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 |
|---|---|---|---|---|---|---|---|
099855fa4e56d6fe54c7260cb149bb41640f0e43 | Add test for populateQueryMetrics | test/query_tests.py | test/query_tests.py | import unittest
import pydocumentdb.document_client as document_client
import pydocumentdb.documents as documents
import test.test_config as test_config
class QueryTest(unittest.TestCase):
"""Test to ensure escaping of non-ascii characters from partition key"""
host = test_config._test_config.host
masterK... | Python | 0 | @@ -915,10 +915,9 @@
%22/%22)
-
%0A
+
@@ -1490,77 +1490,8 @@
s)%0A%0A
- def test_first_and_last_slashes_trimmed_for_query_string (self):%0A
@@ -1637,16 +1637,85 @@
ition)%0A%0A
+ def test_first_and_last_slashes_trimmed_for_query_string (self):%0A
@@ -2088,8 +2088,919 @@
myId')%0A%0A
+ ... |
3ca5442a6efac5bce68b215fe24b615741e23ef8 | Fix parameter name | executor/opensubmitexec/running.py | executor/opensubmitexec/running.py | import pexpect
import os
import time
import tempfile
from .exceptions import *
import logging
logger = logging.getLogger('opensubmitexec')
def kill_longrunning(config):
'''
Terminate everything under the current user account
that has run too long. This is a final safeguard if
the subproc... | Python | 0.000107 | @@ -5829,23 +5829,20 @@
.format(
-pattern
+text
, self.n
|
9d73418d4a5d4170e1a68cd45c04d38554ec4d61 | update links to Gmsh documentation | meshio/msh_io/main.py | meshio/msh_io/main.py | # -*- coding: utf-8 -*-
#
from ctypes import c_int, sizeof
import struct
from . import msh2, msh4_0, msh4_1
versions = {"2": msh2, "4.0": msh4_0, "4.1": msh4_1, "4": msh4_1}
def read(filename):
"""Reads a Gmsh msh file.
"""
with open(filename, "rb") as f:
mesh = read_buffer(f)
return mesh
d... | Python | 0 | @@ -414,17 +414,16 @@
sh.info/
-/
doc/texi
@@ -1379,12 +1379,8 @@
nfo/
-dev/
doc/
@@ -1416,28 +1416,8 @@
rmat
--_0028version-4_0029
%0A%0A
|
7d2b8283518847fbee4507ed17b7f5f29c88e9f0 | fix import | rasa/nlu/tokenizers/whitespace_tokenizer.py | rasa/nlu/tokenizers/whitespace_tokenizer.py | from typing import Any, Dict, List, Text
import regex
import re
from constants import DOCS_URL_COMPONENTS
from rasa.nlu.tokenizers.tokenizer import Token, Tokenizer
from rasa.nlu.training_data import Message
import rasa.utils.common as common_utils
class WhitespaceTokenizer(Tokenizer):
defaults = {
# F... | Python | 0.000001 | @@ -64,16 +64,21 @@
e%0A%0Afrom
+rasa.
constant
|
b615bce7bb9fcdab8d3c364e459d7ce516665feb | fix on messages type | messagebird/verify.py | messagebird/verify.py | from messagebird.base import Base
from messagebird.recipient import Recipient
from messagebird.message import Message
class Verify(Base):
def __init__(self):
self.id = None
self.href = None
self.type = None
self.originator = None
self.ref... | Python | 0.000006 | @@ -1371,25 +1371,16 @@
value
-%5B'items'%5D
= %5BMess
@@ -1411,17 +1411,8 @@
alue
-%5B'items'%5D
%5D%0A
|
d9237f7546efa0552d8af255aa6247ba250db5e8 | fix environ test for mac/win | tests/test_fast/test_env.py | tests/test_fast/test_env.py | from easyprocess import EasyProcess
from nose.tools import eq_, ok_
import sys
python = sys.executable
def pass_env(e):
# py37 creates "LC_CTYPE" automatically
prog = 'import os;d=dict(os.environ);d.pop("LC_CTYPE",None);print(d)'
return EasyProcess([python, '-c', prog], env=e).call().stdout
def test_en... | Python | 0.000002 | @@ -71,16 +71,28 @@
port sys
+%0Aimport json
%0A%0Apython
@@ -136,132 +136,75 @@
-# py37 creates %22LC_CTYPE%22 automatically%0A prog = 'import os;d=dict(os.environ);d.pop(%22LC_CTYPE%22,None);print(d
+prog = 'import os,json;print(json.dumps(dict(os.environ))
)'%0A
-return
+s =
Eas
@@ -255,16 +255,41 ... |
d309d96f81436d53866dcc5dfc4a203f58549225 | use getfixturevalue insteadof getfuncargvalue | tests/test_module_result.py | tests/test_module_result.py | import pytest
from pytest_ansible.results import ModuleResult
positive_host_patterns = {
'all': 2,
'*': 2,
'localhost': 1,
'local*': 1,
'local*:&*host': 1,
'!localhost': 1,
'all[0]': 1,
'all[-1]': 1,
'*[0:1]': 2, # this is confusing, but how host slicing works
'*[0:]': 2,
}
ne... | Python | 0.000002 | @@ -3109,14 +3109,14 @@
getf
-uncarg
+ixture
valu
|
a31c3ca18473cfa65bdf8538e611606049e145c3 | Remove test_sparse_scipy for now | tests/test_poisson_solve.py | tests/test_poisson_solve.py | from unittest import TestCase
import numpy as np
from phi import math
from phi.flow import CLOSED, PERIODIC, OPEN, Domain, poisson_solve
from phi.physics.pressuresolver.sparse import SparseCG, SparseSciPy
def _test_solve_no_obstacles(domain, solver):
print('Testing domain with boundaries: %s' % (domain.boundari... | Python | 0 | @@ -1546,24 +1546,26 @@
solver)%0A%0A
+ #
def test_sp
@@ -1577,32 +1577,34 @@
scipy(self):%0A
+ #
solver = Sp
@@ -1614,24 +1614,26 @@
eSciPy()%0A
+ #
for dom
@@ -1643,32 +1643,34 @@
in DOMAINS:%0A
+ #
_test_s
|
890cf4bcf98e1ea7621341005c4953b5dbcea8e0 | add trigger test | tests/test_scheduled_job.py | tests/test_scheduled_job.py | """Unit test module for scheduled jobs logic"""
import json
from portal.extensions import db
from portal.models.role import ROLE
from portal.models.scheduled_job import ScheduledJob
from portal.tasks import test
from tests import TestCase
class TestScheduledJob(TestCase):
"""Scheduled Job tests"""
def test_... | Python | 0.000001 | @@ -2621,28 +2621,482 @@
self.assert404(resp)%0A
+%0A def test_trigger_job(self):%0A self.promote_user(role_name=ROLE.ADMIN)%0A self.login()%0A%0A job = ScheduledJob(name=%22testjob%22, task=%22test%22, schedule=%220 0 * * *%22)%0A db.session.add(job)%0A db.session.commit()... |
a8a6f23ac4519acdfe744a4ad3d994cbc1c3ef36 | Update deprecated usage of django-guardian "assign" | src/competition/models/organizer_model.py | src/competition/models/organizer_model.py | from django.db import models
from django.dispatch import receiver
from django.db.models.signals import post_save, pre_delete
from django.contrib.auth.models import User
from guardian.shortcuts import assign, remove_perm
from competition.validators import validate_name
from competition.models.competition_model import ... | Python | 0 | @@ -200,16 +200,21 @@
t assign
+_perm
, remove
@@ -1392,16 +1392,21 @@
assign
+_perm
(permiss
|
871c780ed9ec9760b914067a806cba25572b2a00 | Reword comment to fit in an 80-character line | statscache/app.py | statscache/app.py | import flask
import fedmsg.config
import statscache.plugins
import statscache.utils
import statscache.frequency
import json
app = flask.Flask(__name__)
config = fedmsg.config.load_config()
plugins = {} # mapping of identifiers to plugin instances
uri = config['statscache.sqlalchemy.uri']
session = statscache.plugins... | Python | 0.000004 | @@ -3197,17 +3197,8 @@
to
-reusable
Freq
|
87b1bed2c23fa992f16fcd6c4a32a33c6bf8ceb3 | Use `pwndbg.lib.stdio.stdio` to refactor the code | pwndbg/commands/ipython_interactive.py | pwndbg/commands/ipython_interactive.py | """
Command to start an interactive IPython prompt.
"""
import sys
from contextlib import contextmanager
import gdb
import pwndbg.color.message as M
import pwndbg.commands
@contextmanager
def switch_to_ipython_env():
"""We need to change stdout/stderr to the default ones, otherwise we can't use tab or autocompl... | Python | 0.000025 | @@ -167,16 +167,40 @@
ommands%0A
+import pwndbg.lib.stdio%0A
%0A%0A@conte
@@ -365,85 +365,18 @@
B's
-stdout and stderr%0A saved_stdout = sys.stdout%0A saved_stderr = sys.stderr
+excepthook
%0A
@@ -420,20 +420,17 @@
#
-Use Python's
+Switch to
def
@@ -436,29 +436,25 @@
fault stdout
- and
+/
stderr%... |
a19d4a53bf47b045f92dbe9e9d0ee86c69aa5f98 | add forms widget factory beginnings | examples/djangowanted/wanted/forms.py | examples/djangowanted/wanted/forms.py | from django.forms import ModelForm
from django import forms
from wanted.models import *
class FlagForm(ModelForm):
item = forms.ModelChoiceField(queryset=Item.objects.all())
type = forms.ModelChoiceField(queryset=FlagType.objects.all())
value = forms.CharField(max_length=255)
class ItemForm(ModelForm):
... | Python | 0.000001 | @@ -531,16 +531,33 @@
gth=1000
+, label=%22Details%22
)%0A pr
|
b2fed60512b17b19850f06f4b0cdb7114dc3e27b | fix super method | statues/models.py | statues/models.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
from django.db import models
from django.utils import timezone
from django.template.defaultfilters import slugify
# Create your models here.
class Statue(models.Model):
""" Default values for latitude and longitude are the ones from... | Python | 0.000047 | @@ -1107,16 +1107,28 @@
super(
+Statue, self
).save(*
|
ec22975ebfad85e0c7be92acfd326aa9b4f34214 | Remove unused variable from private_torrents | flexget/plugins/filter/private_torrents.py | flexget/plugins/filter/private_torrents.py | import logging
from flexget.plugin import register_plugin, priority
log = logging.getLogger('priv_torrents')
class FilterPrivateTorrents(object):
"""How to handle private torrents.
private_torrents: yes|no
Example::
private_torrents: no
This would reject all torrent entries with private fla... | Python | 0.000002 | @@ -685,33 +685,8 @@
'%5D%0A%0A
- rejected = False%0A
@@ -1044,40 +1044,10 @@
- rejected = True%0A
+el
if p
@@ -1150,40 +1150,8 @@
rue)
-%0A rejected = True
%0A%0Are
|
79c7f2c7294235cf14e4e6652b348f5eda9079df | bump v1.0.1 | steam/__init__.py | steam/__init__.py | __version__ = "1.0.0"
__author__ = "Rossen Georgiev"
version_info = (1, 0, 0)
| Python | 0.000002 | @@ -12,17 +12,17 @@
= %221.0.
-0
+1
%22%0A__auth
@@ -69,11 +69,11 @@
(1, 0,
-0
+1
)%0A
|
0dc35744b443dabc54f79ff1d4b799d1c3d0b5b0 | Add docstrings for test_ebs.py. | flocker/node/agents/functional/test_ebs.py | flocker/node/agents/functional/test_ebs.py | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Functional tests for ``flocker.node.agents.ebs`` using an EC2 cluster.
"""
from uuid import uuid4
from bitmath import Byte
from ..ebs import EBSBlockDeviceAPI
from ..testtools import ec2_client_from_environment
from ....testtools import skip_except
f... | Python | 0 | @@ -495,16 +495,184 @@
er_id):%0A
+ %22%22%22%0A Create an %60%60EBSBlockDeviceAPI%60%60 for use by tests.%0A%0A :param string cluster_id: Flocker cluster id to be used%0A by the current set of tests.%0A %22%22%22%0A
retu
@@ -839,19 +839,35 @@
te%60%60
- and %60%60list
+, %60%60list%60%60,%0A#... |
33fcf7909421104844a952805d043e8de9e5dbcc | Test merge worker with no merges, but with commits | tests/workers/test_merge.py | tests/workers/test_merge.py | import pytest
from mock import patch, MagicMock
from gitfs.worker.merge import MergeWorker
class TestMergeWorker(object):
def test_run(self):
mocked_queue = MagicMock()
mocked_idle = MagicMock(side_effect=ValueError)
mocked_queue.get.side_effect = ValueError()
worker = MergeWork... | Python | 0.000001 | @@ -1758,40 +1758,624 @@
its
-== None%0A assert merges == %5B%5D
+is None%0A assert merges == %5B%5D%0A%0A def test_on_idle_with_commits_and_no_merges(self):%0A mocked_want_to_merge = MagicMock()%0A mocked_commit = MagicMock()%0A%0A worker = MergeWorker(%22name%22, %22email%22, %... |
dd1af0776615a759fb02feea4a441db882ff78c8 | Version bump to 1.0.8 | mezzanine/__init__.py | mezzanine/__init__.py |
__version__ = "1.0.7"
| Python | 0 | @@ -17,7 +17,7 @@
1.0.
-7
+8
%22%0A
|
6a00d7272a29afd21ad40768f87859e7d20526a6 | Whitelist <br> tag | steemrocks/app.py | steemrocks/app.py | from flask import Flask, render_template, request, redirect, abort, g, url_for
from .tx_listener import listen
from .models import Account
from .utils import get_steem_conn, Pagination
from .settings import SITE_URL
import bleach
app = Flask(__name__)
PER_PAGE = 40
@app.cli.command()
def listen_transactions():
... | Python | 0 | @@ -1730,16 +1730,22 @@
%22small%22
+, %22br%22
%5D)%0A%0Aapp.
|
c2f2fb3c49a667f0b9932c5df815bf39cfc4104f | use default value of 'requires_grad_' | pymanopt/autodiff/backends/_pytorch.py | pymanopt/autodiff/backends/_pytorch.py | """
Module containing functions to differentiate functions using pytorch.
"""
import functools
try:
import torch
except ImportError:
torch = None
else:
from torch import autograd
from ._backend import Backend
from .. import make_tracing_backend_decorator
from ...tools import flatten_arguments, group_retur... | Python | 0 | @@ -1859,36 +1859,32 @@
.requires_grad_(
-True
)%0A
@@ -2837,36 +2837,32 @@
.requires_grad_(
-True
)%0A
@@ -3326,36 +3326,32 @@
.requires_grad_(
-True
)%0A
@@ -3529,20 +3529,16 @@
s_grad_(
-True
)%0A
|
4280b33eba9dcd245c58d2abde5551ab2b247db2 | remove existing dead consoles before creating a new one | sublime_hg_cli.py | sublime_hg_cli.py | import sublime_plugin
import os
HG_CLI_BUFFER_NAME = '__ SublimeHg Console __'
HG_CLI_PROMPT = '> '
PATH_TO_HG_CLI_SYNTAX = "Packages/SublimeHg/Support/Sublime Hg CLI.tmLanguage"
current_path = None # Dirname of latest active view (other than the console).
current_console = None # View object (SublimeHg con... | Python | 0 | @@ -808,24 +808,227 @@
return%0D%0A%0D%0A
+ for v in self.view.window().views():%0D%0A if v.name() == HG_CLI_BUFFER_NAME:%0D%0A self.view.window().focus_view(v)%0D%0A self.view.window().run_command('close')%0D%0A%0D%0A
v =
|
bdb01d99a927ac207445e43d0b40413acd12c0e2 | test commit | threeML/models/Parameter.py | threeML/models/Parameter.py | from threeML.bayesian import Priors
class Parameter(object):
def __init__(self,name,initValue,minValue,maxValue,delta,**kwargs):
self.name = str(name)
self.value = initValue
self.minValue = minValue
self.maxValue = maxValue
self.delta ... | Python | 0.000001 | @@ -2787,24 +2787,29 @@
er(object):%0A
+ %0A
#this cl
|
77585afd604e819b064c9dd9003de1956b7ba1b6 | Rename old symlink test class to be internal | test/test_infect.py | test/test_infect.py | #!/usr/bin/env python
# coding: utf-8
import os
import tempfile
import shutil
import pytest
import mock
from infect import infect
class TestSymlink(object):
"""
Test the internal infect symlinker.
These tests will actually use the os interface rather than mocking it out.
This is mainly to make sure... | Python | 0.999986 | @@ -144,16 +144,24 @@
tSymlink
+Internal
(object)
|
2f142afd379a09ee69840e04e7a12fb279b13b65 | Fix imports pep8 | model_utils/models.py | model_utils/models.py | from __future__ import unicode_literals
from model_utils.managers import QueryManager, SoftDeletableManager
from model_utils.fields import AutoCreatedField, AutoLastModifiedField, StatusField, MonitorField, UUIDField
import django
from django.core.exceptions import ImproperlyConfigured
from django.db import models
fr... | Python | 0.000001 | @@ -38,75 +38,163 @@
ls%0A%0A
-from model_utils.managers import QueryManager, SoftDeletableManager
+import django%0Afrom django.core.exceptions import ImproperlyConfigured%0Afrom django.db import models%0Afrom django.utils.translation import ugettext_lazy as _%0A
%0Afro
@@ -221,16 +221,22 @@
import
+(%0A
Auto... |
14fbbab0f1d491679b6ccce35a97f66279385fbe | version bump to 1.4.9 | swift/__init__.py | swift/__init__.py | import gettext
class Version(object):
def __init__(self, canonical_version, final):
self.canonical_version = canonical_version
self.final = final
@property
def pretty_version(self):
if self.final:
return self.canonical_version
else:
return '%s-dev' ... | Python | 0.000001 | @@ -371,9 +371,9 @@
1.4.
-8
+9
', F
|
25683b1eb3d54e095071e1b92bc9c747aa26f18b | Fix syntax warning over comparison of literals using is. | test/test_server.py | test/test_server.py | # -*- coding: utf-8 -*-
import unittest
import time
import sys
import os
import signal
import socket
from subprocess import Popen, PIPE
from . import tools
from bottle import server_names, tob
try:
from urllib.request import urlopen
except:
from urllib2 import urlopen
serverscript = os.path.join(os.path.dirna... | Python | 0.000001 | @@ -1636,18 +1636,18 @@
if rv
-is
+==
128: #
@@ -1963,18 +1963,18 @@
if rv
-is
+==
3: # Po
|
9c165965b7068d1fa3bf3975685fc774337103ee | test query status being a list | test/test_ticket.py | test/test_ticket.py | import os
import sys
import xmlrpclib
pytrac_root = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')
sys.path.insert(0, pytrac_root)
import pytest
from mock import Mock
import datetime
from pytrac import Ticket
class TestTicket(object):
def setup_class(self):
server = Mock()
self... | Python | 0.000022 | @@ -657,16 +657,479 @@
x=10')%0A%0A
+ def testSearchWithStatusList(self):%0A '''search for tickets specifying several possible statuses'''%0A%0A self.ticket.search(%0A summary='test_summary',%0A owner='someowner',%0A status=%5B'new', 'next', 'doing'%5D,%0A )%0A%... |
e9257a00bb897fda74a6a91a2ab099ac9e0a5266 | Add a test for decorators without wraps | test_undecorated.py | test_undecorated.py | # -*- coding: utf-8 -*-
# Copyright 2016 Ionuț Arțăriși <ionut@artarisi.eu>
# 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... | Python | 0.000001 | @@ -2045,24 +2045,318 @@
foo, foo)%0A%0A%0A
+def test_decorator_without_wraps():%0A def lame_decorator(f):%0A def decorator(*args, **kwargs):%0A f(*args, **kwargs)%0A return decorator%0A%0A decorated = lame_decorator(f)%0A%0A assert undecorated(decorated) is f%0A assert undecorated... |
c23ba3e71ec294727d34e112f6e74bdc0eb4c6f3 | Fix mojob pytest for target_os linux | mojo/tools/mopy/gn.py | mojo/tools/mopy/gn.py | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
GN-related configuration functions, e.g., to produce a Config object from a GN
args.gn file).
"""
import ast
import os.path
import re
from .config imp... | Python | 0.000011 | @@ -2378,32 +2378,67 @@
rfbuzz%22%5D = False
+%0A gn_args%5B%22target_os%22%5D = %22linux%22
%0A%0A gn_args%5B%22tar
|
b0fe95a6ebff1c4588ee952b6b8dc542a775cb1d | update news | src/kuas_api/kuas/news.py | src/kuas_api/kuas/news.py | # -*- coding: utf-8 -*-
import random
ENABLE = 1
NEWS_ID = 31
NEWS_DEBUG = False
DEFAULT_WEIGHT = 10
def random_by_weight(p):
choice_id = []
for i in range(len(p)):
choice_id += [i for _ in range(DEFAULT_WEIGHT + p[i]["news_weight"])]
return p[random.choice(choice_id)]
def random_news():
... | Python | 0 | @@ -617,15 +617,13 @@
%22: %22
-104%E7%B4%9A%E6%8E%92%E7%90%83%E7%A4%BE
+%E9%9F%BB%E7%AE%8F%E7%A4%BE
%E6%9C%9F%E5%88%9D%E7%A4%BE%E5%93%A1
@@ -677,15 +677,15 @@
com/
-Kjl1iZe
+6OblQiR
.jpg
@@ -741,47 +741,18 @@
com/
-events/970003029729702/970003066396365/
+kuaszither
%22,%0A
@@ -863,326 +863,22 @@
%22: %22
-%... |
04c98d33a098d2a79f0fa421e0a7e29ac2773f25 | improve pyccel cmd | tests/pyccel_cmd.py | tests/pyccel_cmd.py | # coding: utf-8
"""
.. todo:
- no need to declare a variable, if it is defined by assignment. ex: 'x=1'
means that x is of type double. this must be done automatically.
"""
import sys
import os
from pyccel.printers import fcode
from pyccel.parser import PyccelParser, get_by_name
from pyccel.syntax import ( ... | Python | 0.000047 | @@ -4061,16 +4061,77 @@
, body)%0A
+# code = gencode_as_module(name, imports, preludes, body)%0A
retu
@@ -4427,16 +4427,43 @@
ame_tmp)
+%0A%0Aname = None%0Aname = %22main%22
%0Acode =
@@ -4480,16 +4480,27 @@
t, fcode
+, name=name
)%0A%0Af90_f
|
03d63ee7819719379d8289921c7bcf30fde1aea1 | Use str.encode('hex'). | tests/stochastic.py | tests/stochastic.py | # -*- coding: utf-8 -*-
# Copyright (c) 2010-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/LICENS... | Python | 0.000012 | @@ -887,53 +887,30 @@
d =
-''.join('%2502x' %25 (ord(b),) for b in self.seed
+self.seed.encode('hex'
)%0A
|
019c23eea2cdf486b5ebfddcc38b07d855ac19a8 | Add tests | tests/test_basic.py | tests/test_basic.py | # -*- coding: utf-8 -*-
import logging
import click
from click.testing import CliRunner
import click_log
import pytest
test_logger = logging.getLogger(__name__)
@pytest.fixture
def runner():
return CliRunner()
def test_basic(runner):
@click.command()
@click_log.init()
def cli():
test_l... | Python | 0.000001 | @@ -1492,12 +1492,266 @@
%F0%9F%92%9C %F0%9F%92%9B %F0%9F%92%9A %F0%9F%92%99%5Cn')%0A
+%0A%0Adef test_non_string_log(runner):%0A @click.command()%0A @click_log.init()%0A def cli():%0A test_logger.error(42)%0A%0A result = runner.invoke(cli, catch_exceptions=False)%0A assert not result.exception%0A... |
f34437f0a8b4d3c2e46761d07c5f10bc884dba11 | Use six.assertRegex instead of assertRegexpMatches for Python 3.11 compatibility. | tests/test_cloud.py | tests/test_cloud.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
from pysolr import SolrCloud, SolrError, ZooKeeper, json
from .test_client import SolrTestCase
try:
from kazoo.client import KazooClient
except ImportError:
KazooClient = None
@unittest.skipUnless(
KazooClient is not None... | Python | 0 | @@ -76,16 +76,27 @@
ittest%0A%0A
+import six%0A
from pys
@@ -1881,35 +1881,34 @@
Nada.%0A s
-elf
+ix
.assertRegexpMat
@@ -1899,32 +1899,24 @@
.assertRegex
-pMatches
(%0A
@@ -1908,32 +1908,38 @@
gex(%0A
+ self,
self.solr._crea
@@ -2030,35 +2030,34 @@
path.%0A s
-elf
+ix
.a... |
3a937797dc16ba4eb4c6a957aa1c2e0229b64664 | test update | tests/test_files.py | tests/test_files.py | # No shebang line, this module is meant to be imported
#
# Copyright 2013 Oliver Palmer
#
# 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
#
# U... | Python | 0.000001 | @@ -1232,10 +1232,10 @@
e =
-15
+30
%0A
@@ -1352,13 +1352,14 @@
-b
re
-ak
+turn
%0A%0A
@@ -1388,42 +1388,42 @@
-eq_(os.path.isfile(s.name), False)
+assert False, %22failed %25s%22 %25 s.name
%0A%0A%0A@
|
dcacc47fb4cd0c5bd42bb2dc189914fd15fa6224 | use python3-compatible idioms | tests/test_flask.py | tests/test_flask.py | from __future__ import print_function
from os import path
import unittest2
import json
from flask import Flask, jsonify
from aap_client.crypto_files import load_public_from_x509
from aap_client.tokens import TokenEncoder
from aap_client.flask.client import JWTClient
from aap_client.flask.decorators import jwt_requi... | Python | 0.000103 | @@ -1920,32 +1920,37 @@
payload =
+next(
validPayloads%5B0%5D
@@ -1956,38 +1956,32 @@
%5D%5B1%5D.generate(1)
-.next(
)%0A token
@@ -2250,112 +2250,8 @@
f):%0A
- payload = validPayloads%5B0%5D%5B1%5D.generate(1).next()%0A token = self._encoder.encode(payload)%0A%0A
@@ -2489,16 +24... |
6d3f8207441eda97f41bfcb977911e65423b0907 | change markers count in test to 3232 | tests/test_flask.py | tests/test_flask.py | # -*- coding: utf-8 -*-
from six.moves import http_client
import six
from anyway import app as flask_app
#from anyway.utilities import open_utf8
import json
import pytest
from functools import partial
from urlobject import URLObject
from collections import Counter
@pytest.fixture
def app():
return flask_app.test_c... | Python | 0.000001 | @@ -1042,12 +1042,12 @@
==
-1624
+3232
%0A%0A%0Ad
|
6f2c8139077f30fcf5e5b268e82680049604d2f9 | add windows/linux tests for temp path and systemdrive | tests/test_guest.py | tests/test_guest.py | # Copyright (C) 2017 Cuckoo Foundation.
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
import mock
import pytest
import requests
import responses
import tempfile
from cuckoo.core.guest import GuestManager, OldGuestManager
from cuckoo.main imp... | Python | 0 | @@ -3136,16 +3136,849 @@
== %22C:/tempdir%22%0A
+%0A def test_temp_path(self):%0A set_cwd(tempfile.mkdtemp())%0A cuckoo_create()%0A%0A gm_win = GuestManager(%22cuckoo1%22, %221.2.3.4%22, %22windows%22, 1, None)%0A gm_win.environ%5B%22TEMP%22%5D = %22C:%5CUsers%5Cuser%5CAppData%5CLocal%5C... |
9cb763854fc62403fa834ea582980ac2eaa55381 | Fix a spacing error | tests/test_links.py | tests/test_links.py | #!/usr/bin/env python
# -*- encoding: utf-8
import pytest
import requests
@pytest.mark.parametrize('path', [
# Check pagination is working correctly
'/page/2/', '/page/3/',
])
def test_pages_appear_correctly(hostname, path):
resp = requests.get('http://%s/%s' % (hostname, path))
assert resp.status_co... | Python | 0.998444 | @@ -1827,17 +1827,16 @@
so:%3Cbr/%3E
-
Episode
|
f951b38c96b87a4ea14ff0ff0e5aadb71d4357cb | Modify the MNIST testing script | tests/test_mnist.py | tests/test_mnist.py | #!/usr/bin/python2
# -*- coding: utf-8 -*-
import os
import cPickle
from reid.datasets import Datasets
from reid.optimization import sgd
from reid.models import cost_functions as costfuncs
from reid.models import active_functions as actfuncs
from reid.models.layers import FullConnLayer, ConvPoolLayer
from reid.models.... | Python | 0.000001 | @@ -345,32 +345,78 @@
Net%0A
-%0A%0Adef _load_data():%0A
+from reid.models.evaluate import Evaluator%0A%0A%0A# Load the MNIST Dataset%0A
with
@@ -483,20 +483,16 @@
) as f:%0A
-
trai
@@ -537,20 +537,16 @@
oad(f)%0A%0A
-
train_se
@@ -612,20 +612,16 @@
0%5D, 1))%0A
-
valid_se
@@ -687,20 +687,16... |
5b023e23f33e429a548b4ffd664ded52861a5edd | refactor the login test part into its own method | tests/test_notes.py | tests/test_notes.py | from webtest import TestApp
import os
import re
import ConfigParser
import notes
import dbaccessor
DB = 'notes.db'
CONFIG_FILE = 'user.cfg'
class TestWebserver():
def login(self):
config = ConfigParser.RawConfigParser()
config.read(CONFIG_FILE)
section = config.sections()[0]
retu... | Python | 0.000914 | @@ -432,16 +432,106 @@
rd')%7D)%0A%0A
+ def check_if_logged_in(self, result):%0A assert 'Logged in as: ' in result.body%0A%0A
def
@@ -4120,46 +4120,39 @@
-assert 'L
+self.check_if_l
ogged
- in as: ' in
+_in(
result
-.body
+)
%0A%0A
@@ -4778,46 +4778,39 @@
-assert 'L
+self.check_if_l
... |
41704cc721ded9dd9db9c4e57f164e8658a86ff0 | Remove TODO | tests/test_rooms.py | tests/test_rooms.py | import pytest
from rocketchat_API.APIExceptions.RocketExceptions import RocketMissingParamException
def test_rooms_upload(logged_rocket):
# ToDo: Find a better way to test that this endpoint actually works fine (when using json and not data fails
# silently)
rooms_upload = logged_rocket.rooms_upload(
... | Python | 0.000181 | @@ -138,137 +138,8 @@
t):%0A
- # ToDo: Find a better way to test that this endpoint actually works fine (when using json and not data fails%0A # silently)%0A
|
1300848ed2deb253a4423a7b5826af95c91cb31a | Add application blacklist to run tests | tests/test_rules.py | tests/test_rules.py | # Copyright (C) 2016 by Per Unneberg
from os.path import abspath, dirname, join, basename
import logging
import shutil
import subprocess as sp
import pytest
logger = logging.getLogger(__name__)
stderr = None if pytest.config.getoption("--show-workflow-output") else sp.STDOUT
applications = [pytest.config.getoption("-... | Python | 0.000001 | @@ -819,16 +819,384 @@
DOUT)%0A%0A%0A
+application_blacklist = %5B'utils'%5D%0Aapplications = list(set(applications).difference(application_blacklist))%0Ablacklist =%5B%5D%0A%0Arules = %5B(y) for x in applications for y in getattr(pytest.rules, x) if not basename(y).rsplit(%22.rule%22) in blacklist%5D%0A%0A@pytest.mar... |
575c85388cd139b68cd89d2e08f996bbc03296da | remove ipdb | tests/test_scanf.py | tests/test_scanf.py | import nose
import logging
l = logging.getLogger('angr.tests.scanf')
import os
import string
import angr
test_location = str(os.path.dirname(os.path.realpath(__file__)))
class Checker(object):
def __init__(self, check_func, length=None, base=10, dummy=False):
self._check_func = check_func
self.... | Python | 0.000016 | @@ -1412,54 +1412,8 @@
t):%0A
- import ipdb; ipdb.set_trace()%0A
|
10911383e0bf888aa7ae13945c64a6e1aa1f2ae6 | Add a test to check that the real admin url isn't leaked in the honeypot page. | tests/test_suite.py | tests/test_suite.py | import django
import pytest
from admin_honeypot.models import LoginAttempt
from django.conf import settings
from django.core import mail
from django.core.urlresolvers import reverse
from django.test import TestCase
try:
# Python 2.7
from urllib import quote_plus
except ImportError:
# Python 3+
from url... | Python | 0 | @@ -2825,8 +2825,411 @@
de=301)%0A
+%0A def test_real_url_leak(self):%0A %22%22%22%0A A test to make sure the real admin URL isn't leaked in the honeypot%0A login form page.%0A %22%22%22%0A%0A honeypot_html = self.client.get(self.honeypot_url, follow=True).content.decode('utf-8')%... |
c1472d16e1d0a7c9240cdff87dc27a769e14479a | Rename variable for flake8 | tests/test_utils.py | tests/test_utils.py | import logging
import tempfile
import mappyfile
import pytest
def test_open():
fn = './tests/sample_maps/256_overlay_res.map'
d = mappyfile.open(fn)
assert d["name"] == "TEST"
d = mappyfile.open(fn, expand_includes=False)
assert d["name"] == "TEST"
d = mappyfile.open(fn, include_position=Tr... | Python | 0.000001 | @@ -1754,25 +1754,27 @@
rs%22, 1%5D%0A
-l
+cmp
= mappyfile
@@ -1795,33 +1795,35 @@
pth)%0A assert
-l
+cmp
%5B%22name%22%5D == %22Lay
@@ -1870,17 +1870,19 @@
0%5D%0A
-l
+cmp
= mappy
@@ -1908,21 +1908,8 @@
th)%0A
- print(l)%0A
@@ -1915,17 +1915,19 @@
assert
-l
+cmp
%5B%22name%22%5D
|
167787e36f282229b687fd10a03e9fbbb4b7d313 | Test utils unicode fix | tests/test_utils.py | tests/test_utils.py | import datetime
from dateutil.parser import parse
from scrapi import util
class TestScrapiUtils(object):
def test_copy_to_unicode(self):
converted = util.copy_to_unicode('test')
assert converted == u'test'
assert isinstance(converted, unicode)
def test_timestamp(self):
time... | Python | 0.000001 | @@ -42,16 +42,27 @@
rt parse
+%0Aimport six
%0A%0Afrom s
@@ -272,22 +272,28 @@
verted,
-unicod
+six.text_typ
e)%0A%0A
|
f3c9f29d1a5ee6bac0216dee41a04e6bbd79be3c | Write test for check_dir_exists | tests/test_utils.py | tests/test_utils.py | import errno
import os
import posixpath
import subprocess
import pytest
from daemonocle._utils import proc_get_open_fds
from daemonocle.exceptions import DaemonEnvironmentError
def test_proc_get_open_fds_fallbacks_current_proc(temp_dir, monkeypatch):
# Normal
result_1 = proc_get_open_fds()
def mock_os_... | Python | 0.000047 | @@ -96,16 +96,34 @@
s import
+ check_dir_exists,
proc_ge
@@ -192,16 +192,662 @@
Error%0A%0A%0A
+def test_check_dir_exists(temp_dir):%0A test_dir = posixpath.join(temp_dir, 'foo')%0A os.mkdir(test_dir)%0A check_dir_exists(test_dir)%0A%0A with pytest.raises(OSError) as exc_info:%0A check_dir_exists... |
b82dbd63aedf8a6a6af494b6d6be697a9f4230d5 | Add unit test for expand_axis_label | tests/test_utils.py | tests/test_utils.py | import pickle
from six.moves import range
from fuel.utils import do_not_pickle_attributes
@do_not_pickle_attributes("non_pickable", "bulky_attr")
class TestClass(object):
def __init__(self):
self.load()
def load(self):
self.bulky_attr = list(range(100))
self.non_pickable = lambda x: ... | Python | 0.000001 | @@ -83,16 +83,35 @@
tributes
+, expand_axis_label
%0A%0A%0A@do_n
@@ -548,8 +548,350 @@
ot None%0A
+%0A%0Adef test_expand_axis_label():%0A assert expand_axis_label('b') == 'batch'%0A assert expand_axis_label('c') == 'channel'%0A assert expand_axis_label('t') == 'time'%0A assert expand_axis_label('0') == '... |
dec84d732ef01fab351d29bea4b01f2702ae37c3 | Fix tests for check_inputs errors | tests/test_utils.py | tests/test_utils.py | from unittest import TestCase # or `from unittest import ...` if on Python 3.4+
from category_encoders.utils import convert_input_vector, convert_inputs
import pandas as pd
import numpy as np
class TestUtils(TestCase):
def test_convert_input_vector(self):
index = [2, 3, 4]
result = convert_input... | Python | 0.000002 | @@ -5243,34 +5243,53 @@
nput
-_vector, barray, aseries)%0A
+s, bframe, aseries)%0A%0A # shape mismatch
%0A
@@ -5336,23 +5336,17 @@
rt_input
-_vector
+s
, barray
|
3e6f835a88183182b6ebba25c61666735a69fc81 | Add more tests for the vault commandhelper | tests/vaultshell.py | tests/vaultshell.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
class VaultShellTests(unittest.TestCase):
def test_basic(self):
print "test basic. Pass"
| Python | 0 | @@ -55,16 +55,70 @@
unittest
+%0Aimport vault_shell.vault_commandhelper as VaultHelper
%0A%0Aclass
@@ -212,8 +212,630 @@
. Pass%22%0A
+ vaulthelper = VaultHelper.VaultCommandHelper()%0A self.failUnless(vaulthelper is not None)%0A%0A def test_execute_vault_commands(self):%0A vaulthelper = Vau... |
0168993e15d0601a243932202270096c3b906211 | Fix missing whitespace | src/meerkat/logs/stats.py | src/meerkat/logs/stats.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from collections import Counter
from meerkat.utils.list import distinct
from meerkat.utils.time import log_date_to_python_date, ms_since_epoch
from meerkat.utils.url import (
url_is_asset, url_is_common_asset,url_is_false_negative, url_is_ignored,
... | Python | 0.999999 | @@ -273,16 +273,17 @@
n_asset,
+
url_is_f
|
fd3babd8c1b2817c7b4873529f98de02cdb63096 | Bump to 4.9.1 | thumbor/__init__.py | thumbor/__init__.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
'''This is the main module in thumbor'''
__version__ = "4.9.0"
| Python | 0.000069 | @@ -306,11 +306,11 @@
= %224.9.
-0
+1
%22%0A
|
69a52774be3f98b51f2dfc1b88c939b4a93bb093 | version bump 3.7.1.1 | thumbor/__init__.py | thumbor/__init__.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
'''This is the main module in thumbor'''
__version__ = "3.7.1"
| Python | 0.000001 | @@ -308,10 +308,12 @@
= %223.7.1
+.1
%22%0A
|
4d54261dbc751b1cbacc984a9b449da89c5a9205 | Update api | time_metrics/api.py | time_metrics/api.py | from wsw_stats.utils import get_backend
def put_metric(slug, object=None, count=1, **kwargs):
backend = get_backend()
backend.put_metric(slug, object=object, count=count, **kwargs) | Python | 0 | @@ -2,42 +2,41 @@
rom
-wsw_stats.utils import get_backend
+.models import Metric, MetricItem
%0A%0A%0Ad
@@ -96,75 +96,402 @@
-backend = get_backend()%0A backend.put_metric(slug, object=object,
+from django.conf import settings%0A from django.contrib.sites.models import Site%0A%0A try:%0A metric... |
74fb410bb0be52fc742290c7d107e9fe07d7b1e5 | Add missing slash | src/mist/monitor/views.py | src/mist/monitor/views.py | import os
from subprocess import call
from time import time
from logging import getLogger
from pyramid.view import view_config
from pyramid.response import Response
from mist.monitor.stats import mongo_get_stats
from mist.monitor.stats import graphite_get_stats
from mist.monitor.stats import dummy_get_stats
log = ... | Python | 0.006439 | @@ -570,16 +570,17 @@
tcwd()+'
+/
../conf/
|
75a14b7da282f15fc84819418ec845e86559eaf2 | Correct cache file selection logic inverted by 4663490f8fa. | tmdb3/cache_file.py | tmdb3/cache_file.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#-----------------------
# Name: cache_file.py
# Python Library
# Author: Raymond Wagner
# Purpose: Persistant file-backed cache using /tmp/ to share data
# using flock or msvcrt.locking to allow safe concurrent
# access.
#-----------------------
import s... | Python | 0 | @@ -1693,20 +1693,16 @@
elif
-not
filename
|
cc309ec0061b10c2bf0fb4114dd4ed9bfdc8078f | Allow dash in name of junit_tests rule | tools/bzl/junit.bzl | tools/bzl/junit.bzl | # Copyright (C) 2016 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 required by applicable law or ag... | Python | 0.999705 | @@ -1926,16 +1926,34 @@
e = name
+.replace(%22-%22, %22_%22)
+ %22Test
|
da1a84bdce2109e79a61a0190632545ebab003b2 | Fix docs | sqlalchemy_continuum/plugins/activity.py | sqlalchemy_continuum/plugins/activity.py | """
Activity
--------
The ActivityPlugin is the most powerful plugin for tracking changes of
individual entities. If you use ActivityPlugin you probably don't need to use
TransactionChanges nor TransactionMeta plugins.
You can initalize the ActivityPlugin by adding it to versioning manager.
::
make_versioned(plu... | Python | 0.000003 | @@ -1285,39 +1285,12 @@
ct_t
-ransaction_id%0A%0A
+x_id
@@ -1785,39 +1785,12 @@
et_t
-ransaction_id%0A%0A
+x_id
@@ -3414,26 +3414,17 @@
object_t
-ransaction
+x
_id = sa
@@ -3570,26 +3570,17 @@
target_t
-ransaction
+x
_id = sa
@@ -3630,34 +3630,25 @@
tes(object_t
-ransa... |
f08692645d2fe8895016acfe000e8d461dff66b7 | Change CHROME_34_REVISION to one that is available in the continuous archive (251854); the previous revision (251904) was only available in the snapshots archive, but this is not where we download from for testing. | chrome/test/chromedriver/archive.py | chrome/test/chromedriver/archive.py | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Downloads items from the Chromium continuous archive."""
import os
import platform
import urllib
import util
CHROME_32_REVISION = '232870'
CHROME_3... | Python | 0.000001 | @@ -364,10 +364,10 @@
'251
-90
+85
4'%0A%0A
|
2e371dd4c6a3703cdce4ff8f13c29b2204a14760 | Handle the deleted taxids | rnacentral_pipeline/databases/crw/secondary_models.py | rnacentral_pipeline/databases/crw/secondary_models.py | # -*- coding: utf-8 -*-
"""
Copyright [2009-2018] EMBL-European Bioinformatics Institute
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... | Python | 0 | @@ -1319,16 +1319,332 @@
raw)%0A%0A%0A
+def as_taxid(raw):%0A if raw == '501083':%0A return 126%0A if raw in %7B'600001', '600002', '600003'%7D:%0A return 562%0A if raw in %7B'600101', '600102'%7D:%0A return 2238%0A if raw in %7B'600301', '600302'%7D:%0A return 4932%0A if ra... |
94b9b2e7ec5fb13a66950c2cdd75d271b534efe1 | Fix a couple of debug statements in bot.py | espresso/bot.py | espresso/bot.py | import imp
import json
import logging
import time
from slackclient import SlackClient
from listener import Listener
from listener import ListenerType
from message import Message
from repl import EspressoConsole
from user import User
class Espresso(object):
"""The bot's main class.
Handles connections and all... | Python | 0.001651 | @@ -1330,27 +1330,21 @@
gin
-%7B%7D
+%25s
from
-%7B%7D'.format(
+%25s',
plug
@@ -1357,17 +1357,16 @@
ugindir)
-)
%0A%0A
@@ -2059,69 +2059,8 @@
():%0A
- logging.debug(%22Raw message: %7B%7D%22.format(msg))%0A
@@ -2167,32 +2167,86 @@
key('subtype'):%0A
+ logging.debug(... |
998f2d9bec74dd74b31726bf2ccd16189398e0b3 | Deal with permission issues from ensembl | rnacentral_pipeline/databases/ensembl/genomes/urls.py | rnacentral_pipeline/databases/ensembl/genomes/urls.py | # -*- coding: utf-8 -*-
"""
Copyright [2009-2020] EMBL-European Bioinformatics Institute
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... | Python | 0 | @@ -2587,16 +2587,37 @@
at.gz%22%0A%0A
+ try:%0A
@@ -2658,16 +2658,20 @@
+
if size
@@ -2679,16 +2679,264 @@
s None:%0A
+ LOGGER.warn(%22GFF file %25s is empty, skip %25s%22, gff_path, assembly)%0A continue%0A except:%0A ... |
c89114a58c27a161ee6f84cb12272483ca8b21a0 | Add integration test for textDocument_references. | rplugin/python3/LanguageClient/LanguageClient_test.py | rplugin/python3/LanguageClient/LanguageClient_test.py | import time
import neovim
import pytest
from . util import joinPath
NVIM_LISTEN_ADDRESS = "/tmp/nvim-LanguageClient-IntegrationTest"
PROJECT_ROOT_PATH = joinPath("tests/sample-rs")
MAINRS_PATH = joinPath("tests/sample-rs/src/main.rs")
LIBRS_PATH = joinPath("tests/sample-rs/src/lib.rs")
@pytest.fixture(scope="module... | Python | 0 | @@ -2094,38 +2094,38 @@
nvim.current.
-buffer
+window
.cursor = %5B1, 1%5D
@@ -2386,22 +2386,22 @@
current.
-buffer
+window
.cursor
@@ -2453,16 +2453,16 @@
od yet.%0A
-
nvim
@@ -2500,24 +2500,311 @@
_symbol%22)%0A%0A%0A
+def test_textDocument_references(nvim):%0A nvim.current.window.cursor = %5B8, 4%5... |
ece716fb046f0651e936e36372222b5e49c5f96c | Simplify call of WSGI app. | etalage/application.py | etalage/application.py | # -*- coding: utf-8 -*-
# Etalage -- Open Data POIs portal
# By: Emmanuel Raviart <eraviart@easter-eggs.com>
#
# Copyright (C) 2011, 2012 Easter-eggs
# http://gitorious.org/infos-pratiques/etalage
#
# This file is part of Etalage.
#
# Etalage is free software; you can redistribute it and/or modify
# it under the term... | Python | 0 | @@ -1482,37 +1482,19 @@
return
-req.get_response(
app
-)
%0A%0A%0A@wsgi
|
44348bafa8f084fe1cf9b22c7d3b9add1d08e912 | Update common.py | ci_scripts/neblio_ci_libs/common.py | ci_scripts/neblio_ci_libs/common.py | import os
from subprocess import call
import sys
import errno
import urllib
def mkdir_p(path):
try:
os.makedirs(path)
except OSError as exc: # Python >2.5
if exc.errno == errno.EEXIST and os.path.isdir(path):
pass
else:
raise
def call_with_err_code(cmd):
... | Python | 0.000001 | @@ -1996,16 +1996,149 @@
%5D = %221%22%0A
+%09%09os.environ%5B'CPATH'%5D = '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include'%0A
%0A%0A%09else:
|
3db022203bfb6041a78302ee80f612b5b5de55f9 | Fix sockjs args passing | src/mist/io/sockjs_mux.py | src/mist/io/sockjs_mux.py | from sockjs.tornado import conn, session
from sockjs.tornado.transports import base
class ChannelSession(session.BaseSession):
def __init__(self, conn, server, base, name):
super(ChannelSession, self).__init__(conn, server)
self.base = base
self.name = name
def send_message(self, msg,... | Python | 0.000142 | @@ -461,27 +461,8 @@
g):%0A
- print %22yo%22%0A
@@ -507,158 +507,98 @@
-print msg_parts%0A print %22ya%22%0A handler = 'on_%25s' %25 msg_parts%5B0%5D%0A print handler%0A print dir(self.conn)%0A print self.conn
+handler = 'on_%25s' %25 msg_parts%5B0%5D%0A arg... |
439e63f8eab65aeca68f398ca2898e5de09e0de5 | Make /storage/filesystem ignore `.tmp` files | vdirsyncer/storage/filesystem.py | vdirsyncer/storage/filesystem.py | import errno
import logging
import os
import subprocess
from atomicwrites import atomic_write
from .. import exceptions
from ..utils import checkdir
from ..utils import expand_path
from ..utils import generate_href
from ..utils import get_etag_from_file
from ..vobject import Item
from .base import normalize_meta_valu... | Python | 0 | @@ -2412,16 +2412,70 @@
fileext)
+ and (%0A not fname.endswith('.tmp'))
:%0A
|
5c58bdf408122c5809880bbd93cdfccff6ca19f9 | rearrange test cases | armstrong/apps/related_content/tests/fields.py | armstrong/apps/related_content/tests/fields.py | from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes.generic import GenericForeignKey
from django.db import models
from ._utils import *
from ..models import RelatedContent
from ..models import RelatedType
from .models import generate_model
class RelatedContentFieldTestCase(Tes... | Python | 0.948511 | @@ -588,24 +588,323 @@
ect, two)%0A%0A%0A
+class RelatedObjectsFieldTestCase(TestCase):%0A def test_contains_all_related_objects_for_given_source(self):%0A one, two, c = generate_model()%0A related_content = one.related.all()%0A self.assertEqual(1, related_content.count())%0A self.assert... |
3b75cc0e0d6a05d0f1699e4f2dc882588aa3eec9 | fix isinstance() check on get_queryset() | rest_framework_mongoengine/generics.py | rest_framework_mongoengine/generics.py | from rest_framework import mixins
from rest_framework import generics as drf_generics
from mongoengine.django.shortcuts import get_document_or_404
class GenericAPIView(drf_generics.GenericAPIView):
"""
View to play nice with our Document Serializer
"""
lookup_field = 'id'
def get_object(self):
... | Python | 0.000001 | @@ -141,16 +141,62 @@
_or_404%0A
+from mongoengine.queryset import BaseQuerySet%0A
%0A%0Aclass
@@ -332,16 +332,282 @@
= 'id'%0A%0A
+ def get_queryset(self):%0A %22%22%22%0A Re evaluate queryset, fixes #63%0A %22%22%22%0A queryset = super(GenericAPIView, self).get_queryset()%0A%0A ... |
ce71cc5af9dee9385262e990c02f1a3679ef1eaf | Remove debugging print from deploy-mac.py | tools/deploy-mac.py | tools/deploy-mac.py | #!/usr/bin/env python
from __future__ import print_function
import argparse
import errno
import os
import re
import shutil
import subprocess
qtPath = None
def splitPath(path):
folders = []
while True:
path, folder = os.path.split(path)
if folder != '':
folders.append(folder)
else:
if path != '':
fol... | Python | 0.000001 | @@ -1505,23 +1505,8 @@
K):%0A
-%09%09print(split)%0A
%09%09sp
|
77c96ac289be80bdc12718e9c0eb68716f9a1113 | Add @private to docstrings | src/linescan.py | src/linescan.py | #! /usr/bin/python
# -*- coding: utf-8 -*-
"""Effortlessly read a text file using counting numbers.
Created 2013-2017 Caleb Ely
<https://CodeTri.net>
Licensed under The MIT License
<http://opensource.org/licenses/MIT/>
"""
import locale
__all__ = ("LineScan")
class LineScan(object):
"""Main linescan class.
... | Python | 0 | @@ -1016,17 +1016,15 @@
elf.
-__
scans)%0A
+
%0A
@@ -1103,16 +1103,33 @@
%22%22%22
+@private%0A
Store sc
@@ -1131,32 +1131,41 @@
re scan details.
+%0A
%22%22%22%0A self
@@ -1341,16 +1341,33 @@
%22%22%22
+@private%0A
Reset sc
@@ -1377,16 +1377,25 @@
details.
+%0A ... |
a80220d047e1b405cda3e0a219ff3617212e5d9c | print bug fix attempt #1 | taxicam/camera.py | taxicam/camera.py | """Provides functions to use a webcam in combination with gpg."""
import logging
import numpy
import gnupg
import time
import cv2
log = logging.getLogger(__name__)
gpg = gnupg.GPG(gnupghome='/home/maikel/.gnupg')
gpg.encoding = 'utf8'
pub_keys = gpg.list_keys()
def take_picture_from_device(source):
"""Takes a pi... | Python | 0 | @@ -113,16 +113,27 @@
rt time%0A
+import sys%0A
import c
@@ -2934,15 +2934,14 @@
t %22,
-
end=
-%22%22
+''
)%0A
@@ -3011,61 +3011,54 @@
- print
+sys.stdout.write
('(x='
- +
++
str(x)
- +
++
',y='
- +
++
str(y)
- + ')', end=%22 %22
++')'
)%0A
|
d01efcc630a84f85230e05459da4b9daf33386df | Fix minor typo in a comment in getgitinfo.py | tools/getgitinfo.py | tools/getgitinfo.py | #!/usr/bin/python
from subprocess import Popen, PIPE
import sys
import re
def getSvnInfo():
"""Make a build string for svn
Returns a string or None, of not in an svn repository"""
(urlbase, gitHash, dirty) = ("","","")
(svnStatus,stderr) = Popen("svn status", shell=True,stdout=PIPE, stderr=P... | Python | 0.000363 | @@ -1746,10 +1746,8 @@
ound
-fg
%0A
|
8a2224da57d08fc2548c7d885918ca402557506c | Add TemplateReadError to templateparser.Parser | templateparser.py | templateparser.py | #!/usr/bin/python2.5
"""A simple implementation of a template parser
Classes:
Parser: Parses a template by replacing tags with their values.
Error classes:
Error: Default error class for templateparser
TemplateReadError: Template file could not be read or found.
"""
__author__ = 'Jan Klopper & Elmer de Looff'
_... | Python | 0 | @@ -7610,16 +7610,56 @@
nction%0A%0A
+ TemplateReadError = TemplateReadError%0A
%0Aclass S
|
22e8a7cb8f8412c4bb79f46e8e7ca2a540bf317c | Add stdOut and stdError to Django app data model. | src/dashboard/src/dashboard/models.py | src/dashboard/src/dashboard/models.py | # This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
# * Rearrange models' order
# * Make sure each model has one field with primary_key=True
# Feel free to rename the models, but don't rename db_table values or field names.
#
# Also note: You'll have to ... | Python | 0 | @@ -1799,32 +1799,156 @@
de', blank=True)
+%0A stdout = models.TextField(db_column='stdOut', blank=True)%0A stderror = models.TextField(db_column='stdError', blank=True)
%0A%0A class Meta:%0A
|
95cf4fecca3695565d8388174c325c4bd4ff0877 | remove top level dirs from import | tools/wheel_tool.py | tools/wheel_tool.py | import argparse
import glob
import os
import subprocess
import sys
import zipfile
import pkginfo
import pkg_resources
# Normalises package names to be used in Bazel labels.
def sanitise_package(name):
return name.replace("-", "_").lower()
class Wheel(object):
def __init__(self, path):
self._path =... | Python | 0.000001 | @@ -1804,147 +1804,8 @@
%5D),%0A
- # This makes this directory a top-level in the python import%0A # search path for anything that depends on this.%0A imports = %5B%22.%22%5D,%0A
|
60ac05bbda83191a0e794322299969a3fef2f9cd | Update distancia.py | topgeo/distancia.py | topgeo/distancia.py | # Calculo de distancias entre puntos
## Profesor Revisor:
### Dr Ramon Solano Barajas
## Elaborado por:
### Jairo Avalos Velazquez
### Alan Mauricio Cruz Otero
def caldist(csv):
"""
Esta funcion sirve para realizar el calculo de distancias entre dos puntos.
"""
# Importamos los modulos numpy y ... | Python | 0 | @@ -430,13 +430,23 @@
pts
-_1
=
+pd.read_csv(
inpu
@@ -482,41 +482,8 @@
s:%22)
-%0A %0A pts = pd.read_csv(pts_1
)%0A
|
e4a7eaa570964fbc2489bbce20913857b1c5c0aa | bump minor version | topiary/__init__.py | topiary/__init__.py |
from .lazy_ligandome_dict import LazyLigandomeDict, AlleleNotFound
from .converters import (
epitopes_to_dataframe,
epitopes_to_csv
)
from .predict_epitopes import (
predict_epitopes_from_args,
predict_epitopes_from_variants,
predict_epitopes_from_mutation_effects,
)
from .epitope_prediction import... | Python | 0 | @@ -626,17 +626,17 @@
= '0.1.
-0
+1
'%0A%0A__all
|
9d6a2862c536ef83bee085a01ea70900ec116c8c | add europarl.2019-05-23 to Broxtowe | polling_stations/apps/data_collection/management/commands/import_broxtowe.py | polling_stations/apps/data_collection/management/commands/import_broxtowe.py | import os
from data_collection.github_importer import BaseGitHubImporter
class Command(BaseGitHubImporter):
council_id = "E07000172"
elections = ["local.2019-05-02"]
# This one is a bit of a mish-mash
# The stations are on GitHub
srid = 4326
scraper_name = "wdiv-scrapers/DC-PollingStations-Br... | Python | 0 | @@ -167,16 +167,39 @@
9-05-02%22
+, %22europarl.2019-05-23%22
%5D%0A%0A #
|
91004a866474c12031055a9d6ee3ee72262b2877 | Allow custom response from update_from_dict | src/rest_toolkit/views.py | src/rest_toolkit/views.py | from pyramid.httpexceptions import HTTPMethodNotAllowed
from pyramid.httpexceptions import HTTPNoContent
from .state import RestState
def unsupported_method_view(resource, request):
request.response.status_int = 405
return {'message': 'Unsupported HTTP method'}
def default_options_view(resource, request, me... | Python | 0 | @@ -1029,24 +1029,28 @@
al=True)%0A
+ r =
resource.up
@@ -1088,32 +1088,56 @@
lse)%0A return
+r if r is not None else
resource.to_dict
@@ -1384,24 +1384,28 @@
l=False)%0A
+ r =
resource.up
@@ -1442,32 +1442,56 @@
rue)%0A return
+r if r is not None else
resource.to_dict
|
5b4056dbaa6b53bf6978bcaac43c9bc0fde004ed | Update meta slightly to include created date in the ordering. | src/videostream/models.py | src/videostream/models.py | # -*- coding: utf-8 -*-
# © Copyright 2009 Andre Engelbrecht. All Rights Reserved.
# This script is licensed under the BSD Open Source Licence
# Please see the text file LICENCE for more information
# If this script is distributed, it must be accompanied by the Licence
from django.db import models
from django.conf im... | Python | 0 | @@ -22,255 +22,8 @@
*-%0A%0A
-# %C2%A9 Copyright 2009 Andre Engelbrecht. All Rights Reserved.%0A# This script is licensed under the BSD Open Source Licence%0A# Please see the text file LICENCE for more information%0A# If this script is distributed, it must be accompanied by the Licence%0A%0A
from
@@ -2234,29 +2234,27... |
cc5f5e3c15c20d27f71afadf7a993ca7001c3f48 | Set version to 0.11-dev. | src/webassets/__init__.py | src/webassets/__init__.py | __version__ = (0, 10)
# Make a couple frequently used things available right here.
from .bundle import Bundle
from .env import Environment
| Python | 0 | @@ -12,17 +12,24 @@
= (0, 1
-0
+1, 'dev'
)%0A%0A%0A# Ma
|
779359f87698a421ae0102b58d214232921a3dfc | add python 2.4 requirement | setup-data.py | setup-data.py | import sys, glob, os
packages = ['matplotlib.toolkits.basemap.data']
package_dirs = {'':'lib'}
boundaryfiles = glob.glob("lib/matplotlib/toolkits/basemap/data/*_f.dat")
basemap_datafiles = [os.path.basename(bfile) for bfile in boundaryfiles]
package_data = {'matplotlib.toolkits.basemap.data':basemap_data... | Python | 0.000006 | @@ -14,16 +14,606 @@
lob, os%0A
+major, minor1, minor2, s, tmp = sys.version_info%0Aif major==2 and minor1%3C=3:%0A # setuptools monkeypatches distutils.core.Distribution to support%0A # package_data%0A #try: import setuptools%0A #except ImportError:%0A # raise SystemExit(%22%22%22%0A#matplotlib requ... |
1f92ca0793e5ff2d35fb0e702ffbf568215c8656 | edit sheets range and added function for factfile | sheets_api.py | sheets_api.py | # Google sheets API functions
from __future__ import print_function
import httplib2
import os
from apiclient import discovery
from oauth2client import client
from oauth2client import tools
from oauth2client.file import Storage
try:
import argparse
flags = argparse.ArgumentParser(parents=[tools.argparser]).par... | Python | 0 | @@ -2253,11 +2253,16 @@
or!A
-:AV
+3:BA1000
'%0A
@@ -2464,32 +2464,32 @@
nd.')%0A else:%0A
+
return v
@@ -2499,271 +2499,8 @@
es%0A%0A
-# Based off the missionary ID, retrieve all rows related to that ID in the form%0A# of a dict of dicts.%0Adef get_ind_missionary_reports(miss_id):%0A # Validate in... |
04da5a48f8d189927887c23cfcc310467ff4b5ca | add namibia gazette scrawler configs | engine/client.py | engine/client.py | """
load and execute scrapers
"""
import sys
import csv
import time
from Scrapengine.scrapers import (
rss, article, lawyers_ke, nurses_ke, starhealth_news, starhealth_register,
ke_gazette)
from Scrapengine.configs import SCRAPERS
def execute_rss(single=True):
'''
`single` - set True to scrape... | Python | 0 | @@ -197,16 +197,28 @@
_gazette
+, na_gazette
)%0Afrom S
@@ -1828,16 +1828,71 @@
xargs)%0A%0A
+def execute_na_gazette():%0A print na_gazette.main()%0A%0A
%0Aif __na
@@ -2603,16 +2603,79 @@
ister()%0A
+ elif scraper == %22na-gazette%22:%0A execute_na_gazette()%0A
else
|
2060b434b8f0fd54f4c77081a6c0e250bf81fe81 | LOAD DATA LOCAL INFILE has been altered as of MySQL 5.5. If disabled, it should fail gracefully. | engines/mysql.py | engines/mysql.py | import os
import platform
from retriever.lib.models import Engine, no_cleanup
class engine(Engine):
"""Engine instance for MySQL."""
name = "MySQL"
abbreviation = "m"
datatypes = {
"auto": "INT(5) NOT NULL AUTO_INCREMENT",
"int": "INT",
"bigint": "BIG... | Python | 0 | @@ -2390,33 +2390,41 @@
%22)%22%0A
-%0A
+try:%0A
self
@@ -2442,32 +2442,207 @@
cute(statement)%0A
+ except Exception as e:%0A print %22Failed bulk insert (%25s), inserting manually%22 %25 e%0A return Engine.insert_data_from_file(self, filename)%0A
... |
be1faa2f8fda8b7c8ed8e6f3fd61abd16b7c7509 | update read repo example | first-steps-gitpython/read_repo.py | first-steps-gitpython/read_repo.py | import os
from git import Repo
COMMITS_TO_PRINT = 5
def print_commit(commit):
print('----')
print(str(commit.hexsha))
print("\"{}\" by {} ({})".format(commit.summary,
commit.author.name,
commit.author.email))
print(str(commit.... | Python | 0 | @@ -490,73 +490,8 @@
o):%0A
- print('Repo active branch is %7B%7D'.format(repo.active_branch))%0A
|
20dce56f93b35ae492c8c3b57c4b75265b0002a0 | add robustness to init | flyingpigeon/processes/__init__.py | flyingpigeon/processes/__init__.py | __all__ = [
"wps_subset_continents",
"wps_subset_countries",
"wps_subset_regionseurope",
"wps_subset_points",
"wps_indices_simple",
"wps_indices_percentile",
"wps_weatherregimes_ra",
"wps_weatherregimes_model",
"wps_weatherregimes_projection",
... | Python | 0.000004 | @@ -507,16 +507,42 @@
m_csv%22,%0A
+ %22wps_robustness%22,%0A
@@ -745,34 +745,8 @@
x%22,%0A
-# %22wps_robustness%22,
%0A# T
|
e1fa62727b6e27185c6416664a4fdb5336354bc0 | Update phonology.py | cltk/phonology/old_english/phonology.py | cltk/phonology/old_english/phonology.py | import re
IPA_rules ={
'nk':'ŋk',
'ng':'ŋg',
'hw':'ʍ',
'hl':'l',
'hn':'n̥',
'hr':'r̥',
'ēa':'æːɑ̯',
'ea':'æ',
'sċ':'ʃ'
}
IPA ={
'a':'ɑ',
'æ':'æ',
'b':'b',
'c':'k',
'ċ':'tʃ',
'd':'d',
'ð':'ð',
'e':'e',
'f':'f',
'g':'g',
'ġ':'j',
'h':'h... | Python | 0.000001 | @@ -1,8 +1,168 @@
+%22%22%22%0ASources:%0A https://en.wikipedia.org/wiki/Old_English_phonology%0A Hogg, Richard M. (1992). The Cambridge History of the English Language. Chapter 3%0A%22%22%22%0A%0A
import r
|
e53958b1ebf015349b95b1e523301ce4481a354f | Fix broken middleware test. | cms/apps/pages/tests/test_middleware.py | cms/apps/pages/tests/test_middleware.py | from django.contrib.contenttypes.models import ContentType
from django.http import HttpResponse, HttpResponseNotFound, Http404
from django.test import TestCase, RequestFactory
from ..middleware import RequestPageManager, PageMiddleware
from ..models import ContentBase, Page
from .... import externals
class TestMiddl... | Python | 0.000002 | @@ -4417,16 +4417,17 @@
ontent,
+b
'')%0A%0A
|
87e093f7e5309fa7ad0e96d70bb2f04ec0e29479 | bump version | tensorpack/libinfo.py | tensorpack/libinfo.py |
# issue#1924 may happen on old systems
import cv2 # noqa
import os
# issue#7378 may happen with custom opencv. It doesn't hurt to disable opencl
os.environ['OPENCV_OPENCL_RUNTIME'] = ''
os.environ['TF_ENABLE_WINOGRAD_NONFUSED'] = '1' # issue#9339
os.environ['TF_AUTOTUNE_THRESHOLD'] = '3' # use more warm-up
os.en... | Python | 0 | @@ -384,11 +384,11 @@
= '0.1.
-8
+9
'%0A
|
aaec61b6a2cdb98ad8ea98e498bd7409762d2408 | Rename DesgloseFacturaEmitida | sii/models.py | sii/models.py | # coding=utf-8
from marshmallow import Schema, fields, validate, validates, ValidationError
from sii import __SII_VERSION__
class Titular(Schema):
NombreRazon = fields.String(
required=True,
validate=validate.Length(max=40, error='Nombre demasiado largo')
)
NIF = fields.String(
re... | Python | 0.003424 | @@ -2246,26 +2246,38 @@
%0A%0Aclass
-SujetaAIVA
+DesgloseFacturaEmitida
(Schema)
@@ -2461,18 +2461,30 @@
ted(
-SujetaAIVA
+DesgloseFacturaEmitida
)%0A
|
5f5f4ae8e0b664ea162bb5ae13eab7b54d9b73b5 | Fix RegistroLRFacturasRecibidas in models | sii/models.py | sii/models.py | # coding=utf-8
from marshmallow import Schema, fields, validate, validates, ValidationError
from sii import __SII_VERSION__
class Titular(Schema):
NombreRazon = fields.String(
required=True,
validate=validate.Length(max=40, error='Nombre demasiado largo')
)
NIF = fields.String(
re... | Python | 0 | @@ -4940,36 +4940,37 @@
gistroLRFacturas
-Emit
+Recib
idas = fields.Ne
|
f46675875c224ea8b1d5508ecfeb25209f1e1d32 | add test for rejecting invalid iss | test/auth/test_jwt.py | test/auth/test_jwt.py | from collections import OrderedDict
import flask
import jwt
import pytest
import requests
from cdispyutils.auth.errors import (
JWTValidationError,
JWTAudienceError,
)
from cdispyutils.auth.jwt_validation import (
get_public_key_for_kid,
require_jwt,
validate_jwt,
)
from .conftest import (
TE... | Python | 0 | @@ -1,12 +1,47 @@
+# pylint: disable=unused-argument%0A%0A
from collect
@@ -1430,24 +1430,400 @@
%0A%0A%0Adef test_
+invalid_iss_rejected(encoded_jwt, public_key, iss):%0A %22%22%22%0A Test that if %60%60validate_jwt%60%60 receives a token whose value for %60%60iss%60%60%0A does not match the expected value,... |
db6304c6bc897b18c6e71b57c22e9bda6464a13a | Add post function. | slacknotif.py | slacknotif.py | import io
import shutil
print("Be sure to run this as sudo/root. Press enter to continue...")
url = input("Paste your slack webhook url: ")
filename = "slacknotif"
script = """#!/bin/bash
function post_to_slack () {
SLACK_USERNAME="$(hostname)"
SLACK_MESSAGE="$1"
SLACK_URL=$SLACK_URL
... | Python | 0 | @@ -1,12 +1,26 @@
+import socket%0A
import io%0Aim
@@ -35,13 +35,47 @@
til%0A
-%0Aprin
+import requests%0Aimport json%0A%0Akey = inpu
t(%22B
@@ -100,17 +100,17 @@
as
-sudo/root
+root/sudo
. Pr
@@ -135,17 +135,18 @@
nue.
-..
%22)%0A
-%0Aurl
+webhook
= i
@@ -184,16 +184,17 @@
url: %22)%0A
+%0A
filename
@@ -2... |
7a180ef8b6c774b3deb62b713bd31d071aad17fd | fix unaligned column in usage() msg | Config.py | Config.py | #!/usr/bin/env python
# Copyright (c) 2001, MetaSlash Inc. All rights reserved.
"""
Configuration information for checker.
"""
import sys
import getopt
import string
_DEFAULT_BLACK_LIST = [ "Tkinter", ]
class Config :
"Hold configuration information"
def __init__(self) :
"Initialize configuratio... | Python | 0.000009 | @@ -1286,17 +1286,17 @@
t %22 %25-1
-7
+8
s %25s%25s%22
@@ -2976,16 +2976,17 @@
Options:
+
|
6b9a17464ee1c409e53c4ceef6e9d4cfb2b3f758 | Add return statement | django_enumfield/enum.py | django_enumfield/enum.py | from __future__ import absolute_import
import logging
from enum import Enum as NativeEnum, IntEnum as NativeIntEnum
from typing import Any, Dict, List, Optional, Sequence, Tuple, TypeVar, Union, cast
import six
try:
from django.utils.functional import classproperty # type: ignore
except ImportError:
# Pre-D... | Python | 1 | @@ -3799,16 +3799,36 @@
ault__))
+%0A return None
%0A%0A @c
|
7f1745f3967cc9c07eb2b06b9dbcbdfa6aa13251 | Update cybergis-script-geoserver-import-styles.py | bin/cybergis-script-geoserver-import-styles.py | bin/cybergis-script-geoserver-import-styles.py | from base64 import b64encode
from optparse import make_option
import json
import urllib
import urllib2
import argparse
import time
import os
import subprocess
#==#
import _geoserver_import_styles
#==#
parser = argparse.ArgumentParser(description='')
parser.add_argument("--path", help="The location in the filesystem of ... | Python | 0 | @@ -336,16 +336,123 @@
ctory%22)%0A
+parser.add_argument(%22--prefix%22, help=%22The prefix to prepend to all the styles when loaded into GeoServer%22)%0A
parser.a
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.