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 |
|---|---|---|---|---|---|---|---|
b323ad25f62ae82468ef3ca7f4e6a4b72e550dbc | remove default ordering in apireport | locksmith/auth/management/commands/apireport.py | locksmith/auth/management/commands/apireport.py | import datetime
from urlparse import urljoin
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from django.db.models import get_model, Count
from locksmith.common import apicall
APP = getattr(settings, 'LOCKSMITH_STATS_APP', 'api')
MODEL = getattr(settings, 'LOCKSMITH_S... | Python | 0 | @@ -1306,16 +1306,27 @@
, end)%7D)
+.order_by()
%0A
|
8f30d1b88378b6c634f0e49a21fa15eeb89ca737 | Replace if with boolean expression. | statbot/crawler.py | statbot/crawler.py | #
# crawler.py
#
# statbot - Store Discord records for later analysis
# Copyright (c) 2017 Ammon Smith
#
# statbot is available free of charge under the terms of the MIT
# License. You are free to redistribute and/or modify it under those
# terms. It is distributed in the hopes that it will be useful, but
# WITHOUT ANY... | Python | 0.002808 | @@ -2083,24 +2083,71 @@
d%5D = mhist%0A%0A
+ # Remove deleted channels from tracker%0A
for
@@ -3364,14 +3364,24 @@
-read =
+all_empty &= not
awa
@@ -3414,79 +3414,8 @@
st)%0A
- if read:%0A all_empty = False%0A
|
c7d30ed5e5b22aeb24e378c8f74dec64100d1dd1 | remove marks for testing transposability with X = None | anndata/tests/test_transpose.py | anndata/tests/test_transpose.py | from scipy import sparse
import pytest
from anndata.tests.helpers import gen_adata, assert_equal
def test_transpose_orig():
"""
Original test for transpose, should be covered by more thorough tests below, but
keeping around just in case.
"""
adata = gen_adata((5, 3))
adata.varp = {f"varp_{k}... | Python | 0.999973 | @@ -1003,21 +1003,8 @@
ram(
-%0A
gen_
@@ -1048,42 +1048,8 @@
e_X%22
-, marks=pytest.mark.xfail%0A
),%0A
|
12cfdb19ad13c74d1415fd6619b055f874472f53 | test eight ball | testbot.py | testbot.py | # -*- coding: utf-8 -*-
from bot import Tofbot
import unittest
from collections import namedtuple
def print_resp(msg):
print (" -> %s" % msg)
class TestTofbot(Tofbot):
def __init__(self, nick, name, chan, origin):
chans = [chan]
self.nick = nick
Tofbot.__init__(self, nick, name, ch... | Python | 0.000002 | @@ -2435,12 +2435,150 @@
'O', 'L'%5D)%0A
+%0A def test_eightball(self):%0A l = bot_input(self.bot, %22boule magique, est-ce que blabla ?%22)%0A self.assertEquals(1, len(l))%0A
|
baaa8a6209122b824dca7d9acdeb50675bb65b12 | check for wfe port liveness in integration tests | test/startservers.py | test/startservers.py | import atexit
import BaseHTTPServer
import errno
import os
import shutil
import signal
import socket
import subprocess
import sys
import tempfile
import threading
import time
class ToSServerThread(threading.Thread):
class ToSHandler(BaseHTTPServer.BaseHTTPRequestHandler):
def do_GET(self):
sel... | Python | 0 | @@ -3143,25 +3143,15 @@
-for debug_
port
- in
+s =
ran
@@ -3164,16 +3164,61 @@
0, 8005)
+ + %5B4000%5D%0A for debug_port in ports
:%0A
|
581220d46d6568c33148298feb1c21d4184720f5 | Fix year import. | util/year.py | util/year.py | # -*- coding: utf-8 -*-
from db import session
import model
from util import config
def to_json(year, sum_points=None):
if sum_points is None: sum_points = util.task.max_points_year_dict()[year.id]
print sum_points
return {
'id': year.id,
'index': year.id,
'year': year.year,
'sum_points': sum_points[0],
... | Python | 0 | @@ -77,16 +77,28 @@
t config
+%0Aimport util
%0A%0Adef to
|
80358e9dc0b241301a90cf73bfe38afba3226359 | Optimize add_personality | lib/aquilon/worker/commands/add_personality.py | lib/aquilon/worker/commands/add_personality.py | # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2011,2012,2013,2014,2015,2016 Contributor
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You ma... | Python | 0.000009 | @@ -768,16 +768,69 @@
y%60.%22%22%22%0A%0A
+from sqlalchemy.orm import joinedload, subqueryload%0A%0A
import r
@@ -1908,74 +1908,414 @@
-dbarchetype = Archetype.get_unique(session, archetype, compel=True
+options = %5Bsubqueryload('param_def_holders'),%0A joinedload('param_def_holders.param_de... |
0fe82c97db166953d821513c12b0c3662e8faa96 | Fix PyLint warnings. | test/test_apriori.py | test/test_apriori.py | """
Tests for apyori.apriori.
"""
from nose.tools import eq_
from mock import Mock
from apyori import TransactionManager
from apyori import SupportRecord
from apyori import RelationRecord
from apyori import OrderedStatistic
from apyori import apriori
def test_empty():
"""
Test for empty data.
"""
tr... | Python | 0 | @@ -384,38 +384,88 @@
upport_records(*
-args):
+_):%0A %22%22%22 Mock for apyori.gen_support_records. %22%22%22
%0A return
@@ -498,38 +498,91 @@
red_statistics(*
-args):
+_):%0A %22%22%22 Mock for apyori.gen_ordered_statistics. %22%22%22
%0A yield O
@@ -1317,32 +1317,85 @@
records(*arg... |
a89d4b7eaa0bfd1e6917dc0e886c0b5c5bab4e36 | Test case where bandgap = 0 for DeVosSolarcell | test/test_classes.py | test/test_classes.py | # -*- coding: utf-8 -*-
import numpy as np
import ibei
from astropy import units
import unittest
temp_sun = 5762.
temp_earth = 288.
bandgap = 1.15
input_params = {"temp_sun": temp_sun,
"temp_planet": temp_earth,
"bandgap": bandgap,
"voltage": 0.5,}
class Issues(unittes... | Python | 0.000162 | @@ -3558,16 +3558,872 @@
_unit)%0A%0A
+ def test_calc_power_density_zero_bandgap(self):%0A %22%22%22%0A calc_power_density should return value with unit of W m%5E-2.%0A %22%22%22%0A self.solarcell.bandgap = 0%0A tested_unit = self.solarcell.calc_power_density().unit%0A targ... |
1ba16f0bbfa203ee4a0d2fa0d15318912757f840 | set an analog and a digital pin | examples/capability_test.py | examples/capability_test.py | #!/usr/bin/python
__author__ = 'Copyright (c) 2015 Alan Yorinks All rights reserved.'
"""
Copyright (c) 2013 Alan Yorinks All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; eithe... | Python | 0.000002 | @@ -15,78 +15,8 @@
hon%0A
-%0A__author__ = 'Copyright (c) 2015 Alan Yorinks All rights reserved.'%0A%0A
%22%22%22%0A
@@ -33,16 +33,21 @@
(c) 2013
+-2015
Alan Yo
@@ -906,17 +906,17 @@
g marked
-
+%0A
a servo
@@ -921,16 +921,548 @@
o device
+. Pin 12 is set to digital output and pin A0 is set to analog%0Aimput.... |
40d01669d64bbdfb06f73b28db019a1806a544e8 | Fix call to train_test_split in plot_latent_crf example. Scikit-learn's train_test_split changed its behaviour for nd samples in version 0.15. | examples/plot_latent_crf.py | examples/plot_latent_crf.py | """
===================
Latent Dynamics CRF
===================
Solving a 2d grid problem by introducing latent variable interactions.
The input data is the same as in plot_grid_crf, a cross pattern.
But now, the center is not given an extra state. That makes the problem
much harder to solve for a pairwise model.
We c... | Python | 0 | @@ -896,16 +896,83 @@
_size=.5
+,%0A allow_nd=True
)%0A%0Acrf =
|
6502243f05a69a2cc1ec4ef2f4e36af1f2e9797f | Update version.py | umi_tools/version.py | umi_tools/version.py | __version__ = "0.2.4"
| Python | 0.000001 | @@ -16,7 +16,7 @@
0.2.
-4
+5
%22%0A
|
f3bc6b072aee3bcf194733dc2e06a7f199def59a | Fix DNS information expiration | lib/python2.6/aquilon/server/dbwrappers/dns.py | lib/python2.6/aquilon/server/dbwrappers/dns.py | # ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
#
# Copyright (C) 2008,2009,2010,2011 Contributor
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the EU DataGrid Software License. You should
# have received a copy of t... | Python | 0.000134 | @@ -2339,16 +2339,17 @@
dbfqdn,
+%5B
'dns_rec
@@ -2353,10 +2353,11 @@
records'
+%5D
)%0A
|
ee998b6253ac3cca618587c03166cdc1f28377be | remove unecessary query | api/preprint_providers/views.py | api/preprint_providers/views.py | from rest_framework import generics
from rest_framework import permissions as drf_permissions
from modularodm import Q
from framework.auth.oauth_scopes import CoreScopes
from website.models import Node, PreprintProvider
from api.base import permissions as base_permissions
from api.base.filters import ODMFilterMixin... | Python | 0.999999 | @@ -1794,31 +1794,8 @@
turn
- Q('_id', 'ne', None) &
Q('
|
9a3f69964d405def11454175937204f1b20b9d81 | update inidb.py, considering if it's still necessary | Web-Terminal/Modules/initDB.py | Web-Terminal/Modules/initDB.py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Init database
Create tables
Insert data
Query data
"""
from sqlalchemy import *
from sqlalchemy.orm import *
#define egine
engine = create_engine('sqlite:///../DB/raspberrypirobot.db')
#bind metadata
metadata = MetaData(engine)
#create tables, init database
pilot =... | Python | 0 | @@ -225,19 +225,14 @@
rypi
-robot
.db')%0A
+
#bin
@@ -301,16 +301,18 @@
atabase%0A
+#
pilot =
@@ -328,32 +328,34 @@
lot', metadata,%0A
+#
Column('id',
@@ -377,32 +377,34 @@
ry_key = True),%0A
+#
Column('name
@@ -427,32 +427,34 @@
unique = True),%0A
+#
Column('full
@@ -466,32 +466,34 @@
, St... |
aafe8faf69d275a7f0ead1ff9b7169852ab19df0 | Fix of 'latest updated companies' order | main/local_modules/frontend/controllers/main.py | main/local_modules/frontend/controllers/main.py | # -*- coding: utf-8 -*-
from collections import defaultdict
import logging
from openerp.addons.web import http
from openerp.http import request
from openerp.addons.website.controllers.main import Website
import time
_logger = logging.getLogger(__name__)
_logger.setLevel(logging.DEBUG)
class MainPage(Website):
@... | Python | 0 | @@ -54,16 +54,28 @@
ltdict%0A%0A
+import time%0A
import l
@@ -211,28 +211,16 @@
Website%0A
-import time%0A
_logger
@@ -253,40 +253,8 @@
__)%0A
-_logger.setLevel(logging.DEBUG)%0A
%0A%0Acl
@@ -463,99 +463,25 @@
-cr, uid, context = request.cr, request.uid, request.context%0A pool = request.registry
+e... |
fcca3dc3d7dff1cde2e3c25e819e2a9ea9294c04 | Rename separator->delimiter | api_scripts/csv_pythonic.py | api_scripts/csv_pythonic.py | import argparse
import itertools
import sys
from conrad import Conrad
API_TOKEN = "62251cb1a65617e329e48d1adec9666d3d6d2c6c"
BASE_URL = "http://127.0.0.1:8000/api/v1/"
def api_get_csv(path, fields=None, params=None, attributes=None, separator=";",
limit=None):
"""
Params:
- path Th... | Python | 0.000001 | @@ -231,24 +231,24 @@
s=None,
-separato
+delimite
r=%22;%22,%0A
@@ -1073,24 +1073,24 @@
eader =
-separato
+delimite
r.join(f
@@ -1138,28 +1138,28 @@
+= (
-separator + separato
+delimiter + delimite
r.jo
@@ -1386,24 +1386,24 @@
eld%5D) +
-separato
+delimite
r)%0A%0A
@@ -2054,24 +2054,24 @@
ue'%5D) +
-s... |
aa0a7e4129ea81c76cd1a77a664418611d37014c | remove flex test output | test/gnina/test_flex.py | test/gnina/test_flex.py | #!/usr/bin/env python3
# Test docking/minimsation with flexible residues
# Reference selections are checked against the following selection in PyMol
# (after stripping away all hydrogen atoms):
#
# select byres
# (RECEPTOR and not backbone
# and not resname ALA and not resname GLY and not resname PRO
# ) ... | Python | 0.000039 | @@ -4496,20 +4496,43 @@
ec_ref.pdb%22, %22pdb%22)%0A
+rmout(outlig, outflex)%0A
|
70996827c40a4fc56f9a65cd356967e2ea3ab698 | Disable InsecureRequestWarning when sslVerify is false | app/api/models/LXDModule.py | app/api/models/LXDModule.py | from app.api.models.Base import Base
from app.api.utils.remoteImageMapper import remoteImagesList
from app.lib.conf import Config
from app import __metadata__ as meta
from pylxd import Client
import requests
import logging
logging = logging.getLogger(__name__)
class LXDModule(Base):
# Default 127.0.0.1 -> Move t... | Python | 0.000431 | @@ -216,16 +216,100 @@
logging
+%0Aimport urllib3%0A%0Aurllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
%0A%0Aloggin
@@ -7595,28 +7595,29 @@
raise NotImplementedError()
+%0A
|
b5e6622b340e22ec57bfda9f2b8d2e829489d572 | fix error with committee that doesn't have a portal url added another exception | src/knesset/video/management/commands/sub_commands/UpdateCommitteesVideos.py | src/knesset/video/management/commands/sub_commands/UpdateCommitteesVideos.py | # encoding: utf-8
from knesset.video.management.commands.sub_commands import SubCommand
from knesset.committees.models import Committee
from BeautifulSoup import BeautifulSoup
import urllib,re,datetime
from knesset.video.utils import get_videos_queryset
from knesset.video.models import Video
class UpdateCommitteesVid... | Python | 0 | @@ -501,16 +501,70 @@
.gov.il'
+%0A %0A KNESSET_BASEHREF='http://www.knesset.gov.il'
%0A%0A de
@@ -1959,24 +1959,101 @@
en(href)%3E6:%0A
+ if href%5B0%5D=='/':%0A href=self.KNESSET_BASEHREF+href%0A
@@ -2260,24 +2260,50 @@
ref='+href)%0A
+ return ''%0A
... |
70dd44d7f467d726e344c6391c568618b78dcf28 | add # pragma: no cover | root_numpy/tmva/_data.py | root_numpy/tmva/_data.py | import numpy as np
import ROOT
from ROOT import TMVA
from . import _libtmvanumpy
from .. import ROOT_VERSION
__all__ = [
'add_classification_events',
'add_regression_events',
]
NEW_TMVA_API = ROOT_VERSION >= '6.07/04'
def add_classification_events(obj, events, labels, signal_label=None,
... | Python | 0.00012 | @@ -2360,32 +2360,52 @@
if NEW_TMVA_API:
+ # pragma: no cover
%0A if not
@@ -2565,32 +2565,52 @@
7/04%22)%0A else:
+ # pragma: no cover
%0A if not
@@ -5571,16 +5571,36 @@
MVA_API:
+ # pragma: no cover
%0A
@@ -5768,32 +5768,52 @@
7/04%22)%0A else:
+ # pragma: no cover
%0A ... |
d0b6a5ec5d40b0a88f72ab18cd0a2a39c14a44d8 | Raise when path is missing | streamline/base.py | streamline/base.py | """
This module contains the base class which is used by all other class-based
route handler classes.
"""
import bottle
from . import utils
METHODS = (
'get',
'post',
'put',
'patch',
'delete',
)
class RouteBase(object):
"""
Base class for class-based route handlers. This class produces... | Python | 0.000088 | @@ -3353,16 +3353,112 @@
_path()%0A
+ if path is None:%0A raise RuntimeError('No path specified for %7B%7D'.format(cls))%0A
|
fe3174a29901130786ee25144d74e779f348e147 | Correct wrong number of parameters | feincms_cleanse/__init__.py | feincms_cleanse/__init__.py | VERSION = (1, 0, 99)
__version__ = '.'.join(map(str, VERSION))
from BeautifulSoup import BeautifulSoup
import lxml.html
import lxml.html.clean
import re
import unicodedata
__all__ = ('cleanse_html', 'Cleanse')
class Cleanse(object):
allowed_tags = {
'a': ('href', 'name', 'target', 'title'),
'h2':... | Python | 0.000596 | @@ -671,32 +671,38 @@
f validate_href(
+self,
href):%0A %22
|
60f682a0c5fdf276da2a804a09c6c9041b57dee8 | Add missing newline. | sunpy/util/util.py | sunpy/util/util.py | # -*- coding: utf-8 -*-
#
# Author: Steven Christe <steven.d.christe@nasa.gov>
#
# <License info will go here...>
"""Provides utility programs.
Notes:
The astronomy-type utilities should probably be separated out into
another file.
--schriste
"""
from datetime import datetime
import numpy as np
de... | Python | 0.000016 | @@ -4371,8 +4371,9 @@
%25 type_)
+%0A
|
ddc5a7f3868c5ba311e307a4d84777a3c0a5c087 | add utf8 note | rtracer/util/__init__.py | rtracer/util/__init__.py | from .data_handling import *
| Python | 0 | @@ -1,8 +1,33 @@
+# -*- coding: utf-8 -*-%0A%0A
from .da
@@ -47,8 +47,9 @@
mport *%0A
+%0A
|
dde43f917bc12d269c3320174527a934bdfb4e70 | add geocoords | migrations/versions/20b0b763f2f9_iso_updates.py | migrations/versions/20b0b763f2f9_iso_updates.py | # coding=utf-8
"""iso updates
Revision ID: 20b0b763f2f9
Revises: 53f4e74ce460
Create Date: 2014-10-09 12:51:21.612004
"""
# revision identifiers, used by Alembic.
revision = '20b0b763f2f9'
down_revision = '53f4e74ce460'
import datetime
from alembic import op
import sqlalchemy as sa
def upgrade():
pass
def d... | Python | 0.003113 | @@ -290,32 +290,234 @@
%0Adef upgrade():%0A
+ %22%22%22%0Agmo 6.57645 37.1381%0Astc -10.6771 165.835%0Alto 0.2975 34.6961%0Alks 0.1529 34.5708%0Alsm 0.3652 34.0335%0Alrt -8.4746 122.7619%0Aaqz -12.8322 -60.9716%0A %22%22%22%0A
pass%0A%0Adef do
|
7b85834a7c3e8b56fbaf2c3f347714e0bed08e13 | Bump app version to 2019.5.2 | app/handlers/__init__.py | app/handlers/__init__.py | __version__ = "2019.5.1"
__versionfull__ = __version__
| Python | 0 | @@ -15,17 +15,17 @@
%222019.5.
-1
+2
%22%0A__vers
|
d331a36abbedc144fcffa75acf0f601209b8e2fb | Improve the handling of ssl._create_unverified_context() | files/check-latest-monit.py | files/check-latest-monit.py | #!/usr/bin/env python
#
# Check the version of latest binary distribution of monit.
#
# USAGE:
# progname
#
#
# @see https://mmonit.com/monit/dist/binary/
#
import sys
import re
import urllib
import ssl
MONIT_DIST_LINK = "http://mmonit.com/monit/dist/binary/"
REGEX_MONIT_LIST = re.compile('\salt="\[DIR\]"></td>... | Python | 0.00005 | @@ -413,16 +413,106 @@
rsions%0A%0A
+ f = None%0A try:%0A f = urllib.urlopen(MONIT_DIST_LINK)%0A except IOError:%0A
# ig
@@ -556,16 +556,20 @@
error;%0A
+
# @s
@@ -614,16 +614,71 @@
/714426%0A
+ context = ssl._create_unverified_context()%0A
f =
@@ -720,43 +720,16 @... |
fdaf1b474d48ec296bda9e95c16fbed1ccee542e | Rename _{make => create}_test_classes_for_device | test/on_yubikey/util.py | test/on_yubikey/util.py | from __future__ import print_function
import click
import functools
import os
import sys
import unittest
import ykman.descriptor
from ykman.util import TRANSPORT
import test.util
_skip = True
_test_serials = os.environ.get('DESTRUCTIVE_TEST_YUBIKEY_SERIALS')
_no_prompt = os.environ.get('DESTRUCTIVE_TEST_DO_NOT_PROMP... | Python | 0.000033 | @@ -2805,27 +2805,29 @@
lass%0A%0A%0Adef _
-mak
+creat
e_test_class
@@ -4076,19 +4076,21 @@
ass in _
-mak
+creat
e_test_c
|
3dd23df07d7d1f84e361c87345aafcfefeff636a | Order agonistic options to control vacuum gripper | jsk_2016_01_baxter_apc/node_scripts/control_vacuum_gripper.py | jsk_2016_01_baxter_apc/node_scripts/control_vacuum_gripper.py | #!/usr/bin/env python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import rospy
from std_msgs.msg import Bool
def main():
parser = argparse.ArgumentParser()
parser.add_argument('action', type=str, choices=['start', 'stop'])
... | Python | 0 | @@ -268,275 +268,845 @@
nt('
-action', type=str, choices=%5B'start', 'stop'%5D)%0A limbs = %5B'left', 'right'%5D%0A parser.add_argument('limb', type=str, choices=limbs, nargs='?')%0A args = parser.parse_args()%0A%0A action = args.action%0A limbs = %5B'left', 'right'%5D if args.limb is None else %5Bargs.... |
74e9f4f4f64ed0c9501d2527b3948dbcde423cc6 | Increase log verbosity on exception | jetcomcrawl/modes/items.py | jetcomcrawl/modes/items.py | from bs4 import BeautifulSoup
import logging
from jetcomcrawl import browser
import jetcomcrawl.libs.queue
class Worker(object):
def __init__(self):
self.queue_categories = jetcomcrawl.libs.queue.Queue('queue_categories')
self.queue_items = jetcomcrawl.libs.queue.Queue('queue_items')
def wor... | Python | 0 | @@ -756,32 +756,53 @@
mat(cid, page))%0A
+ try:%0A
soup
@@ -853,24 +853,28 @@
+
results = %5B%5D
@@ -874,16 +874,20 @@
ts = %5B%5D%0A
+
@@ -1003,16 +1003,20 @@
+
+
url = it
@@ -1028,16 +1028,20 @@
'href'%5D%0A
+
@@ -1085,24 +10... |
2eb11c244667857b8d4ff73eeceff87c268c48f0 | Update windows_calculatortest.py | sample-code/examples/python/windows_calculatortest.py | sample-code/examples/python/windows_calculatortest.py | """
//******************************************************************************
Copyright (c) 2016 Appium Committers. All rights reserved.
Licensed to you 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 ... | Python | 0 | @@ -1821,11 +1821,9 @@
is
- 7
+7
%22)%0A%0A
@@ -2212,35 +2212,33 @@
t), %22Display is
- 8
+8
%22)%0A%0A def test
@@ -2918,35 +2918,33 @@
t), %22Display is
- 8
+8
%22)%0A%0A def test
@@ -3452,27 +3452,25 @@
%22Display is
- 8
+8
%22)%0A%0A def
@@ -3876,12 +3876,10 @@
is
-
81
-
%22)%0A%0A... |
e676dcf847e1a4411b5ced2d6f83bef5b2af36af | add config file | scrape-ims/scrapy/scrape_dogs/scrape_dogs/settings.py | scrape-ims/scrapy/scrape_dogs/scrape_dogs/settings.py | # -*- coding: utf-8 -*-
# Scrapy settings for scrape_dogs project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
# http://scrapy.readthedocs.org/en/la... | Python | 0.000001 | @@ -442,16 +442,126 @@
logging
+%0Aimport json%0A%0Awith open('config.json', 'rb') as f:%0A config = json.load(f)%0A%0AmainImPath = config%5B'image_dir'%5D
%0A%0ABOT_NA
@@ -2572,63 +2572,18 @@
E =
-'/media/nate/Windows/github/IDmyDog/scrape-ims/images/'
+mainImPath
%0A%0AIM
|
1e2b1b29df681edf0613a2ba8cc697e0bd14cf7a | fix some SyntaxWarning | abilian/web/action.py | abilian/web/action.py | # coding=utf-8
from jinja2 import Template, Markup
from flask import current_app, g
__all__ = ('Action', 'ModalActionMixin', 'actions')
class Action(object):
""" Action interface
"""
category = None
name = None
title = None
description = None
icon = None
_url = None
#: a bool (or something that can ... | Python | 0.001029 | @@ -3954,33 +3954,33 @@
%22%22%22%0A assert
-(
+
self.installed()
@@ -4018,25 +4018,24 @@
application%22
-)
%0A assert(
@@ -4033,17 +4033,17 @@
assert
-(
+
all(map(
@@ -4084,17 +4084,16 @@
ctions))
-)
%0A%0A fo
@@ -4479,33 +4479,33 @@
%22%22%22%0A assert
-(
+
self.installed()
@@ -4543,25 ... |
0543cf17187f6d3b178717bd528af28c754aaf94 | Fix a flaky test. | tensorflow/contrib/memory_stats/python/kernel_tests/memory_stats_ops_test.py | tensorflow/contrib/memory_stats/python/kernel_tests/memory_stats_ops_test.py | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Python | 0.003744 | @@ -3098,59 +3098,25 @@
b =
-random_ops.random_uniform(matrix_shape, dtype=dtype
+math_ops.add(a, a
)%0A%0A
@@ -3166,17 +3166,17 @@
ss.run(%5B
-a
+b
, bytes_
|
17d715c03d9fa8064a334c2daf5dd01770c283ab | add convert_tflite function for image classification task to convert saved model to tflite with metadata. | tensorflow_lite_support/metadata/python/metadata_writers/image_classifier.py | tensorflow_lite_support/metadata/python/metadata_writers/image_classifier.py | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Python | 0.000001 | @@ -1160,17 +1160,16 @@
sifier%22%0A
-_
MODEL_DE
@@ -1260,17 +1260,16 @@
-
%22known s
@@ -1288,17 +1288,16 @@
ries.%22)%0A
-_
INPUT_NA
@@ -1309,17 +1309,16 @@
%22image%22%0A
-_
INPUT_DE
@@ -1361,17 +1361,16 @@
ified.%22%0A
-_
OUTPUT_N
@@ -1389,17 +1389,16 @@
bility%22%0A
-_
OUTPUT_D
@@ -2519,17 +2... |
e6720d0ccab5377195d469c158192087ca591fae | fix example | examples/showVolumeGroup.py | examples/showVolumeGroup.py | #!/usr/bin/env python
import sys, os
sys.path.append("..")
from afs.util.AfsConfig import AfsConfig, setupDefaultConfig
from afs.util.options import define, options
from afs.service.VolService import VolService
import afs
setupDefaultConfig()
afs.defaultConfig.AFSCell="desy.de"
volMng = VolService()
VolName="root.cel... | Python | 0.00489 | @@ -360,16 +360,17 @@
nt VolG%0A
+%0A
for v in
@@ -390,19 +390,17 @@
%0A vol
- =
+=
volMng.g
@@ -412,19 +412,15 @@
ume(
-'root.cell'
+v%5B%22id%22%5D
,v%5B%22
@@ -451,8 +451,9 @@
int vol%0A
+%0A
|
f6b34a81135b75f418737d11c5eed50546237d58 | Fix __centroid method. | simplex.py | simplex.py | import numpy as np
class NelderMead:
def __init__(self, objective, simplex):
"""
Arguments:
objective -- objective function to be minimised. It is
assumed the function takes a numpy array (vector) as input.
simplex -- initial simplex. It is assumed the simplex is
a 2... | Python | 0.000022 | @@ -2586,32 +2586,46 @@
type=np.float)%0A%0A
+ j = 0%0A
for i in
@@ -2636,16 +2636,18 @@
arange(n
++1
):%0A
@@ -2761,17 +2761,17 @@
values%5B
-i
+j
%5D = valu
@@ -2771,16 +2771,48 @@
= value
+%0A %0A j += 1
%0A%0A
|
a80f5c03d5a6811c19eb1107df512423f809637b | Send the signal one more time, sometimes it happens not to be decoded correctly | switch_nexa.py | switch_nexa.py | import sys
import time
sys.path.append("/storage/.kodi/addons/python.RPi.GPIO/lib")
import RPi.GPIO as GPIO
class NexaSwitcher:
def __init__(self, data_pin, transmitter_code):
self._data_pin = data_pin
self._transmitter_code = transmitter_code
print "Created NexaSwitcher for data PIN #" + s... | Python | 0.000003 | @@ -2154,16 +2154,206 @@
n_off)%0A%0A
+ # Send the signal one more time,%0A # sometimes it happens not to be decoded correctly%0A time.sleep(1)%0A for x in range(0, 5):%0A self.send_on_off(on_off)%0A%0A
%09GPIO.ou
|
ffde8f3fac088398da6f99388307ec3906f1498d | Fix duplicate print statement error at dev start-up | swh/web/ui/main.py | swh/web/ui/main.py | # Copyright (C) 2015 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU Affero General Public License version 3, or any later version
# See top-level LICENSE file for more information
import logging
import os
from flask import Flask
from swh.core i... | Python | 0.000001 | @@ -2800,34 +2800,16 @@
log
-ging.basicConfig(filename=
+_file =
os.p
@@ -2851,34 +2851,33 @@
og')
-,%0A
+%0A logging.basicConfig(
leve
@@ -2916,24 +2916,149 @@
logging.INFO
+,%0A handlers=%5Blogging.FileHandler(log_file),%0A logg... |
eb575e511369b9ece61bb3543496f47ff37fdc3d | Fix socket transport | polyaxon_client/transport/socket_transport.py | polyaxon_client/transport/socket_transport.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import json
import threading
import websocket
from polyaxon_client.logger import logger
from polyaxon_client.workers.socket_worker import SocketWorker
class SocketTransportMixin(object):
"""Socket operations transport."""
... | Python | 0.000001 | @@ -98,25 +98,8 @@
json
-%0Aimport threading
%0A%0Aim
@@ -160,71 +160,8 @@
ger%0A
-from polyaxon_client.workers.socket_worker import SocketWorker%0A
%0A%0Acl
|
c8a9ef23668582098fe5c8beff0cf83530108c93 | implement test for different unit comparison | tests/Calculators.py | tests/Calculators.py | import unittest
import utils.PhysicsQuantities as PQ
from plugins.SimpleCalculator import AoverLECalculator, SpecificActivityCalculator
from utils import ureg
class TestCalculator(unittest.TestCase):
def setUp(self):
self.dataIsotopeSpecificAct = {"det1": {'Isotope': [PQ.Isotope(3, 1)], 'SpecificActivity'... | Python | 0 | @@ -1032,46 +1032,8 @@
ct)%0A
- tmp = PQ.SpecificActivity(1.)%0A
@@ -1128,8 +1128,468 @@
ty(1.)%5D)
+%0A%0A def testSpecificActivitySimpleDiffMassUnit(self):%0A data = self.dataIsotopeAct%0A data%5B%22det1%22%5D%5B%22Mass%22%5D = PQ.Mass(10., ureg.g)%0A calculator = SpecificActivi... |
5dbb552bc54904b1e3f4f4ac45d7192fe6107c3c | Read stopwords.txt when initialize, to avoid reading it in every update. | 32-trinity/tf-32.py | 32-trinity/tf-32.py | #!/usr/bin/env python
import sys, re, operator, collections
class WordFrequenciesModel:
""" Models the data. In this case, we're only interested
in words and their frequencies as an end result """
freqs = {}
def __init__(self, path_to_file):
self.update(path_to_file)
def update(self, path... | Python | 0 | @@ -215,16 +215,81 @@
qs = %7B%7D%0A
+ stopwords = set(open('../stop_words.txt').read().split(','))%0A
def
@@ -310,32 +310,32 @@
path_to_file):%0A
-
self.upd
@@ -406,81 +406,8 @@
ry:%0A
- stopwords = set(open('../stop_words.txt').read().split(','))%0A
@@ -481,16 +481,16 @@
ower()... |
4578de68e7486d33fff6b1117293777af91679c4 | Redact data from zwave_js diagnostics (#68348) | homeassistant/components/zwave_js/diagnostics.py | homeassistant/components/zwave_js/diagnostics.py | """Provides diagnostics for Z-Wave JS."""
from __future__ import annotations
from zwave_js_server.client import Client
from zwave_js_server.dump import dump_msgs
from zwave_js_server.model.node import NodeDataType
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_URL
from homea... | Python | 0 | @@ -209,16 +209,88 @@
taType%0A%0A
+from homeassistant.components.diagnostics.util import async_redact_data%0A
from hom
@@ -334,16 +334,16 @@
igEntry%0A
-
from hom
@@ -650,16 +650,52 @@
_entry%0A%0A
+TO_REDACT = (%22homeId%22, %22location%22)%0A%0A
%0Aasync d
@@ -974,20 +974,50 @@
return
-msgs
+async_redact_da... |
734b8c99ebbbc03fd0c0f4323b110cfe785d7340 | add length to table_field() | util/pyfits_utils.py | util/pyfits_utils.py | import pyfits
class tabledata(object):
def __setattr__(self, name, val):
object.__setattr__(self, name, val)
def set(self, name,val):
self.__setattr__(name, val)
def getcolumn(self, name):
return self.__dict__[name.lower()]
def table_fields(dataorfn):
pf = None
if isinstance(dataorfn, str):
pf = pyfits.o... | Python | 0.000035 | @@ -33,16 +33,56 @@
bject):%0A
+%09def __init__(self):%0A%09%09self._length = 0%0A
%09def __s
@@ -108,16 +108,16 @@
, val):%0A
-
%09%09object
@@ -266,16 +266,58 @@
lower()%5D
+%0A%09def __len__(self):%0A%09%09return self._length
%0A%0Adef ta
@@ -565,16 +565,43 @@
eld(c))%0A
+%09fields._length = len(data)
%0A%09... |
08e6c724457080e3d092597238c7ab931fb6c16f | Fix request that select the dimensionnement by fixing the DPS | views/DPS.py | views/DPS.py | # -*- coding: utf-8 -*-
# vim: set ts=4
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from django.forms import ModelForm, RadioSelect
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.shortcuts import render_to_response, get_object_or_404
from django.tem... | Python | 0 | @@ -4312,15 +4312,28 @@
, pk
-=
+ =
dim_id
+, DPS = dps
)%0A
|
97443c3531e7f2af3f5a38591459e18e7b804fa4 | Update comment | tickets.py | tickets.py | from selenium.webdriver.common.proxy import *
from selenium import webdriver
import threading
import argparse
import os
class GlastonburyTickets(threading.Thread):
def __init__(self, base_url, proxy_file):
self.threads = []
self.base_url = base_url
self.proxy_list = [line.strip() for line ... | Python | 0 | @@ -2257,38 +2257,43 @@
# If we a
-re not
+ppear to be
on the holding
@@ -2300,58 +2300,32 @@
page
-,
we'll
-increment the success count for this proxy
+close the browser
%0A
|
79e35bbdf600d62707b6d3a5d57051e3c608daf2 | Fix auto_reload in Linux (#1286) | sanic/reloader_helpers.py | sanic/reloader_helpers.py | import os
import sys
import signal
import subprocess
from time import sleep
from multiprocessing import Process
def _iter_module_files():
"""This iterates over all relevant Python files.
It goes through all
loaded files from modules, all files in folders of already loaded modules
as well as all files... | Python | 0.000006 | @@ -2442,24 +2442,45 @@
list_pid_2:%0A
+ try:%0A
@@ -2514,16 +2514,201 @@
IGTERM)%0A
+ except ProcessLookupError:%0A continue%0A try:%0A os.kill(int(child_pid), signal.SIGTERM)%0A except ProcessLookupError:%0A continue%0A
%0A%... |
ede6cbe14c4a5ed3e16283c4afb448ce3d15463c | Allow fields other than "id" to be passed around | spiff/views.py | spiff/views.py | from django.views.generic import TemplateView
from copy import copy
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.conf.urls import url
from django.views.decorators.csrf import csrf_exempt
import json
from django.http import HttpResponse
from django.core import se... | Python | 0 | @@ -1715,16 +1715,37 @@
eView):%0A
+ slug_field = 'id'%0A%0A
def ge
@@ -2021,32 +2021,88 @@
rgs, **kwargs):%0A
+ fields = %7Bself.slug_field: kwargs%5Bself.slug_field%5D%7D%0A
return self.
@@ -2123,23 +2123,16 @@
get(
-pk=kwargs%5B'id'%5D
+**fields
)%0A%0A
@@ -3717,16 +3717,12 @@
(?P%3C
-id%3E%5B0-9%5... |
91c2e80e1a13dbc7653c9f53f9da953890a2da8f | fix missing import in uri.py | smr/uri.py | smr/uri.py | import boto
from boto.s3.key import Key
import logging
import os
import re
import shutil
S3_BUCKETS = {} # cache s3 buckets to re-use them
def get_s3_bucket(bucket_name, config):
if bucket_name not in S3_BUCKETS:
s3conn = boto.connect_s3(config.AWS_ACCESS_KEY, config.AWS_SECRET_KEY)
S3_BUCKETS[buc... | Python | 0.00061 | @@ -81,16 +81,27 @@
t shutil
+%0Aimport sys
%0A%0AS3_BUC
|
9ff2ed732c6918ff22680d39b860163cdab6c072 | Handle case when PUDC_B pin function is not found. | utils/fasm2frames.py | utils/fasm2frames.py | #!/usr/bin/env python3
from __future__ import print_function
import fasm
import argparse
import json
import os
import os.path
from prjxray import fasm_assembler
from prjxray.db import Database
from prjxray.roi import Roi
class FASMSyntaxError(SyntaxError):
pass
def dump_frames_verbose(frames):
print()
... | Python | 0 | @@ -2603,24 +2603,69 @@
use = True%0A%0A
+ if pudc_b_tile_site is not None:%0A
asse
@@ -3324,16 +3324,49 @@
b_in_use
+ and pudc_b_tile_site is not None
:%0A
|
10245467b393dcf6d8ee2733365afb0d8257c9e4 | Test commit | facebook_calculate_likes.py | facebook_calculate_likes.py | # First, let's query for all of the likes in your social
# network and store them in a slightly more convenient
# data structure as a dictionary keyed on each friend's
# name.
import facebook
from prettytable import PrettyTable
from collections import Counter
# Create a connection to the Graph API with your access tok... | Python | 0.002666 | @@ -1,8 +1,33 @@
+# This is a test by Timo%0A
# First,
|
bf0e192b190efbde1b594cdf85c6552b343c2f0c | Use new API correctly, v2... | run_samples.py | run_samples.py | #!/usr/bin/python3
'''
Run simulations with parameter samples.
'''
import model
countries = model.datasheet.get_country_list()
# Move these to the front.
countries_to_plot = ['United States of America',
'South Africa',
'Uganda',
'Nigeria',
... | Python | 0 | @@ -624,24 +624,26 @@
= model.
+si
mul
+a
ti
-sim
+on
.MultiSi
|
52e22627c586e620dc99972bb9491912ff7f9c77 | remove pylint issues | src/gmv/log_utils.py | src/gmv/log_utils.py | '''
Gmvault: a tool to backup and restore your gmail account.
Copyright (C) <2011-2012> <guillaume Aubert (guillaume dot aubert at gmail do com)>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Fre... | Python | 0.000001 | @@ -4845,24 +4845,28 @@
actory(cls,
+the_
type):%0A
@@ -5000,16 +5000,20 @@
if
+the_
type ==
@@ -5187,16 +5187,20 @@
wn.%22 %25 (
+the_
type))%0A
@@ -5450,32 +5450,36 @@
rr_handler(cls,
+the_
type):%0A %22
@@ -5582,32 +5582,36 @@
cls.get_factory(
+the_
type).setup_simp
@@ -5689,24 +5689,... |
a01458044fbec8d9aacc7bafad70d7314dc388fa | set STATIC_ROOT | Beacon/settings.py | Beacon/settings.py | """
Django settings for Beacon project.
Generated by 'django-admin startproject' using Django 1.9.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
# ... | Python | 0.000008 | @@ -3282,8 +3282,33 @@
tatic/'%0A
+STATIC_ROOT = '/static/'%0A
|
04824dd78cd2151ddb2b9a670101f91454da9a4e | Add temporary docstrings for remaining methods/functions | spyns/ising.py | spyns/ising.py | # -*- coding: utf-8 -*-
# Copyright (c) Mason DataMaterials Group.
# Distributed under the terms of the MIT License.
"""
Created on Thu Aug 31 15:39:03 2017
@author: ssilayi
"""
import logging
import math
import random
import numpy as np
__author__ = "Swabir Silayi"
__copyright__ = "Copyright 2017, Mason DataMate... | Python | 0 | @@ -2822,16 +2822,187 @@
h, t):%0A
+ %22%22%22Temporary docstring.%0A%0A Parameters%0A ----------%0A h : float%0A Magnetic field%0A%0A t : float%0A Temperature%0A%0A %22%22%22
%0A
@@ -3439,16 +3439,187 @@
t, h):%0A
+ %22%22%22Temporary d... |
da4b5724d556a06ce9d6150cfe4fc1fd06b655d8 | add template path and save get_url for template urls | app/mapproxy_webconf/app.py | app/mapproxy_webconf/app.py | import os
from copy import deepcopy
from . import bottle
from . import config
from . import storage
from .bottle import request, response, static_file
from .utils import requires_json
from .capabilities import parse_capabilities_url
app = bottle.Bottle()
class RESTBase(object):
def __init__(self, section):
... | Python | 0 | @@ -144,16 +144,42 @@
tic_file
+, template, SimpleTemplate
%0Afrom .u
@@ -275,16 +275,143 @@
Bottle()
+%0Abottle.TEMPLATE_PATH = %5Bos.path.join(os.path.dirname(__file__), 'templates')%5D%0ASimpleTemplate.defaults%5B%22get_url%22%5D = app.get_url
%0A%0Aclass
|
a3788f4d9ab0fc8a319b71548db4a40924f14d71 | Fix a test case | test/test_csv_writer.py | test/test_csv_writer.py | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
import collections
import itertools
import pytablewriter
import pytest
from .data import header_list
from .data import value_matrix
from .data import value_matrix_with_none
from .data import mix_... | Python | 0.999999 | @@ -3990,25 +3990,16 @@
%5B
-%22table%22,
%22header%22
@@ -4049,20 +4049,8 @@
%5B
-data.table,
data
@@ -4178,39 +4178,32 @@
on(self, capsys,
- table,
header, value,
@@ -4255,42 +4255,8 @@
s()%0A
- writer.table_name = table%0A
|
29cc8951e4485d0edeade28c5e6711ccaefe9551 | fix concatenation while editing files | sbhstimetable/jsconcat.py | sbhstimetable/jsconcat.py | # sbhs-timetable-python
# Copyright (C) 2015 Simon Shields, James Ye
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ver... | Python | 0.000007 | @@ -911,16 +911,71 @@
sfile(i)
+ and i.endswith('.js') and not i.endswith('.concat.js')
:%0A
|
f6b02f3959172e2f196dbc45cbdb8df46898f6ec | add call_back to run_tardis (#860) | tardis/base.py | tardis/base.py | # functions that are important for the general usage of TARDIS
def run_tardis(config, atom_data=None):
"""
This function is one of the core functions to run TARDIS from a given
config object.
It will return a model object containing
Parameters
----------
config: ~str or ~dict
fil... | Python | 0 | @@ -94,16 +94,41 @@
ata=None
+, simulation_callbacks=%5B%5D
):%0A %22
@@ -1239,24 +1239,97 @@
=atom_data)%0A
+ for cb in simulation_callbacks:%0A simulation.add_callback(cb)%0A%0A
simulati
|
87dcae36cdd08c1740d2e7bf102c10a4152a5345 | Fix unittest. | pymatgen/analysis/tests/test_energy_models.py | pymatgen/analysis/tests/test_energy_models.py | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
"""
TODO: Modify module doc.
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.1"
__maintainer__ = "... | Python | 0.999984 | @@ -1557,21 +1557,26 @@
), -
-36.3476248117
+145.39049924661001
)%0A%0A
|
6d92657abfdc444bc32d0b260461e9e27c587edc | Fix UnicodeError when printing str | tpb/tpb.py | tpb/tpb.py | #!/usr/bin/env python
"""
Unofficial Python API for ThePirateBay.
Currently supports searching, recent torrents and top 100 torrents.
@author Karan Goel
@email karan@goel.im
Copyright (C) 2013 Karan Goel
This program is free software: you can redistribute it and/or modify
it under the terms of the GN... | Python | 0.000297 | @@ -3282,16 +3282,31 @@
ups()%5B2%5D
+.encode('utf8')
# uploa
|
9576a3077f8fff0d68267dbf5bb2e821ef92c46c | remove storage use in download | fate_flow/utils/download.py | fate_flow/utils/download.py | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | Python | 0 | @@ -652,16 +652,8 @@
sion
-,storage
%0A%0Afr
@@ -1497,14 +1497,14 @@
= s
-torage
+ession
.get
|
55ede9afeb52d799605587f0eeb5dc40d6cc4fb9 | FIX hook | account_payment_group/hooks.py | account_payment_group/hooks.py | # -*- coding: utf-8 -*-
# Copyright <YEAR(S)> <AUTHOR(S)>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
try:
from openupgradelib.openupgrade_tools import column_exists
from openupgradelib import openupgrade
except ImportError:
column_exists = None
openupgrade = None
import logging
_log... | Python | 0.000001 | @@ -183,16 +183,78 @@
_exists%0A
+ from openupgradelib.openupgrade_tools import table_exists%0A
from
@@ -752,16 +752,86 @@
ment')%0A%0A
+ if table_exists and table_exists(cr, 'account_voucher_copy'):%0A
rest
|
ac9a6c8340964ee7f6db3eb408e8241b5128346f | Test with and without discarding verified reads | test/test_readtagger.py | test/test_readtagger.py | from readtagger.readtagger import SamTagProcessor
from readtagger.readtagger import SamAnnotator
from readtagger.readtagger import main
from collections import namedtuple
TEST_SAM = 'testsam_a.sam'
TEST_SAM_B = 'testsam_b.sam'
TEST_BAM_A = 'dm6.bam'
TEST_BAM_B = 'pasteurianus.bam'
def test_samtag_processor(datadi... | Python | 0 | @@ -1303,16 +1303,32 @@
est_main
+_keep_suboptimal
(datadir
@@ -1360,129 +1360,126 @@
-discarded = tmpdir.join('discarded.bam')%0A verified = tmpdir.join('verified.bam')%0A output = tmpdir.join('output.bam'
+# Annotate dm6 with pasteurianus reads, keep suboptimal tags%0A discarded, verified, output = g... |
c8215c50a2ae17b5962d1637ed9acec4f37f3621 | Deal with API change in libs7comm | s7/__init__.py | s7/__init__.py | #!/usr/bin/env python
import ctypes
class S7Exception:
def __init__(self, msg, err):
self._err = err
self._msg = msg
def __str__(self):
return "%s (%d)" % (self._msg, self._err)
class S7Comm:
def __init__(self, address):
self._address = address
self._s7obj = ctypes... | Python | 0 | @@ -1050,16 +1050,19 @@
mm_read_
+db_
word(sel
@@ -1094,32 +1094,32 @@
s.byref(value))%0A
-
%0A if ret
@@ -1537,16 +1537,19 @@
m_write_
+db_
word(sel
@@ -1905,16 +1905,19 @@
mm_read_
+db_
byte(sel
@@ -2352,16 +2352,19 @@
m_write_
+db_
byte(sel
@@ -2785,16 +2785,19 @@
mm_read_
+db_
bit(self
@@ -3192,... |
14678265d17e88caa225f570e3bcaed0a1114522 | Fix ordering of gestalten | features/gestalten/views.py | features/gestalten/views.py | import allauth
import django
from django.views import generic
import core
import utils
from core.views import base
from features.associations import models as associations
from . import forms, models
class Detail(
core.views.PermissionMixin, django.views.generic.list.MultipleObjectMixin,
django.views... | Python | 0.000003 | @@ -1023,16 +1023,17 @@
g =
+%5B
'-score'
%0A
@@ -1028,16 +1028,39 @@
'-score'
+, '-user__date_joined'%5D
%0A pag
|
e3b92286e9dbe4e777af574698b9a634b69a9b02 | Fix data errors in test_fmri using funcfile data file. | neuroimaging/modalities/fmri/tests/test_fmri.py | neuroimaging/modalities/fmri/tests/test_fmri.py | import gc, os
from tempfile import mkstemp
import numpy as np
from neuroimaging.testing import *
import neuroimaging.core.reference.axis as axis
import neuroimaging.core.reference.grid as grid
from neuroimaging.modalities.fmri.api import FmriImage, fmri_generator, fromimage
from neuroimaging.core.api import Image, ... | Python | 0.000002 | @@ -1128,22 +1128,8 @@
name
-, clobber=True
)%0A
@@ -1414,17 +1414,16 @@
e, (20,2
-0
,20))%0A
@@ -1483,16 +1483,17 @@
als(j, 2
+0
)%0A%0A d
@@ -1550,24 +1550,25 @@
grid%5B3%5D%0A
+%0A
assert_a
@@ -1563,95 +1563,28 @@
-assert_almost_equal(subgrid.mapping.transform,%0A ... |
86864f0ff3af90b4bf3ca6e5f057f9c766ab0fde | Use a saner timeout value on the database connection | trac/db.py | trac/db.py | # -*- coding: iso8859-1 -*-
#
# Copyright (C) 2003, 2004 Edgewall Software
# Copyright (C) 2003, 2004 Jonas Borgstrm <jonas@edgewall.com>
#
# Trac is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version... | Python | 0.000414 | @@ -2925,17 +2925,16 @@
config%0A%0A
-%0A
def get_
@@ -2980,18 +2980,31 @@
(db_name
+, timeout=5000
)
-%0A
%0A%0Adef sy
|
d063aab1277fff1ec711bb85f6a925d95df58e15 | Add test_set_insert_customer_text_msg | test/test_server_api.py | test/test_server_api.py | import unittest
import os,sys
cur_dir = os.path.dirname(__file__)
par_dir = os.path.dirname(cur_dir)
sys.path.append(par_dir)
from server_api import *
from mysql import *
class Server_api(unittest.TestCase):
def test_find_now_schedule(self):
with mysql() as db:
db.connect()
self.ass... | Python | 0.000531 | @@ -683,16 +683,161 @@
exc())%0A%0A
+ def test_set_insert_customer_text_msg(self):%0A ret = set_insert_customer_text_msg()%0A self.assertEqual(ret%5B'result'%5D,'success')%0A%0A
def suit
@@ -941,16 +941,61 @@
irthday'
+,%0A 'test_set_insert_customer_text_msg'
%5D%0A su
|
9d22096d82a2075609bb8a9ba08884c6e9076eef | Fix #2 | watdo/cli.py | watdo/cli.py | # -*- coding: utf-8 -*-
'''
watdo.cli
~~~~~~~~~
This module contains both helper functions and main() for the CLI
interface.
:copyright: (c) 2013 Markus Unterwaditzer
:license: MIT, see LICENSE for more details.
'''
import watdo.editor as editor
import subprocess
import os
import argparse
... | Python | 0 | @@ -285,16 +285,32 @@
process%0A
+import tempfile%0A
import o
@@ -1222,25 +1222,24 @@
turn False%0A%0A
-%0A
def launch_e
@@ -1260,18 +1260,16 @@
file
-name='todo
+suffix='
.mar
@@ -1292,98 +1292,178 @@
file
-path = os.path.join(cfg%5B'TMPPATH'%5D, tmpfilename)%0A%0A with open(tmpfilepath, 'wb+')
+ = tempfile.... |
62509a12726d8a67ad4fa03d0ffcecd6284c1a04 | Fix docstring indentation problem | feincms/default_settings.py | feincms/default_settings.py | # ------------------------------------------------------------------------
# coding=utf-8
# $Id$
# ------------------------------------------------------------------------
"""
Default settings for FeinCMS
All of these can be overridden by specifying them in the standard
``settings.py`` file.
"""
from os.path import j... | Python | 0.00007 | @@ -4758,17 +4758,16 @@
e the%0A#:
-
%60%60app_r
|
b4c75150e9b42839ae532a6dd1dae9ad995d833e | Add dns_check to generation of master binding | salt/config.py | salt/config.py | '''
All salt configuration loading and defaults should be in this module
'''
# Import python modules
import os
import socket
# Import third party libs
import yaml
# Import salt libs
import salt.crypt
import salt.loader
def load_config(opts, path, env_var):
'''
Attempts to update ``opts`` dict by parsing either... | Python | 0 | @@ -211,16 +211,34 @@
t.loader
+%0Aimport salt.utils
%0A%0Adef lo
@@ -2267,32 +2267,94 @@
INION_CONFIG')%0A%0A
+ opts%5B'master_ip'%5D = salt.utils.dns_check(opts%5B'master'%5D)%0A%0A
opts%5B'master
@@ -2385,16 +2385,19 @@
%5B'master
+_ip
'%5D + ':'
|
6f462b45d7dd6bc5a0d49a3329c592d32c610b9f | Update archivebox/core/forms.py | archivebox/core/forms.py | archivebox/core/forms.py | __package__ = 'archivebox.core'
from django import forms
from ..util import URL_REGEX
from .utils_taggit import edit_string_for_tags, parse_tags
CHOICES = (
('0', 'depth = 0 (archive just these URLs)'),
('1', 'depth = 1 (archive these URLs and all URLs one hop away)'),
)
ARCHIVE_METHODS = [
('title', 't... | Python | 0 | @@ -281,311 +281,150 @@
%0A)%0A%0A
-ARCHIVE_METHODS = %5B%0A ('title', 'title'),%0A ('favicon', 'favicon'),%0A ('wget', 'wget'),%0A ('warc', 'warc'),%0A ('pdf', 'pdf'),%0A ('screenshot', 'screenshot'),%0A ('dom', 'dom'),%0A ('singlefile', 'singlefile'),%0A ('git', 'git'),%0A ('media', 'me... |
c9af08cc14072548c658dcf7e547dfb069da1e7a | Fix my stupidity in gae_sandbox.py. | assetpipe/gae_sandbox.py | assetpipe/gae_sandbox.py | """ Utilities for allowing assetpipe to work in the Google App Engine SDK. """
import contextlib
try:
from google.appengine.tools.devappserver2.python import stubs
ON_GAE = True
except ImportError:
ON_GAE = False
if ON_GAE:
def allow_modules(func):
"""
A decorator for allowing mod... | Python | 0.000002 | @@ -1851,20 +1851,16 @@
apped%0A%0A%0A
-
@con
@@ -1882,20 +1882,16 @@
manager%0A
-
def
@@ -1900,26 +1900,32 @@
low_
-mode_write():%0A
+writeable_filesystem():%0A
@@ -1974,36 +1974,32 @@
D_MODES%0A
-
new_modes = set(
@@ -2028,20 +2028,16 @@
_MODES)%0A
-
@@ -20... |
497428591b2ad58fa96ed52247c4504bb2677b19 | Update example to show how to redirect the user on error or success. fixes #4 | oauth2u/examples/server_with_plugin_to_login.py | oauth2u/examples/server_with_plugin_to_login.py | '''
This example shows how to use a plugin to ask for client
login and password.
If you have an application/website with registered users, you
can allow any application to authenticate using oauth 2 protocol
implementing plugins like these bellow
'''
from oauth2u.server import Server, plugins, database
@plugins.reg... | Python | 0 | @@ -1520,24 +1520,102 @@
allow?%3C/p%3E'%0A
+ '%3Cp%3E Yes, I do %3Cinput type=%22checkbox%22 name=%22allow%22 /%3E %3C/p%3E'%0A
@@ -2310,16 +2310,75 @@
',''))%0A%0A
+ allow = (handler.get_argument('allow','off') == 'on')%0A%0A
if n
@@ -2437,16 +2437,16 @@
code):%0A
-
... |
e172dd221f2dbca29544de813bdbaf9f44aa16e3 | Remove PID since the process is daemonized afterwards, meaning that pid isn't correct | salt/runner.py | salt/runner.py | # -*- coding: utf-8 -*-
'''
Execute salt convenience routines
'''
# Import python libs
from __future__ import print_function
from __future__ import absolute_import
import logging
# Import salt libs
import salt.exceptions
import salt.loader
import salt.minion
import salt.utils.args
import salt.utils.event
from salt.cl... | Python | 0.000001 | @@ -4899,21 +4899,8 @@
ning
- in pid %7Bpid%7D
und
|
75f9eba8a20d93132a888c4f01d65e8962bd3d7d | add id field to MetaDataSerializer | onadata/libs/serializers/metadata_serializer.py | onadata/libs/serializers/metadata_serializer.py | from django.utils.translation import ugettext as _
from rest_framework import serializers
from onadata.apps.main.models.meta_data import MetaData
METADATA_TYPES = (
('data_license', _(u"Data License")),
('form_license', _(u"Form License")),
('mapbox_layer', _(u"Mapbox Layer")),
('media', _(u"Media")),... | Python | 0 | @@ -504,16 +504,79 @@
lizer):%0A
+ id = serializers.IntegerField(source='pk', read_only=True)%0A
xfor
|
34def35fb63595a1739f384d07ab92e7acbe895e | version 0.8.0 | actstream/__init__.py | actstream/__init__.py | try:
from actstream.signals import action
except:
pass
__version__ = '0.7.0'
__author__ = 'Justin Quick <justquick@gmail.com>'
default_app_config = 'actstream.apps.ActstreamConfig'
| Python | 0.000002 | @@ -78,9 +78,9 @@
'0.
-7
+8
.0'%0A
@@ -93,16 +93,33 @@
or__ = '
+Asif Saif Uddin,
Justin Q
|
c9213ee82d5683b5e6d39f6810ff0444dcdc8a04 | remove stale data passing | impl_cffi.py | impl_cffi.py | from __future__ import print_function
import os.path
from libpicohttpparser import ffi, lib
class HttpRequest(object):
def __init__(self, method, path, version, headers):
self.path = path
self.method = method
self.version = version
self.headers = headers
self.body = None
... | Python | 0.000002 | @@ -707,16 +707,17 @@
on_body%0A
+%0A
@@ -1021,30 +1021,24 @@
headers(self
-, data
):%0A c
@@ -4210,20 +4210,16 @@
headers(
-data
)%0A%0A
|
c7d05192f159bd1d75cc7031a7c7cb366207a701 | remove debug output | tests/MpfTestCase.py | tests/MpfTestCase.py | import unittest
from mpf.system.machine import MachineController
from mpf.system.utility_functions import Util
import logging
import sys
from mock import *
import time
import inspect
class TestMachineController(MachineController):
local_mpf_config_cache = {}
def __init__(self, options, config_patches):
... | Python | 0.000101 | @@ -502,53 +502,8 @@
f):%0A
- print(self.options%5B'mpfconfigfile'%5D)%0A
|
7f00dd5ebe906525a8bc63abd5b1608ac5cd281b | Use ISO format when changing birthdate | web/blueprints/user/forms.py | web/blueprints/user/forms.py | # -*- coding: utf-8 -*-
# Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
import re
from difflib import SequenceMatcher
from flask import url_for
from flask_wtf ... | Python | 0.000277 | @@ -2802,19 +2802,8 @@
rmat
-=%22%25d.%25m.%25Y%22
)%0A%0A%0A
|
320fe2d32ed58f15c841f604f32f2a1e3eb2aba6 | Update test-install | msmbuilder/project_templates/0-test-install.py | msmbuilder/project_templates/0-test-install.py | """This script tests your python installation as it pertains to running project templates.
MSMBuilder supports Python 2.7 and 3.3+ and has some necessary dependencies
like numpy, scipy, and scikit-learn. This templated project enforces
some more stringent requirements to make sure all the users are more-or-less
on the... | Python | 0 | @@ -2122,32 +2122,36 @@
lotting scripts
+can
try to use %60xdg-
@@ -2205,102 +2205,89 @@
ot.
-You can remove these calls. %22%0A %22They're typically the last line of the plotting scripts
+Use the --display flag on %22%0A %22msmb TemplateProject to enable this behavior
.%22%0A
|
a61433f4de497d517c41226477d2d96885ad92ea | Add the current site domain to the email template context | ecommerce/notifications/notifications.py | ecommerce/notifications/notifications.py | import logging
from oscar.core.loading import get_model, get_class
from premailer import transform
from ecommerce.extensions.analytics.utils import parse_tracking_context
log = logging.getLogger(__name__)
CommunicationEventType = get_model('customer', 'CommunicationEventType')
Dispatcher = get_class('customer.utils... | Python | 0.000008 | @@ -1018,24 +1018,60 @@
full_name,%0A
+ 'site_domain': site.domain,%0A
'pla
|
8d34804f11be57e84c0b0a4e2ce452fd1ab00604 | Fix handling of namespace packages in modules_from_import_statements() | edgedb/lang/common/lang/import_/utils.py | edgedb/lang/common/lang/import_/utils.py | ##
# Copyright (c) 2011-2012 Sprymix Inc.
# All rights reserved.
#
# See LICENSE for details.
##
import imp
import importlib
import os.path
import sys
import types
from metamagic.utils.algos import topological
from .context import ImportContext
from . import cache as caches
from . import module as module_types
d... | Python | 0.000001 | @@ -4402,24 +4402,552 @@
list, str):%0A
+ # Try to obtain package loader path and do it with care%0A # as NamespaceLoader/NamespacePath have slightly different%0A # semantics.%0A try:%0A loader_path = loader.path%0A except At... |
f008f599d47fbbc858f9366e96b573b60b7cf00a | Fix KiwiViewer export from more recent paraview | VelodyneHDL/python/veloview/kiwiviewerExporter.py | VelodyneHDL/python/veloview/kiwiviewerExporter.py | # Copyright 2013 Velodyne Acoustics, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | Python | 0 | @@ -1534,16 +1534,19 @@
rrayName
+%5B1%5D
%0A els
|
0881adc5c348fc733897abc446271f3516cbc7a3 | Version bump to 3.7.0b10 | kiteconnect/__version__.py | kiteconnect/__version__.py | __title__ = "kiteconnect"
__description__ = "The official Python client for the Kite Connect trading API"
__url__ = "https://kite.trade"
__download_url__ = "https://github.com/zerodhatech/pykiteconnect"
__version__ = "3.7.0b9"
__author__ = "Zerodha Technology Pvt ltd. (India)"
__author_email__ = "talk@zerodha.tech"
__l... | Python | 0 | @@ -221,9 +221,10 @@
7.0b
-9
+10
%22%0A__
|
bedd27c95ff6a9fbb87ccbd9cf695db8ee443f48 | change tests | shutit_test.py | shutit_test.py | from shutit_module import ShutItModule
import random
import string
class shutit_test(ShutItModule):
def build(self, shutit):
vagrant_image = shutit.cfg[self.module_id]['vagrant_image']
vagrant_provider = shutit.cfg[self.module_id]['vagrant_provider']
shutit_branch = shutit.cfg[self.module_id]['shutit_bra... | Python | 0.000001 | @@ -655,16 +655,56 @@
99999)%0A%0A
+%09%09# python3 first - more likely to fail%0A
%09%09shutit
@@ -780,32 +780,58 @@
word='vagrant')%0A
+%09%09shutit.remove('python')%0A
%09%09shutit.install
@@ -832,16 +832,24 @@
nstall('
+python3
git dock
@@ -860,23 +860,151 @@
o python
+3
-pip')%0A
+%09%09shutit.send('git c... |
9a4f02b3716a3a775ad6e9e0b0a09fb777cd1b4c | make the engines pass the start function | salt/engines/__init__.py | salt/engines/__init__.py | '''
Initialize the engines system. This plugin system allows for
complex services to be encapsulated within the salt plugin environment
'''
# Import python libs
import multiprocessing
# Import salt libs
import salt
class Engine(multiprocessing.Process):
'''
Execute the given engine in a new process
'''
... | Python | 0.000007 | @@ -644,31 +644,69 @@
-self.msrvc%5Bself.service
+fun = '%7B0%7D.start'.format(self.service)%0A self.msrvc%5Bfun
%5D()%0A
|
72d35232a1dead480a692655f280afe57aa39e37 | Fix key errors | helpdesk/management/commands/escalate_tickets.py | helpdesk/management/commands/escalate_tickets.py | #!/usr/bin/python
"""
django-helpdesk - A Django powered ticket tracker for small enterprise.
(c) Copyright 2008 Jutda. All Rights Reserved. See LICENSE for details.
scripts/escalate_tickets.py - Easy way to escalate tickets based on their age,
designed to be run from Cron or similar.
""... | Python | 0.001872 | @@ -1436,24 +1436,16 @@
if
-options%5B
'verbose
@@ -1455,17 +1455,27 @@
alation'
-%5D
+ in options
:%0A
@@ -1506,33 +1506,35 @@
if
-options%5B'queues'%5D
+'queues' in options
:%0A
|
06d8acc2be00dafcf018cd53738ec2fbaf9ec37d | Update simplefetch.py | simplefetch.py | simplefetch.py | import paramiko, logging, socket, time, re, datetime
import sys
python3_usage=True
if sys.version_info[0] < 3:
python3_usage=False
"""
#v2.0 2020.01.20
#Written by Ercin TORUN
#automates ssh login using paramiko library
"""
#==================some variables
line_break = "\r"
ios_any_cli_length = "... | Python | 0 | @@ -3840,16 +3840,29 @@
o-iosxr%22
+, %22dell-os10%22
):%0D%0A%09%09%09%09
|
bfb2c907b95b1a863b32d2c675e270a452c0ec1e | Document prefix permissions | dog/ext/config.py | dog/ext/config.py | """
Contains commands that have to do with configuring the bot for your server.
This extension also contains commands that globally configure the bot, but only
the owner can use those.
"""
import logging
from discord.ext import commands
from dog import Cog
log = logging.getLogger(__name__)
CONFIGKEYS_HELP = '<http... | Python | 0.000001 | @@ -5011,16 +5011,79 @@
server.
+%0A Only members with %22Manage Server%22 may manage prefixes.
%0A%0A
|
8acc17e73f10e8d35439244d833cb8e697bb0df7 | add more python version limit | knowledge_repo/_version.py | knowledge_repo/_version.py | import os
import subprocess
__all__ = ['__author__', '__author_email__', '__version__', '__git_uri__', '__dependencies__', '__optional_dependencies__']
__author__ = "Erik Ritter (maintainer), Serena Jiang, John Bodley, Bill Ulammandakh, Naoya Kanai, Robert Chang, Dan Frank, Chetan Sharma, Matthew Wardrop"
__author_... | Python | 0 | @@ -1252,16 +1252,24 @@
pygments
+==2.10.0
', # Co
@@ -1361,16 +1361,23 @@
tabulate
+==0.8.9
', # Re
|
66fe4ea11a0603600f37904b3fca65dc9c7a4460 | Fix template tag (it had an impossible condition in it. | agon/templatetags/agon_tags.py | agon/templatetags/agon_tags.py | from django import template
from django.db.models.loading import cache as app_cache
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
register = template.Library()
class TopObjectsNode(template.Node):
@classmethod
def handle_token(cls, parser, token... | Python | 0 | @@ -389,18 +389,19 @@
s) != 4
-or
+and
len(bit
@@ -829,13 +829,79 @@
or(%22
-test%22
+Fourth argument to %25r must be %22%0A %22'limit'%22 %25 bits%5B0%5D
)%0A
|
cb29a43639989825d465199be9ae79d46a3f1458 | Remove --no-db/-db option from AIM CLI | aim/tools/cli/groups/aimcli.py | aim/tools/cli/groups/aimcli.py | # Copyright (c) 2016 Cisco Systems
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | Python | 0.000002 | @@ -648,16 +648,39 @@
t config
+%0Afrom aim.db import api
%0A%0Aimport
@@ -1272,52 +1272,8 @@
e')%0A
-@click.option('--db/--no-db', default=True)%0A
@cli
@@ -1367,12 +1367,8 @@
ile,
- db,
deb
@@ -1532,134 +1532,8 @@
FO)%0A
- if db:%0A try:%0A config.CONF.register_opts(db_opts, 'database')%0... |
27b0a5b95e188a5bd77ae662bbb43e06dfde4749 | Use the id of the channel and unquote all of the text first. | slack/views.py | slack/views.py | from flask import Flask, request
import requests
from urllib import unquote
app = Flask(__name__)
@app.route("/")
def meme():
domain = request.args["team_domain"]
slackbot = request.args["slackbot"]
text = request.args["text"]
channel = request.args["channel_name"]
text = text[:-1] if text[-1] ==... | Python | 0 | @@ -274,15 +274,38 @@
nel_
-name%22%5D%0A
+id%22%5D%0A%0A text = unquote(text)
%0A
@@ -442,50 +442,8 @@
ams%5D
-%0A params = %5Bunquote(x) for x in params%5D
%0A%0A
@@ -812,11 +812,8 @@
nel=
-%2523
%7B2%7D%22
|
732124f5c5d75243682a4603fe5f30bfcd018c98 | use symbolic name for default route | akanda/router/drivers/route.py | akanda/router/drivers/route.py | import logging
from akanda.router.drivers import base
LOG = logging.getLogger(__name__)
class RouteManager(base.Manager):
EXECUTABLE = '/sbin/route'
def __init__(self, root_helper='sudo'):
super(RouteManager, self).__init__(root_helper)
def update_default(self, config):
for net in con... | Python | 0.000001 | @@ -459,37 +459,8 @@
if
-subnet.cidr.version == 4 and
subn
@@ -541,164 +541,8 @@
y_ip
-, '0.0.0.0/0')%0A elif subnet.cidr.version == 6 and subnet.gateway_ip:%0A self._set_default_v6_gateway(subnet.gateway_ip, '::'
)%0A%0A
@@ -585,24 +585,16 @@
teway_ip
-, prefix
):%0A
@@... |
7029460530616d39f53d94880a5279441f7148ca | Update sizes.py | plantcv/plantcv/visualize/sizes.py | plantcv/plantcv/visualize/sizes.py | # Visualize an annotated image with object sizes
import os
import cv2
import random
import numpy as np
from plantcv.plantcv import params
from plantcv.plantcv import plot_image
from plantcv.plantcv import print_image
from plantcv.plantcv import find_objects
from plantcv.plantcv import color_palette
from plantcv.plantc... | Python | 0.000001 | @@ -97,16 +97,57 @@
y as np%0A
+from plantcv.plantcv import find_objects%0A
from pla
@@ -256,49 +256,8 @@
age%0A
-from plantcv.plantcv import find_objects%0A
from
|
8df06e8ba6b06fee4155fee34ec9dc5e5d407b78 | bump version | aldryn_stripe_shop/__init__.py | aldryn_stripe_shop/__init__.py | # -*- coding: utf-8 -*-
__version__ = '0.0.2'
| Python | 0 | @@ -40,7 +40,7 @@
0.0.
-2
+3
'%0A
|
bf2ce07fe6f346add93ff57fe14b28adddc413ed | Update MeshView to new API | plugins/Views/MeshView/MeshView.py | plugins/Views/MeshView/MeshView.py | # Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
from UM.View.View import View
from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
from UM.Resources import Resources
from UM.Application import Application
from UM.Math.Color import Color
from UM.Preferen... | Python | 0 | @@ -2683,16 +2683,36 @@
tance().
+getMachineManager().
getActiv
@@ -2719,16 +2719,24 @@
eMachine
+Instance
()%0A%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.