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 |
|---|---|---|---|---|---|---|---|
a57a61b8032ca836495826fd25c4e57c6c1cd2dd | fix case where no results returned but expected to be binned | metaseq/filetype_adapters.py | metaseq/filetype_adapters.py | """
This module provides classes that make a file format conform to a uniform API.
These are not generally needed by end-users, rather, they are used internally
by higher-level code like :mod:`metaseq.genomic_signal`.
File-type adapters accept a filename of the appropriate format (which is not
checked) as the only arg... | Python | 0 | @@ -4776,38 +4776,12 @@
os((
-interval.stop - interval.start
+bins
,))%0A
|
b7d65281f83642a5b2563f48a1668fe869529c0b | comment out Sefton election id | polling_stations/apps/data_collection/management/commands/import_sefton.py | polling_stations/apps/data_collection/management/commands/import_sefton.py | from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter
class Command(BaseXpressDemocracyClubCsvImporter):
council_id = 'E08000014'
addresses_name = 'Democracy_Club__04May2017 Sefton.tsv'
stations_name = 'Democracy_Club__04May2017 Sefton.tsv'
elections = [
'mayor.live... | Python | 0 | @@ -348,16 +348,17 @@
+#
'parl.20
|
4d036b2d81a1f2f936e97e4fad132dbe9ef48966 | fix padding used when convolving image to find boundaries | geoblend/coefficient_matrix.py | geoblend/coefficient_matrix.py |
import os
import sys
import pyamg
import numpy as np
from scipy import sparse
from scipy.ndimage import convolve
def boundary_from_mask(mask):
"""
Find the boundary pixels for a given mask. Boundaries lie
outside the data region. This function returns a boundary
image (same shape as mask), where the ... | Python | 0 | @@ -768,24 +768,25 @@
%5B0,
+-
1, 0%5D,%0A
@@ -793,15 +793,16 @@
%5B
+-
1,
--
4,
+-
1%5D,%0A
@@ -813,16 +813,17 @@
%5B0,
+-
1, 0%5D%0A
@@ -1069,21 +1069,48 @@
k, selem
+, mode='constant', cval=0
)%0A
+ #
boundar
@@ -2001,27 +2001,8 @@
sk.%0A
- c%5Bindices%5D = 4%0A
@@ ... |
62a4d7be754ded7368797938b8888aff472584ba | Add special case to find the correct team when searching for 'Anaheim Mighty Ducks' | db/team.py | db/team.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .common import Base, session_scope
from sqlalchemy import and_, or_
from sqlalchemy.sql.expression import func
class Team(Base):
__tablename__ = 'teams'
__autoload__ = True
HUMAN_READABLE = 'team'
def __init__(self, team_data):
self.team_i... | Python | 0.000001 | @@ -1219,16 +1219,107 @@
diens%22%0A%0A
+ if name.lower() == %22anaheim mighty ducks%22:%0A name = %22Anaheim Ducks%22%0A%0A
|
c702a996436988550f6aaef606be6371db17a136 | split context factory into two classes, a new one when opennsa just performs https requests | opennsa/ctxfactory.py | opennsa/ctxfactory.py | """
SSL/TLS context definition.
Most of this code is borrowed from the SGAS 3.X LUTS codebase.
NORDUnet holds the copyright for SGAS 3.X LUTS and OpenNSA.
"""
import os
from OpenSSL import SSL
class ContextFactory:
def __init__(self, private_key_path, public_key_path, certificate_dir, verify=True):
... | Python | 0.00005 | @@ -198,16 +198,23 @@
%0A%0Aclass
+Request
ContextF
@@ -223,201 +223,185 @@
tory
-:%0A%0A def __init__(self, private_key_path, public_key_path, certificate_dir, verify=True):%0A%0A self.private_key_path = private_key_path%0A self.public_key_path = public_key_path
+(object):%0A %22%22%22%0A ... |
4551484f9d56da8f65beb75270c525457dccaf04 | Tweak Change presentation | gerrit_notify/gerrit_notify.py | gerrit_notify/gerrit_notify.py | from requests.auth import HTTPDigestAuth
from os import makedirs
from os.path import expanduser, exists, join
import requests
import json
class BadRequest(Exception): pass
class Change(object):
def __init__(self, json):
self.fields = dict(json)
def __getattr__(self, name):
if name in self.field... | Python | 0 | @@ -251,16 +251,295 @@
(json)%0A%0A
+ def shorten_string(self, s, l=15, reverse=False):%0A cut = %22...%22%0A l = l - len(cut)%0A if len(s) %3E l:%0A if reverse:%0A return cut + s%5Blen(s) - l:%5D%0A else:%0A return s%5B:l%5D + cut%0A e... |
153fa0cb788d687f59b7fea60648cadedb4ef39a | remove redundant quotes for ffmpeg args | opmuse/transcoding.py | opmuse/transcoding.py | import io
import os
import time
import subprocess
import re
import cherrypy
from pydispatch import dispatcher
class FFMPEGTranscoderSubprocessTool(cherrypy.Tool):
"""
This tool makes sure the ffmpeg subprocess is ended
properly when a request is cancelled
"""
def __init__(self):
cherrypy.To... | Python | 0.000007 | @@ -1408,20 +1408,18 @@
'artist=
-%22
%25s
-%22
' %25 arti
@@ -1458,20 +1458,18 @@
'album=
-%22
%25s
-%22
' %25 albu
@@ -1507,20 +1507,18 @@
'title=
-%22
%25s
-%22
' %25 titl
@@ -1562,20 +1562,18 @@
knumber=
-%22
%25s
-%22
' %25 trac
|
2822df8d958c5497e155843585773d043a7c9b61 | Prepare v3.3.19.dev | flexget/_version.py | flexget/_version.py | """
Current FlexGet version.
This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by
release scripts in continuous integration. Should (almost) never be set manually.
The version should always be set to the <next release version>.dev
The jenkins release job wi... | Python | 0.000002 | @@ -442,7 +442,11 @@
.3.1
-8
+9.dev
'%0A
|
20a2c7bcd18cf649c6f1a25f69f3816c421ab6ed | Add message body to the comment | github/events/issue_comment.py | github/events/issue_comment.py | import html
from data_types.issue import Issue
from data_types.issue_comment import IssueComment
from data_types.repository import Repository
from data_types.user import User
from .base import EventBase
class EventIssueComment(EventBase):
def __init__(self, sdk):
super(EventIssueComment, self).__init__(... | Python | 0 | @@ -2278,19 +2278,151 @@
-message +=
+if len(self.comment.body):%0A message += html.escape(self.comment.body) + %22%5Cn%5Cn%22%0A%0A message += %22%3Ca href=%5C%22%7B%7D%5C%22%3Elink%3C/a%3E%22.format(
self
@@ -2438,16 +2438,17 @@
html_url
+)
%0A%0A
|
f10c641074674474ea87bd45e70170e8c4f6ae1f | Prepare v2.0.51.dev | flexget/_version.py | flexget/_version.py | """
Current FlexGet version.
This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by
release scripts in continuous integration. Should (almost) never be set manually.
The version should always be set to the <next release version>.dev
The jenkins release job wi... | Python | 0.000002 | @@ -438,11 +438,15 @@
= '2.0.5
-0
+1.dev
'%0A
|
5aef21759e1202135b7bff656bd2b0b39de0a0c9 | Update doc string to make it explicit that it's salt we're mentioning. | salt/modules/virtualenv_mod.py | salt/modules/virtualenv_mod.py | '''
Create virtualenv environments
'''
# Import python libs
import logging
import warnings
# Import salt libs
import salt.utils
import salt.exceptions
# Import 3rd party libs
try:
import virtualenv
HAS_VIRTUALENV = True
VIRTUALENV_VERSION_INFO = tuple(
[int(i) for i in virtualenv.__version__.spl... | Python | 0 | @@ -1296,18 +1296,18 @@
rtualenv
+.
-(
Deprecat
@@ -1319,15 +1319,72 @@
nce
-0.17.0)
+salt%3E=0.17.0%0A Use %60%60system_site_packages=False%60%60 instead.
%0A
|
07f9a8b95b4a032a620a90f1eca0ae030a8f669b | Update mongo_return.py | salt/returners/mongo_return.py | salt/returners/mongo_return.py | # -*- coding: utf-8 -*-
'''
Return data to a mongodb server
Required python modules: pymongo
This returner will send data from the minions to a MongoDB server. To
configure the settings for your MongoDB server, add the following lines
to the minion config files.
.. code-block:: yaml
mongo.db: <database name>
... | Python | 0.000003 | @@ -3038,27 +3038,22 @@
False)%0A
+%0A
-'''%0A
+#
at some
@@ -3092,16 +3092,18 @@
for %0A
+ #
pymongo
@@ -3142,16 +3142,18 @@
are%0A
+ #
a bunch
@@ -3197,23 +3197,16 @@
pported%0A
- '''
%0A if
@@ -4330,27 +4330,22 @@
%5B'out'%5D%0A
+%0A
-'''%0A
+#
save re
@@ -4404,16 +4404... |
ec1b26a0fa246cc1c89dff3a2cb710c561aac2b6 | Prepare v1.2.476.dev | flexget/_version.py | flexget/_version.py | """
Current FlexGet version.
This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by
release scripts in continuous integration. Should (almost) never be set manually.
The version should always be set to the <next release version>.dev
The jenkins release job wi... | Python | 0.000001 | @@ -443,7 +443,11 @@
2.47
-5
+6.dev
'%0A
|
782c3ebbf0c0028bc212678169accce2e61d572d | Prepare v1.2.493.dev | flexget/_version.py | flexget/_version.py | """
Current FlexGet version.
This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by
release scripts in continuous integration. Should (almost) never be set manually.
The version should always be set to the <next release version>.dev
The jenkins release job wi... | Python | 0.000002 | @@ -439,11 +439,15 @@
'1.2.49
-2
+3.dev
'%0A
|
c3c3110d9491b04e199a73cb5afda8484c92fc64 | Allow overwriting of keys when specified | upload_download_s3.py | upload_download_s3.py | # License under the MIT License - see LICENSE
from boto.s3.connection import S3Connection
from boto.s3.key import Key
import os
import math
from utils import timestring
try:
from filechunkio import FileChunkIO
NO_CHUNKIO_FLAG = False
except ImportError:
NO_CHUNKIO_FLAG = True
Warning("The filechunkio... | Python | 0.000001 | @@ -562,32 +562,47 @@
aws_access=%7B%7D
+, replace=False
):%0A '''%0A U
@@ -2793,32 +2793,87 @@
t, full_key_name
+,%0A replace=replace
)%0A elif os.pa
@@ -2951,24 +2951,41 @@
et, key_name
+, replace=replace
)%0A else:%0A
@@ -3228,16 +3228,31 @@
52428800
+, repl... |
6a7212a8e925d0721497558394e8e25876519320 | Use LOG_FILE_PATH setting instead of literal strings. | VilfredoReloadedCore/__init__.py | VilfredoReloadedCore/__init__.py | # -*- coding: utf-8 -*-
#
# This file is part of VilfredoReloadedCore.
#
# Copyright © 2009-2013 Pietro Speroni di Fenizio / Derek Paterson.
#
# VilfredoReloadedCore 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 ... | Python | 0 | @@ -1481,16 +1481,26 @@
ame__)%0A%0A
+import os%0A
%0A# The _
@@ -2571,153 +2571,8 @@
ig%0A%0A
-# Set logging%0Aimport os%0Abasedir = os.path.abspath(os.path.dirname(__file__))%0Aconfig_file = os.path.join(basedir, app.config%5B'LOG_CONFIG_FILE'%5D)%0A%0A
# Pa
@@ -2642,33 +2642,43 @@
.isfile(
-'/var/tmp/vr.log'
+a... |
d8b7239d01f99b3d5e39e76da27574f728394f00 | Include yes_private and filter private patients | custom/enikshay/management/commands/run_diagnosis_test_migration.py | custom/enikshay/management/commands/run_diagnosis_test_migration.py | from __future__ import absolute_import, print_function
import csv
import datetime
from django.core.management import BaseCommand
from casexml.apps.case.mock import CaseFactory
from corehq.form_processor.interfaces.dbaccessors import CaseAccessors
from custom.enikshay.case_utils import get_occurrence_case_from_episod... | Python | 0.000002 | @@ -314,17 +314,101 @@
_episode
+, get_person_case_from_episode%0Afrom custom.enikshay.const import ENROLLED_IN_PRIVATE
%0A
-
from cus
@@ -2162,32 +2162,49 @@
ld_migrate_case(
+episode_case_id,
case_properties)
@@ -2194,32 +2194,40 @@
case_properties
+, domain
):%0A
@@ -3221,24 +3221,33 @@
igrate... |
c5eb43fe924314ea2eeb2d37934f5eda15526f5e | fix TypeError when there's no args | urllib3/connection.py | urllib3/connection.py | # urllib3/connection.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import sys
import socket
from socket import timeout as SocketTimeout
try: # Python 3
fr... | Python | 0.000005 | @@ -3673,20 +3673,18 @@
nn_kw =
-None
+%7B%7D
%0A%0A de
|
e75ea01cdcbc283f26799fd8a9690b8fa28f2fe1 | Fix linter issues | juju/charmhub.py | juju/charmhub.py | from .client import client
from .errors import JujuError
class CharmHub:
def __init__(self, model):
self.model = model
async def info(self, name, channel=None):
"""info displays detailed information about a CharmHub charm. The charm
can be specified by the exact name.
Channel... | Python | 0.000001 | @@ -775,27 +775,25 @@
hannel=None,
- %0A
+%0A
@@ -851,11 +851,9 @@
one,
- %0A
+%0A
@@ -1275,16 +1275,37 @@
hannel,%0A
+
@@ -1368,16 +1368,37 @@
lisher,%0A
+
|
fddc7e09bcebf9b4875906ad03e58699237b13be | Enable filtering OpenStack package by tenant. | src/nodeconductor_assembly_waldur/packages/filters.py | src/nodeconductor_assembly_waldur/packages/filters.py | import django_filters
from nodeconductor.core.filters import UUIDFilter
from . import models
class PackageTemplateFilter(django_filters.FilterSet):
name = django_filters.CharFilter(lookup_type='icontains')
settings_uuid = UUIDFilter(name='service_settings__uuid')
class Meta(object):
model = mod... | Python | 0 | @@ -576,16 +576,22 @@
customer
+__uuid
')%0A p
@@ -653,16 +653,67 @@
_project
+__uuid')%0A tenant = UUIDFilter(name='tenant__uuid
')%0A%0A
@@ -772,16 +772,16 @@
Package%0A
-
@@ -819,10 +819,20 @@
project'
+, 'tenant'
)%0A
|
cde7f203aa9c322b17868e6a06c51f527d3f4ed9 | remove unused function | kuyruk/config.py | kuyruk/config.py | import os
import sys
import ast
import types
import logging
import pkg_resources
from kuyruk import importer
import kuyruk # required for references in docs
logger = logging.getLogger(__name__)
class Config(object):
"""Kuyruk configuration object. Default values are defined as
class attributes. Additional... | Python | 0.000016 | @@ -1821,23 +1821,16 @@
e(self,
-module_
name):%0A
@@ -1854,23 +1854,16 @@
nstance(
-module_
name, st
@@ -1934,23 +1934,16 @@
_module(
-module_
name)%0A
@@ -2189,15 +2189,8 @@
s%22,
-module_
name
@@ -3109,389 +3109,8 @@
-self._eval_item(key, value)%0A%0A def from_cmd_args(self, args):%0A %2... |
ca838d2353f0688ed5076f5fc059e429525c9cc0 | make archive slug a separate function | lacli/archive.py | lacli/archive.py | import os
import re
import hashlib
from unidecode import unidecode
from datetime import date
from tempfile import NamedTemporaryFile
from lacli.adf import Auth
from lacli.crypt import CryptIO
from lacli.cipher import get_cipher
from shutil import copyfileobj
from zipfile import ZipFile, ZIP_DEFLATED
_slugify_strip_r... | Python | 0.00001 | @@ -791,24 +791,156 @@
.lower())%0A%0A%0A
+def archive_slug(archive):%0A return %22%7B%7D-%7B%7D%22.format(date.today().isoformat(),%0A _slugify(archive.title))%0A%0A%0A
def restore_
@@ -1466,91 +1466,28 @@
e =
-%22%7B%7D-%7B%7D%22.format(date.today().isoformat(),%0A ... |
908fac99182d5a50d6314fd808460f63324391de | Use ladder id for stats key for sort ordering | ladder/models.py | ladder/models.py | import operator
from django.db import models
class Season(models.Model):
name = models.CharField(max_length=150)
start_date = models.DateField('Start date')
end_date = models.DateField('End date')
season_round = models.IntegerField(max_length=1)
def __unicode__(self):
return str(self.star... | Python | 0 | @@ -1368,24 +1368,18 @@
%5Bladder.
+i
d
-ivision
%5D = ladd
|
e6c9b21d443a4cf63c3a5219fb63064623e10109 | Add environment variables as third config layer | lander/config.py | lander/config.py | """Configuration facilities.
"""
import json
import sys
import os
from collections import ChainMap
from metaget.tex.lsstdoc import LsstDoc
import structlog
class Configuration(object):
"""lander configuration container and validator.
Parameters
----------
args : `argparse.Namespace`
An argum... | Python | 0 | @@ -995,113 +995,209 @@
ons
-are merged in a ChainMap. Priority is for computed%0A # configurations. Then values fdirectly from c
+from environment variables%0A self._envvars = self._get_environment_variables()%0A%0A # Configurations are merged in a ChainMap. Priority is%0A # 1. Computed c... |
f5d4f543cc7265433bf6040335b2f6d592b52b91 | Add import os in lmod to fix regression | lmod/__init__.py | lmod/__init__.py | from functools import partial
from os import environ
from subprocess import Popen, PIPE
LMOD_SYSTEM_NAME = environ.get('LMOD_SYSTEM_NAME', '')
def module(command, *args):
cmd = (environ['LMOD_CMD'], 'python', '--terse', command)
result = Popen(cmd + args, stdout=PIPE, stderr=PIPE)
if command in ('load', ... | Python | 0 | @@ -1,12 +1,68 @@
+import os # require by lmod output evaluated by exec()%0A%0A
from functoo
|
0deaf3b981b6ded8de3ef09a454861a409e6670e | remove gunicron | mail/settings.py | mail/settings.py | # Django settings for mail project.
import os
import sys
from os.path import expanduser
try:
sys.path.append(expanduser("~/.python"))
from env import DEBUG
from env import *
except ImportError:
pass
STATIC_URL = '/mail/static/'
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@... | Python | 0.999783 | @@ -3589,24 +3589,8 @@
s',%0A
- 'gunicorn',%0A
@@ -3594,16 +3594,17 @@
'app'
+,
%0A)%0A%0AANON
|
26a248fa78576e45f5c2aa67d8715a2f9715f420 | Rename variable to make upcoming change explain itself | mailer/engine.py | mailer/engine.py | from __future__ import unicode_literals
import time
import smtplib
import logging
import lockfile
from socket import error as socket_error
from django.conf import settings
from django.core.mail import get_connection
from django.core.mail.message import make_msgid
from mailer.models import (
Message, MessageLog,... | Python | 0 | @@ -4004,29 +4004,36 @@
el.%0A
-EMAIL_BACKEND
+mailer_email_backend
= getat
@@ -4465,29 +4465,36 @@
backend=
-EMAIL_BACKEND
+mailer_email_backend
)%0A
|
f10cf73055f6d18b8c58cdf8a56113fa10712b96 | add standalone functionality to list and delete messages | message_store.py | message_store.py | from tinydb import TinyDB, Query
from tinydb.operations import increment
import time
from threading import RLock
from argparse import ArgumentParser
from settings import DEFAULT_DIR, DATABASE_FN
from utils import log, hash_string
class MessageStore():
def __init__(self, size_threshold=None):
self.size_th... | Python | 0 | @@ -143,16 +143,17 @@
Parser%0A%0A
+%0A
from set
@@ -1353,16 +1353,186 @@
else:%0A
+ deleted = res%5B0%5D%5B'deleted'%5D%0A if deleted:%0A log(%22Received deleted message: %7B%7D%22.format(message))%0A else:%0A
@@ -1591,32 +1591,36 @@
a... |
a86d3f357f83f30882fd9bb3fe5c0d1b91cf3b7c | Make download function return list of successfully downloaded files. | fedimg/downloader.py | fedimg/downloader.py | #!/bin/env python
# -*- coding: utf8 -*-
import os
import subprocess
import sys
import urllib2
import fedimg
import fedimg.messenger
from fedmsg.util import compress
def download(urls):
""" Downloads files from a list of URLs with a progress bar and
stores them locally. """
# Create the proper local u... | Python | 0 | @@ -276,16 +276,56 @@
locally.
+ Returns a list of local file locations.
%22%22%22%0A%0A
@@ -582,24 +582,105 @@
NLOAD_DIR)%0A%0A
+ local_files = list() # If a file finishes downloading, it is appended here%0A%0A
for url
@@ -1438,36 +1438,222 @@
-try:
+# Add finished download path to li... |
6aadb1eae7d0a69556fb84a7404d59edd416d55c | Add logout confirmation message | passwordless/views.py | passwordless/views.py | from django.core.exceptions import ObjectDoesNotExist
from django.contrib.auth import authenticate,login,logout
from django.contrib import messages
from django.shortcuts import render,redirect
from django.views import View
from django.views.generic.edit import FormView
from . import forms
from . import models
# Crea... | Python | 0.000001 | @@ -1482,16 +1482,88 @@
equest)%0A
+ messages.success(request, 'You are now logged out of the site')%0A
|
8c5935a369190d5e712f7337c72d898caef4cee2 | Fix value error when unpacking betclic lines that have no odds | external/odds/betclic/api.py | external/odds/betclic/api.py | import bs4
import requests
from collections import namedtuple
from memoize import memoize
import contextlib
from external.odds.betclic import TEAM_MAP
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
BETCLIC_L1_URL = 'https://ww... | Python | 0.000005 | @@ -2193,16 +2193,33 @@
in raw:%0A
+ try:%0A
@@ -2261,24 +2261,28 @@
ine%0A
+
team_a = con
@@ -2308,24 +2308,28 @@
_a)%0A
+
+
team_b = con
@@ -2355,24 +2355,28 @@
_b)%0A
+
+
odds%5B(team_a
@@ -2409,16 +2409,123 @@
w, lose)
+%0A except ValueError:%0... |
585e4fafaf407b15d6a7862044dec455d2a74683 | Delete duplicated constant (#3190) | google/cloud/vision/feature.py | google/cloud/vision/feature.py | # Copyright 2016 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.000003 | @@ -975,24 +975,64 @@
PROPERTIES'%0A
+ LABEL_DETECTION = 'LABEL_DETECTION'%0A
LANDMARK
@@ -1107,86 +1107,8 @@
ON'%0A
- LABEL_DETECTION = 'LABEL_DETECTION'%0A TEXT_DETECTION = 'TEXT_DETECTION'%0A
@@ -1163,44 +1163,40 @@
-IMAGE_PROPERTIES = 'IMAGE_PROPERTIES
+TEXT_DETECTION = 'TEXT_DETECTION
... |
c3e9be243f1da9c253302ee4eb8549d8d1b00f69 | Update __init__.py | filetype/__init__.py | filetype/__init__.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from .filetype import * # noqa
from .helpers import * # noqa
from .match import * # noqa
# Current package semver version
__version__ = version = '1.1.0'
| Python | 0.000072 | @@ -211,13 +211,13 @@
on = '1.
-1
+2
.0'%0A
|
4794e23607ff0fb18353270e3e5f7090c331a90c | Fix missing import | partypi/utils/tweeter.py | partypi/utils/tweeter.py | import tweepy
def twitter_api():
consumer_key = None
consumer_secret = None
access_token = None
access_token_secret = None
try:
from credentials import (
consumer_key,
consumer_secret,
access_token,
access_token_secret
)
except:
try:
... | Python | 0.999463 | @@ -1,12 +1,22 @@
+import os%0A
import tweep
|
b74b8810fc257969713a7eaffc1a2ea430f2063b | Indent fixes | folder-indicator.py | folder-indicator.py | #!/usr/bin/env python
import sys
import gtk
import appindicator
import os
import threading
import time
from subprocess import call
from os import walk
from os import listdir
from os.path import isfile, isdir, join
from Crypto.Random import random
from xml.dom.minidom import parse
import xml.dom.minidom
import gob... | Python | 0 | @@ -2972,18 +2972,16 @@
idget):%0A
-%09%0A
%09%09path =
@@ -3547,17 +3547,16 @@
f, sub)%0A
-%0A
%09%0A%09def i
|
5d7f2f84600abcede94a0aaee087ef299cf740a6 | Add filter on the town field on the Farmer model | farmers_api/farmers/views.py | farmers_api/farmers/views.py | from rest_framework import viewsets
from .models import Farmer
from .serializers import FarmerSerializer
class FarmerViewSet(viewsets.ReadOnlyModelViewSet):
queryset = Farmer.objects.all()
serializer_class = FarmerSerializer
| Python | 0 | @@ -213,24 +213,54 @@
lass = FarmerSerializer%0A
+ filter_fields = ('town',)%0A
|
74b14948eb9040022989028a23965dd3c0a40d18 | Removing redundant parenthesis | vyked/model.py | vyked/model.py | class Entity():
"""
objects which are defined by their identity
"""
def __init__(self, id):
self._id = id
@property
def id(self):
return self._id
class Value():
"""
describe a property of a thing, and they don’t have their own identity or lifecycle
"""
@staticm... | Python | 0.999219 | @@ -5,20 +5,18 @@
s Entity
-()
:%0A
+
%22%22%22%0A
@@ -191,18 +191,16 @@
ss Value
-()
:%0A %22%22
@@ -378,18 +378,16 @@
ggregate
-()
:%0A %22%22
@@ -460,24 +460,24 @@
%0A pass%0A%0A%0A
+
class Factor
@@ -473,26 +473,24 @@
lass Factory
-()
:%0A %22%22%22%0A
|
b07e34bd35b6e0c4fe2505ec10e082fe751d2a2b | update training form | formlibrary/test.py | formlibrary/test.py | from django.test import TestCase
from workflow.models import WorkflowLevel1, Country, Province, WorkflowLevel2, Sector, ProjectType, SiteProfile, Office
from formlibrary.models import TrainingAttendance, Distribution, Beneficiary
from datetime import datetime
class TrainingAttendanceTestCase(TestCase):
def setUp... | Python | 0 | @@ -3589,99 +3589,8 @@
ce,%0A
- distribution_indicator = %2234%22,%0A
|
833ed3352c2e40923c167ddb41edba17db292bb7 | Allow mongo returner to update a password protected mongo database. | salt/returners/mongo_return.py | salt/returners/mongo_return.py | '''
Return data to a mongodb server
This is the default interface for returning data for the butter statd subsytem
'''
import logging
import pymongo
log = logging.getLogger(__name__)
__opts__ = {
'mongo.host': 'salt',
'mongo.port': 27017,
'mongo.db': 'salt',
}
def ret... | Python | 0 | @@ -284,32 +284,96 @@
go.db': 'salt',%0A
+ 'mongo.user': '',%0A 'mongo.password': '',%0A
%7D%0A%0Ade
@@ -590,24 +590,176 @@
mongo.db'%5D%5D%0A
+%0A user = __opts__.get('mongo.user')%0A password = __opts__.get('mongo.password')%0A if user and password:%0A db.authentica... |
3e3e146c2517ae934863fbcc797f417e5c4b0d9d | Add XATTR to both immutable and mutable data sets | perfrunner/tests/n1ql.py | perfrunner/tests/n1ql.py | from perfrunner.helpers.cbmonitor import timeit, with_stats
from perfrunner.helpers.misc import target_hash
from perfrunner.tests import PerfTest, TargetIterator
class N1QLTest(PerfTest):
COLLECTORS = {
'iostat': False,
'memory': False,
'n1ql_latency': True,
'n1ql_stats': True,
... | Python | 0 | @@ -6065,32 +6065,61 @@
config, 'n1ql')%0A
+ super().xattr_load()%0A
super().
|
0c1c2fd453ea55ee87d0d0f259a19d7d7dd47a63 | Rename data_checksums keyword to checksums | salt/states/postgres_initdb.py | salt/states/postgres_initdb.py | # -*- coding: utf-8 -*-
"""
Initialization of PostgreSQL data directory
===========================================
The postgres_initdb module is used to initialize the postgresql
data directory.
.. versionadded:: 2016.3.0
.. code-block:: yaml
pgsql-data-dir:
postgres_initdb.present:
- name: /var/... | Python | 0.000065 | @@ -499,13 +499,8 @@
-
-data_
chec
|
4fbac792b89102caa5414db18d1ec39d1ef75a98 | Fix One-eyed Cheat | fireplace/cards/gvg/rogue.py | fireplace/cards/gvg/rogue.py | from ..utils import *
##
# Minions
# Goblin Auto-Barber
class GVG_023:
action = buffWeapon("GVG_023a")
# One-eyed Cheat
class GVG_025:
def OWN_MINION_SUMMON(self, player, minion):
if minion.race == Race.PIRATE and minion != self:
self.stealth = True
# Iron Sensei
class GVG_027:
def OWN_TURN_END(self):
... | Python | 0 | @@ -162,24 +162,16 @@
ON(self,
- player,
minion)
|
7837ef57c5dcdddc16ad353fa0c992c4403e22dd | change default model for compilation | Utils/py/BallDetection/RegressionNetwork/devil_code_generator1/compile.py | Utils/py/BallDetection/RegressionNetwork/devil_code_generator1/compile.py | #!/usr/bin/env python3
import argparse
import pickle
from pathlib import Path
from tensorflow.keras.models import load_model
from onbcg import keras_compile # can throw linter warnings, but python3 can handle imports like that
DATA_DIR = Path(Path(__file__).parent.parent.absolute() / "data").resolve()
CPP_DIR = P... | Python | 0 | @@ -984,16 +984,21 @@
s fy1500
+_conf
.h5.',%0A
@@ -1051,16 +1051,21 @@
'fy1500
+_conf
.h5'))%0A
|
015366647a97629321f1cacc401a41d25a10c968 | fix - schema for ArticleContent | flickipedia/config/schema.py | flickipedia/config/schema.py | """
Ryan Faulkner, 2014
Schema definitions for sqlalchemy
"""
from sqlalchemy import Column, Integer, String, BigInteger, Text
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class User(Base):
""" Elements for Flickipedia users """
__tablename__ = 'Users'
_id = Colum... | Python | 0 | @@ -1861,16 +1861,17 @@
Content(
+a
id='%25s',
@@ -1871,19 +1871,22 @@
d='%25s',
-aid
+markup
='%25s')%3E%22
@@ -1907,17 +1907,17 @@
self.
-_
+a
id, self
@@ -1917,19 +1917,22 @@
d, self.
-aid
+markup
)%0A%0Aclass
|
0125a143ec7ca36e25f97822f31f7c5b3640391b | fix return value | framework/addons/__init__.py | framework/addons/__init__.py | """
"""
from framework import StoredObject
from website import settings
class AddonModelMixin(StoredObject):
_meta = {
'abstract': True,
}
def get_addons(self):
addons = []
for addon_name in settings.ADDONS_AVAILABLE_DICT.keys():
addon = self.get_addon(addon_name)
... | Python | 0.000058 | @@ -574,17 +574,16 @@
onfig):%0A
-%0A
@@ -1260,36 +1260,35 @@
%0A return
-Fals
+Non
e%0A%0A def has_a
|
bb4e4d42882672080629f6ee6202ee2700c1c805 | Order of operations matters. | fmn/rules/generic.py | fmn/rules/generic.py | # Generic rules for FMN
import fedmsg
import fedmsg.encoding
import fmn.rules.utils
from fmn.lib.hinting import hint
import logging
log = logging.getLogger('fedmsg')
try:
import re2 as re
re.set_fallback_notification(re.FALLBACK_WARNING)
except ImportError:
log.warning("Couldn't import the 're2' module... | Python | 0.00024 | @@ -1157,16 +1157,17 @@
snick =
+(
fasnick
@@ -1167,24 +1167,25 @@
asnick or %5B%5D
+)
and fasnick
|
bf111c8c597a67b0a83d7ff07b8a35b228b36761 | 'Raw' component is a red herring | Sketches/MPS/Examples/OneShot_Race.py | Sketches/MPS/Examples/OneShot_Race.py | #!/usr/bin/python
import time
import socket
import Axon
from Kamaelia.Chassis.ConnectedServer import ServerCore
from Kamaelia.Chassis.Pipeline import Pipeline
from Kamaelia.Util.OneShot import OneShot
from Kamaelia.Util.Console import *
from Kamaelia.Chassis.Seq import Seq
from Kamaelia.Internet.TCPClient import TCPC... | Python | 0.999973 | @@ -1621,24 +1621,8 @@
5),%0A
- Raw(),%0A#
|
1b09c0ac64c118a9c68bd6cda271351b6e8a166b | Handle no data retCode | SnsManager/twitter/TwitterExporter.py | SnsManager/twitter/TwitterExporter.py | import tweepy
from TwitterBase import TwitterBase
from SnsManager import ErrorCode, IExporter
class TwitterExporter(TwitterBase, IExporter):
def __init__(self, *args, **kwargs):
super(TwitterExporter, self).__init__(*args, **kwargs)
self.verbose = kwargs['verbose'] if 'verbose' in kwargs else Fals... | Python | 0.000046 | @@ -2720,16 +2720,121 @@
data'%5D)%0A
+ if retDict%5B'count'%5D == 0:%0A retDict%5B'retCode'%5D = ErrorCode.E_NO_DATA%0A else:%0A
|
469cd8ad380fa5fb8dad8b0548dbedf490cb7512 | Remove cursor | modules/dashboard_display.py | modules/dashboard_display.py | import sys
sys.path.append('../')
import lcm
from exlcm import eng_status_t
from exlcm import net_status_t
from exlcm import mode_control_t
from kivy.config import Config
Config.set('graphics', 'fullscreen', 1)
Config.set('graphics', 'borderless', 1)
Config.set('graphics', 'height', 480)
Config.set('graphics', 'widt... | Python | 0.000004 | @@ -167,16 +167,57 @@
Config%0A%0A
+Config.set('graphics', 'show_cursor', 0)%0A
Config.s
|
cf87421b510c8e0b72a6bb5932495b0922de6f69 | Fix mistral client | st2actionrunner/st2actionrunner/runners/mistral.py | st2actionrunner/st2actionrunner/runners/mistral.py | import uuid
from oslo.config import cfg
from mistralclient.api import client as mistral
from st2common.models.api.action import ACTIONEXEC_STATUS_RUNNING
from st2actionrunner.runners import ActionRunner
from st2common import log as logging
LOG = logging.getLogger(__name__)
def get_runner():
return MistralRunn... | Python | 0 | @@ -637,17 +637,17 @@
mistral.
-C
+c
lient(mi
|
1c2c81fb16cc02411fdf726bf76b24bd6a2e8c9d | Make ctypes-python tests pass regardless of timezone. | subversion/bindings/ctypes-python/test/svntypes.py | subversion/bindings/ctypes-python/test/svntypes.py | #!/usr/bin/env python
# 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... | Python | 0.002728 | @@ -1452,50 +1452,91 @@
sert
-Equal(s1%5B:27%5D, '1999-12-31 23:59:59 +0000
+RegexpMatches(s1%5B:27%5D,%0A '%5Cd%7B4%7D-%5Cd%7B2%7D-%5Cd%7B2%7D %5Cd%7B2%7D:%5Cd%7B2%7D:%5Cd%7B2%7D %5B+-%5D%5Cd%7B4%7D %5C
(')%0A
|
de44e4b94233fcb9fdc0f757d70fab2e901221f6 | extend ERROR_OUTPUT_STRINGS to support address field | haproxyadmin/command_status.py | haproxyadmin/command_status.py | # -*- coding: utf-8 -*-
# vim:fenc=utf-8
"""
haproxyadmin.command_status.py
~~~~~~~~~~~~~~~~~~~
This module categorizes the output returned by various commands
"""
# CLI doesn't return a message if operation is successfully executed.
# But, versions prior 1.5.10 was returning 'Done.' message only for ACL/MAPs
# oper... | Python | 0.000004 | @@ -3692,20 +3692,17 @@
'state'
- and
+,
'weight
@@ -3702,16 +3702,27 @@
'weight'
+ add 'addr'
.%22,%0A
|
3ecaba99ab8d0ff138dfa8a158ce8d7733eb8d4d | Update import error messages | src/ggrc/converters/handlers/template.py | src/ggrc/converters/handlers/template.py | # Copyright (C) 2016 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Handlers specific for Assessment templates."""
import re
from sqlalchemy import and_
from ggrc import db
from ggrc import converters
from ggrc.models import CustomAttributeDefinition as CAD
from ggrc.c... | Python | 0 | @@ -348,16 +348,51 @@
andlers%0A
+from ggrc.converters import errors%0A
%0A%0Aclass
@@ -739,38 +739,63 @@
ror(
-%22invalid template object type%22
+errors.WRONG_VALUE_ERROR, column_name=self.display_name
)%0A
|
d8046ebe1974778149bb37ca710df63a1116c115 | Bump prerelease (4.0.1-a1) [ci skip] | ftpsync/__init__.py | ftpsync/__init__.py | # -*- coding: utf-8 -*-
# Make version accessible as 'ftpsync.__version__'
# from ftpsync._version import __version__
"""
Package version number.
See https://www.python.org/dev/peps/pep-0440
Examples
Pre-releases (alpha, beta, release candidate):
'3.0.0a1', '3.0.0b1', '3.0.0rc1'
Final release:
... | Python | 0 | @@ -439,11 +439,14 @@
= %224.0.
-0
+1-a1
%22%0A
|
d4e03bfcbc6292d3a50237f95c9d67ba5d89a475 | Use usubscribe rather than popping the broadcaster | swampdragon/pubsub_providers/redis_sub_provider.py | swampdragon/pubsub_providers/redis_sub_provider.py | import json
import tornadoredis.pubsub
import tornadoredis
from .base_provider import BaseProvider
class RedisSubProvider(BaseProvider):
def __init__(self):
self._subscriber = tornadoredis.pubsub.SockJSSubscriber(tornadoredis.Client())
def close(self, broadcaster):
for channel in self._subscr... | Python | 0 | @@ -425,32 +425,34 @@
elf._subscriber.
+un
subscribers%5Bchan
@@ -444,32 +444,26 @@
ubscribe
-rs%5B
+(
channel
-%5D.pop(
+,
broadcas
|
3bf91964ccb30625cf86c48c8cc294c1aaa04f15 | Use pygst.require | mopidy/backends/gstreamer.py | mopidy/backends/gstreamer.py | import gobject
gobject.threads_init()
# FIXME make sure we don't get hit by
# http://jameswestby.net/weblog/tech/14-caution-python-multiprocessing-and-glib-dont-mix.html
import gst
import logging
import threading
from mopidy.backends import (BaseBackend,
BasePlaybackController,
... | Python | 0.000001 | @@ -164,16 +164,52 @@
x.html%0A%0A
+import pygst%0Apygst.require('0.10')%0A%0A
import g
|
003089545b47e3fea262d334af94d9e592ec6852 | update overall styles | gem/settings/dev.py | gem/settings/dev.py | from .base import * # noqa
ALLOWED_HOSTS = [
'localhost',
'.localhost',
'127.0.0.1',
'172.30.1.238'
]
DEBUG = True
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
try:
from .local import * # noqa
except ImportError:
pass
try:
from secrets import * # noqa
except Imp... | Python | 0 | @@ -95,28 +95,8 @@
0.1'
-,%0A '172.30.1.238'
%0A%5D%0A%0A
|
5b88cba10cade5b1c289808f01ca280d150c343d | print statistics for deltas betweeen values in generated chroma table | gen_chroma_table.py | gen_chroma_table.py |
"""
Generate a 2D lookup table for hue & lightness vs. chroma
"""
import os
import sys
import argparse
import numpy as np
import nphusl
import husl
parser = argparse.ArgumentParser()
parser.add_argument("-s", "--table-size", default=256, type=int)
parser.add_argument("-o", "--output-file-prefix", default=None)
pars... | Python | 0 | @@ -1814,39 +1814,26 @@
t h_idx_step
-_%7B%7D;%22.format(i)
+;%22
, file=out_h
@@ -1874,17 +1874,68 @@
idx_step
-_
+;%22, file=out_h)%0Aprint(%22const c_table_t h_idx_step =
%7B%7D;%22.for
@@ -1938,17 +1938,26 @@
.format(
-i
+h_idx_step
), file=
@@ -1952,33 +1952,33 @@
step), file=out_
-h
+c
)%0Aprint(%22const... |
bc6a98eba6c2c5a8af654c8c489195a549dd18fa | Add option to only generate kv or pigtail components | generate-compose.py | generate-compose.py | import yaml
from collections import OrderedDict
from sys import argv
compose = OrderedDict()
compose["version"] = "2"
compose["services"] = OrderedDict()
def extend(od, kind):
od["extends"] = OrderedDict()
od["extends"]["file"] = "common.yml"
od["extends"]["service"] = kind
def postgres(index, additional... | Python | 0 | @@ -45,17 +45,8 @@
ict%0A
-from sys
impo
@@ -51,17 +51,21 @@
port arg
-v
+parse
%0A%0Acompos
@@ -1484,16 +1484,228 @@
rn ret%0A%0A
+parser = argparse.ArgumentParser()%0Aparser.add_argument('--component', action='append', default=%5B%5D, dest=%22components%22, choices=%5B%22kv%22, %22pigtail%22%5D)%0Aparser.add_ar... |
a32c0f63e2652d9629d2a90d3528398e95f57130 | Update variograms.py | geostatsmodels/variograms.py | geostatsmodels/variograms.py | #!/usr/bin/env python
import numpy as np
import utilities
def lagindices( pwdist, lag, tol ):
'''
Input: (pwdist) square NumPy array of pairwise distances
(lag) the distance, h, between points
(tol) the tolerance we are comfortable with around (lag)
Output: (ind) list ... | Python | 0 | @@ -1537,75 +1537,8 @@
'''%0A
- if pwdist == None:%0A pwdist = utilities.pairwise( data )%0A
|
6dc8279aeeb79bc756e073ec25bdbca93b2e452a | Fix tfb.Permute under jax.jit. | tensorflow_probability/python/bijectors/permute.py | tensorflow_probability/python/bijectors/permute.py | # Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | Python | 0 | @@ -3314,16 +3314,27 @@
_tensor(
+%0A
axis, na
@@ -3342,16 +3342,38 @@
e='axis'
+, as_shape_tensor=True
)%0A
|
f4d57cbc5cf27759d8ad4c529aa49a0fc6ec08fd | Mark pending range as resource intensive (#1246) | pending_range_test.py | pending_range_test.py | from cassandra.query import SimpleStatement
from dtest import TRACE, Tester, debug
from tools import no_vnodes, known_failure
@no_vnodes()
class TestPendingRangeMovements(Tester):
@known_failure(failure_source='test',
jira_url='https://issues.apache.org/jira/browse/CASSANDRA-12468',
... | Python | 0 | @@ -36,16 +36,53 @@
tatement
+%0Afrom nose.plugins.attrib import attr
%0A%0Afrom d
@@ -145,23 +145,8 @@
odes
-, known_failure
%0A%0A%0A@
@@ -208,159 +208,33 @@
@
-known_failure(failu
+attr('
re
-_
source
-='test',%0A jira_url='https://issues.apache.org/jira/browse/CASSANDRA-12468',%0A ... |
72a6a39489a666eaf7bd6928f50a5cd0d2854053 | Use cls instead of self in classmethod | tempest/api/identity/admin/v3/test_endpoint_groups.py | tempest/api/identity/admin/v3/test_endpoint_groups.py | # Copyright 2017 AT&T Corporation.
# 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 require... | Python | 0.000126 | @@ -1934,20 +1934,19 @@
service(
-self
+cls
):%0A
@@ -2124,36 +2124,35 @@
= (%0A
-self
+cls
.services_client
@@ -2227,17 +2227,16 @@
-
type=s_t
@@ -2240,17 +2240,16 @@
s_type,%0A
-
@@ -2375,20 +2375,19 @@
-self
+cls
.service
|
22761fa04ca2a93a2c11103fb8f8fca3a51c8626 | Call .save() on database model tests to trigger any DB-level constraints | launch_control/dashboard_app/tests.py | launch_control/dashboard_app/tests.py | """
Unit tests of the Dashboard application
"""
from django.contrib.contenttypes import generic
from django.db import IntegrityError
from django.test import TestCase
from launch_control.utils.call_helper import ObjectFactoryMixIn
from launch_control.dashboard_app.models import (
HardwareDevice,
Softwa... | Python | 0 | @@ -597,32 +597,58 @@
oftwarePackage)%0A
+ sw_package.save()%0A
self.ass
@@ -1216,32 +1216,57 @@
HardwareDevice)%0A
+ hw_device.save()%0A
self.ass
|
0d1d9b9154fd65c44b1b66fb31a8d87327ac8a03 | Drop pypandoc download feature | src/lander/ext/parser/pandoc/_convert.py | src/lander/ext/parser/pandoc/_convert.py | """Pandoc-based markup conversion APIs."""
from __future__ import annotations
import functools
import logging
from typing import Any, Callable, List, Optional, TypeVar
import pypandoc
__all__ = ["convert_text", "ensure_pandoc"]
F = TypeVar("F", bound=Callable[..., Any])
def ensure_pandoc(func: F) -> Callable[...... | Python | 0 | @@ -751,28 +751,10 @@
e =
-(%0A %22p
+%22P
ando
@@ -785,531 +785,44 @@
und.
- Lander is installing it %22%0A %22for you.%22%0A )%0A logger.warning(message)%0A%0A # This version of pandoc is known to be compatible with both%0A # pypandoc.downl... |
164dbc588467074e7e9640e63601de44923c40c9 | add to simplewallet tests | test-wallet.py | test-wallet.py | import pymonero
import sys
# Initialize 2 simple wallets, one not connected, and one connected
user_host = 'http://localhost'
user_port = ['18083', '18082']
walletID = []
simplewallet = []
for i in range(0, len(user_port)):
walletID.append(pymonero.connections.Wallet(user_host, user_port[i]))
simplewallet.appe... | Python | 0 | @@ -113,17 +113,17 @@
p://
-localhost
+127.0.0.1
'%0Aus
@@ -142,19 +142,92 @@
1808
-3', '18082'
+2'%5D%0Awallet_file = %5B%22/absolute/path/to/wallet_file%22%5D%0Awallet_pass = %5B%22wallet_password%22
%5D%0Awa
@@ -487,24 +487,305 @@
ort)):%0A %0A
+ # Stop wallet if currently running%0A stop_wallet, err =... |
d30246565a75cd6e5e1c368cac74b1a86f365090 | remove testing edits | web_version.py | web_version.py | ######################################
# File Name : web_version.py
# Author : Daniel Cuneo
# Creation Date : 11-21-2015
######################################
import pandas as pd
from flask import Flask
from flask import request, render_template
import indeed_scrape
import jinja2
from bokeh.embed import components
fro... | Python | 0.000001 | @@ -1712,17 +1712,16 @@
():%0A
-#
kws = re
@@ -1741,17 +1741,16 @@
w'%5D%0A
-#
zips = r
@@ -1777,51 +1777,8 @@
s'%5D%0A
- kws= %22data science%22%0A zips = %22%5E(94)%22%0A
|
bea5ea8c4bc2b4342adb199d6b7e9012476030a2 | implement multimethod for backup backend | src/backend.py | src/backend.py | from multipledispatch import dispatch
from pymongo.mongo_client import MongoClient
from io import TextIOBase
@dispatch(TextIOBase)
def close(f):
##############################################################################
def get_db(uri, connections):
"""
Retrieves database from connection string. The co... | Python | 0 | @@ -1,12 +1,35 @@
+import os%0Aimport gzip%0A%0A
from multipl
@@ -58,117 +58,261 @@
tch%0A
-%0Afrom pymongo.mongo_client import MongoClient%0Afrom io import TextIOBase%0A%0A%0A@dispatch(TextIOBase)%0Adef close(f):
+from bson.json_util import loads as json_loads%0Afrom bson.json_util import dumps as json_dumps%0A%0Afr... |
71c63587d86c627434f5683ec1496376fa0e3dde | Fix typo | scripts/analyze_all_results.py | scripts/analyze_all_results.py | from __future__ import print_function
# allow us to import the codebase/keras directory
import sys
import glob
import numpy as np
from os.path import dirname, abspath
sys.path.insert(0, dirname(dirname(abspath(__file__))))
DATASETS = ['SE0714', 'Olympic', 'PsychExp', 'SS-Twitter', 'SS-Youtube',
'SCv1', 'S... | Python | 0.999999 | @@ -405,12 +405,12 @@
= '
-full
+last
'%0A
@@ -510,23 +510,20 @@
TS_DIR,
-DATASET
+dset
, METHOD
@@ -854,23 +854,20 @@
.format(
-DATASET
+dset
))%0A p
@@ -1179,18 +1179,24 @@
dset in
-%5B%5D
+DATASETS
:%0A ge
@@ -1194,24 +1194,25 @@
S:%0A get_results(dset)
+%0A
|
4743f692f03c3e33ae0283aedbd3590ce457bc35 | Update layer pins for 2013-11-08 | weboslayers.py | weboslayers.py | # Copyright (c) 2008-2013 LG Electronics, 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 t... | Python | 0 | @@ -3061,15 +3061,15 @@
mit=
-9269153
+5a4d86f
', '
|
17f4420fc31cf9d03a4e50f085c4c7d2940efec3 | Update layer pins for 2014-02-13 | weboslayers.py | weboslayers.py | # Copyright (c) 2008-2014 LG Electronics, 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 t... | Python | 0 | @@ -3061,15 +3061,15 @@
mit=
-56a0805
+4728cd4
', '
|
e30e5e9780cfe674a70856609ad6010056936263 | Use requests instead of urllib.request | picdump/webadapter.py | picdump/webadapter.py |
import urllib.request
class WebAdapter:
def get(self, urllike):
url = self.mk_url(urllike)
try:
res = urllib.request.urlopen(url)
return res.read()
except Exception as e:
raise e
def open(self, urllike):
url = self.mk_url(urllike)
t... | Python | 0 | @@ -1,30 +1,24 @@
%0Aimport
-urllib.
request
+s
%0A%0A%0Aclass
@@ -42,202 +42,49 @@
def
-get(self, urllike):%0A url = self.mk_url(urllike)%0A try:%0A res = urllib.request.urlopen(url)%0A return res.read()%0A except Exception as e:%0A raise e
+__init__(self):%0... |
a35abfda8af01f3c5bab4f4122060b630c118cac | Use ros-logging instead of print | bitbots_head_behavior/src/bitbots_head_behavior/actions/pattern_search.py | bitbots_head_behavior/src/bitbots_head_behavior/actions/pattern_search.py | import math
from dynamic_stack_decider.abstract_action_element import AbstractActionElement
class PatternSearch(AbstractActionElement):
def __init__(self, blackboard, dsd, parameters=None):
super(PatternSearch, self).__init__(blackboard, dsd, parameters)
self.index = 0
self.pattern = self... | Python | 0.000003 | @@ -575,24 +575,25 @@
math.pi%0A
+%0A
print(%22S
@@ -588,14 +588,46 @@
-print(
+rospy.logdebug_throttle_identical(1, f
%22Sea
@@ -641,30 +641,16 @@
at %7B
-%7D, %7B%7D%22.format(
head_pan
, he
@@ -637,34 +637,36 @@
ing at %7Bhead_pan
+%7D
,
+%7B
head_tilt))%0A
@@ -658,17 +658,18 @@
ead_ti... |
80e7fbff75a51d9dea8716f74d7d06fb01155704 | Add python3 compat boilerplate | lib/ansible/plugins/test/mathstuff.py | lib/ansible/plugins/test/mathstuff.py | # (c) 2016, Ansible, Inc
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is di... | Python | 0.000023 | @@ -693,16 +693,83 @@
_ = type
+%0Afrom __future__ import (absolute_import, division, print_function)
%0A%0Adef is
@@ -882,16 +882,8 @@
dule
-(object)
:%0A
|
6d7cf3575e02212ec68d16338a055b372ae6a9f5 | Fix tabs | gateware/git_info.py | gateware/git_info.py | import binascii
import os
import subprocess
import sys
from litex.gen.fhdl import *
from litex.soc.interconnect.csr import *
def git_root():
if sys.platform == "win32":
# Git on Windows is likely to use Unix-style paths (`/c/path/to/repo`),
# whereas directories passed to Python should be Windows-style paths
#... | Python | 0 | @@ -168,17 +168,24 @@
win32%22:%0A
-%09
+
# Git on
@@ -248,17 +248,24 @@
repo%60),%0A
-%09
+
# wherea
@@ -325,17 +325,24 @@
e paths%0A
-%09
+
# (%60C:/p
@@ -401,17 +401,24 @@
API). %0A
-%09
+
# %60cygpa
|
52355dbe102c17481aec99acbb8f4a4471708c87 | Fix record building in serverkeyreplace | nogotofail/mitm/connection/handlers/connection/serverkeyreplace.py | nogotofail/mitm/connection/handlers/connection/serverkeyreplace.py | r'''
Copyright 2014 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to i... | Python | 0 | @@ -6778,42 +6778,8 @@
nse%0A
- else:%0A
|
515cfb6c6c40147a05c832183f427ea8f99ab5f2 | Fix null case | helpers/notification_helper.py | helpers/notification_helper.py | import datetime
import logging
import urllib
import uuid
from consts.client_type import ClientType
from consts.notification_type import NotificationType
from google.appengine.api import urlfetch
from helpers.push_helper import PushHelper
from models.event import Event
from models.sitevar import Sitevar
from notifi... | Python | 0.038085 | @@ -3382,16 +3382,18 @@
st_match
+es
= Match
@@ -3428,19 +3428,16 @@
, num=1)
-%5B0%5D
%0A
@@ -3503,49 +3503,8 @@
m=2)
-%0A next_match = next_matches%5B0%5D
%0A%0A
@@ -3713,24 +3713,32 @@
f last_match
+es != %5B%5D
and next_ma
@@ -3736,24 +3736,32 @@
d next_match
+es != %5B%5D
and not n... |
bf6f985d4746a42979184cca70daa039df484ab0 | Update __init__.py | zonetruck/__init__.py | zonetruck/__init__.py | import dnspython
def main():
print ("Hello, world!")
| Python | 0.000072 | @@ -7,14 +7,17 @@
dns
-python
+.resolver
%0A%0Ade
@@ -31,28 +31,150 @@
):%0A%09
-print (%22Hello, world!%22)
+answers = dns.resolver.query('dnspython.org', 'MX')%0A%09for rdata in answers:%0A %09%09print 'Host', rdata.exchange, 'has preference', rdata.preference
%0A
|
77e65d6dd1bfec8525a4ea8a8f28c83dd5fa67f3 | Update PR to work against C* 3.0 | native_transport_ssl_test.py | native_transport_ssl_test.py | import os
from cassandra import ConsistencyLevel
from cassandra.cluster import NoHostAvailable
from dtest import Tester
from tools import generate_ssl_stores, putget, since
class NativeTransportSSL(Tester):
"""
Native transport integration tests, specifically for ssl and port configurations.
"""
de... | Python | 0 | @@ -1325,17 +1325,17 @@
ince('3.
-2
+0
')%0A d
@@ -3555,16 +3555,11 @@
e 3.
-2
+0
(
-with
CASS
|
c457764d5cd904d89a1de5627891458150bcf756 | fix store order status update | src/foodbeazt/resources/store_order_status.py | src/foodbeazt/resources/store_order_status.py | from flask import g, request
from flask_restful import Resource
from flask_mail import Message
from bson import ObjectId, json_util
from service.OrderService import OrderService
from service.StoreService import StoreService
from service.StoreOrderService import StoreOrderService
from service.PushNotificationService imp... | Python | 0.000001 | @@ -978,32 +978,69 @@
def post(self):%0A
+ tenant_id = g.user.tenant_id%0A
try:%0A
@@ -1817,32 +1817,63 @@
t found%22%7D, 443%0A%0A
+ store_order = None%0A
if a
@@ -1893,36 +1893,24 @@
on.can()
-:%0A if
+ and not
order_i
@@ -1915,26 +1915,27 @@
_id is None... |
8fec29601080c2cc0357b8d3882eb63d9d8cbe15 | modify test unit | suffix_tree/test_suffix_tree.py | suffix_tree/test_suffix_tree.py | #!/usr/bin/python
#encoding=utf-8
'''
Authored by jhsrcmh in NCI
-----------------------------
<strong> Wolf's MIS</strong>
-----------------------------
'''
import unittest
import codecs
from suffix_tree import SuffixTree
class SuffixTreeTest(unittest.TestCase):
def test_empty_string(self):
st = ... | Python | 0.000001 | @@ -1123,9 +1123,9 @@
g(u'
-%E8%B0%A2
+a
'))%0A
|
3ccd55be338e1a1ba3d9196f032e70535608d514 | Update nepdict.py | nepdict/local/bin/nepdict.py | nepdict/local/bin/nepdict.py | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import signal
import re
# when the set time is up, it display a output and exits the programs
def handler(signum, frame):
print("\n")
print(color.BOLD + "Times UP! See you next time.")
print("Thank you for using Nepdict." + color.END)
exit(0)
# adds color t... | Python | 0.000001 | @@ -1459,14 +1459,12 @@
ase/
-nirmal
+data
.csv
|
7da8d040d5020809495f828ba9ea7bd14393af3a | Add `nullable` property to DataField template | serrano/resources/templates.py | serrano/resources/templates.py | # DataField core fields and properties
DataCategory = {
'fields': [':pk', 'name', 'order', 'parent'],
'related': {
'parent': {
'fields': [':pk', 'name', 'order'],
}
}
}
DataField = {
'fields': [
':pk', 'name', 'plural_name', 'description', 'keywords',
'categ... | Python | 0 | @@ -531,16 +531,28 @@
al_unit'
+, 'nullable'
%0A %5D,%0A
|
fb5ec25b85a57ce368533ff2deb1f159fc78e838 | Fix invalid function call | src/adhocracy_mercator/adhocracy_mercator/scripts/mercator_export_users.py | src/adhocracy_mercator/adhocracy_mercator/scripts/mercator_export_users.py | """Export users and their proposal rates.
This is a generic script used for diffrerent proposal implementations.
"""
import csv
from pyramid.registry import Registry
from substanced.util import find_service
from adhocracy_core.interfaces import IItem
from adhocracy_core.interfaces import IResource
from adhocracy_cor... | Python | 0.007235 | @@ -1159,26 +1159,16 @@
nterface
-, registry
)%0A pr
|
e390647355548744b278f8f8dfd86eef4094b8e4 | Update accuracy_utils.py | tensorflow/examples/speech_commands/accuracy_utils.py | tensorflow/examples/speech_commands/accuracy_utils.py | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Python | 0 | @@ -5821,16 +5821,27 @@
ng.info(
+%0A
'%7B:.1f%7D%25
@@ -5884,28 +5884,16 @@
rong, '%0A
-
@@ -5941,28 +5941,16 @@
-
-
any_matc
@@ -5989,28 +5989,16 @@
entage,%0A
-
|
6c804fc1b6bffb26104803fbbd2a6a766fef80df | Return error messages instead of Error objects, fixes #461 | datajoint/autopopulate.py | datajoint/autopopulate.py | """autopopulate containing the dj.AutoPopulate class. See `dj.AutoPopulate` for more info."""
import logging
import datetime
import traceback
import random
from tqdm import tqdm
from pymysql import OperationalError
from .relational_operand import RelationalOperand, AndList, U
from .errors import DataJointError
from .ba... | Python | 0 | @@ -5330,17 +5330,16 @@
ount = 0
-
%0A
@@ -6473,202 +6473,198 @@
-if reserve_jobs:%0A # show error name and error message (if any)%0A error_message = ': '.join(%5Berror.__class__.__name__, str(error)%5D).strip(': '
+error_message = ': '.join(%5Berror... |
a3d1d323c943c2bef763850dfa57adb1413abc32 | fix static url | david/ext/views/static.py | david/ext/views/static.py | # -*- coding: utf-8 -*-
import os
from flask import url_for, current_app, json
from david.lib.cache import lc
from config import APP_ROOT, STATIC_ROOT, DEBUG, SITE_ROOT
class LazyStatic(object):
def __init__(self, path):
self.path = path
def __get__(self, obj, type):
return static_url(self.p... | Python | 0.000776 | @@ -951,53 +951,216 @@
-return%0A return os.path.join('/', filename)
+if '.' in filename:%0A basename, ext = filename.rsplit('.', 1)%0A return '%25s_%25s.%25s' %25 (basename, hashmap%5Bfilename%5D, ext)%0A return filename + '_' + hashmap%5Bfilename%5D%0A return filename
%0A%0A%... |
9447a52990d6398dd7308f0373db6a9c98624410 | Update train_mnist_original_softmax_center.py | codes/20191211_metric_learning/src/train_mnist_original_softmax_center.py | codes/20191211_metric_learning/src/train_mnist_original_softmax_center.py | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets, transforms
from torch.utils.data import DataLoader
import torch.optim.lr_scheduler as lr_scheduler
from torch.autograd.function import Function
import torchvision
import matplotlib.pyplot a... | Python | 0.000001 | @@ -4952,16 +4952,17 @@
./output
+s
/models/
@@ -5094,16 +5094,17 @@
./output
+s
/visual/
|
4cedc5b496041d5d7ba3632302bc77d89c59f44b | Tweak how to handle fastq file name for 2 pass mapping | ddb_ngsflow/rna/bowtie.py | ddb_ngsflow/rna/bowtie.py | """
.. module:: cufflinks
:platform: Unix, OSX
:synopsis: A module of methods for working with the bowtie alignment program
into additional formats.
.. moduleauthor:: Daniel Gaston <daniel.gaston@dal.ca>
"""
from ddb_ngsflow import pipeline
def add_additional_options(command_list, config, flags):
if ... | Python | 0 | @@ -852,32 +852,125 @@
%22.format(name)%0A%0A
+ if %222-pass%22 in flags:%0A samples%5Bname%5D%5B'unmapped_fastq'%5D = samples%5Bname%5D%5B'fastq1'%5D%0A%0A
command = (%22
@@ -2184,33 +2184,33 @@
les%5Bname%5D%5B'fastq
-1
+2
'%5D),%0A
|
77e0046f8b8548f1c701c43291ab04bf3089ecb6 | comment 정리 | 1_get_char_size.py | 1_get_char_size.py | #-*- coding: utf-8 -*-
""" Get information on training dataset."""
import object_detector.file_io as file_io
import numpy as np
import cv2
import os
import argparse as ap
DEFAULT_CONFIG_FILE = "conf/svhn.json"
def calc_average_patch_size(annotation_file):
widths = []
heights = []
an... | Python | 0 | @@ -1630,122 +1630,8 @@
%0D%0A
- # w %D6%BC pair, h %D6%BC pair%0D%0A %0D%0A # 1. pair 1st dim %0D%0A # 2. pair 2nd dim %0D%0A # 3. pair 3rd dim %0D%0A%0D%0A
@@ -2320,1052 +2320,7 @@
%0D
-%0A# %22%22%22 %0D%0A# %7B%0D%0A# u'boxes': %0D%0A# %5B%0D%0A# ... |
888cf9a5ebab4d5ead19fcf818d0d16b6738a99a | read properties with the correct company. | addons/website_sale_delivery/models/sale_order.py | addons/website_sale_delivery/models/sale_order.py | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from odoo import api, fields, models
_logger = logging.getLogger(__name__)
class SaleOrder(models.Model):
_inherit = 'sale.order'
amount_delivery = fields.Monetary(
compute='_compute_am... | Python | 0 | @@ -1468,32 +1468,86 @@
e%0A else:%0A
+ self = self.with_company(self.company_id)%0A
# at
|
38e5f927e96a3c541080dfe786499c8aec49bb81 | Add a getSettingValue method to MachineManagerProxy | UM/Qt/Bindings/MachineManagerProxy.py | UM/Qt/Bindings/MachineManagerProxy.py | # Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
from PyQt5.QtCore import QObject, pyqtProperty, pyqtSignal, pyqtSlot
from UM.Application import Application
class MachineManagerProxy(QObject):
def __init__(self, parent = None):
super().__init__(parent)
... | Python | 0 | @@ -2508,24 +2508,232 @@
e(profile)%0A%0A
+ @pyqtSlot(str)%0A def getSettingValue(self, setting):%0A profile = self._manager.getActiveProfile()%0A if not profile:%0A return None%0A%0A return profile.getSettingValue(setting)%0A%0A
def _onA
|
d4058bbeb356db876a70e1c046ebceed99bcb901 | Revise to var in_val_pos | lc0105_construct_binary_tree_from_preorder_and_inorder_traversal.py | lc0105_construct_binary_tree_from_preorder_and_inorder_traversal.py | """Leetcode 105. Construct Binary Tree from Preorder and Inorder Traversal
Medium
URL: https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
Given preorder and inorder traversal of a tree, construct the binary tree.
Note: You may assume that duplicates do not exist in the tree.
Fo... | Python | 0.002156 | @@ -745,39 +745,40 @@
in
-order_d
+_val_pos
, preorder, inor
@@ -1035,23 +1035,24 @@
pos = in
-order_d
+_val_pos
%5Broot.va
@@ -1360,39 +1360,40 @@
in
-order_d
+_val_pos
, preorder, inor
@@ -1552,39 +1552,40 @@
in
-order_d
+_val_pos
, preorder, inor
@@ -1611,17 +1611,16... |
379ffea89716a515e85de9cdaab2bc9c47a68fc4 | Add LineWidthNode | src/mcedit2/rendering/scenegraph/misc.py | src/mcedit2/rendering/scenegraph/misc.py | """
misc
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
from OpenGL import GL
from mcedit2.rendering.scenegraph.rendernode import RenderstateRenderNode, RenderNode
from mcedit2.rendering.scenegraph.scenenode import Node
log = logging.getLogger(__name__)
clas... | Python | 0.000001 | @@ -750,16 +750,411 @@
mode%0A%0A%0A
+class LineWidthRenderNode(RenderstateRenderNode):%0A def enter(self):%0A GL.glPushAttrib(GL.GL_LINE_BIT)%0A GL.glLineWidth(self.sceneNode.lineWidth)%0A%0A def exit(self):%0A GL.glPopAttrib()%0A%0A%0Aclass LineWidthNode(Node):%0A RenderNodeClass = Lin... |
34bc20649056bbfbf8cb584dd20a773839db2dd3 | Add error handling to Document class | lib/neotext_quote_context/document.py | lib/neotext_quote_context/document.py | # -*- coding: utf-8 -*-
# Copyright (C) 2015-2016 Tim Langeman and contributors
# <see AUTHORS.txt file>
#
# This library is part of the Neotext project:
# http://www.neotext.net/
# The code for this server library is released under the MIT License:
# http://www.opensource.org/licenses/mit-license
from bs4 import Bea... | Python | 0 | @@ -358,16 +358,27 @@
urlopen
+, HTTPError
%0Afrom fu
@@ -1299,16 +1299,33 @@
lf.url)%0A
+ try:%0A
@@ -1359,24 +1359,28 @@
d()%0A
+
+
return raw.d
@@ -1393,16 +1393,64 @@
'utf-8')
+%0A except HTTPError:%0A return %22%22
%0A%0A de
|
ec15a9379e89dcaf30fedd844ab98940f1b38fc2 | Enable wrapper for Intel MKL on Linux | scipy/_build_utils/_fortran.py | scipy/_build_utils/_fortran.py | import re
import sys
import os
import glob
from distutils.dep_util import newer
__all__ = ['needs_g77_abi_wrapper', 'split_fortran_files',
'get_g77_abi_wrappers',
'needs_sgemv_fix', 'get_sgemv_fix']
def uses_veclib(info):
if sys.platform != "darwin":
return False
r_accelerate =... | Python | 0 | @@ -1165,106 +1165,27 @@
-# XXX: is this really true only on Mac OS X ?%0A elif uses_mkl(info) and sys.platform == %22darwin%22
+elif uses_mkl(info)
:%0A
|
1b5e97bc85022618e7a41f284c83cfde4659fe10 | fix frequency filters | scout/blueprints/core/forms.py | scout/blueprints/core/forms.py | # -*- coding: utf-8 -*-
"""
"main concept of MongoDB is embed whenever possible"
Ref: http://stackoverflow.com/questions/4655610#comment5129510_4656431
"""
from __future__ import absolute_import, unicode_literals
from flask_wtf import FlaskForm as Form
from flask_wtf.file import FileField
from wtforms import (DecimalF... | Python | 0.000001 | @@ -3615,250 +3615,8 @@
gs)%0A
- for field_name in %5B'thousand_genomes_frequency', 'exac_frequency',%0A 'cadd_score'%5D:%0A field = getattr(form, field_name)%0A%0A if field.data:%0A field.data = field.data%5B0%5D if field.data%5B0%5D else None%0A%0A
|
ad36a4a6ae8376a779f9feb08adfb2ca4a59dbb4 | add \x0c to whitespace characters, as per html5 standard | scrapy/linkextractors/regex.py | scrapy/linkextractors/regex.py | import re
from six.moves.urllib.parse import urljoin
from w3lib.html import remove_tags, replace_entities, replace_escape_chars, get_base_url
from scrapy.link import Link
from .sgml import SgmlLinkExtractor
linkre = re.compile(
"<a\s.*?href=(\"[.#]+?\"|\'[.#]+?\'|[^\s]+?)(>|\s.*?>)(.*?)<[/ ]?a>",
re.... | Python | 0.000001 | @@ -338,16 +338,17 @@
ECASE)%0A%0A
+%0A
def clea
@@ -469,16 +469,20 @@
%5Cr%5Cn '%5C%22
+%5Cx0c
%22)%0A%0A%0Acla
|
d531d03dfa19d1e785d71ac28e010531eefbca84 | Add TODO | scripts/generate_submission.py | scripts/generate_submission.py | #!/usr/bin/env python
import pandas as pd
from sklearn.preprocessing import LabelEncoder
from xgboost.sklearn import XGBClassifier
from sklearn.ensemble import BaggingClassifier
from utils.io import generate_submission
def main():
path = '../data/processed/'
prefix = 'processed_'
suffix = '1'
train_u... | Python | 0.000002 | @@ -1326,16 +1326,84 @@
%0A )%0A%0A
+ # TODO: Fit bagging with different datasets and warm start True%0A
clf
|
c17dddb367cb2aadf9569667d6f8d57497282158 | Fix testing of form output | src/multipageforms/tests/test_multiform.py | src/multipageforms/tests/test_multiform.py | from __future__ import unicode_literals
import unittest
from django import test, forms
from ..forms import multiform
class MultiFormTest(unittest.TestCase):
def setUp(self):
class TestForm1(forms.Form):
i1 = forms.IntegerField()
self.formclass1 = TestForm1
class TestForm2(fo... | Python | 0 | @@ -114,16 +114,17 @@
tiform%0A%0A
+%0A
class Mu
@@ -1943,58 +1943,41 @@
-expected = ('%3Cinput id=%22id_testmultiform-0-
+seen = multiform.forms%5B0%5D%5B'
seen
-%22
'
+%5D
%0A
@@ -1985,27 +1985,87 @@
- '
+self.assertEqual(seen.label, 'Seen')%0A self.assertEqual(seen.html_
name
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.