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 |
|---|---|---|---|---|---|---|---|
dfd1cceb9b5e18d646ef55d0b12b561712510379 | Test prepare() failure due to missing postconf | certbot-postfix/certbot_postfix/installer_test.py | certbot-postfix/certbot_postfix/installer_test.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
import unittest
import mock
import six
# Fake Postfix Configs
names_only_config = """myhostname = mail.fub... | Python | 0.000001 | @@ -246,16 +246,44 @@
rt six%0A%0A
+from certbot import errors%0A%0A
# Fake P
@@ -986,24 +986,512 @@
utility'))%0A%0A
+ def test_no_postconf_prepare(self):%0A installer = self._create_installer()%0A%0A installer_path = %22certbot_postfix.installer%22%0A exe_exists_path = installer_path + %22.... |
08c88a53db462765141ae3d3771f809e01e41feb | add `experiments` alias | libs/utils/test.py | libs/utils/test.py | # SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2015, ARM Limited and contributors.
#
# 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
#
# ... | Python | 0.000059 | @@ -1590,16 +1590,167 @@
rectory.
+%0A%0A :ivar experiments: List of :class:%60Experiment%60 s executed for the test. Only%0A available after :meth:%60init%60 has been called.
%0A %22%22%22
@@ -3423,24 +3423,76 @@
utor.run()%0A%0A
+ cls.experiments = cls.executor.experiments%0A%0A
... |
9d68ccf56e89090bf72e04b360f82379ef7a67f6 | extend GenomeData testing to cover failed group definitions | tests/test_genomedata.py | tests/test_genomedata.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""test_genomedata.py
Test instantiation, methods and attributions of the GenomeData class
This test suite is intended to be run from the repository root using:
nosetests -v
(c) The James Hutton Institute 2017
Author: Leighton Pritchard
Contact:
leighton.pritchard@hut... | Python | 0 | @@ -3238,34 +3238,34 @@
e, self.groups_s
+e
t
-r
, self.seqfile,%0A
@@ -5541,8 +5541,233 @@
exist%22)%0A
+%0A @raises(TypeError)%0A def test_invalid_groups(self):%0A %22%22%22GenomeData errors with invalid group type.%22%22%22%0A gd = GenomeData(self.name, 12345, self.seqfile,%0A ... |
909ed14677842a0f3b1307bdb916743c34ee1782 | Make exception message checking py2/3 compatible. | tests/test_jsonschema.py | tests/test_jsonschema.py | """Test the validation for the core configuration schema."""
import json
import pytest
from flask_jsondash import charts_builder as app
def _schema(**vals):
"""Default schema."""
data = dict(
date="2016-08-23 15:03:49.178000",
layout="grid",
name="testlayout",
modules=[],
... | Python | 0 | @@ -3038,24 +3038,28 @@
Missing' in
+str(
exc.value.me
@@ -3055,24 +3055,17 @@
xc.value
-.message
+)
%0A%0A%0A@pyte
@@ -3534,16 +3534,20 @@
mix' in
+str(
exc.valu
@@ -3551,13 +3551,6 @@
alue
-.message
+)
%0A
|
84a0ef749ecbad22aa4c7a7462b626b93e723b90 | set Model.Query only if Query is not Bound | src/choo/queries/base.py | src/choo/queries/base.py | from abc import ABCMeta, abstractmethod
from collections import OrderedDict
from copy import deepcopy
from itertools import chain
from types import MappingProxyType
from ..types import Serializable
class MetaQuery(ABCMeta):
"""
Metaclass for all Queries
"""
def __new__(mcs, name, bases, attrs):
... | Python | 0.000001 | @@ -684,32 +684,60 @@
odel is not None
+ and not hasattr(cls, 'API')
:%0A Mo
|
c75cd76826325516c770081c62b8b045dfb75baf | Complete - task : move jobtree to a local repository | shared/config.py | shared/config.py | import xml.etree.ElementTree as ET
import os
import sys
from sonLib.bioio import system
from sonLib.bioio import getRandomAlphaNumericString
def checkDatabaseConf(databaseConf):
"""Function checks the database conf is as expected and creates useful exceptions
if not"""
dataString = ET.tostring(databaseCon... | Python | 0.999606 | @@ -1049,24 +1049,449 @@
dataString)%0A
+ if typeString == %22postgresql%22:%0A postgresql = databaseConf.find(%22postgresql%22)%0A if postgresql == None:%0A raise RuntimeError(%22Database conf is of type postgresql but there is no nested postgresql tag: %25s%22 %25 dataString)%0A if... |
d20aef9623d0f82637220d4a8927c7b0549711c3 | Fix test_fauxware_oppologist. (#2365) | tests/test_oppologist.py | tests/test_oppologist.py | import os
import angr
test_location = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..')
def _ultra_oppologist(p, s):
old_ops = dict(angr.engines.vex.claripy.irop.operations)
try:
angr.engines.vex.claripy.irop.operations.clear()
angr.engines.vex.claripy.irop.operations['Iop... | Python | 0 | @@ -950,30 +950,32 @@
) == 18%0A
-assert
+stdout =
pg.deadende
@@ -997,26 +997,132 @@
s(1)
-.count(b%22%5Cn%22) == 3
+%0A if b%22trusted user%22 in stdout:%0A assert stdout.count(b%22%5Cn%22) == 3%0A else:%0A assert stdout.count(b%22%5Cn%22) == 2
%0A%0Ade
|
f93bc6ab42d6f1761288c724aa022bcf7216c733 | use couchbase 3.0 | bamboos/docker/environment/provider_worker.py | bamboos/docker/environment/provider_worker.py | """Author: Konrad Zemek
Copyright (C) 2015 ACK CYFRONET AGH
This software is released under the MIT license cited in 'LICENSE.txt'
Brings up a set of oneprovider worker nodes. They can create separate clusters.
"""
import copy
import json
import os
from . import common, docker, riak, couchbase, dns as dns_mod
PROV... | Python | 0 | @@ -3480,30 +3480,8 @@
rver
-:enterprise-4.0.0-beta
', d
|
45596b2e603e1ccb7cb271cc9834ede6293dd700 | create a local ghostpad before linking | voctocore/experiments/binlinktest.py | voctocore/experiments/binlinktest.py | #!/usr/bin/python3
import gi, time
gi.require_version('Gst', '1.0')
from gi.repository import GLib, Gst, GObject
GObject.threads_init()
Gst.init(None)
class SrcBin(Gst.Bin):
def __init__(self):
super().__init__()
self.src = Gst.ElementFactory.make('videotestsrc', 'src')
self.add(self.src)
self.add_pad(
... | Python | 0 | @@ -834,16 +834,144 @@
))%0A%09%09)%0A%0A
+%09def create_ghostpad(self, pad):%0A%09%09ghostpad = Gst.GhostPad.new(pad.get_name(), pad)%0A%09%09self.add_pad(ghostpad)%0A%09%09return ghostpad%0A%0A
%09def add
@@ -987,16 +987,16 @@
, src):%0A
-
%09%09sinkpa
@@ -1172,16 +1172,17 @@
esn't%0A%09%09
+#
print(sr
@@ -1242... |
d43199533570c3e99ae90cd09d74648f32727c1b | Fix on Python 2 | tests/test_reprounzip.py | tests/test_reprounzip.py | # Copyright (C) 2014 New York University
# This file is part of ReproZip which is released under the Revised BSD License
# See file LICENSE for full license details.
from __future__ import print_function, unicode_literals
import io
import os
import sys
import tarfile
import tempfile
import unittest
import warnings
f... | Python | 0.000272 | @@ -248,16 +248,30 @@
ort sys%0A
+import shutil%0A
import t
@@ -4384,20 +4384,21 @@
-with
+tmp =
tempfil
@@ -4403,35 +4403,29 @@
ile.
-TemporaryDirectory() as tmp
+mkdtemp()%0A try
:%0A
@@ -5829,21 +5829,33 @@
-with
+self.assertEqual(
rpz_obj.
@@ -5871,51 +5871,8 @@
ig()
- as fp:%0... |
b8e24b78feae538806c7de0f138623cbe179646c | Fix submit guard. | bika/lims/skins/bika/guard_submit_analysis.py | bika/lims/skins/bika/guard_submit_analysis.py | ## Script (Python) "guard_submit_analysis"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
wf_tool = context.portal_workflow
analyses = ['Analysis', 'DuplicateAnalysis', 'ReferenceAnalysis', ]
if context.portal_type in... | Python | 0 | @@ -328,61 +328,8 @@
es:%0A
- if not context.getResult():%0A return False%0A
|
20abd500ad4424114c5258d40027948fa89d247d | add pipeline to store_snvs_in_db | biolib/src/scripts/seqvar/store_snvs_in_db.py | biolib/src/scripts/seqvar/store_snvs_in_db.py | #!/usr/bin/env python
# Copyright 2009 Jose Blanca, Peio Ziarsolo, COMAV-Univ. Politecnica Valencia
# This file is part of biolib.
# biolib is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either versio... | Python | 0.000002 | @@ -1143,16 +1143,61 @@
t_db_url
+%0Afrom biolib.pipelines import pipeline_runner
%0A%0Adef pa
@@ -1771,16 +1771,133 @@
e name')
+%0A parser.add_option('-p', '--pipeline', dest='pipeline',%0A help='Another filtering pipeline')
%0A%0A pa
@@ -2859,16 +2859,47 @@
library%0A
+ pipeline =... |
6a8a6ba6a926eab3bf51dc9d4080d11b274799aa | Update copyright | tests/test_tcp_client.py | tests/test_tcp_client.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import socket
import asyncore
import random
import pdb
class tcp_client(asyncore.dispatcher):
def __init__(self, host, port, msg):
asyncore.dispatcher.__init__(self)
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
self.connect((host, p... | Python | 0 | @@ -41,16 +41,191 @@
-8 -*-%0A%0A
+#%0A# Copyright (C) 2012-2015 ichenq@outlook.com. All rights reserved.%0A# Distributed under the terms and conditions of the Apache License. %0A# See accompanying files LICENSE.%0A#%0A%0A
import s
|
2ce868c52f59cce62d15d06c024b12ed4e519430 | Use HTTP/1.1; couple of fixes/refinements. | examples/fetch2.py | examples/fetch2.py | """Fetch one URL and write its content to stdout.
This version adds a Request object.
"""
import sys
import urllib.parse
from http.client import BadStatusLine
from tulip import *
class Request:
def __init__(self, url, verbose=True):
self.url = url
self.verbose = verbose
self.parts = ur... | Python | 0 | @@ -490,16 +490,56 @@
'https'%0A
+ self.netloc = self.parts.netloc%0A
@@ -897,17 +897,17 @@
'HTTP/1.
-0
+1
'%0A
@@ -953,16 +953,70 @@
ers = %5B%5D
+%0A self.reader = None%0A self.writer = None
%0A%0A @c
@@ -1199,16 +1199,51 @@
e 'tcp')
+,%0A file=sys.stderr... |
c57d0faf5828f750fe68446d927eb7271be25979 | add code for compiling notes/ section. also add code for creating a directory in the output folder if it doesnt already exist | compile.py | compile.py | import sys
import os, shutil, subprocess
from glob import glob
site_title = 'wabbo'
include_dir = 'includes/'
exclude_files = ['readme.md']
out_folder = '_out/'
def pandocConvert(pathto, fname):
dothtml = fname[:fname.index('.')] + '.html'
in_file = pathto + fname
out_file = out_folder + pathto + dothtml... | Python | 0 | @@ -157,16 +157,62 @@
out/'%0A%0A%0A
+fname_no_ext = lambda fn: fn%5B:fn.index('.')%5D%0A%0A
def pand
@@ -1030,16 +1030,51 @@
_files%0A%0A
+%0A%0A# Compilation script begins here%0A
for fnam
@@ -1241,16 +1241,267 @@
'blov/', fname)%0A
+%0Afor fname in os.listdir('./notes/'):%0A if isPage(fname) and fname_no_ext... |
9caf509d2884d91453441140d855693666ce183d | update the script. | music_recommend.py | music_recommend.py | #!/usr/bin/env python2
"""
this script use python3 and work period to get the
recommend music from netease.
"""
import time
import sqlite3
from netease import NetEase
# config
USERNAME = 'your username'
PASSWORD = 'your password'
DATABASE_URL = 'recommend.db'
UPDATE_PERIOD = 6 * 60 * 60
def period(seconds):... | Python | 0 | @@ -115,20 +115,8 @@
%22%22%0A%0A
-import time%0A
impo
@@ -154,16 +154,78 @@
NetEase%0A
+from apscheduler.schedulers.blocking import BlockingScheduler%0A
%0A%0A# conf
@@ -243,21 +243,19 @@
= '
-your username
+15897970114
'%0APA
@@ -268,21 +268,40 @@
= '
-your password
+c651bf7febcc1f324a984529959a0950
'%0ADA
... |
b0e6bf7bf0fb844aeef7d0ab112b3e884613df20 | Update settings.py | mysite/settings.py | mysite/settings.py | # Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | Python | 0.000001 | @@ -1274,60 +1274,10 @@
= '
--c&qt=71oi%5Ee5s8(ene*$b89%5E#%25*0xeve$x_trs91veok9#0h0
'%0A
+
%0A# S
@@ -3255,36 +3255,32 @@
'PASSWORD': '
-7321
',%0A %7D%0A
@@ -3653,36 +3653,32 @@
'PASSWORD': '
-7321
',%0A %7D%0A
@@ -3863,12 +3863,8 @@
': '
-7321
',%0A
@@ -5553,16 +5553,16 @@
r fi... |
055f806d8e677489b20e109bf595b0a47b2ccf3a | Create nested transaction for code triggered by signal handler | web/opensubmit/models/userprofile.py | web/opensubmit/models/userprofile.py | from django.db import models, transaction
from django.contrib.auth.models import User
from django.utils import timezone
from django.shortcuts import get_object_or_404
from .assignment import Assignment
from .course import Course
from .submission import Submission
from .studyprogram import StudyProgram
class UserProf... | Python | 0 | @@ -159,16 +159,50 @@
t_or_404
+%0Afrom django.db import transaction
%0A%0Afrom .
@@ -332,16 +332,73 @@
rogram%0A%0A
+import logging%0Alogger = logging.getLogger('OpenSubmit')%0A%0A
%0Aclass U
@@ -4093,17 +4093,16 @@
line')%0A%0A
-%0A
def db_f
@@ -4269,16 +4269,24 @@
o Social
+%0A
or manu
@@ -4308,75 +4... |
427536af8398a6fb98d24fcc32a463cebafe6289 | replace hardcoded paths | tests/nlu/selectors/test_selectors.py | tests/nlu/selectors/test_selectors.py | import pytest
from rasa.nlu import train
from rasa.nlu.config import RasaNLUModelConfig
from rasa.nlu.training_data import load_data
from rasa.nlu.train import Trainer, Interpreter
from rasa.utils.tensorflow.constants import (
EPOCHS,
MASKED_LM,
NUM_TRANSFORMER_LAYERS,
TRANSFORMER_SIZE,
EVAL_NUM_EP... | Python | 0.003483 | @@ -4524,17 +4524,16 @@
el%22%0A
-#
best_mod
@@ -4580,114 +4580,8 @@
me)%0A
- best_model_file = Path('/Users/thomas/research/code/carbon-bot/models/response_selector', model_name)%0A
@@ -5134,17 +5134,16 @@
-#
path=Pat
@@ -5165,94 +5165,8 @@
h),%0A
- path=Path('/Users/thomas/research/... |
9b1cda7f864d3faf5c4889b0057b5439abdbd7a8 | Fix #145 (auto-refresh should not ignore directories) | 0_dired_fs_observer.py | 0_dired_fs_observer.py | # coding: utf-8
'''This module creates a file system observer, which
1. collect all open/expanded paths from all FileBrowser views and
2. waiting for any changes in these paths (create/remove/modify file), and in case of such change
3. schedule a refresh for corresponding view(s)
Filename of this module s... | Python | 0 | @@ -6083,44 +6083,8 @@
th =
- src_path if event.is_directory else
os.
@@ -6106,17 +6106,16 @@
c_path)%0A
-%0A
|
e57d946543af9fca5c10efd43f4b313719ef8a75 | Update tests | tests/unroll/unroll01.py | tests/unroll/unroll01.py | from polyphony import testbench
from polyphony import unroll
def unroll01(xs, ys):
s = 0
for i in range(8): # synth: unroll
x = xs[i] + 1
if x < 0:
s = s + x
else:
s = s - x
ys[i] = x
#print(x)
return s
@testbench
def test():
data = [1... | Python | 0.000001 | @@ -105,16 +105,23 @@
in
+unroll(
range(8)
: #
@@ -120,26 +120,10 @@
e(8)
+)
:
- # synth: unroll
%0A
|
8ad3d29336e74b39d2daac5a6c8f6b50b1efa9b7 | Refactor into main function | 2015/python/2015-03.py | 2015/python/2015-03.py | #!/usr/local/bin/python3
from collections import namedtuple
with open('../input/2015-03.txt') as f:
instructions = f.read().rstrip()
Point = namedtuple('Point', ['x', 'y'])
location = Point(0, 0)
visited = {location}
def new_loc(current_loc, instruction):
new_loc_table = {
'^': (current_loc.x, curr... | Python | 0.000007 | @@ -58,87 +58,53 @@
ple%0A
-%0Awith open('../input/2015-03.txt') as f:%0A instructions = f.read().rstrip()%0A%0A
+import pathlib%0A%0A%0Adef main(puzzle_input):%0A
Poin
@@ -139,16 +139,20 @@
, 'y'%5D)%0A
+
location
@@ -158,32 +158,36 @@
n = Point(0, 0)%0A
+
visited = %7Blocat
@@ -192,17 +192,20 @@
... |
2f5ffd9f238cd2b0428937bc31580182a5e1d2c1 | Disable ability to use certain bond modes in UI | nailgun/nailgun/api/v1/handlers/release.py | nailgun/nailgun/api/v1/handlers/release.py | # -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, 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 requi... | Python | 0.000003 | @@ -1111,16 +1111,54 @@
lection%0A
+from nailgun.settings import settings%0A
%0A%0Aclass
@@ -2182,32 +2182,734 @@
single, obj_id)%0A
+ networks_metadata = dict(obj%5B'networks_metadata'%5D)%0A if 'experimental' not in settings.VERSION%5B'feature_groups'%5D:%0A networks_metadata%5B'bonding'%... |
cb2547ecf40aa18e9bdf4688fe0f552e2f02a738 | update example | examples/pubsub.py | examples/pubsub.py | import tornado
import tornadis
@tornado.gen.coroutine
def pubsub():
client = tornadis.Client()
yield client.connect()
yield client.pubsub_psubscribe("foo*")
yield client.pubsub_subscribe("bar")
while True:
reply = yield client.pubsub_pop_message()
print(reply)
if reply[3] =... | Python | 0.000001 | @@ -63,11 +63,56 @@
bsub
-():
+_coroutine():%0A # Let's get a connected client
%0A
@@ -130,16 +130,22 @@
ornadis.
+PubSub
Client()
@@ -171,16 +171,55 @@
onnect()
+%0A%0A # Let's %22psubscribe%22 to a pattern
%0A yie
@@ -249,24 +249,62 @@
ribe(%22foo*%22)
+%0A%0A # Let's %22subscribe%22 to a channe... |
2ce16a9903ab07c98d805988e82d88c7c8c64e47 | simplify definition of sqrtm grad, move to top of file | autograd/scipy/linalg.py | autograd/scipy/linalg.py | from __future__ import division
import scipy.linalg
import autograd.numpy as anp
from autograd.numpy.numpy_wrapper import wrap_namespace
from autograd.numpy.linalg import atleast_2d_col as al2d
wrap_namespace(scipy.linalg.__dict__, globals()) # populates module namespace
def _flip(a, trans):
if anp.iscomplexob... | Python | 0 | @@ -269,16 +269,89 @@
espace%0A%0A
+sqrtm.defgrad(lambda ans, A, **kwargs: lambda g: solve_lyapunov(ans, g))%0A
%0Adef _fl
@@ -1128,158 +1128,4 @@
1)%0A%0A
-%0Adef make_grad_sqrtm(ans, A, **kwargs):%0A def sqrtm_grad(g):%0A return solve_lyapunov(ans, g)%0A return sqrtm_grad%0Asqrtm.defgrad(make_grad_sqr... |
c53f791e6256e9ed755db09de4951225ee22f924 | Remove editor and java kill script from the taskkill script | tools/task_kill.py | tools/task_kill.py | #!/usr/bin/env python
#
# Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
#
# A script to kill hanging processs. The tool will return non-zero if any
# proc... | Python | 0.000006 | @@ -617,40 +617,8 @@
e',%0A
- 'editor': 'DartEditor.exe',%0A
@@ -641,24 +641,24 @@
plore.exe',%0A
+
'firefox
@@ -822,84 +822,8 @@
t',%0A
- 'editor': 'DartEditor',%0A 'java': 'java',%0A 'eggplant': 'Eggplant',%0A
@@ -987,36 +987,8 @@
t',%0A
- 'editor': 'DartEditor',%0A
@@ -1541,... |
509bdc6b0a27397ea12e7236ca23160d8019e1b1 | Add taxonomy annotations and text refs | indra/sources/virhostnet/processor.py | indra/sources/virhostnet/processor.py | import re
from indra.databases import uniprot_client
from indra.statements import Agent, Complex, Evidence
from indra.preassembler.grounding_mapper import standardize_agent_name
class VirhostnetProcessor():
def __init__(self, df):
self.df = df
self.statements = []
def extract_statements(self)... | Python | 0.000001 | @@ -3,16 +3,31 @@
port re%0A
+import logging%0A
from ind
@@ -188,16 +188,55 @@
_name%0A%0A%0A
+logger = logging.getLogger(__name__)%0A%0A%0A
class Vi
@@ -252,18 +252,16 @@
rocessor
-()
:%0A de
@@ -903,231 +903,625 @@
a
-nnotations = %7B%0A 'exp_method': %7B'id': exp_method_id, 'name': exp_method_nam... |
3f6bfdb407085ddac560e48d43277a897df48c8d | Update version.py | tenable/version.py | tenable/version.py | version = '1.2.8'
version_info = tuple(int(d) for d in version.split("-")[0].split("."))
| Python | 0.000001 | @@ -10,11 +10,11 @@
'1.
-2.8
+3.0
'%0Ave
|
ccf2a4b372b859ee905d72df9ecfa2db1eda385b | Use stdlib json library as default | tzwhere/tzwhere.py | tzwhere/tzwhere.py | #!/usr/bin/python
import argparse
import simplejson as json
import datetime
import math
import pickle
parser = argparse.ArgumentParser(description='''
Convert lat/lng to timezones. Specify --read_pickle to initialize from a pickle file instead of the json file.
''')
parser.add_argument('--json_file', default='tz_wor... | Python | 0.000002 | @@ -28,16 +28,61 @@
rgparse%0A
+try:%0A import json%0Aexcept ImportError:%0A
import s
|
db846990e010014f023324d5b687caeb13bc9725 | fix script so that it actually works! | scripts/climodat/dump.py | scripts/climodat/dump.py | import constants
from pyIEM import iemdb
import network
nt = network.Table("IACLIMATE")
i = iemdb.iemdb()
coop = i['coop']
for id in nt.sts.keys():
fn = "coop_data/%s.csv" % (st.sts[id]['name'].replace(" ", "_"), )
out = open(fn, 'w')
out.write("station,station_name,lat,lon,day,high,low,precip,snow,\n")
sql = ... | Python | 0 | @@ -171,17 +171,17 @@
csv%22 %25 (
-s
+n
t.sts%5Bid
@@ -370,17 +370,19 @@
ay ASC%22
-%5C
+%25 (
%0A
@@ -383,19 +383,16 @@
-%25 (
constant
@@ -410,26 +410,16 @@
(id), id
-.lower(),
)%0A%0A rs
@@ -537,17 +537,17 @@
ower(),
-s
+n
t.sts%5Bid
@@ -553,25 +553,33 @@
d%5D%5B'name'%5D,
-s
+%0A ... |
1bacf10e11a268caf227d2f2cc76aefae00ceeb3 | Fix idention in soc.views.models.club module. | app/soc/views/models/club.py | app/soc/views/models/club.py | #!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | Python | 0 | @@ -3147,16 +3147,26 @@
s_type,%0A
+
pa
|
20ee83e153e5ca21cc60ff052c5331320f6aec2c | Add add_products test | paystackapi/tests/test_page.py | paystackapi/tests/test_page.py | import httpretty
from paystackapi.tests.base_test_case import BaseTestCase
from paystackapi.page import Page
class TestPage(BaseTestCase):
@httpretty.activate
def test_page_create(self):
"""Method defined to test page creation."""
httpretty.register_uri(
httpretty.POST,
... | Python | 0.000001 | @@ -2851,32 +2851,37 @@
sage%22: %22
-Slug is availabl
+Products added to pag
e%22%7D',%0A
|
a999e37136ff17739bbd2e782fc4c47767489908 | add moonscript and lua | silp/language.py | silp/language.py | import silp
class Language:
def __init__(self, name, extension, macro_prefix,
generated_suffix, columns):
self.name = name
self.extension = extension
self.macro_prefix = macro_prefix
self.generated_suffix = generated_suffix
self.columns = columns
languages... | Python | 0 | @@ -817,10 +817,138 @@
', 80),%0A
+ Language('Moonscript', '.moon', '--SILP:', '--__SILP__%5Cn', 80),%0A Language('Lua', '.lua', '--SILP:', '--__SILP__%5Cn', 80),%0A
%5D%0A
|
a2b508c8db448c6c5e4c2c40ec7f2dcd93ffa5ec | undo beat in worker | control.py | control.py | #!/usr/bin/python
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.script import Manager
from celery.bin.celery import main as celery_main
from gfsad import create_app, db
from gfsad.models import Location
import json
import redis
app = create_app('Production')
migrate = Migrate(app, db)
manager = ... | Python | 0.000001 | @@ -400,51 +400,10 @@
eat(
-Q=%22gfsad%22):%0A from random import randint%0A
+):
%0A
@@ -444,25 +444,25 @@
'-C', '-
-l', 'info
+-pidfile=
'%5D%0A w
@@ -547,70 +547,15 @@
ger.
-option('-b', '--beat', help='Include celery beat with worker')
+command
%0Adef
@@ -566,18 +566,17 @@
ker(
-beat=False
+Q=%22gfsa... |
422b559b07f179e93423530155a86bc7765142c8 | Update XSS-injection.py | pen_test_code/XSS-injection.py | pen_test_code/XSS-injection.py | import mechanize
url = "http://www.webscantest.com/crosstraining/aboutyou.php"
browser = mechanize.Browser()
attackNumber = 1
with open('XSS-vectors.txt') as f:
for line in f:
browser.open(url)
browser.select_form(nr=0)
browser["fname"] = line
res = browser.submit()
content = res.read()
# check ... | Python | 0 | @@ -402,17 +402,17 @@
%09%09print
-
+(
%22Possibl
@@ -417,16 +417,17 @@
ble XXS%22
+)
%0A %09%0A%09
@@ -528,17 +528,17 @@
)%0A%09print
-
+(
attackNu
@@ -541,16 +541,17 @@
ckNumber
+)
%0A%09attack
|
767131c3addcc182b8b0c73a977df3540b282500 | Remove problematic imports in __init__ -- causing cycles and weirdness. | thinc/neural/__init__.py | thinc/neural/__init__.py | from ._classes.model import Model
from ._classes.affine import Affine
from ._classes.relu import ReLu
from ._classes.softmax import Softmax
from ._classes.elu import ELU
from ._classes.maxout import Maxout
from ._classes.embed import Embed
from ._classes.static_vectors import StaticVectors
#from ._classes.embed impor... | Python | 0 | @@ -205,134 +205,8 @@
ut%0A%0A
-from ._classes.embed import Embed%0Afrom ._classes.static_vectors import StaticVectors%0A#from ._classes.embed import HashEmbed%0A%0A#
from
@@ -251,16 +251,16 @@
ax_pool%0A
+
from ._c
@@ -299,17 +299,16 @@
tWindow%0A
-#
from ._c
@@ -345,9 +345,8 @@
orm%0A
-#
from
|
5819a2e1b0d5c4a53edbebe19b756480ba14de5c | Set hostname on framework | scale/scheduler/management/commands/scale_scheduler.py | scale/scheduler/management/commands/scale_scheduler.py | from __future__ import unicode_literals
import json
import logging
import signal
import socket
import sys
from django.conf import settings
from django.core.management.base import BaseCommand
from mesoshttp.client import MesosClient
from scheduler.manager import scheduler_mgr
from scheduler.scale_scheduler import Sc... | Python | 0.000008 | @@ -1711,16 +1711,92 @@
K_NAME,%0A
+ frameworkHostname=scheduler_mgr.hostname,%0A
|
0fbc02dfff60ebd6109aedc8c8486a79b30a9284 | Make changes to flow to support tests | scripts/thanks_report.py | scripts/thanks_report.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Create reports for thankers and thankees by wiki and month.
These are the specific command line parameters for this script:
¶ms;
-minimum The minimum number of thanks actions needed for inclusion.
-year The year for which to generate the report.
... | Python | 0 | @@ -1194,16 +1194,29 @@
data =
+self.parse(*(
self.gat
@@ -1220,16 +1220,18 @@
gather()
+))
%0A
@@ -2051,24 +2051,125 @@
r(thankees)%0A
+ return (thankers_count, thankees_count)%0A%0A def parse(self, thankers_count, thankees_count):
%0A inc
|
6757196f4b45f53c2ce91b38a957be1970295a4e | update copyright year (#275) | etc/mappings.py | etc/mappings.py | # -*- coding: ISO-8859-15 -*-
# =================================================================
#
# Authors: Tom Kralidis <tomkralidis@gmail.com>
#
# Copyright (c) 2012 Tom Kralidis
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files... | Python | 0 | @@ -162,17 +162,17 @@
(c) 201
-2
+5
Tom Kra
|
89ffd5dbaed09b99247fe9a93cbea8aea7acac1f | Change PROXY_HOST_HTTPS in settings | thumborizeme/settings.py | thumborizeme/settings.py | import os
# REDIS
REDIS_HOST = os.environ.get('REDIS_HOST', '127.0.0.1')
REDIS_PORT = os.environ.get('REDIS_PORT', 6379)
REDIS_PASSWORD = os.environ.get('REDIS_PASSWORD', '')
HOST = os.environ.get('HOST', 'http://localhost:9000')
THUMBOR_HOST = os.environ.get('THUMBOR_HOST', 'http://localhost:8001')
# PROXY
PROXY_HO... | Python | 0.000001 | @@ -388,32 +388,38 @@
.get('PROXY_HOST
+_HTTPS
', '')%0APROXY_POR
|
52e09c8ee68d7f4ac8128c15da6f8ca18fb7eadd | Use check_output instead of Popen | src/clubbable/import_mdb/import_mdb.py | src/clubbable/import_mdb/import_mdb.py | """
Import members, guests and meetings from a Microsoft Access database.
Check table names, and columns to customise for your database.
"""
import csv
from datetime import datetime
import re
from subprocess import Popen, PIPE
from celery import shared_task
from club.models import Member, Meeting, Guest
MDB_EXPORT_C... | Python | 0.000001 | @@ -213,19 +213,20 @@
ort
-Popen, PIPE
+check_output
%0Afro
@@ -1672,15 +1672,30 @@
-args =
+output = check_output(
(MDB
@@ -1732,44 +1732,8 @@
ble)
-%0A p = Popen(args, stdout=PIPE
)%0A
@@ -1766,14 +1766,12 @@
der(
-p.stdo
+outp
ut)%0A
|
2e6d31374d0f8ef999d7a383d4d19cda6156b605 | delete FORM | wanish/__init__.py | wanish/__init__.py | from lxml import etree
from lxml.etree import strip_elements
import requests
from requests.exceptions import ConnectionError, Timeout
from lxml.html import document_fromstring
from wanish.cleaner import html_cleaner, ArticleExtractor
from wanish.encoding import get_encoding
from wanish.images import get_image_url
from... | Python | 0.000001 | @@ -4316,16 +4316,8 @@
ul',
- 'form',
%0A
|
f06b666614e4606824e5f090583c6c5e03a05aad | add icon widget | simplui/label.py | simplui/label.py | # ----------------------------------------------------------------------
# Copyright (c) 2009 Tristam MacDonald
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source... | Python | 0.000001 | @@ -3533,20 +3533,17 @@
, y):%0A%09%09
-
+%09
self.act
@@ -3554,20 +3554,17 @@
self)%0A%09%09
-
+%09
res = ev
|
1ee25342de03af55981031525c489528cc44075c | change ks url | server/server_control.py | server/server_control.py | import sys
import random
from datetime import datetime, timedelta
import asyncio
import isodate
import requests
import youtube_utils as yt
# list of video titles to filter
filter_list = [
"havana",
"bts",
"watch mojo",
"top 5",
"top 10",
"top 12",
"top 100",
"top 25",
"kids react"... | Python | 0.000003 | @@ -2010,43 +2010,33 @@
http
-s
://
-github.com/jghibiki/Doc/blob/ks
+jghibiki.github.io/Doc
/ks.
|
482e9f7880c7a75ff38ff35a2d046bc2993904f6 | add Detail View ajax | exadmin/plugins/ajax.py | exadmin/plugins/ajax.py | from django.http import HttpResponse
from django.utils import simplejson
from django.utils.html import escape
from django import forms
from django.conf import settings
from django.utils.html import conditional_escape
from django.utils.encoding import StrAndUnicode, force_unicode
from django.utils.safestring import mark... | Python | 0 | @@ -408,16 +408,67 @@
azy as _
+%0Afrom django.utils.datastructures import SortedDict
%0A%0Afrom e
@@ -568,16 +568,33 @@
dminView
+, DetailAdminView
%0A%0ANON_FI
@@ -2380,16 +2380,432 @@
esult)%0A%0A
+class AjaxDetailPlugin(BaseAdminPlugin):%0A%0A def get_response(self, __):%0A if not (self.request.is_aj... |
06f2b79ceba640b57ec3323a37f0204df5f26bb3 | Fix the test settings. | base/settings/testing.py | base/settings/testing.py | # -*- coding: utf-8 -*-
from configurations import values
from .base import Base as Settings
class Testing(Settings):
# Debug Settings.
# --------------------------------------------------------------------------
DEBUG = values.BooleanValue(False)
TEMPLATE_DEBUG = values.BooleanValue(False)
# Da... | Python | 0.000003 | @@ -985,24 +985,221 @@
%7D,%0A %7D%0A%0A
+ # Static File Configuration.%0A # --------------------------------------------------------------------------%0A STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'%0A%0A
# Media
@@ -1412,227 +1412,88 @@
-DEFAULT_S3_PATH = 'm... |
8c35ca3e51ebe8eee61c5f13388d5073b7271473 | Use scenario_outline rather than scenario. | behave/formatter/json.py | behave/formatter/json.py | from __future__ import absolute_import
import base64
try:
import json
except ImportError:
import simplejson as json
from behave.formatter.base import Formatter
class JSONFormatter(Formatter):
name = 'json'
description = 'JSON dump of test run'
def __init__(self, stream, config):
super(J... | Python | 0 | @@ -1336,32 +1336,40 @@
yword': scenario
+_outline
.keyword,%0A
@@ -1382,32 +1382,40 @@
'name': scenario
+_outline
.name,%0A
@@ -1425,32 +1425,40 @@
'tags': scenario
+_outline
.tags,%0A
@@ -1472,32 +1472,40 @@
ation': scenario
+_outline
.location,%0A
|
f95aa5b36a354fe3cfd94b43d8f0f6346ec400de | Disable setting thread_name_prefix in ThreadPoolExecutor (only supported in Python >= 3.6) | soapypower/threadpool.py | soapypower/threadpool.py | import os, queue, concurrent.futures
class ThreadPoolExecutor(concurrent.futures.ThreadPoolExecutor):
"""ThreadPoolExecutor which allows setting max. work queue size"""
def __init__(self, max_workers=0, thread_name_prefix='', max_queue_size=0):
super().__init__(max_workers or os.cpu_count() or 1, thre... | Python | 0 | @@ -256,16 +256,17 @@
+#
super().
@@ -330,16 +330,77 @@
prefix)%0A
+ super().__init__(max_workers or os.cpu_count() or 1)%0A
|
edbe6f7707afac9afa5e201c9e1fc17fad05e548 | Reorder imports | pitchfork/setup_application.py | pitchfork/setup_application.py | # Copyright 2014 Dave Kludt
#
# 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, s... | Python | 0 | @@ -853,93 +853,93 @@
ort
-views%0Aimport logging%0Aimport defaults%0Aimport template_filters%0Aimport template_function
+template_functions%0Aimport template_filters%0Aimport defaults%0Aimport logging%0Aimport view
s%0A%0A%0A
|
ee77a8668f4a5941f424735418a0973d3d0f333c | Add support for super duper silent option. | numscons/core/helpers.py | numscons/core/helpers.py | # Last Changed: .
"""This initialize a scons environment using info from distutils, and all our
customization (python extension builders, build_dir, etc...)."""
from os.path import join as pjoin
from numscons.core.custom_builders import DistutilsSharedLibrary, NumpyCtypes, \
DistutilsPythonExtension, DistutilsSt... | Python | 0 | @@ -2942,16 +2942,21 @@
'1', '2'
+, '3'
)))%0A
|
3f6a8591bfca515e64a4f79ac8a8e5a56cdec3be | fix 3.3 | oauthenticator/openid.py | oauthenticator/openid.py | """
Custom Authenticator to use Google OAuth with JupyterHub.
Derived from the GitHub OAuth authenticator.
"""
import os
import json
from tornado import gen
from tornado.auth import GoogleOAuth2Mixin
from tornado.web import HTTPError
from traitlets import Unicode
from jupyterhu... | Python | 0.999775 | @@ -3103,16 +3103,17 @@
+#
%22code%22:
@@ -3283,16 +3283,17 @@
+#
%22grant_t
|
e3a3ca173e15541a995225e709e8453ce060280b | Simplify utils.py:NamedTempFile to one version | yapftests/utils.py | yapftests/utils.py | # -*- coding: utf-8 -*-
# Copyright 2015-2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... | Python | 0.00002 | @@ -1286,39 +1286,10 @@
ute%0A
-if sys.version_info%5B0%5D %3E= 3:%0A
+#%0A
# No
@@ -1361,18 +1361,16 @@
aryFile%0A
-
# says N
@@ -1427,26 +1427,24 @@
cumenation.%0A
-
@contextlib.
@@ -1450,34 +1450,32 @@
.contextmanager%0A
-
def NamedTempFil
@@ -1498,34 +1498,32 @@
-
buffering=-1,%... |
1b663791dbb7604730d0a761ac66ca4623e8acbc | improve debug messages | yaranullin/main.py | yaranullin/main.py | # yaranullin/main.py
#
# Copyright (c) 2012 Marco Scopesi <marco.scopesi@gmail.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS P... | Python | 0 | @@ -2301,53 +2301,8 @@
vel)
-%0A LOGGER.debug('Starting %25s...', args.cmd)
%0A%0A
@@ -2515,60 +2515,205 @@
-run(args)%0A except KeyboardInterrupt:%0A pass
+LOGGER.debug('Starting %25s...', args.cmd)%0A run(args)%0A LOGGER.debug('Quitting %25s...', args.cmd)%0A except KeyboardInt... |
549fd2c0b7a60d55953f15223fac9e59fd780089 | make odoo2odoo installable | odoo2odoo/__openerp__.py | odoo2odoo/__openerp__.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 JEOSOFT (http://www.jeosoft.com.ar)
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General P... | Python | 0.000001 | @@ -1423,20 +1423,19 @@
lable':
-Fals
+Tru
e,%0A '
|
60e86f10ee17f4b118442f54ab93884c8a909dab | Remove episode_detail.jses from the application.py js files list | opal/core/application.py | opal/core/application.py | """
Application helpers for OPAL
"""
from opal.utils import stringport
class OpalApplication(object):
schema_module = None
core_javascripts = {
'opal.upstream.deps': [
"js/lib/modernizr.js",
"js/lib/jquery-1.11.3/jquery-1.11.3.js",
"js/lib/d3/d3.js",
"js... | Python | 0 | @@ -3619,58 +3619,8 @@
s%22,%0A
- %22js/opal/services/episode_detail.js%22,%0A
@@ -4225,61 +4225,8 @@
s%22,%0A
- %22js/opal/controllers/episode_detail.js%22,%0A
|
34240aec77709be23ff5fc0b14ad5334dfd6a92b | Change common keys. | openchordcharts/utils.py | openchordcharts/utils.py | # -*- coding: utf-8 -*-
# Open Chord Charts -- Database of free chord charts
# By: Christophe Benz <christophe.benz@gmail.com>
#
# Copyright (C) 2012 Christophe Benz
# https://gitorious.org/open-chord-charts/
#
# This file is part of Open Chord Charts.
#
# Open Chord Charts is free software; you can redistribute it a... | Python | 0 | @@ -1264,18 +1264,18 @@
, 'F', '
-F#
+Gb
', 'G'%5D%0A
|
b6f31d48fcaa8a76fc7398e38a7ca763ae3bf89b | Refactor Yadis discovery, fix UnicodeErrors | openid/yadis/discover.py | openid/yadis/discover.py | # -*- test-case-name: openid.test.test_yadis_discover -*-
__all__ = ['discover', 'DiscoveryResult', 'DiscoveryFailure']
from io import StringIO
from openid import fetchers
from openid.yadis.constants import \
YADIS_HEADER_NAME, YADIS_CONTENT_TYPE, YADIS_ACCEPT_HEADER
from openid.yadis.parsehtml import MetaNotFo... | Python | 0 | @@ -3497,33 +3497,44 @@
None
-,
if
-I
+no suitable URL
can
-'t
%0A
-find any
+be found
.%0A%0A
@@ -4752,16 +4752,41 @@
bytes):%0A
+ try:%0A
@@ -4830,16 +4830,860 @@
coding)%0A
+ except UnicodeError:%0A # All right, the detected encoding has f... |
c30010e5a97cc7926d8c78cecbc01dfe2cb8550a | Use Vertex in STLWriter | plugins/STLWriter/STLWriter.py | plugins/STLWriter/STLWriter.py | from Cura.MeshHandling.MeshWriter import MeshWriter
import time
import struct
class STLWriter(MeshWriter):
def __init__(self):
super(STLWriter, self).__init__()
self._supported_extension = ".stl"
#TODO: Only a single mesh can be saved to a single file, we might want to save multiple me... | Python | 0 | @@ -1046,187 +1046,352 @@
-f.write(struct.pack(%22%3Cfff%22, v1%5B0%5D, v1%5B1%5D, v1%5B2%5D))%0A f.write(struct.pack(%22%3Cfff%22, v2%5B0%5D, v2%5B1%5D, v2%5B2%5D))%0A f.write(struct.pack(%22%3Cfff%22, v3%5B0%5D, v3%5B1%5D, v3%5B2%5D
+vertPos = v1.getPosition()%0A f.w... |
7e79ff0739618c6e82619a04398c4a6b1602e2dc | fix non-greedy regexp | src/eduid_common/api/utils.py | src/eduid_common/api/utils.py | # -*- coding: utf-8 -*-
import re
from uuid import uuid4
import sys
from flask import current_app, session
from eduid_userdb import User
from eduid_userdb.dashboard import DashboardUser
from eduid_userdb.proofing import ProofingUser
from eduid_userdb.exceptions import UserDBValueError, EduIDUserDBError
from eduid_use... | Python | 0.998747 | @@ -5135,13 +5135,11 @@
(r'%3C
-%5B%5E%3C%5D+
+.+?
%3E',
|
6bb3e5343be824b84bf38e255a9f992295c24aee | Allow ~ in video url slugs. | localtv/urls.py | localtv/urls.py | from django.conf.urls.defaults import patterns, include, url
from django.contrib.auth.models import User
from django.views.generic import ListView
from localtv.api.v1 import api as api_v1
from localtv.listing.views import CompatibleListingView, SiteListView
from localtv.models import Category
from localtv.views import... | Python | 0 | @@ -632,16 +632,17 @@
slug%3E%5B%5Cw
+~
-%5D+))?/?
|
1421e2bd8034281615f06b347df9f6d37201a226 | Improve Blog list at admin view | lowfat/admin.py | lowfat/admin.py | from django.contrib import admin
from simple_history.admin import SimpleHistoryAdmin
from .models import *
@admin.register(Claimant)
class ClaimantAdmin(SimpleHistoryAdmin):
list_display = [
'forenames',
'surname',
'email',
'application_year',
]
search_fields = [
'... | Python | 0 | @@ -3305,36 +3305,351 @@
toryAdmin):%0A
-pass
+list_display = %5B%0A 'author',%0A 'fund',%0A 'added',%0A %5D%0A search_fields = %5B%0A 'fund',%0A 'author',%0A 'coauthor',%0A 'notes_from_author',%0A 'notes_from_admin',%0A 'title',%0A 'publi... |
0425a3ce6ab44c7abae4d791d17db0305b436764 | bump to 0.9.11 | hublib/__init__.py | hublib/__init__.py | from pint import UnitRegistry
ureg = UnitRegistry()
ureg.autoconvert_offset_to_baseunit = True
Q_ = ureg.Quantity
__version__ = "0.9.10"
| Python | 0.000004 | @@ -128,11 +128,11 @@
= %220.9.1
-0
+1
%22%0A
|
67eb081fa8fec0849646bbbcf6305279357f556d | Refactor the fetch command line dispatcher | src/son_analyze/cli/fetch_cmd.py | src/son_analyze/cli/fetch_cmd.py | # Copyright (c) 2015 SONATA-NFV, Thales Communications & Security
# 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
#
#... | Python | 0.000059 | @@ -1249,16 +1249,38 @@
-object%0A
+from enum import Enum%0A
import l
@@ -1649,24 +1649,390 @@
(values))%0A%0A%0A
+class _Dispatcher(Enum):%0A vnfd = (fetch.fetch_vnfd_by_uuid, fetch.fetch_vnfd)%0A nsd = (fetch.fetch_nsd_by_uuid, fetch.fetch_nsd)%0A vnfr = (fetch.fetch_vnfr_by_uuid, fetch.fetch_vnfr)%0A ... |
5b6545f385b031fb2629370ec15dd2770bc27533 | revert test to command_order | wooey/tests/scripts/command_order.py | wooey/tests/scripts/command_order.py | import argparse
import sys
parser = argparse.ArgumentParser(description="Something")
parser.add_argument('linknew', help='the url containing the metadata')
parser.add_argument('name', help='the name of the file')
if __name__ == '__main__':
args = parser.parse_args()
sys.stderr.write('{} {}'.format(args.link, ... | Python | 0.000001 | @@ -108,11 +108,8 @@
link
-new
', h
|
d817078bcb73c2d65677ef660ba43c9859230ee9 | Change get_terminal_size from os to shutil | pokediadb/log.py | pokediadb/log.py | """Module to display different kind of messages in the terminal."""
import os
import textwrap
import click
from pokediadb.enums import Log
def format_message(msg, msg_type):
"""Format a message in function of message type and terminal's size.
Args:
msg (str): Message to format.
msg_type (L... | Python | 0.000001 | @@ -69,18 +69,22 @@
%0Aimport
-o
s
+hutil
%0Aimport
@@ -410,98 +410,30 @@
t
-ry:%0A term_size = os.get_terminal_size()%0A except OSError:%0A term_size = os.
+erm_size = shutil.get_
term
@@ -446,16 +446,8 @@
ize(
-(80, 24)
)%0A
|
aaf7b6b17fdded6f6489eaf84a4d336b3344c356 | support solver resumes in parse_log.py | tools/extra/parse_log.py | tools/extra/parse_log.py | #!/usr/bin/env python
"""
Parse training log
Evolved from parse_log.sh
"""
import os
import re
import extract_seconds
import argparse
import csv
from collections import OrderedDict
def parse_log(path_to_log):
"""Parse log file
Returns (train_dict_list, test_dict_list)
train_dict_list and test_dict_lis... | Python | 0 | @@ -1370,16 +1370,37 @@
ntinue%0A%0A
+ try:%0A
@@ -1517,24 +1517,28 @@
+
logfile_year
@@ -1539,16 +1539,156 @@
e_year)%0A
+ except ValueError:%0A # Skip lines with bad formatting, for example when resuming solver%0A continue%0A%0A
... |
d3ac89dacfd2991965c9638a8678cbf26aab4793 | Fix header mapping | eveigb/middleware.py | eveigb/middleware.py | class IGBMiddleware(object):
"""
Middleware to detect the EVE IGB
"""
def process_request(self, request):
request.is_igb = False
request.is_igb_trusted = False
header_map = [
('HTTP_EVE_SERVERIP', 'eve_server_ip'),
('HTTP_EVE_CHARNAME', 'eve_charname'),... | Python | 0.000009 | @@ -789,18 +789,18 @@
TIONNAME
-,
'
+,
'eve_st
@@ -844,18 +844,18 @@
TATIONID
-,
'
+,
'eve_st
@@ -900,10 +900,10 @@
ROLE
-,
'
+,
'ev
|
bd01c5ab93e3f862317d2ed1a3a6cf401ce524c5 | Remove accidentally refactored removal | src/unittest/python/cloudformation_tests.py | src/unittest/python/cloudformation_tests.py | import json
import random
import string
import tempfile
from infra_buddy.aws.cloudformation import CloudFormationBuddy
from infra_buddy.aws.s3 import S3Buddy, CloudFormationDeployS3Buddy
# noinspection PyUnresolvedReferences
from infra_buddy import commandline
from infra_buddy.deploy.cloudformation_deploy import Cloud... | Python | 0.000001 | @@ -3595,16 +3595,48 @@
mplate,
+parameter_file, config_templates
), self.
|
fd7c2beb8d0d400d0ba91b725ff2bb30d7f43e3b | remove debugging print | examples/app/timeout.py | examples/app/timeout.py | ''' Present a plot updating according to a set of fixed timeout
intervals.
Use the ``bokeh serve`` command to run the example by executing:
bokeh serve timeout.py
at your command prompt. Then navigate to the URL
http://localhost:5006/timeout
in your browser.
'''
import sys
import numpy as np
from boke... | Python | 0.000081 | @@ -1344,31 +1344,8 @@
ta)%0A
- print(%22FOOOO%22)%0A
|
a690a1dd5e66d241cc93a333d5dabb80dfd6b22c | Version update | f90nml/__init__.py | f90nml/__init__.py | """f90nml
======
A Fortran 90 namelist parser and generator.
:copyright: Copyright 2014 Marshall Ward, see AUTHORS for details.
:license: Apache License, Version 2.0, see LICENSE for details.
"""
from f90nml.parser import Parser
__version__ = '0.12-dev'
def read(nml_fname):
"""Parse a Fortran 90 na... | Python | 0 | @@ -260,12 +260,8 @@
0.12
--dev
'%0A%0A%0A
|
3a90a859d4dfdbf13f15399be12a1928aa2c54ff | Add manifold support for fairseq file_io | fairseq/file_io.py | fairseq/file_io.py | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import logging
import os
import shutil
from typing import List, Optional
logger = logging.getLogger(__file__)
try:... | Python | 0.000002 | @@ -796,16 +796,233 @@
)%0A%0A
+ try:%0A # %5BFB only%5D Add extra FB only PathHandlers for PathManager%0A import fairseq.fb_file_io as fb_file_io%0A%0A fb_file_io.update_path_manager(IOPathManager)%0A except ImportError:%0A pass%0A%0A
except I
|
3b35713626b1861d6dc022fa2a40f979cb415860 | remove debugging code | src/streamlink/plugins/facebook.py | src/streamlink/plugins/facebook.py | import re
from streamlink.plugin import Plugin
from streamlink.plugin.api import http, useragents
from streamlink.stream import DASHStream, HTTPStream
from streamlink.utils import parse_json
class Facebook(Plugin):
_url_re = re.compile(r"https?://(?:www\.)?facebook\.com/[^/]+/videos")
_mpd_re = re.compile(r'... | Python | 0 | @@ -686,80 +686,8 @@
ME%7D)
-%0A with open(%22temp.html%22, %22w%22) as f:%0A f.write(res.text)
%0A%0A
@@ -1355,19 +1355,16 @@
url)%0A%0A%0A
-%0A%0A%0A
__plugin
|
abb4e66b8da670485950546c9b8415d22d349031 | Allow a BaseDir object as the home of a BaseDirs object | basedir.py | basedir.py | import json
import os
import os.path
import subprocess
def parse_version_string():
path = os.path.abspath(__file__)
while os.path.islink(path):
path = os.path.join(os.path.dirname(path), os.readlink(path))
path = os.path.dirname(path) # go up one level, from repo/basedir.py to repo, where README.md... | Python | 0.000003 | @@ -5944,24 +5944,114 @@
ult, home):%0A
+ if isinstance(home, BaseDir):%0A self.home = home.path%0A else:%0A
self
|
ea31971f7a60e33b6ec70bce193e021122ed25a6 | delete missing entries | src/tools/drupal2noink_import.py | src/tools/drupal2noink_import.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Tool for importing existing drupal entries into noink.
import sqlite3
import sys
from noink import mainApp
from noink.user_db import UserDB
from noink.entry_db import EntryDB
if len(sys.argv) != 3:
print("usage:")
print("{0} /path/to/sqlite.db mapfile".format(... | Python | 0.000001 | @@ -3104,16 +3104,91 @@
parent%0A%0A
+# Delete missing nodes%0Afor e in entries_to_delete:%0A entry_db.delete(e)%0A%0A
for i in
|
7077716c25849d3c365081c3a531c3e5020b3f4d | remove superfluous box_select tool | examples/glyphs/maps.py | examples/glyphs/maps.py | from __future__ import print_function
from bokeh.util.browser import view
from bokeh.document import Document
from bokeh.embed import file_html
from bokeh.models.glyphs import Circle
from bokeh.models import (
GMapPlot, Range1d, ColumnDataSource,
PanTool, WheelZoomTool, BoxSelectTool,
BoxSelectionOverlay, ... | Python | 0.00003 | @@ -304,23 +304,16 @@
election
-Overlay
, GMapOp
@@ -1811,37 +1811,8 @@
ol()
-%0Abox_select = BoxSelectTool()
%0A%0Apl
@@ -1843,92 +1843,8 @@
zoom
-, box_select)%0Aoverlay = BoxSelectionOverlay(tool=box_select)%0Aplot.add_layout(overlay
)%0A%0Ad
|
aed8a831bca72268ad9fbcd2f777d91af29d61b6 | Define const `OUTPUT_PANEL` for the panel name | message_view.py | message_view.py | import sublime
import sublime_plugin
PANEL_NAME = "SublimeLinter Messages"
def plugin_unloaded():
for window in sublime.windows():
window.destroy_output_panel(PANEL_NAME)
class SublimeLinterDisplayPanelCommand(sublime_plugin.WindowCommand):
def run(self, msg=""):
panel_view = self.window.cr... | Python | 0.005179 | @@ -69,16 +69,54 @@
ssages%22%0A
+OUTPUT_PANEL = %22output.%22 + PANEL_NAME%0A
%0A%0Adef pl
@@ -615,38 +615,20 @@
l%22:
-%22output.%7B%7D%22.format(PANEL_NAME)
+OUTPUT_PANEL
%7D)%0A%0A
|
c6797ae8a2e68cc458bb78bba3c80452f9f15e45 | Fix failing sphinx build | astropy/coordinates/funcs.py | astropy/coordinates/funcs.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module contains convenience functions for coordinate-related functionality.
This is generally just wrapping around the object-oriented coordinates
framework, but it is useful for some users who are used to more functional
interfaces.
"""
from _... | Python | 0.000001 | @@ -5356,17 +5356,16 @@
kyCoord%60
-s
, or rep
|
d716c9b96c73da47c1c616321bcb792a81c1c5d2 | Fix tests | tests/test_stores/test_azure_store.py | tests/test_stores/test_azure_store.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import mock
import tempfile
from unittest import TestCase
from azure.storage.blob import Blob, BlobPrefix, BlobProperties
from polyaxon_stores.exceptions import PolyaxonStoresException
from polyaxon_stores.stores.azure_store im... | Python | 0.000003 | @@ -6061,10 +6061,26 @@
%5D
+, any_order=True
)%0A
|
0a7247363ef5051a7961110557e2a40e86922b63 | Clean uo code | src/unittests/line_intersection.py | src/unittests/line_intersection.py | import unittest
from src.simple_commander.utils.line_intersection import line_intersection
class MainControllerTestCase(unittest.TestCase):
def setUp(self):
self.unit1 = {'width': 2}
self.unit2 = {'width': 2}
def tearDown(self):
del self
def test_intersection_1(self):
A ... | Python | 0.000003 | @@ -266,16 +266,45 @@
del self
+.unit1%0A del self.unit2
%0A%0A de
|
f96f5545accae1718ecceee647dc2cce5d277554 | Fix compile problems with gremlin-python due to changes in third-party libraries. CTR | gremlin-python/src/main/jython/setup.py | gremlin-python/src/main/jython/setup.py | """
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this ... | Python | 0.000025 | @@ -2542,18 +2542,58 @@
t-runner
+==5.2',%0A 'importlib-metadata%3C3.0.0
'
-,
%0A %5D,%0A
|
1874bd2172d4c96b9188cf2b157412d2522331ef | make it slightly larger | examples/list/simple.py | examples/list/simple.py | import gtk
from kiwi.ui.objectlist import Column, ObjectList
class Fruit:
def __init__(self, name, price):
self.name = name
self.price = price
fruits = ObjectList([Column('name', data_type=str),
Column('price', data_type=int)])
for name, price in [('Apple', 4),
... | Python | 0.000091 | @@ -599,17 +599,17 @@
t(150, 1
-5
+8
0)%0A%0Awind
|
abc135f36bbacd8783eb1855298565caa681d15d | bump minor release | feedly/__init__.py | feedly/__init__.py | __author__ = 'Thierry Schellenbach'
__copyright__ = 'Copyright 2012, Thierry Schellenbach'
__credits__ = ['Thierry Schellenbach, mellowmorning.com, @tschellenbach']
__license__ = 'BSD'
__version__ = '0.8.116'
__maintainer__ = 'Thierry Schellenbach'
__email__ = 'thierryschellenbach@gmail.com'
__status__ = 'Production'... | Python | 0 | @@ -205,9 +205,9 @@
8.11
-6
+7
'%0A__
|
073493ca4442aa5a8fbe90c35eccc7dc403d934b | Fix to MercurialRepository.checkout so that it works with recent version of Mercurial (2.3) | src/versioncontrol/_mercurial.py | src/versioncontrol/_mercurial.py | """
Defines the Sumatra version control interface for Mercurial.
Classes
-------
MercurialWorkingCopy
MercurialRepository
Functions
---------
may_have_working_copy() - determine whether a .hg subdirectory exists at a given
path
get_working_copy() - return a MercurialWorkingCopy object... | Python | 0 | @@ -4633,127 +4633,165 @@
-# can't clone into an existing directory, so we create%0A # an empty repository and then do a pull and update%0A
+try:%0A hg.clone(self._ui, %7B%7D, self.url, path, update=True)%0A except: # hg.clone fails for older versions of mercurial, e.g. 1.5%0... |
22cb2159d730fc2fd6c71a95eea20c7272e0d175 | bump a version | feedly/__init__.py | feedly/__init__.py | __author__ = 'Thierry Schellenbach'
__copyright__ = 'Copyright 2012, Thierry Schellenbach'
__credits__ = ['Thierry Schellenbach, mellowmorning.com, @tschellenbach']
__license__ = 'BSD'
__version__ = '0.3.10'
__maintainer__ = 'Thierry Schellenbach'
__email__ = 'thierryschellenbach@gmail.com'
__status__ = 'Production'
... | Python | 0 | @@ -200,17 +200,17 @@
= '0.3.1
-0
+1
'%0A__main
|
1d60509b3065a49c85a874c109260fb63b6c9fe7 | fix sitemap exclude attribute | mfnf/sitemap.py | mfnf/sitemap.py | """Functions for parsing sitemap.
Copyright 2017 Stephan Kulla
"""
import re
from mfnf.utils import remove_prefix, lookup
SITEMAP_NODE_TYPES = ["mfnf_sitemap", "book", "chapter", "article"]
SITEMAP_DELIMITER = "= Bücher ="
SITEMAP_ANNOTATIONS = {
"exlcudes": ": Exclude:",
"after": ": After:",
}
def generat... | Python | 0.000003 | @@ -255,10 +255,10 @@
%22ex
-l
c
+l
udes
|
57161a424e6ef766e19b7fb5f3bd3b3ca02f0743 | improve output | migrate_jobs.py | migrate_jobs.py | import argparse
import io
import random
import struct
import sys
import time
import simple_beanstalk
# how often to check for delayed jobs
DELAY_LOOP_TIME = 30
def chunk(iterable, chunk_size):
"""Break an iterable into chunks of no more than chunk_size"""
chunk = []
for item in iterable:
chunk.... | Python | 0.999999 | @@ -1,12 +1,51 @@
+from __future__ import print_function%0A%0A
import argpa
@@ -108,16 +108,28 @@
ort time
+%0Aimport yaml
%0A%0Aimport
@@ -684,16 +684,227 @@
lue()%0A%0A%0A
+def print_stats(client, fo):%0A stats = dict((k, v) for (k, v) in client.stats().items() if k.startswith('current'))%0A yaml.dump(stats... |
0cfe18d14e83c17b5a5d04f46b0a2b813978c613 | remove with headers from csv_export | app/geobox/lib/tabular.py | app/geobox/lib/tabular.py | # This file is part of the GBI project.
# Copyright (C) 2012 Omniscale GmbH & Co. KG <http://omniscale.com>
#
# 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/licens... | Python | 0.000001 | @@ -5549,30 +5549,11 @@
ort(rows
-, with_headers=True
))%0A
|
ba9960eb9d121ede7158cbac817ed1539291aeb4 | Simplify handling of missing json files. | portable_mds/mongoquery/mds.py | portable_mds/mongoquery/mds.py | import os
import json
from mongoquery import Query
from ..template.mds import MDSTemplate, MDSROTemplate
from ..template.core import ASCENDING, DESCENDING
class JSONCollection(object):
def __init__(self, fp):
self._fp = fp
self.refresh()
def refresh(self):
with open(self._fp, 'r') as ... | Python | 0 | @@ -269,32 +269,73 @@
refresh(self):%0A
+ if os.path.isfile(self._fp):%0A
with ope
@@ -361,32 +361,36 @@
f:%0A
+
self._docs = jso
@@ -383,17 +383,16 @@
lf._docs
-
= json.l
@@ -397,16 +397,134 @@
.load(f)
+%0A else:%0A self._docs = %5B%5D%0A with ... |
b6e21de38e35d6f4c9a8131b2fe57fa995f67cf6 | fix proxy | misc/pgproxy.py | misc/pgproxy.py | #!/usr/bin/env python3
##############################################################################
#The MIT License (MIT)
#
#Copyright (c) 2016 Hajime Nakagami
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to dea... | Python | 0.000001 | @@ -1769,22 +1769,25 @@
rint('%3C%3C
-', chr
+%25d:%25s' %25
(server_
@@ -1786,25 +1786,24 @@
(server_code
-)
, binascii.b
@@ -1818,24 +1818,25 @@
erver_data))
+)
%0A asc
|
73ef474ddc74478f2ae2d3d1e07993b99ed733e5 | fix coding bug | example/rcnn/eval.py | example/rcnn/eval.py | from __future__ import print_function
import argparse
import mxnet as mx
from rcnn.config import config, default, generate_config
from rcnn.tools.test_rcnn import test_rcnn
from pycrayon import CrayonClient
from datetime import datetime
import numpy as np
def parse_args():
parser = argparse.ArgumentParser(descript... | Python | 0.000003 | @@ -2327,27 +2327,8 @@
e)%0A%0A
- mAp = %5B1,2,5%5D;%0A
@@ -2579,20 +2579,8 @@
sh)%0A
-%09os.path.re%0A
|
5b864c5fa5a27bbaddf7e7deafeedb19f0e0e51d | Update Watchers.py | examples/Watchers.py | examples/Watchers.py | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_basic(self):
self.open('https://stocktwits.com/') # Navigate to the web page
self.assert_element('sentiment-tab') # Assert element on page
self.click('sentiment-tab') # Click element ... | Python | 0.000001 | @@ -127,16 +127,34 @@
its.com/
+symbol/CYTR?q=cytr
')
|
66ce9215ead86fa736bef13b065a281efb722a12 | remove deprecated TEMPLATE_DEBUG setting | src/wolnelektury/settings/basic.py | src/wolnelektury/settings/basic.py | # -*- coding: utf-8 -*-
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from os import path
from .paths import PROJECT_DIR
DEBUG = False
TEMPLATE_DEBUG = DEBUG
MAINTENANCE_MODE = False
ADMINS = [
# ('Your N... | Python | 0.000001 | @@ -243,31 +243,8 @@
lse%0A
-TEMPLATE_DEBUG = DEBUG%0A
MAIN
|
2a53a16a3683fc8aba4982ae010580365b813b8e | fix syntax | src/filesystem.py | src/filesystem.py | #!/usr/bin/env python
# =============================================================================
# file = filesystem.py
# description = Gets file system data
# author = GR <https://github.com/shortdudey123>
# create_date = 2014-07-29
# mod_date = 2014-07-29
# version = 0.1
# usage =
# notes =
# python_ver = 2.7.6... | Python | 0.000023 | @@ -720,16 +720,26 @@
ataLines
+ = rawData
.rstrip(
@@ -747,39 +747,8 @@
%5Cn')
-%0A rawDataLines = rawData
.spl
|
a43b115fb4c930008aa841e7af227d2e6516ca7e | move the daplug missing info | privacyideautils/initdaplug.py | privacyideautils/initdaplug.py | import binascii
import os
KEY = "@ABCDEFGHIJKLMNO"
hotpKeyVersion = 0x03
counterFile = 0x42
kbFile = 0x0800
hidMappingFile = 0x0001
try:
from daplug.conv import *
from daplug.utils import *
from daplug.keyset import *
from daplug.keyboard import *
from daplug import *
secu01 = DaplugDongle... | Python | 0 | @@ -460,24 +460,73 @@
ption as e:%0A
+ DAPLUG = False%0A%0A%0Adef _daplug_missing_info():%0A
print(%22C
@@ -642,39 +642,24 @@
s%22 %25 e)%0A
-DAPLUG = False%0A
%0A%0Adef _delet
@@ -1762,16 +1762,47 @@
DAPLUG:%0A
+ _daplug_missing_info()%0A
|
a5eeaf47cbbef12ff8f403c7d7e24c14f97d8060 | Test to be ensured logs are compressed | acceptance_tests/mzb_basic_tests.py | acceptance_tests/mzb_basic_tests.py | #!/usr/bin/env python
import os
import sys
import subprocess
import time
import json
import nose
import re
dirname = os.path.dirname(os.path.realpath(__file__))
os.chdir(dirname)
sys.path.append("../lib")
from util import cmd
from mzb_test_utils import run_successful_bench, restart_bench, start_mzbench_server
mzbe... | Python | 0 | @@ -442,16 +442,17 @@
bench'%0A%0A
+%0A
def corr
@@ -521,24 +521,25 @@
ript.erl')%0A%0A
+%0A
def lua_work
@@ -870,24 +870,25 @@
nch_repo%7D)%0A%0A
+%0A
def worker_f
@@ -1212,32 +1212,32 @@
worker_commit,%0A
-
'mzb
@@ -1260,24 +1260,25 @@
nch_repo%7D)%0A%0A
+%0A
def env_test
@@ -3803,16 +3803,17 @... |
bee2f6027d6d363948492c4609423e408a815fe8 | add note that reset_db does not work on django 1.2 and multiple db support | django_extensions/management/commands/reset_db.py | django_extensions/management/commands/reset_db.py | """
originally from http://www.djangosnippets.org/snippets/828/ by dnordberg
"""
from django.conf import settings
from django.core.management.base import CommandError, BaseCommand
from django.db import connection
import logging
from optparse import make_option
class Command(BaseCommand):
option_list = BaseComman... | Python | 0 | @@ -208,16 +208,30 @@
nection%0A
+import django%0A
import l
@@ -1666,16 +1666,171 @@
%22%22%22
+%0A %0A if django.get_version()%3E=%221.2%22:%0A raise CommandError, %22reset_db is currently not compatible with Django 1.2 or higher%22%0A
%0A%0A
|
7715cd597dc5fad449ae2eca80f6bc4ad8bc64e9 | Add Slugged mixin to assessment template | src/ggrc/models/assessment_template.py | src/ggrc/models/assessment_template.py | # Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: peter@reciprocitylabs.com
# Maintained By: peter@reciprocitylabs.com
"""A module containing the implementation of the assessment template entity.""... | Python | 0 | @@ -371,25 +371,124 @@
ort Base
-, Titled,
+%0Afrom ggrc.models.mixins import Slugged%0Afrom ggrc.models.mixins import Titled%0Afrom ggrc.models.mixins import
CustomA
@@ -659,16 +659,25 @@
emplate(
+Slugged,
Base, Re
@@ -2213,8 +2213,88 @@
S%22)%0A %5D%0A
+%0A @classmethod%0A def generate_slug_prefix_for(cls,... |
d623bec8d83f47e86228cc686470f6be84aa324d | Update to run shell | bitwise.py | bitwise.py | from lib.bitparser import Parse
from lib.lexer import lex
from lib.basefuncs import Token, tokens
import os
from lib.evaluator import runStates as evaluate
import hashlib
def h11(w):
return hashlib.md5(w.encode()).hexdigest()[:9]
def interpret(text, vals = None):
lexed = lex(text, tokens)
parsed = Parse(lexed)
... | Python | 0 | @@ -1169,16 +1169,31 @@
= False%0A
+%09sysex = False%0A
%09vs = No
@@ -1250,16 +1250,78 @@
ot ext:%0A
+%09%09if sysex:%0A%09%09%09sysex = False%0A%09%09%09inp = input('%5Cn-%3E ')%0A%09%09else:%0A%09
%09%09inp =
@@ -1355,16 +1355,24 @@
%22exit%22%0A
+%09%09try:%0A%09
%09%09if not
@@ -1377,16 +1377,17 @@
ot ext... |
9d4973fe2482f37f7b09e15f6cd34a00f04f9c50 | Support batch list_by_mbid requests | acoustid/api/v2/misc.py | acoustid/api/v2/misc.py | # Copyright (C) 2011 Lukas Lalinsky
# Distributed under the MIT license, see the LICENSE file for details.
import logging
from sqlalchemy import sql
from acoustid import tables as schema
from acoustid.api import errors
from acoustid.api.v2 import APIHandler, APIHandlerParams
from acoustid.handler import Handler, Respo... | Python | 0 | @@ -623,16 +623,67 @@
pe=int)%0A
+ self.batch = values.get('batch', type=int)%0A
@@ -1694,44 +1694,40 @@
-#
if
-len(
+not
params.
-mbids) == 1:%0A
+batch:%0A
resp
@@ -1714,32 +1714,33 @@
tch:%0A
+
response%5B'tracks
@@ -1788,17 +1788,16 @@
-#
else:%0A ... |
12ac6964737b08c592fcdba02cfba66ab64bad28 | remove deprecated constant | extract/jira/backlog.py | extract/jira/backlog.py | import json
from .cfg import jira_cfg
from .request import Request, Field
class SprintBacklogRequest(Request):
# ToDo: move to json cfg file as response key item to parse
__KEY_BACKLOG_ITEMS = 'issues'
def __init__(self, login, pswd):
with open(jira_cfg[__class__.__name__]) as cfg_file:
... | Python | 0.000946 | @@ -110,108 +110,8 @@
t):%0A
- # ToDo: move to json cfg file as response key item to parse%0A __KEY_BACKLOG_ITEMS = 'issues'%0A%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.