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 |
|---|---|---|---|---|---|---|---|
231d3cadcbdcdd15dd7bfe4c97e46e12e0d5444b | Fix the CloudFormation ValidationError message (#788) | moto/cloudformation/exceptions.py | moto/cloudformation/exceptions.py | from __future__ import unicode_literals
from werkzeug.exceptions import BadRequest
from jinja2 import Template
class UnformattedGetAttTemplateException(Exception):
description = 'Template error: resource {0} does not support attribute type {1} in Fn::GetAtt'
status_code = 400
class ValidationError(BadReques... | Python | 0.999999 | @@ -421,17 +421,25 @@
e=%22Stack
-:
+ with id
%7B0%7D does
@@ -468,17 +468,16 @@
e_or_id)
-,
%0A%0A
|
e7579d59037830a28322f7b483a7454afecea76c | Remove methods inherited from base model | museum_site/series.py | museum_site/series.py | import os
from django.db import models
from django.db.models import Subquery
from django.template.defaultfilters import slugify
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from museum.settings import STATIC_URL
from museum_site.common import STATIC_PATH, epoch_to_... | Python | 0 | @@ -2216,141 +2216,8 @@
w)%0A%0A
- def as_block(self, view=%22detailed%22, *args, **kwargs):%0A return getattr(self, %22as_%7B%7D_block%22.format(view))(*args, **kwargs)%0A%0A
@@ -4652,182 +4652,4 @@
xt)%0A
-%0A @mark_safe%0A def table_header(self):%0A row = %22%22%0A for f in self... |
a67b7ea2611a82b47847a6deeff744660a197895 | fix var | mpf/config_players/show_player.py | mpf/config_players/show_player.py | """Show config player."""
from copy import deepcopy
from mpf.core.config_player import ConfigPlayer
class ShowPlayer(ConfigPlayer):
"""Plays, starts, stops, pauses, resumes or advances shows based on config."""
config_file_section = 'show_player'
show_section = 'shows'
device_collection = None
... | Python | 0.000004 | @@ -2883,34 +2883,8 @@
how%0A
- del show_settings%0A
|
f0a072d22ec73acf9d8df50ff42da49ef9ebe8ab | Remove -n which doesn't behave the same on OS X | flocker/common/functional/test_ipc.py | flocker/common/functional/test_ipc.py | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Functional tests for IPC.
"""
from twisted.internet.threads import deferToThread
from twisted.python.filepath import FilePath
from twisted.trial.unittest import TestCase
from .. import ProcessNode
from ..test.test_ipc import make_inode_tests
from ...te... | Python | 0.000002 | @@ -1099,35 +1099,32 @@
(%5Bb%22-c%22, b%22echo
--n
hello %3E %22 + temp
@@ -1207,32 +1207,34 @@
ntent(), b%22hello
+%5Cn
%22)%0A%0A def test
|
349a60c5158a371e0567e99707d675b4b689c14a | increase tolerance of failing test (QI2) | mriqc/qc/tests/test_anatomical.py | mriqc/qc/tests/test_anatomical.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
#
# @Author: oesteban
# @Date: 2016-01-05 11:29:40
# @Email: code@oscaresteban.es
# @Last modified by: oesteban
# @Last Modified time: 2016-11-10 17:14:23
... | Python | 0 | @@ -3302,10 +3302,10 @@
e %3C 0.00
-2
+3
%0A
|
540af49f11ae8162f73faae320da99689332dc11 | Bump to 3.8.1 | flask_jwt_extended/__init__.py | flask_jwt_extended/__init__.py | from .jwt_manager import JWTManager
from .view_decorators import (
jwt_required, fresh_jwt_required, jwt_refresh_token_required, jwt_optional
)
from .utils import (
create_refresh_token, create_access_token, get_jwt_identity,
get_jwt_claims, set_access_cookies, set_refresh_cookies,
unset_jwt_cookies, ge... | Python | 0.00005 | @@ -424,7 +424,7 @@
3.8.
-0
+1
'%0A
|
90fc0b9834ec7be213588c807519cee9d1aeaeca | support missing queryset arg in BaseContentItemFormSet | fluent_contents/admin/contentitems.py | fluent_contents/admin/contentitems.py | from django.contrib.contenttypes.generic import BaseGenericInlineFormSet, GenericInlineModelAdmin
from fluent_contents import extensions, appsettings
from fluent_contents.forms import ContentItemForm
from fluent_contents.models import Placeholder, get_parent_language_code
class BaseContentItemFormSet(BaseGenericInlin... | Python | 0 | @@ -586,16 +586,41 @@
language
+ and 'queryset' in kwargs
:%0A
|
84c6af4b3326f5fd02ac718c128d8e597d2def6a | handle "since" param with non-int value | mygpo/api/__init__.py | mygpo/api/__init__.py | #
# This file is part of my.gpodder.org.
#
# my.gpodder.org is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# my.gpodder.org i... | Python | 0.000002 | @@ -2891,20 +2891,16 @@
ince_ =
-int(
request.
@@ -2921,17 +2921,16 @@
', None)
-)
%0A%0A
@@ -3020,32 +3020,65 @@
)%0A%0A try:%0A
+ since_ = int(since_)%0A
sinc
@@ -3108,20 +3108,15 @@
amp(
-int(
since_)
-)
%0A
|
b5352599cc0fbc25d564ae18533c845547a363c6 | fix reference to user-object in advanced api | mygpo/api/advanced.py | mygpo/api/advanced.py | #
# This file is part of my.gpodder.org.
#
# my.gpodder.org is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# my.gpodder.org i... | Python | 0.000001 | @@ -2101,32 +2101,40 @@
ription_changes(
+request.
user, device, si
|
03bf8a82ec2268a2bfe5810fd7a71e99affa78d2 | Clean up logic and repeated code for --dump sections | flexget/plugins/output/dump.py | flexget/plugins/output/dump.py | from loguru import logger
from rich.highlighter import ReprHighlighter
from rich.pretty import Pretty, is_expandable
from flexget import options, plugin
from flexget.event import event
from flexget.terminal import TerminalTable, console
logger = logger.bind(name='dump')
def dump(entries, debug=False, eval_lazy=Fals... | Python | 0 | @@ -3300,17 +3300,17 @@
tates =
-%5B
+%7B
'accepte
@@ -3303,32 +3303,41 @@
es = %7B'accepted'
+: 'green'
, 'rejected', 'f
@@ -3332,16 +3332,23 @@
ejected'
+: 'red'
, 'faile
@@ -3349,16 +3349,26 @@
'failed'
+: 'yellow'
, 'undec
@@ -3372,17 +3372,25 @@
decided'
-%5D
+: 'none'%7D
%0A
@@ -3429,700 +3429,2... |
cbac03ff028c84cf9b7e3a092108144fb399b49c | add test | myuw/test/api/test_affiliation.py | myuw/test/api/test_affiliation.py | import json
from myuw.test.api import MyuwApiTest, require_url
class TestApiAffiliation(MyuwApiTest):
@require_url('myuw_affiliation')
def test_javerage(self):
self.set_user('fffjjj')
response = self.get_response_by_reverse('myuw_affiliation')
self.assertEquals(response.status_code, 4... | Python | 0.000002 | @@ -2114,12 +2114,80 @@
ermitted%22%5D)%0A
+ self.assertEqual(self.request.session.get_expiry_age(), 60)%0A
|
7b50c9290a8c8d3481d9147ebb66d3b7868ad7fc | Write to bouncer config file | bouncer-plumbing/mlab-to-bouncer/makeconfig.py | bouncer-plumbing/mlab-to-bouncer/makeconfig.py | #!/usr/bin/env python
import sys
import yaml
def read_parts_from_stdin():
data = sys.stdin.read()
parts_string = data.split("----")
parts_parsed = []
for part in parts_string:
part_parsed = yaml.safe_load(part)
parts_parsed.append(part_parsed)
return parts_parsed
def assemble_boun... | Python | 0.000001 | @@ -518,32 +518,38 @@
_bouncer_config(
+path,
bouncer_config,
@@ -550,43 +550,365 @@
nfig
-, path):%0A
+_contents):%0A try:%0A f = open(path, 'w')%0A f.write(bouncer_config_contents)%0A f.close()%0A except IOError:%0A
+
print
-bouncer_config%0A%0A
+%22Couldn't write to bounce... |
54b8bfc4a47d4ab78ffa0fd72752b9090e99587f | Allow GET logout | nefertari/authentication/views.py | nefertari/authentication/views.py | from pyramid.security import remember, forget
from nefertari.json_httpexceptions import (
JHTTPFound, JHTTPConflict, JHTTPUnauthorized, JHTTPNotFound, JHTTPOk,
JHTTPBadRequest)
from nefertari.view import BaseView
from nefertari import events
class TicketAuthViewMixin(object):
""" View mixin for auth oper... | Python | 0.000001 | @@ -3326,32 +3326,152 @@
rgs, **kwargs)%0A%0A
+ @events.trigger_instead('logout')%0A def show(self, *args, **kwargs):%0A return self.logout(*args, **kwargs)%0A%0A
%0Aclass TokenAuth
|
b34e1e769f28e791925bb8c0c0324c692640d49e | Delete Uniques | bp_content/themes/default/handlers/handlers.py | bp_content/themes/default/handlers/handlers.py | # -*- coding: utf-8 -*-
"""
A real simple app for using webapp2 with auth and session.
It just covers the basics. Creating a user, login, logout
and a decorator for protecting certain handlers.
Routes are setup in routes.py and added in main.py
"""
# standard library imports
# related third party im... | Python | 0.000001 | @@ -334,16 +334,53 @@
webapp2%0A
+from google.appengine.ext import ndb%0A
from web
@@ -444,16 +444,16 @@
rdError%0A
-
from web
@@ -538,78 +538,8 @@
rts%0A
-import bp_includes.models as models_boilerplate%0Aimport forms as forms%0A
from
@@ -639,16 +639,16 @@
equired%0A
-
from bp_
@@ -682,16 +682,86 @@
, utils%0... |
c80d7432f00a0eb1f5567c1d86d22f49c7761321 | Delete account | bp_content/themes/default/handlers/handlers.py | bp_content/themes/default/handlers/handlers.py | # -*- coding: utf-8 -*-
"""
A real simple app for using webapp2 with auth and session.
It just covers the basics. Creating a user, login, logout
and a decorator for protecting certain handlers.
Routes are setup in routes.py and added in main.py
"""
# standard library imports
# related third party im... | Python | 0 | @@ -334,16 +334,89 @@
webapp2%0A
+from webapp2_extras.auth import InvalidAuthIdError, InvalidPasswordError%0A
from web
@@ -707,16 +707,23 @@
captcha
+, utils
%0A%0A%0Aclass
@@ -3460,87 +3460,1704 @@
-params = %7B%7D%0A return self.render_template('delete_account.html', **params
+if not self.form.valid... |
fc4feaea1e89a72357e468f4e7a2203a5816ad82 | Remove print statement. | tests/test_dependence_constraints.py | tests/test_dependence_constraints.py | # -*- coding: utf-8 -*-
# Copyright (c) 2015-2016 MIT Probabilistic Computing Project
# 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
# Unles... | Python | 0.000046 | @@ -4284,29 +4284,8 @@
(4)%0A
- print state.Zv()%0A
|
0a1b1d5bd60c36ab59d49c711d239e51211e4411 | Update baseapp.py | flask_appbuilder/baseapp.py | flask_appbuilder/baseapp.py | from flask import Blueprint
from flask.ext.babel import lazy_gettext
from flask.ext.babel import gettext as _gettext
from .security.views import AuthView, ResetMyPasswordView, ResetPasswordView, UserGeneralView, RoleGeneralView, PermissionViewGeneralView, ViewMenuGeneralView, PermissionGeneralView, IndexView, Permissio... | Python | 0.000001 | @@ -3135,16 +3135,168 @@
+%0A def add_link(self, name, href, icon = %22%22, category = %22%22)%0A %09self.menu.add_link(name = name, href = href, icon = icon, parent_category = category)
%0A%0A de
|
74852a8a1be0fa5dbae70798367106f3de8b1721 | Update filters.py | flask_appbuilder/filters.py | flask_appbuilder/filters.py | from app import app
from flask.ext.appbuilder.security.models import is_menu_public, is_item_public
from flask.ext.appbuilder.models.datamodel import SQLAModel
from flask import g, request, url_for
from flask.ext.login import current_user
def app_template_filter(filter_name=''):
"""
Use this decorator to ... | Python | 0.000001 | @@ -2462,24 +2462,69 @@
ralview_name
+, request.args.get('_oc_' + generalview_name)
%0A if
|
a208cbdf0b6439fd9fc59050ea9c9afb304bc75d | Remove fields that start with an underscore | netbox/utilities/testing/utils.py | netbox/utilities/testing/utils.py | import logging
from contextlib import contextmanager
from django.contrib.auth.models import Permission, User
from django.forms.models import model_to_dict as _model_to_dict
def model_to_dict(instance, fields=None, exclude=None):
"""
Customized wrapper for Django's built-in model_to_dict(). Does the following... | Python | 0.000005 | @@ -350,24 +350,80 @@
ce ID field%0A
+ - Exclude any fields prepended with an underscore%0A
- Conv
@@ -631,24 +631,129 @@
=_exclude)%0A%0A
+ for key in list(model_dict.keys()):%0A if key.startswith('_'):%0A del model_dict%5Bkey%5D%0A%0A
if 'tags
|
8170ad6cdfd2346bc24a3d743663b4866416ca83 | Add functions to add shapes and iterate over each shape to render. | Engine.py | Engine.py | #Imports
import pygame
from pygame.locals import *
from OpenGL.GL import *
from OpenGL.GLU import *
from shapes import Shape, Cube
#Create a game class
class Game(object):
#Constructor
def __init__(self, title, width, height, bgcolour):
#Initialise pygame
pygame.init()
#Set the size of the window
sel... | Python | 0 | @@ -922,10 +922,335 @@
render)%0A
+%09%09%0A%09#Create a function to add a shape%0A%09def addshape(self, s):%0A%09%09self.shapes.append(s)%0A%09%09%0A%09#Create a function to render the shapes%0A%09def render(self):%0A%09%09#For each of the shapes, check the type and render it%0A%09%09for s in shapes:%0A%09%09%09#If t... |
c95b2dd92bb0b7e7b6bd9b57b3a5031310fdd591 | add warning message about large downloads | examples/FIAC/batch.py | examples/FIAC/batch.py | import os, time
ttoc = time.time()
for subj in range(16):
os.system('python2.4 ./subject.py %d' % subj)
ttic = time.time()
print 'total time for %d subjects (minutes): %02f' % ((subj+1), ((ttic-ttoc)/60))
ttoc = time.time()
for design in ['block', 'event']:
for which in ['delays', 'contrasts']:
... | Python | 0 | @@ -10,16 +10,137 @@
, time%0A%0A
+print %22WARNING: Running this program will involve downloading up to 3 gigs of data and takes a number of hours to run.%22%0A%0A
ttoc = t
|
4e173014b26c2515f441bdef474596dfe34348c1 | change the console banners | nikola/plugins/command_console.py | nikola/plugins/command_console.py | # -*- coding: utf-8 -*-
# Copyright © 2012-2013 Roberto Alsina and others.
# 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 t... | Python | 0 | @@ -1202,16 +1202,47 @@
ort os%0A%0A
+from nikola import __version__%0A
from nik
@@ -1278,16 +1278,16 @@
Command%0A
-
%0A%0Aclass
@@ -1505,16 +1505,118 @@
ation.%22%0A
+ header = %22Nikola v%22 + __version__ + %22 -- %7B0%7D Console (conf = configuration, SITE = site engine)%22%0A%0A
%0A def
@@ -1979,96 +1... |
e9278a2e229953accb8ab9a3d44eae8e455bcb6a | fix linting | examples/cure_model.py | examples/cure_model.py | # -*- coding: utf-8 -*-
from lifelines.fitters import ParametricRegressionFitter
import autograd.numpy as np
from autograd.scipy.special import expit
import matplotlib.pyplot as plt
from scipy.stats import weibull_min
class CureModel(ParametricRegressionFitter):
_fitted_parameter_names = ["lambda_", "beta_", "rh... | Python | 0.000003 | @@ -578,16 +578,17 @@
p.exp(-(
+(
T / lamb
@@ -600,16 +600,17 @@
** rho_)
+)
%0A
|
a79d0b3834e669af7ae3a58f118b20ec41f8eead | Remove print debugging | nikola/plugins/task/page_index.py | nikola/plugins/task/page_index.py | # -*- coding: utf-8 -*-
# Copyright © 2012-2017 Roberto Alsina and others.
# 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 t... | Python | 0 | @@ -4020,107 +4020,8 @@
E'%5D%0A
- print('-S', short_destination)%0A print('-D', dirname)%0A print('-P', post_list)%0A
@@ -4158,64 +4158,8 @@
ex.%0A
- print(post.destination_path(lang, sep='/'))%0A
|
4d270e3a0b9ab144fab26a1add81048dd4a3e3c9 | Test `back_current_density` return unit | test/test_Langmuir.py | test/test_Langmuir.py | # -*- coding: utf-8 -*-
import numpy as np
from astropy import units
import unittest
from tec.electrode import Metal
from tec.models import Langmuir
em = Metal(temp=1000., barrier=2., richardson=10.)
co = Metal(temp=300., barrier=1., richardson=10., position=10.)
class Base(unittest.TestCase):
"""
Base class... | Python | 0.000001 | @@ -1560,36 +1560,241 @@
ble%0A %22%22%22%0A
-pass
+def test_back_current_density(self):%0A %22%22%22%0A back_current_density should return a value with unit A/cm2%0A %22%22%22%0A self.assertEqual(self.t.back_current_density().unit, units.Unit(%22A/cm2%22))
%0A%0A%0Aclass Methods
|
597b0505ff47de8447c7f7318f9bf0a56c890caa | Store access data as well as last event info | list-repos.py | list-repos.py | import github
import yaml
import os.path as path
from datetime import datetime, timedelta
config = yaml.load(open("backup.yaml"))
g = github.Github(login_or_token=config["admin-token"])
repos = {}
oldest_when = datetime.now() - timedelta(days=90) # Github doesn't return events more than 90 days ago, so assume repos ... | Python | 0 | @@ -82,16 +82,35 @@
imedelta
+%0Aimport collections
%0A%0Aconfig
@@ -436,66 +436,1402 @@
ts/%0A
-for repo
+%0Aorg = g.get_organization(config%5B%22org%22%5D)%0A%0AAccess = collections.namedtuple('Access', %5B'who', 'why', 'what'%5D)%0A%0Aadmins = %5B%5D%0Afor member
in
+or
g.get_
-organization(config%5B%22org%22... |
7700eae8c0b1ae90695fde539e0e3e68d295a4e5 | no pformat | lnxdiag12d.py | lnxdiag12d.py | #!/usr/bin/env python
# Based on previous work by
# Charles Menguy (see: http://stackoverflow.com/questions/10217067/implementing-a-full-python-unix-style-daemon-process)
# and Sander Marechal (see: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/)
# Adapted by M.Hendrix [2015]
# daemon12.... | Python | 0.999326 | @@ -429,35 +429,8 @@
nds%0A
-from pprint import pformat%0A
from
@@ -884,43 +884,14 @@
:
-%22, False, DEBUG)%0A syslog_trace(p
+ %7B0%7D%22.
form
@@ -1688,13 +1688,14 @@
:
-%22 + p
+ %7B0%7D%22.
form
@@ -1813,49 +1813,13 @@
:
-%22, False, DEBUG)%0A syslog_trace(p
+%7B0%7D%22.
form
@@ -4298,2... |
396399898c4d1f8cc37ccaf3a1c186abc440adf3 | add unittest with accented characters | test/test_xml_util.py | test/test_xml_util.py | #!/usr/bin/env python
import os
import sys
import re
import unittest
from cgi import escape as html_escape
sys.path.append('../lib/')
import xml_util
class Test_xml_util(unittest.TestCase):
def setUp(self):
pass
def test_flatten(self):
testlist = [ [1,4,7], [2,5,8], [3,6,9] ]
re... | Python | 0 | @@ -146,16 +146,159 @@
l_util%0A%0A
+text_fixtures = os.path.join(os.curdir, 'fixtures/text/')%0Awith open(text_fixtures+'accented_characters.txt') as f:%0A accent_file = f.read()%0A%0A
class Te
@@ -3472,16 +3472,229 @@
rmal))%0A%0A
+ def test_normalize_utf8_withaccents(self):%0A teststring = accent_fil... |
f402a428ffcb01532c12659bab74593301bd2ebe | test more clients at once | test/unit/test_rpc.py | test/unit/test_rpc.py | import eventlet
import logging
import pytest
from wampy.constants import DEFAULT_REALM, DEFAULT_ROLES
from wampy.peers.clients import WampClient, RpcClient
from wampy.rpc import rpc
logger = logging.getLogger('test_rpc')
def make_service_clients(router, names):
clients = []
for name in names:
clien... | Python | 0 | @@ -1288,16 +1288,244 @@
r_004',%0A
+ 'binary_number_consumer_005',%0A 'binary_number_consumer_006',%0A 'binary_number_consumer_007',%0A 'binary_number_consumer_008',%0A 'binary_number_consumer_009',%0A 'binary_number_consumer_010',%0A
%5D%0A%0A
@@ -2130,16 +2130,275 @@
... |
8dd1e97eb3e0cd71cbc4e499b33e898b3865007f | Fix typo | custom/enikshay/management/commands/run_cbnaat_test_fix.py | custom/enikshay/management/commands/run_cbnaat_test_fix.py | from __future__ import print_function
from custom.enikshay.management.commands.utils import (
BaseEnikshayCaseMigration,
get_result_recorded_form,
get_form_path
)
class Command(BaseEnikshayCaseMigration):
case_type = 'test'
case_properties_to_update = [
'result_summary_display',
'd... | Python | 0.999999 | @@ -953,37 +953,39 @@
est_success == '
-error
+success
':%0A
|
e9bd93d227b7aeafd1ddb46bb1115c62d995b576 | Revert "remove type annotations" | test_compilability.py | test_compilability.py | #!/usr/bin/env python
import collections
import glob
import os
import subprocess
import sys
Expectation = collections.namedtuple('Expectation',
['IGNORE',
'LEGITIMATE_ERROR',
'KNOWN_ISSUE'])
baseline = Ex... | Python | 0 | @@ -518,16 +518,21 @@
cc
+: str
,%0A
@@ -553,16 +553,21 @@
iles_dir
+: str
,%0A
@@ -583,16 +583,29 @@
expect
+: Expectation
):%0A
@@ -1994,16 +1994,21 @@
ile_path
+: str
):%0A%0A
@@ -2443,16 +2443,21 @@
o(action
+: str
,%0A
@@ -2481,16 +2481,21 @@
ile_path
+: str
):%0A ... |
2d359a318ed1fa835ca986a336fc5c26ea7e326e | Fix #225, Add author in builds API | frigg/builds/serializers.py | frigg/builds/serializers.py | from rest_framework import serializers
from frigg.projects.models import Project
from .models import Build, BuildResult
class ProjectInlineSerializer(serializers.ModelSerializer):
class Meta:
model = Project
fields = (
'id',
'owner',
'name',
'priv... | Python | 0 | @@ -1034,32 +1034,54 @@
'message',%0A
+ 'author',%0A
'col
@@ -1627,32 +1627,54 @@
'message',%0A
+ 'author',%0A
'col
|
390dcf211710477443cc8a44d1360060221dd471 | Use new GMT tile source | test_viewrel_image.py | test_viewrel_image.py | #!/usr/bin/env python
"""Test PySlip view-relative images."""
import wx
import pyslip
import local_tiles
######
# Various demo constants
######
DefaultAppSize = (600, 400)
TileDirectory = 'tiles'
MinTileLevel = 0
InitViewLevel = 2
InitViewPosition = (85.0, -5.0)
###############################################... | Python | 0 | @@ -87,22 +87,49 @@
lip%0A
-import local_t
+from gmt_local_tiles import GMTTiles as T
iles
@@ -1487,25 +1487,8 @@
c =
-local_tiles.Local
Tile
|
837056bb5691d2b58d7c656160eeaec9bdc494b5 | Remove jenkins api additions | nodepool/myjenkins.py | nodepool/myjenkins.py | #!/usr/bin/env python
# Copyright 2011-2013 OpenStack Foundation
#
# 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 app... | Python | 0 | @@ -948,3652 +948,9 @@
-def disable_node(self, name, msg=''):%0A '''%0A Disable a node%0A%0A @param name: Jenkins node name%0A @type name: str%0A @param msg: Offline message%0A @type msg: str%0A '''%0A info = self.get_node_info(name)%0A if info%5B'o... |
53e1ff21bb219495f1b99f84dbb31624fdd35231 | Fix that crazy error that would cause enless looping... | lpthw/ex33.py | lpthw/ex33.py | #i = 0
#numbers = []
#while i < 6:
# print "At the top i is %d" % i
# numbers.append(i)
#
# i += 1
# print "Numbers now: ", numbers
# print "At the bottom i is %d" % i
#
#
#print "The numbers: "
#
#for num in numbers:
# print num
#Study Drills
print "What's the limit of the list?"
a = raw_input("> "... | Python | 0.000001 | @@ -299,16 +299,20 @@
t?%22%0Aa =
+int(
raw_inpu
@@ -318,16 +318,17 @@
ut(%22%3E %22)
+)
%0A%0Adef li
|
5df45d88d7547dafe459ef211f0ef284b18ffacc | update bash_command | lu/plugins.py | lu/plugins.py | import re
import subprocess
from slackbot.bot import listen_to
from slackbot.bot import respond_to
@respond_to('hi', re.IGNORECASE)
def hi(message):
message.reply('hi-me -> jaime XD')
message.react('+1')
@respond_to('help', re.IGNORECASE)
def help(message):
message.reply('I going to do: ')
with ope... | Python | 0.000001 | @@ -667,20 +667,283 @@
eploy')%0A
-%0A
+ p = subprocess.Popen(%5B'./bash_commands.sh'%5D, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)%0A text = ''%0A for line in p.stdout.readlines():%0A text += line.decode(%22utf-8%22)%0A message.reply(text)%0A%0A # uncomment to exec line by ... |
2b35647b0f2f39fe808025f72fd69d4bca2ca5e2 | Test that cache hit is returned from HttpCacher on success | tests/caching_test.py | tests/caching_test.py | import os
import functools
import socket
import threading
import SocketServer
import BaseHTTPServer
import contextlib
import subprocess
import shutil
from nose.tools import istest, assert_equals, assert_false
from whack.caching import HttpCacher
from whack.tempdir import create_temporary_dir
_install_id = "c05c2cbd1... | Python | 0 | @@ -1330,16 +1330,289 @@
) %0A%0A
+@test%0Adef fetch_returns_cache_hit_if_http_server_returns_200(test_runner):%0A test_runner.cache_put(_install_id, %7B%22README%22: %22Out of memory and time%22%7D)%0A result = test_runner.cacher.fetch(_install_id, test_runner.build_dir)%0A assert_equals(True, result.cac... |
f51bae0d0787e879fd7dafe5d460568c2bc8ef31 | fix e2e test fixtures to post list of jobs | tests/e2e/conftest.py | tests/e2e/conftest.py | from django.core.urlresolvers import reverse
from django.template import Context, Template
import pytest
from webtest.app import TestApp
import simplejson as json
from treeherder.webapp.wsgi import application
import os
@pytest.fixture
def pending_jobs():
"""returns a list of buildapi pending jobs"""
return j... | Python | 0 | @@ -1169,32 +1169,35 @@
esult_set_stored
+%5B0%5D
)%0A url = reve
@@ -1205,109 +1205,49 @@
se(%22
-resultset-add-job%22,%0A kwargs=%7B%22project%22: jm.project, %22pk%22: pending_jobs%5B'resultset_id'%5D
+jobs-list%22, kwargs=%7B%22project%22: jm.project
%7D)%0A
@@ -1292,16 +1292,17 @@
params=
... |
cdd30e453f421d65d9650ee10425996ed12912b6 | Make a note to use a new API. | tests/legacy/utils.py | tests/legacy/utils.py | import asyncio
import contextlib
import functools
import logging
import os
import platform
import time
import unittest
class AsyncioTestCase(unittest.TestCase):
"""
Base class for tests that sets up an isolated event loop for each test.
"""
def __init_subclass__(cls, **kwargs):
"""
C... | Python | 0 | @@ -241,16 +241,86 @@
test.%0A%0A
+ Replace with IsolatedAsyncioTestCase when dropping Python %3C 3.8.%0A%0A
%22%22%22%0A
|
2401e8c11fb88b2da6ea1c2c376023150e2f97d6 | clean up | main/views.py | main/views.py | from django.shortcuts import render
from .forms import *
from proxmoxer import ProxmoxAPI
from managevm import secrets
def index(request):
return render(request, 'index.html')
def manage(request):
return render(request,'manage.html')
def create_vm(request):
if request.method == 'POST':
vm_form = VM_Form(da... | Python | 0.000001 | @@ -818,51 +818,8 @@
%5D)%0A%0A
- # %5BTESTING%5D Create openvz container %0A
@@ -1564,37 +1564,8 @@
%5D)%0A
-%0A print(str(testdata))
%0A%0A
|
3731e2771f41fd45a787216d724892c407ba347f | test for veryfing that we are throwing Disconnected() only once when TCPServer is disconnected, sadly we have to wait for a set amount of time to make sure it's not triggered | tests/net/test_tcp.py | tests/net/test_tcp.py | #!/usr/bin/env python
from time import time
from socket import socket, AF_INET, SOCK_STREAM
import pytest
from circuits import Manager
from circuits.core.pollers import Select
from circuits.net.sockets import TCPServer, TCPClient
from circuits.net.sockets import Close, Connect, Write
from .client import Client
from ... | Python | 0 | @@ -4053,24 +4053,171 @@
sconnected%22)
+%0A%0A client.disconnected = False%0A client.push(Write(b%22foo%22))%0A assert pytest.wait_for(client, %22disconnected%22, timeout=20) is None
%0A finally
|
c1948e47006c1d28d0be70037e1a0b45c3ca0de3 | Use member as recorder in team take tests | tests/py/test_take.py | tests/py/test_take.py | from __future__ import unicode_literals
from decimal import Decimal as D
from gittip.testing import Harness
from gittip.models.participant import Participant
default_team_name = 'Team'
class Tests(Harness):
def make_team(self, name=default_team_name):
team = self.make_participant(name, number='plural... | Python | 0 | @@ -3776,36 +3776,37 @@
ce, D('42.00'),
-team
+alice
)%0A assert
@@ -4020,36 +4020,37 @@
ce, D('50.00'),
-team
+alice
)%0A assert
@@ -4347,20 +4347,21 @@
2.00'),
-team
+alice
)%0A%0A
|
3ff88d2631ca3ee5633739643e3e2a6940f0cc83 | Fix comment typo | nova/api/validator.py | nova/api/validator.py | # Copyright 2011 Cloudscaling, 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 requir... | Python | 0.000004 | @@ -1799,17 +1799,17 @@
e path i
-f
+s
rfc3986
|
2342adc6339c0cb2ae794185800286dd6d2d17f6 | introduce a new kind of exception: RedirectWarning (warning with an additional redirection button) | openerp/exceptions.py | openerp/exceptions.py | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the G... | Python | 0 | @@ -1225,16 +1225,516 @@
pass%0A%0A
+class RedirectWarning(Exception):%0A %22%22%22 Warning with a possibility to redirect the user instead of simply%0A discarding the warning message.%0A %22%22%22%0A def __init__(self, msg, action_id, button_text):%0A %22%22%22%0A :param int action_id: id ... |
f022ab6fd517d9a3ad7b1648a4d52930796cf82b | Version bump. | orchestra/__init__.py | orchestra/__init__.py | # The current Orchestra version.
__version__ = '1.0.34'
default_app_config = 'orchestra.apps.OrchestraAppConfig'
| Python | 0 | @@ -50,9 +50,9 @@
.0.3
-4
+5
'%0A%0Ad
|
95c0063e443abf5ee3e86c51983eb9711603d1d5 | Use print function for forward-compatibility | orges/ProcessQueue.py | orges/ProcessQueue.py | #!/bin/python
"""ProcessQueue - Syncronizing workers through Queues"""
from __future__ import division
from multiprocessing import Process, Queue, cpu_count
from Queue import Empty
from collections import namedtuple
import time
import random
from test.algorithms.saes import f
# (Semi Auto) Configuration
try:
P... | Python | 0.000003 | @@ -98,16 +98,54 @@
ivision%0A
+from __future__ import print_function%0A
from mul
@@ -3138,32 +3138,14 @@
ex,
-(
worker
-_index, (worker))
) i
@@ -3244,24 +3244,68 @@
try:%0A
+ # do not wait for a message%0A
@@ -3351,37 +3351,8 @@
it()
- # do not wait for a message
%0A
... |
218587b68756be4f7393324fdaf04ed04d8baf3c | add offsets to tseries.api | pandas/tseries/api.py | pandas/tseries/api.py | """
"""
from pandas.tseries.index import DatetimeIndex, date_range, bdate_range
from pandas.tseries.period import PeriodIndex, period_range, pnow
from pandas.tseries.resample import TimeGrouper
| Python | 0.000002 | @@ -76,16 +76,53 @@
e_range%0A
+from pandas.tseries.offsets import *%0A
from pan
|
97f608ee5e2b73108de6af69db8764c9d009a873 | reorder failing presets | rl_coach/tests/presets/test_presets.py | rl_coach/tests/presets/test_presets.py | # nasty hack to deal with issue #46
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
import pytest
import os
import time
import shutil
from subprocess import Popen, DEVNULL
from rl_coach.logger import screen
FAILING_PRESETS = [
'Fetch_DDPG_HER_baselines',
'Mon... | Python | 0.000001 | @@ -336,25 +336,8 @@
C',%0A
- 'CARLA_CIL',%0A
@@ -353,24 +353,45 @@
uite_DDPG',%0A
+ 'Doom_Basic_BC',%0A
'CARLA_D
@@ -389,28 +389,27 @@
'CARLA_
-DDPG
+CIL
',%0A '
Doom_Bas
@@ -396,37 +396,34 @@
_CIL',%0A '
-Doom_Basic_BC
+CARLA_DDPG
',%0A 'CARL
|
547e70e63940f5260230ad49a9f8f37cebf803ed | Remove un-actionable message | photos3/imgprocess.py | photos3/imgprocess.py | """
photos3.imgprocess
==================
Contains code for processing images
"""
import base64
import os
import pathlib
import tempfile
from PIL import Image
from PIL.ExifTags import GPSTAGS
from PIL.ExifTags import TAGS
from hashlib import sha256
from photos3.model import AlbumImage
from photos3.model import ImageM... | Python | 0.000212 | @@ -1136,136 +1136,11 @@
p
-rint(%22WARNING: File (%7Bt%7D) '%7Bf%7D' does not have EXIF data%22.format(%0A t=img.__class__.__name__,%0A f=file_path))
+ass
%0A%0A
|
f51bc102384ee3b58e8f2c2ce46af1e36616be40 | Allow adding buffer as ndarray | demosys/opengl/vao.py | demosys/opengl/vao.py | from typing import List
import moderngl as mgl
from demosys.opengl import types
from demosys.opengl import ShaderProgram
from demosys import context
DRAW_MODES = {
mgl.TRIANGLES: 'TRIANGLES',
mgl.TRIANGLE_FAN: 'TRIANGLE_FAN',
mgl.TRIANGLE_STRIP: 'TRIANGLE_STRIP',
mgl.TRIANGLES_ADJACENCY: 'TRIANGLES_AD... | Python | 0.000011 | @@ -1,12 +1,25 @@
+import numpy%0A
from typing
@@ -3261,36 +3261,24 @@
self, buffer
-: mgl.Buffer
, buffer_for
@@ -3297,32 +3297,32 @@
tribute_names):%0A
+
%22%22%22%0A
@@ -3485,24 +3485,50 @@
uffer object
+. Can be ndarray or Buffer
%0A :pa
@@ -3636,32 +3636,74 @@
fer, mgl.Buffer)
+ and not... |
4ea203bf62a9b77bc177a1cf9e0ab087c0622827 | improve regex construction performance | autoload/pymatcher.py | autoload/pymatcher.py | import vim, re
import heapq
def CtrlPPyMatch():
items = vim.eval('a:items')
astr = vim.eval('a:str')
lowAstr = astr.lower()
limit = int(vim.eval('a:limit'))
mmode = vim.eval('a:mmode')
aregex = int(vim.eval('a:regex'))
rez = vim.eval('s:rez')
specialChars = ['^','$','.','{','}','(',')... | Python | 0.001353 | @@ -275,22 +275,39 @@
-specialChars =
+escape = %7Bc : %22%5C%5C%22 + c for c in
%5B'%5E
@@ -353,16 +353,17 @@
'/','+'%5D
+%7D
%0A%0A re
@@ -434,53 +434,104 @@
-if len(lowAstr) == 1:%0A c =
+# Escape all of the characters as necessary%0A escaped = %5Bescape.get(c, c) for c in
lowA... |
3dd4ab569931cda3015600364a29611b0b060701 | implement FireModule | squezeenet.py | squezeenet.py | from keras.models import Model
from keras.layers import (Input, Dense, Convolution2D, MaxPooling2D,
Dropout, BatchNormalization, Flatten, Merge)
from keras.optimizers import RMSProp
from keras.utils import np_utils
import numpy as np
import theano as tn
import multiprocessing as mp
tn.confi... | Python | 0.000002 | @@ -158,17 +158,17 @@
latten,
-M
+m
erge)%0Afr
@@ -404,164 +404,492 @@
self
-):%0A pass%0A%0A def __call__(self, data):%0A # data = ...(data)%0A # data = ...(data)%0A # data = ...(data)%0A # data = ...(data)%0A pass%0A%0A return data
+, squeeze_size, expand_size):%0A self.sqz_size = squeeze... |
7e19fe1346ee7a7467faaf6c37cb64018ebef44e | make 'turntable' default camera | sofia/plot.py | sofia/plot.py | """Plotting functions
- makeMTX: Generate 3D-matrix-data
- visualize3D: Plot 3D data
"""
import numpy as _np
from vispy import scene, color
from .process import pdc
from .sph import sph2cart
def makeMTX(Pnm, dn, Nviz=3, krIndex=1, oversize=1):
"""mtxData = makeMTX(Nviz=3, Pnm, dn, krIndex)
--------------------... | Python | 0.000004 | @@ -3007,15 +3007,17 @@
= '
-arcball
+turntable
'%0A
|
6d60588e06c08fd510bd2d857b5c77f8776dc4ce | Revert "Add interactions to ResultSet" | axelrod/result_set.py | axelrod/result_set.py | import math
import csv
#from .eigen import *
from axelrod import payoff as ap, cooperation as ac
try:
# Python 2
from StringIO import StringIO
except ImportError:
# Python 3
from io import StringIO
class ResultSet(object):
"""A class to hold the results of a tournament."""
def __init__(self... | Python | 0 | @@ -1600,41 +1600,8 @@
None
-%0A self.interactions = None
%0A%0A
@@ -3138,113 +3138,8 @@
n)%0A%0A
- if 'interactions' in self.results:%0A self.interactions = self.results%5B'interactions'%5D%0A%0A
|
5fe3b35846bd1a0abfee68091daf58d7d92e51ba | Allow explicit and implicit numbering of the same tag. | tools/merge-event-log-tags.py | tools/merge-event-log-tags.py | #!/usr/bin/env python
#
# Copyright (C) 2009 The Android Open Source Project
#
# 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 req... | Python | 0.99997 | @@ -2078,16 +2078,208 @@
gname%5D%0A%0A
+ # Allow an explicit tag number to define an implicit tag number%0A if orig.tagnum is None:%0A orig.tagnum = t.tagnum%0A elif t.tagnum is None:%0A t.tagnum = orig.tagnum%0A%0A
if
|
b77cc71a96d3cd9aa9475189428378b34f5f590c | fix typo in run_regression_tests.py | tools/run_regression_tests.py | tools/run_regression_tests.py | #!/bin/python
import run_tests
import os
import time
import subprocess
import sys
# returns a list of new revisions
def svn_fetch():
current_version = run_tests.svn_info()[0]
p = subprocess.Popen(['svn', 'up'], stdout=subprocess.PIPE)
revision = -1
output = ''
for l in p.stdout:
if 'At revision ' in l:
... | Python | 0.014301 | @@ -446,16 +446,17 @@
%25s' %25 ou
+t
put%0A%09%09sy
|
50e8b700638a9b986ceb746083a915d862ccac90 | format fix | trunk/pyfarm/db/insert/net.py | trunk/pyfarm/db/insert/net.py | # No shebang line, this module is meant to be imported
#
# This file is part of PyFarm.
# Copyright (C) 2008-2012 Oliver Palmer
#
# PyFarm is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version ... | Python | 0.000003 | @@ -3248,17 +3248,16 @@
msg(%22...
-.
hostname
@@ -3274,16 +3274,16 @@
stname)%0A
+
data
@@ -3558,18 +3558,16 @@
msg(%22...
-..
address:
@@ -3803,19 +3803,16 @@
msg(%22...
-...
subnet:
@@ -4142,23 +4142,16 @@
msg(%22...
-.......
os: %25s%22
@@ -4970,24 +4970,25 @@
log.msg(%22..
+.
swap total:
@@ -52... |
cfd675bf8594bcc6d47359fe75d38a151cf4cfe5 | fix import reference | ummeli/opportunities/views.py | ummeli/opportunities/views.py | from django.views.generic import DetailView, ListView
from django.shortcuts import get_object_or_404
from django.shortcuts import render, redirect
from django.core.urlresolvers import reverse
from django.template import RequestContext
from django.contrib.auth.decorators import login_required
from django.contrib import ... | Python | 0 | @@ -444,16 +444,23 @@
unities.
+tomtom.
forms im
|
4b8ae8f1839299d8bf41bb5fa1ac868767168ee3 | remove attribute to pass test (not interesting attr for this test! | vmlog/test/test_serializer.py | vmlog/test/test_serializer.py | import pytest
import struct, py, sys
from jitlog.objects import (FlatOp, TraceForest, Trace,
MergePoint, iter_ranges, PointInTrace)
from jitlog import constants as const
from vmlog.views import (LogMetaSerializer, TraceSerializer,
VisualTraceTreeSerializer)
PY3 = sys.version_info[0] >= 3
class FakeJit... | Python | 0 | @@ -865,16 +865,61 @@
is test%0A
+ del json%5B'labels'%5D%0A del json%5B'jumps'%5D%0A
asse
|
67add1ce9fdd437f72c71c12c71b38aeba60465a | update settings | vpn-proxy/project/settings.py | vpn-proxy/project/settings.py | """
Django settings for project project.
Generated by 'django-admin startproject' using Django 1.9.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
#... | Python | 0.000001 | @@ -958,14 +958,13 @@
38.2
-50.225
+26.36
'%0ASE
@@ -1029,17 +1029,15 @@
= '
-vpn-proxy
+mist-io
-tun
|
32e9fb1549365be7405ba7c8c575b2dd381eeb4b | remove useless EsxTemplatePool class | src/template.py | src/template.py | from pyVmomi import vim
from tabulate import tabulate
from vm import vm_guess_folder
from misc import esx_name, esx_objects
###########
# HELPERS #
###########
def template_get_all(service):
l = []
vms = esx_objects(service, vim.VirtualMachine)
for v in vms:
if not v.summary.config.template:
... | Python | 0 | @@ -418,76 +418,33 @@
ate_
-list(s, opt):%0A pool = EsxTemplatePool(s)%0A tmpls = pool.list()%0A
+print_details(templates):
%0A
@@ -537,19 +537,23 @@
r t in t
+e
mpl
+ate
s:%0A
@@ -571,17 +571,16 @@
.info()%0A
-%0A
@@ -747,16 +747,118 @@
aders)%0A%0A
+def template_list(s, opt):%0A temp... |
766c95cc924db51237dc8a1447a510a72ae79bca | Implement get_root_dir_with_all_resources for tf.resource_loader. Change: 150157133 | tensorflow/python/platform/resource_loader.py | tensorflow/python/platform/resource_loader.py | # Copyright 2015 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.990059 | @@ -761,16 +761,50 @@
atafile%0A
+@@get_root_dir_with_all_resources%0A
@@load_r
@@ -811,16 +811,16 @@
esource%0A
-
@@readah
@@ -1693,72 +1693,65 @@
Get
-the
+a
direct
-ory where files specified in data attribute are stored
+ path to the data files colocated with the script
.%0A%0A
@@ -1861,24 +1861,24 @@
ore... |
04b8abde8e44dd6f1ccd9bbec55d0c03e89dfd49 | Update librispeech_test.py | tensorflow_datasets/audio/librispeech_test.py | tensorflow_datasets/audio/librispeech_test.py | # coding=utf-8
# Copyright 2019 The TensorFlow Datasets 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 appl... | Python | 0 | @@ -623,11 +623,18 @@
or l
-m1b
+ibrispeech
dat
|
55560ac5782dcd6acc3cad3a6c9990bdb602dd1e | Fix SyntaxError | froide/foirequestfollower/tests.py | froide/foirequestfollower/tests.py | import re
import factory
from django.test import TestCase
from django.urls import reverse
from django.core import mail
from django.contrib.auth import get_user_model
from django_comments.forms import CommentForm
from django_comments.models import Comment
from froide.foirequest.models import FoiRequest
from froide.fo... | Python | 0.012387 | @@ -1829,16 +1829,24 @@
er=req,
+message=
req.mess
|
4f88836f604bd5dbd7e38b55428f3b30d814c88a | add glsar comparison to example_gls.py | scikits/statsmodels/examples/example_gls.py | scikits/statsmodels/examples/example_gls.py | """
Example: scikis.statsmodels.GLS
"""
import scikits.statsmodels as sm
import numpy as np
data = sm.datasets.longley.Load()
data.exog = sm.add_constant(data.exog)
# The Longley dataset is a time series dataset
# Let's assume that the data is heteroskedastic and that we know
# the nature of the heteroskedasticity. ... | Python | 0.000001 | @@ -1777,8 +1777,624 @@
support%0A
+%0A# We can use the GLSAR model with one lag, to get to a similar result%0A%0Aglsar_model = sm.GLSAR(data.endog, data.exog, 1)%0Aglsar_results = glsar_model.iterative_fit(0)%0A%0A# comparing gls and glsar results, we see that there are some small%0A# differences in the parameter est... |
dccbbf1babfef430144798869e0b93735f980b81 | Add accommodation type to ItineraryComponent model | gapipy/resources/tour/itinerary.py | gapipy/resources/tour/itinerary.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from ..base import Resource
from ...models.base import BaseModel
from ...utils import DurationLabelMixin, LocationLabelMixin, duration_label
class OptionalActivity(BaseModel):
_resource_fields = [
('activity_dossier', 'ActivityDossier'),
... | Python | 0 | @@ -1053,32 +1053,91 @@
ion', 'Place'),%0A
+ ('accommodation_dossier', 'AccommodationDossier'),%0A
('activi
@@ -1466,16 +1466,107 @@
_TIME'%0A%0A
+ @property%0A def is_accommodation(self):%0A return self.type == 'ACCOMMODATION'%0A%0A
@pro
|
745585949c37abd42b3d1c977b6da9f2efaac6f3 | Add yesno and capfirst for cluster policy 'Enable' column | senlin_dashboard/cluster/clusters/tables.py | senlin_dashboard/cluster/clusters/tables.py | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | Python | 0.000006 | @@ -625,24 +625,78 @@
everse_lazy%0A
+from django.template import defaultfilters as filters%0A
from django.
@@ -6197,16 +6197,25 @@
.Column(
+%0A
%22enabled
@@ -6216,16 +6216,24 @@
nabled%22,
+%0A
verbose
@@ -6250,16 +6250,67 @@
nabled%22)
+,%0A filters=(filters.yesno, filters.capfirst)
)... |
c0d02e1f9eccf7c4aa6d28da9a3fa7f027885a11 | Remove unused import | vispy/visuals/tests/test_axis.py | vispy/visuals/tests/test_axis.py | # -*- coding: utf-8 -*-
"""
Tests for AxisVisual
"""
from vispy import scene
from vispy.scene import visuals
from vispy.testing import (requires_application, TestingCanvas,
run_tests_if_main)
@requires_application()
def test_axis():
with TestingCanvas() as c:
axis = visuals.Ax... | Python | 0.000001 | @@ -52,32 +52,8 @@
%22%22%0A%0A
-from vispy import scene%0A
from
|
380dd22b37d2bd377276c8325497e519e18ec84a | Improve to_csv message | cartoframes/data/observatory/catalog/entity.py | cartoframes/data/observatory/catalog/entity.py | import pandas as pd
from abc import ABC
from ...clients.bigquery_client import BigQueryClient
from ....utils.logger import log
from ....exceptions import DOError
_PLATFORM_BQ = 'bq'
class CatalogEntity(ABC):
"""This is an internal class the rest of the classes related to the catalog discovery extend.
It ... | Python | 0.000097 | @@ -180,16 +180,333 @@
= 'bq'%0A%0A
+_DATASET_READ_MSG = '''To load it as a DataFrame you can do:%0A%0A df = pandas.read_csv('%7B%7D')%0A'''%0A%0A_GEOGRAPHY_READ_MSG = '''To load it as a GeoDataFrame you can do:%0A%0A from cartoframes.utils import decode_geometry%0A%0A df = pandas.read_csv('%7B%7D')%0A gdf... |
999fa7b062d58ecb0723ac5074a471f6229fc1dd | read mask as uint8 array | chainercv/datasets/cub/cub_keypoint_dataset.py | chainercv/datasets/cub/cub_keypoint_dataset.py | import collections
import numpy as np
import os
from chainercv.datasets.cub.cub_utils import CUBDatasetBase
from chainercv import utils
class CUBKeypointDataset(CUBDatasetBase):
"""`Caltech-UCSD Birds-200-2011`_ dataset with annotated keypoints.
.. _`Caltech-UCSD Birds-200-2011`:
http://www.vision... | Python | 0.000021 | @@ -5244,16 +5244,44 @@
.png'),%0A
+ dtype=np.uint8,%0A
|
62d44e2402c854a41ba8cb59a628369558d19e36 | Remove duplicate test | tests/test__config.py | tests/test__config.py | from .test_utils import TestCase
from confetti import Config
from confetti import get_config_object_from_proxy
from confetti import exceptions
class BasicUsageTest(TestCase):
def setUp(self):
super(BasicUsageTest, self).setUp()
self.conf = Config(dict(
a=dict(
b=2
... | Python | 0.000014 | @@ -1112,147 +1112,8 @@
3)%0A%0A
- def test__setting_existing_paths_through_proxy(self):%0A self.conf.root.a.b = 3%0A self.assertEquals(self.conf.root.a.b, 3)%0A%0A
|
4368ea7128fd850d3ee2b67243db47d92e75836f | fix test_context to use get_current_context | tests/test_context.py | tests/test_context.py | import numpy
from glitter import EnumConstant
from glitter.contexts import Context
def check_property(context, name):
value = getattr(context, name)
try:
if isinstance(value, EnumConstant):
if name in ("draw_buffer", "read_buffer"):
return # avoid problems with unavailable ... | Python | 0.000004 | @@ -69,17 +69,29 @@
import
-C
+get_current_c
ontext%0A%0A
@@ -1141,17 +1141,29 @@
ntext =
-C
+get_current_c
ontext()
|
dec0bbfa4ab4c824ef93cdded281c8dd954f0c77 | Add conditional user switching only if user is not sdkman_user | tests/test_default.py | tests/test_default.py | sdkman_user = 'jenkins'
sdkman_group = 'jenkins'
def script_wrap(cmds):
# run as interactive shell under user to ensure .bashrc is sourced
return "sudo -H -u {0} /bin/bash -i -c '{1}'".format(
sdkman_user,
'; '.join(cmds)
)
def check_run_for_rc_and_result(cmds, expected, host, check_stde... | Python | 0.000011 | @@ -56,24 +56,30 @@
script_wrap(
+host,
cmds):%0A #
@@ -108,19 +108,8 @@
ell
-under user
to e
@@ -141,31 +141,23 @@
-return %22sudo -H -u %7B0%7D
+wrapped_cmd = %22
/bin
@@ -170,17 +170,17 @@
-i -c '%7B
-1
+0
%7D'%22.form
@@ -182,24 +182,58 @@
.format(
-%0A
+'; '.join(cmds))%0A%0A if host... |
043b2f26f836567f3d8d755d0756522559063a0d | Fix last commit | tests/test_domains.py | tests/test_domains.py | import unittest
import subprocess
import random
# copied from python 2.7 for python 2.6
def check_output(*popenargs, **kwargs):
if 'stdout' in kwargs:
raise ValueError('stdout argument not allowed, it will be overridden.')
process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs)
out... | Python | 0.000002 | @@ -1,12 +1,23 @@
+import sys%0A
import unitt
|
80efd0cd3b050fe75fe4a96b26b35000b1d0a90b | Update test_elo_bot.py | tests/test_elo_bot.py | tests/test_elo_bot.py | import unittest
import sys
from mnl_elo_bot import elo_bot
sys.path.append(".")
class IntegrationTest(unittest.TestCase):
# Just see if it initializes and runs...
def test_process(self):
teams = elo_bot.main(False, None, '')
for team in teams.values():
self.assertIsNotNone(team... | Python | 0.000001 | @@ -75,19 +75,16 @@
d(%22.%22)%0A%0A
-%0A%0A%0A
class In
|
de69b8cce482edc7877d2b203accbc846656ae04 | fix test_factory attribute lookup | tests/test_factory.py | tests/test_factory.py | try:
from builtins import object
except ImportError:
pass
from unittest import TestCase
from transitions.extensions import MachineFactory
class TestFactory(TestCase):
def setUp(self):
self.factory = MachineFactory()
def test_mixins(self):
machine_cls = self.factory.get_predefined()
... | Python | 0 | @@ -479,38 +479,34 @@
graph_cls, '
-set_edge_state
+_get_graph
'))%0A
@@ -601,38 +601,34 @@
ested_cls, '
-set_edge_state
+_get_graph
'))%0A
@@ -782,38 +782,34 @@
ocked_cls, '
-set_edge_state
+_get_graph
'))%0A
@@ -1058,38 +1058,34 @@
ested_cls, '
-set_edge_state
+_get_graph
'))%0A ... |
f7e789422be7fc81dd249d018f00a25ec58deaa0 | Rollback invalid receipts registry for now | yowsup/layers/interface/interface.py | yowsup/layers/interface/interface.py | from yowsup.layers import YowLayer, YowLayerEvent
from yowsup.layers.protocol_iq.protocolentities import IqProtocolEntity
from yowsup.layers.network import YowNetworkLayer
from yowsup.layers.auth import YowAuthenticationProtocolLayer
from yowsup.layers.protocol_receipts.protocolentities import OutgoingReceiptProtocolEn... | Python | 0 | @@ -780,32 +780,34 @@
try = %7B%7D%0A
+ #
self.receiptsRe
@@ -1363,24 +1363,26 @@
Entity)%0A%0A
+ #
def _sendRe
@@ -1434,32 +1434,34 @@
Ack = None):%0A
+ #
assert outg
@@ -1530,24 +1530,26 @@
Entity,%5C%0A
+ #
%22Ex
@@ -1651,24 +1651,26 @@
_class__%0A
+ #
self.re
@@ -17... |
e0dd3fd47325be778211fe8160593b9fb00b4be8 | test harness: properly report exception message | tests/test_harness.py | tests/test_harness.py | #
# Copyright 2011-2015 Jeff Bush
#
# 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 writ... | Python | 0 | @@ -4752,25 +4752,11 @@
str(
-sys.exc_info()%5B0%5D
+exc
))%5D%0A
|
d10826960d5bafc6616dc408e0d47faf1b305269 | Fix the tests | gaphor/ui/tests/test_elementeditor.py | gaphor/ui/tests/test_elementeditor.py | import pytest
from gaphor.ui.elementeditor import ElementEditor
class DiagramsStub:
def get_current_view(self):
return None
@pytest.fixture
def diagrams():
return DiagramsStub()
def test_reopen_of_window(event_manager, element_factory, diagrams):
editor = ElementEditor(event_manager, element_... | Python | 0.999909 | @@ -194,16 +194,100 @@
tub()%0A%0A%0A
+class DummyProperties(dict):%0A def set(self, key, val):%0A self%5Bkey%5D = val%0A%0A%0A
def test
@@ -347,16 +347,51 @@
grams):%0A
+ properties = DummyProperties()%0A
edit
@@ -465,11 +465,8 @@
ties
-=%7B%7D
)%0A%0A
|
203425afc4a65c9ff41e86bf09da01931612b005 | Add repr test for recipe | tests/test_recipes.py | tests/test_recipes.py | import unittest
from brew.constants import IMPERIAL_UNITS
from brew.constants import SI_UNITS
from brew.recipes import Recipe
from fixtures import grain_additions
from fixtures import hop_additions
from fixtures import recipe
from fixtures import yeast
class TestRecipe(unittest.TestCase):
def setUp(self):
... | Python | 0.000001 | @@ -708,24 +708,878 @@
pale ale')%0A%0A
+ def test_repr(self):%0A out = repr(self.recipe)%0A self.assertEquals(out, %22Recipe('pale ale', grain_additions=%5BGrainAddition(Grain('pale 2-row', short_name='2-row', color=2.0, hwe=308.78), weight=13.96, grain_type='cereal'), GrainAddition(Grain('crystal C2... |
c6c210acfcb64b0db10dcc10d415981ab2e1eccf | Remove unnecessary decode in test | tests/test_snactor.py | tests/test_snactor.py | import json
import os
from subprocess import check_call, check_output, CalledProcessError
from helpers import project_dir
import pytest
def setup_module(m):
os.environ['PYTHONDONTWRITEBYTECODE'] = '1'
def test_discovery(project_dir):
with project_dir.as_cwd():
check_call(['snactor', 'discover'])
... | Python | 0.010572 | @@ -4747,32 +4747,16 @@
).read()
-.decode('utf-8')
%0A
|
f5cf4944ee092301b0e6ddf31b14906cba2e198c | Improve documentation | tests/test_unicode.py | tests/test_unicode.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
import inflect
class TestUnicode(unittest.TestCase):
def test_unicode(self):
engine = inflect.engine()
# Unicode compatability test
unicode_test_cases = {
'cliché': 'clichés',
... | Python | 0.000004 | @@ -156,65 +156,84 @@
-def test_unicode(self):%0A engine = inflect.engine()
+%22%22%22 Unicode compatibility test cases %22%22%22%0A%0A def test_unicode_plural(self):
%0A
@@ -237,17 +237,19 @@
-#
+%22%22%22
Unicode
@@ -255,17 +255,17 @@
e compat
-a
+i
bility t
@@ -267,16 +267,71 @@
it... |
27f3648b1fa8609ff403bf23f07dc01be3da7031 | Simplify call to set_radmask() and remove old comments | tests/test_zlambda.py | tests/test_zlambda.py | from __future__ import division, absolute_import, print_function
from past.builtins import xrange
import unittest
import numpy.testing as testing
import numpy as np
import fitsio
from numpy import random
from redmapper import Cluster
from redmapper import Configuration
from redmapper import GalaxyCatalog
from redmapp... | Python | 0 | @@ -1740,137 +1740,8 @@
mask
-%0A%0A #mpc_scale = np.radians(1.) * cluster.cosmo.Dl(0, cluster.z) / (1 + cluster.z)**2%0A mpc_scale = cluster.mpc_scale
%0A
@@ -1769,27 +1769,16 @@
(cluster
-, mpc_scale
)%0A%0A
@@ -1906,16 +1906,24 @@
er.dec,
+cluster.
mpc_scal
@@ -2277,346 +2277,63 @@
... |
7189f2c5ee45481cceb4025143c642232f8817a9 | add alpha with the hextorgb function | wal_steam.py | wal_steam.py | #!/usr/bin/env python
#----------------------------------#
# ,--. ,--. ,--. #
# | .' / ,---. ,-' '-. ,--,--. #
# | . ' | .-. |'-. .-'' ,-. | #
# | |\ \' '-' ' | | \ '-' | #
# `--' '--' `---' `--' `--`--' #
# kotajacob.tk #
# Copyright (C) 2017 Dakota Walsh #
#... | Python | 0 | @@ -1933,26 +1933,17 @@
#
-remove parentheses
+add alpha
%0A
@@ -1958,16 +1958,25 @@
= color
+ + (255,)
%0A
@@ -1998,17 +1998,16 @@
nd(tmp)%0A
-%0A
retu
|
07034e25419b0bca9cd07828acf14a03bdd0726b | Clarify broken line | tests/web/settings.py | tests/web/settings.py | import cherrypy
import tangelo
# This service reports the value of cherrypy's thread pool setting
def run(**kwargs):
if kwargs.get('pool'):
tangelo.util.set_server_setting('server.thread_pool',
int(kwargs['pool']))
response = 'pool="%r"' % cherrypy.config.get('server.t... | Python | 0.999998 | @@ -204,41 +204,8 @@
ol',
-%0A
int
|
792e0018af083ca232edc0d6efb5e366c6467eec | clean up | watershed.py | watershed.py | import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import os
from scipy import ndimage
from skimage import measure, morphology, segmentation
from skimage.feature import peak_local_max
from tocmfastpy import *
#possibly useful
#morphology.remove_small_objects
de... | Python | 0.000001 | @@ -15,106 +15,8 @@
s np
- # linear algebra%0Aimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)%0Aimport os
%0Afro
@@ -507,24 +507,40 @@
e.label(mask
+, connectivity=2
)%0A i = 0%0A
@@ -925,16 +925,32 @@
(newmask
+, connectivity=2
)%0A
|
d0089aea33e773ec844964c1751157d04e27ea33 | fix implicit relative import | tf_cnnvis/__init__.py | tf_cnnvis/__init__.py | from tf_cnnvis import *
| Python | 0.000014 | @@ -1,13 +1,14 @@
from
+.
tf_cnnvi
@@ -20,6 +20,184 @@
ort
-*
+get_visualization%0Afrom .tf_cnnvis import image_normalization%0Afrom .tf_cnnvis import convert_into_grid%0A%0A__all__ = %5B%22get_visualization%22, %22image_normalization%22, %22convert_into_grid%22%5D%0A
%0A
|
8867aebdc657b5dc3047fc42fd8189878b7de006 | Add lammps_interface parameters. | thermof/parameters.py | thermof/parameters.py | """
Parameters for reading and plotting thermal flux
"""
k_parameters = dict(kb=0.001987,
conv=69443.84,
dt=5,
volume=80 * 80 * 80,
temp=300,
prefix='J0Jt_t',
isotropic=True,
aver... | Python | 0 | @@ -2373,8 +2373,1566 @@
=1e6)%0A%7D%0A
+%0Alammps_parameters = dict(cif_file='', # File options%0A output_cif=False,%0A output_raspa=False,%0A force_field='UFF', # Force field options%0A mol... |
cb934c9570eefa0aa7616f486395f1bfbc8c08cd | Update Bazel to latest version | third_party/bazel.bzl | third_party/bazel.bzl | # Copyright 2019 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.999917 | @@ -591,46 +591,46 @@
= %22
-51421724b6038844838a74886e894df16b1bcaf1
+867bada0117df8c57a91c6c0005206ba45ffbada
%22%0A
|
1ea757d2a03a6969670f282d0c7c00a9d62677e2 | Refresh cancers list each time (fixes build failing on some tests and makes filters behaviour more consistent and predictable) | website/views/_global_filters.py | website/views/_global_filters.py | from models import MC3Mutation
from models import TCGAMutation
from models import Cancer
from models import Mutation
from models import Site
from models import The1000GenomesMutation
from models import ExomeSequencingMutation
from models import ClinicalData
from database import has_or_any
from helpers.filters import Fi... | Python | 0 | @@ -4695,82 +4695,8 @@
%5D%0A%0A%0A
-# we do not expect cancers to change often%0Acancers = Cancer.query.all()%0A%0A%0A
def
@@ -4743,16 +4743,50 @@
by_id):%0A
+ cancers = Cancer.query.all()%0A%0A
retu
|
08889219b5a676066f531075370101c492b25761 | Remove useless method | alignak_app/synthesis/service.py | alignak_app/synthesis/service.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2015-2016:
# Matthieu Estrada, ttamalfor@gmail.com
#
# This file is part of (AlignakApp).
#
# (AlignakApp) 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 Sof... | Python | 0.000128 | @@ -4910,481 +4910,8 @@
1)%0A%0A
- def update_service(self, service):%0A %22%22%22%0A Update last check and output of service%0A%0A :param service: a service from Backend%0A :type service: dict%0A %22%22%22%0A%0A self.service = service%0A%0A diff_last_check = get_dif... |
3d74a8cab311acefb499c3b1c5969b2ff9cdcd07 | Update Bazel to latest version | third_party/bazel.bzl | third_party/bazel.bzl | # Copyright 2019 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.000018 | @@ -591,128 +591,128 @@
= %22
-da5ee491b7af41d18d035e42228f518077164f65%22%0Abazel_sha256 = %228820cad1f844cdf528a7c7d66dc221f91fb4cf9eb3ae98e7f1fe2b0ac7760e46
+0289418a45e0ca220474d1f55e11a4c9bffff489%22%0Abazel_sha256 = %22d168f896b064193c3fc22a8f17127738865970c56a0dfba8d3ec88106fdf4887
%22%0A
|
13bf3354736f219e739dc78e5f5c0cc2ab3058c7 | Fix a test that wasn't running. | websockets/test_client_server.py | websockets/test_client_server.py | import unittest
from unittest.mock import patch
import asyncio
from .client import *
from .exceptions import InvalidHandshake
from .http import read_response
from .server import *
@asyncio.coroutine
def echo(ws, uri):
yield from ws.send((yield from ws.recv()))
class ClientServerTests(unittest.TestCase):
... | Python | 0.00051 | @@ -1964,24 +1964,44 @@
-yield from tulip
+self.loop.run_until_complete(asyncio
.sle
@@ -2005,16 +2005,17 @@
sleep(0)
+)
%0A%0A @p
|
80bf936ad8068a32313411291b5be5675decf235 | Update Bazel to latest version | third_party/bazel.bzl | third_party/bazel.bzl | # Copyright 2019 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 | @@ -591,128 +591,128 @@
= %22
-b85d0b71c878029384caf94041701ad7839796c6%22%0Abazel_sha256 = %2279fff96688010cf4a2d857c1824d42d1addd806ac610fa9d11eb076decbf0bc2
+dfcda9e1fb417af94884b319d40ce747b2b7c871%22%0Abazel_sha256 = %22ab7650f4f3c615cfa8da149be53792a3b86d20c4e5990bb2c9ffd7268a048cf7
%22%0A
|
92adc02daae13f6ef24ae1ec2eafac77ce528a74 | Update script to start, stop and status by name. | setup/timvideos/streaming/list_aws_hosts.py | setup/timvideos/streaming/list_aws_hosts.py | # list_aws_hosts.py
# list all active ec2 hosts
from boto import ec2
import pw
creds = pw.stream['aws']
ec2conn = ec2.connection.EC2Connection(creds['id'], creds['key'] )
reservations = ec2conn.get_all_instances()
instances = [i for r in reservations for i in r.instances]
for i in instances:
if not i.dns_name:
... | Python | 0 | @@ -1,12 +1,58 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A
# list_aws_h
@@ -92,67 +92,807 @@
ts%0A%0A
-from boto import ec2 %0Aimport pw%0A%0Acreds = pw.stream%5B'aws'%5D%0A%0A
+%22%22%22%0AStart / stop by name.%0AStart mission %22list_aws_hosts.py start mission%22%0AStop mission %22list_aws_hosts.py stop ... |
31879d171257b933ac08012f16c1b80cde7c0a48 | Optimize column names | web/blueprints/user/tables.py | web/blueprints/user/tables.py | import typing
from flask import url_for
from bs_table_py.table import BootstrapTable, Column, \
LinkColumn, button_toolbar, MultiBtnColumn, DateColumn, RelativeDateColumn
from web.blueprints.helpers.user import no_membership_change
class RefreshableTableMixin:
"""A mixin class showing the refresh button by ... | Python | 0.000002 | @@ -3590,24 +3590,87 @@
trapTable):%0A
+ class Meta:%0A table_args = %7B'data-escape': 'false'%7D%0A%0A
id = Col
@@ -3666,34 +3666,33 @@
id = Column(%22
-ID
+#
%22)%0A user = Li
@@ -3749,45 +3749,95 @@
mn(%22
-Raum%22)%0A num_hosts = Column(%22#Hosts
+%3Ci class=%5C%22fas fa-home%5C%22%3E%3C... |
d2a7d772826773941ad11fd92e823ec81080635d | Add SF package registry for PIO Plus | platformio/pioplus.py | platformio/pioplus.py | # Copyright 2014-present PlatformIO <contact@platformio.org>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | Python | 0 | @@ -1100,29 +1100,16 @@
_init__(
-%0A
self, jo
@@ -1144,16 +1144,18 @@
kages%22),
+ %5B
%0A
@@ -1159,17 +1159,16 @@
-%5B
%22https:/
@@ -1219,24 +1219,143 @@
est.json%22,%0A
+ %22https://sourceforge.net/projects/platformio-storage/files/%22%0A %22packages/manifest... |
734d4bb7bc827ca63eed780b7b8fe15185e91119 | Refactor towards EntangledModelForm | cmsplugin_cascade/bootstrap4/secondary_menu.py | cmsplugin_cascade/bootstrap4/secondary_menu.py | from django.forms import widgets
from django.forms.fields import ChoiceField, IntegerField
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _, get_language_from_request
from entangled.forms import EntangledModelFormMixin, get_related_object
from cms.plugin_pool import ... | Python | 0 | @@ -1,37 +1,4 @@
-from django.forms import widgets%0A
from
@@ -156,35 +156,8 @@
as _
-, get_language_from_request
%0Afro
@@ -208,28 +208,8 @@
ixin
-, get_related_object
%0Afro
@@ -1475,1333 +1475,166 @@
-# page_id = GlossaryField(%0A # widgets.Select(choices=()),%0A # label=_(%22CMS Page Id%22)... |
c25b381309a93b41042ac17e8f606bb0c0caf97a | clear the session at the start of the tests | plotly/tests/utils.py | plotly/tests/utils.py | import copy
import json
from numbers import Number as Num
from unittest import TestCase
from plotly import files, session, utils
class PlotlyTestCase(TestCase):
# parent test case to assist with clean up of local credentials/config
def __init__(self, *args, **kwargs):
self._credentials = None
... | Python | 0 | @@ -465,16 +465,186 @@
wargs)%0A%0A
+ @classmethod%0A def setUpClass(cls):%0A session._session = %7B%0A 'credentials': %7B%7D,%0A 'config': %7B%7D,%0A 'plot_options': %7B%7D%0A %7D%0A%0A
def
|
ec0d4b38115031d19066c321ef06659e5761bdd8 | Update docs | src/pybel/parser/utils.py | src/pybel/parser/utils.py | # -*- coding: utf-8 -*-
import itertools as itt
import logging
import re
log = logging.getLogger('pybel')
re_match_bel_header = re.compile("(SET\s+DOCUMENT|DEFINE\s+NAMESPACE|DEFINE\s+ANNOTATION)")
def sanitize_file_lines(f):
"""Enumerates a line iterator and returns the pairs of (line number, line) that are c... | Python | 0.000001 | @@ -3465,16 +3465,343 @@
match%0A%0A
+ 1. Checks that all keys in the query dict are in the target dict%0A 2. Matches the values of the keys in the query dict%0A a. If the value is a string, then must match exactly%0A b. If the value is a set/list/tuple, then will match any of them%0A c. If... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.