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 |
|---|---|---|---|---|---|---|---|
ef46bd346772156b6efd6e11106164cfbedc8cba | Add license text. | testfixtures/tests/test_roundcomparison.py | testfixtures/tests/test_roundcomparison.py | from decimal import Decimal
from testfixtures import RoundComparison as R, compare, ShouldRaise
from unittest import TestCase
class Tests(TestCase):
def test_equal_yes_rhs(self):
self.assertTrue(0.123457 == R(0.123456, 5))
def test_equal_yes_lhs(self):
self.assertTrue(R(0.123456, 5) == 0.1234... | Python | 0 | @@ -1,12 +1,88 @@
+# Copyright (c) 2014 Simplistix Ltd%0A# See license.txt for license details.%0A%0A
from decimal
@@ -196,16 +196,47 @@
stCase%0A%0A
+from ..compat import PY2, PY3%0A%0A
class Te
|
6b21430fb60848626d1659c2a19086acb4482de9 | support for reading retrofitted models | openquake/parser/vulnerability.py | openquake/parser/vulnerability.py | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2010-2011, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenQuak... | Python | 0.000004 | @@ -4228,24 +4228,43 @@
job_id, path
+, retrofitted=False
):%0A %22%22%22Lo
@@ -4741,16 +4741,29 @@
y(job_id
+, retrofitted
),%0A
@@ -4827,16 +4827,35 @@
s(job_id
+, retrofitted=False
):%0A %22
@@ -5009,16 +5009,29 @@
y(job_id
+, retrofitted
))%0A%0A
|
700e0889d3e38e74d2c96fc653657ca16fbb5009 | lower its max value to 40 | aot/cards/trumps/gauge.py | aot/cards/trumps/gauge.py | ################################################################################
# Copyright (C) 2016 by Arena of Titans Contributors.
#
# This file is part of Arena of Titans.
#
# Arena of Titans is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as pu... | Python | 0.999835 | @@ -993,10 +993,9 @@
E =
-10
+4
0%0A%0A
|
826d9c3efefb2aeeaf656b592a5d4046a735520f | Fix console output | sslyze/cli/console_output.py | sslyze/cli/console_output.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
from sslyze.cli import CompletedServerScan
from sslyze.cli import FailedServerScan
from sslyze.cli.output_generator import OutputGenerator
from sslyze.server_connectivity import ClientAuthenticationServerConfiguratio... | Python | 0.000142 | @@ -583,16 +583,18 @@
uth_msg%7D
+%5Cn
'%0A SE
@@ -695,16 +695,18 @@
g tasks.
+%5Cn
'%0A%0A S
|
6a8f7b3ddf6c43565efeda5d21de714808e98785 | Add sample yaml data | hubblestack_nova/modules/netstat.py | hubblestack_nova/modules/netstat.py | # -*- encoding: utf-8 -*-
'''
Hubble Nova plugin for FreeBSD pkgng audit
:maintainer: HubbleStack
:maturity: 20160623
:platform: Unix
:requires: SaltStack
'''
from __future__ import absolute_import
import copy
import logging
import salt.utils
log = logging.getLogger(__name__)
def __virtual__():
if 'network.ne... | Python | 0 | @@ -148,16 +148,199 @@
altStack
+%0A%0ASample data for the netstat whitelist:%0A%0A.. code-block:: yaml%0A%0A netstat:%0A ssh:%0A address: 0.0.0.0:22%0A another_identifier:%0A address: 127.0.0.1:80
%0A'''%0Afro
|
1f72d0fc0fb8222ca8ffb69c164e4d118e1a9d1d | update version | meta.py | meta.py | #!/usr/bin/env python3
# @Time : 17-9-10 01:08
# @Author : Wavky Huang
# @Contact : master@wavky.com
# @File : meta.py
"""
"""
PROJECT_NAME = 'ManHourCalendar'
VERSION = '0.9.1a2'
AUTHOR = 'Wavky Huang'
AUTHOR_EMAIL = 'master@wavky.com'
| Python | 0 | @@ -178,17 +178,17 @@
= '0.9.1
-a
+b
2'%0AAUTHO
|
f98a2f11768db262dcf5113375edc8fdcf7d5304 | Fix Build Time | meta.py | meta.py | # TODO: Use Celery to properly manage updates, and provide dyanmic updates as everything progresses.
# TODO: Integrate with GitLab Webhooks
# TODO: Integrate with GitLab <-> Heroku
import datetime
import hashlib
import hmac
import json
import logging
import os
import threading
from flask import abort, Blueprint, json... | Python | 0 | @@ -603,38 +603,37 @@
y:%0A last_
-update
+build
_timestamp = os.
@@ -651,23 +651,12 @@
me(%22
-tmp/restart.txt
+venv
%22)%0A
@@ -683,30 +683,29 @@
last_
-update
+build
_timestamp =
@@ -722,37 +722,38 @@
y:%0A last_
-build
+update
_timestamp = os.
@@ -759,36 +759,47 @@
.path.getctime(%22
... |
52e004e9a14f4cbcd56503ea0f1652cf5e4ed853 | test untested ipcore interfaces | hwtLib/tests/ipCorePackager_test.py | hwtLib/tests/ipCorePackager_test.py | import shutil
import tempfile
import unittest
from hwt.hdlObjects.types.array import Array
from hwt.hdlObjects.types.struct import HStruct
from hwt.serializer.ip_packager.packager import Packager
from hwtLib.amba.axi4_streamToMem import Axi4streamToMem
from hwtLib.amba.axiLite_comp.endpoint import AxiLiteEndpoint
from... | Python | 0 | @@ -146,55 +146,227 @@
hwt.
-serializer.ip_packager.packager import Packager
+interfaces.std import BramPort, Handshaked%0Afrom hwt.serializer.ip_packager.interfaces.std import IP_Handshake%0Afrom hwt.serializer.ip_packager.packager import Packager%0Afrom hwt.synthesizer.interfaceLevel.unit import Unit
%0Afro
@@ -728... |
979c1eb0198fbcc4b27894a74abd9c5423c1ff9a | Define device type name | stoqdrivers/devices/base.py | stoqdrivers/devices/base.py | # -*- Mode: Python; coding: iso-8859-1 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Stoqdrivers
## Copyright (C) 2006 Async Open Source <http://www.async.com.br>
## 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 publishe... | Python | 0.998514 | @@ -1259,16 +1259,17 @@
import
+(
PRINTER_
@@ -1288,16 +1288,75 @@
E_DEVICE
+,%0A BARCODE_READER_DEVICE)
%0Afrom st
@@ -1773,16 +1773,25 @@
dict = %7B
+%0A
PRINTER_
@@ -1821,52 +1821,88 @@
- SCALE_DEVICE: %22Scale%22
+SCALE_DEVICE: %22Scale%2... |
cfce39c33d416a67f118c0259f601d5306fe6185 | this is 0.7.1 | cligj/__init__.py | cligj/__init__.py | """cligj
A package of arguments, options, and parsers for the Python GeoJSON
ecosystem.
"""
import sys
from warnings import warn
import click
from .features import normalize_feature_inputs
__version__ = "0.7.1dev"
if sys.version_info < (3, 6):
warn("cligj 1.0.0 will require Python >= 3.6", FutureWarning)
# ... | Python | 0.999999 | @@ -211,11 +211,8 @@
.7.1
-dev
%22%0A%0Ai
|
a1d9247e0d72a468e0fa70793501cd2e7dfec854 | Update wsgi.py. | clintools/wsgi.py | clintools/wsgi.py | """
WSGI config for clintools project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SET... | Python | 0 | @@ -1,314 +1,334 @@
-%22%22%22%0AWSGI config for clintools project.%0A%0AIt exposes the WSGI callable as a module-level variable named %60%60application%60%60.%0A%0AFor more information on this file, see%0Ahttps://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/%0A%22%22%22%0A%0Aimport os%0A%0Afrom django.core.wsgi... |
fca2e7e1b2e9e3931d077c2ef0dd3e92ca56a8af | add mising import | misc.py | misc.py | #pylint: disable=F0401
from helpers import *
from time import time as now
import org.bukkit.inventory.ItemStack as ItemStack
#
# Welcome new players
#
@hook.event("player.PlayerJoinEvent", "monitor")
def onJoin(event):
player = event.getPlayer()
# send welcome broadcast
if not server.getOfflinePlayer(player.ge... | Python | 0 | @@ -67,16 +67,30 @@
as now%0A
+import thread%0A
import o
|
937aa61393f46167806c1f4913c42e873ea1c435 | fix misc.lastfile() | misc.py | misc.py | """miscellaneous definitions"""
from math import ceil
import os.path
def file_name(args, par_type):
"""returns file name format for any time step"""
return args.name + '_' + par_type + '{:05d}'
def path_fmt(args, par_type):
"""returns full path format for any time step"""
return os.path.join(args.... | Python | 0.000001 | @@ -200,16 +200,17 @@
:05d%7D'%0A%0A
+%0A
def path
@@ -656,13 +656,14 @@
p =
-99999
+100000
%0A
|
6fdba909f03090649bee2255770a570114ed117f | Fix lint errors | manage.py | manage.py | #!/usr/bin/env python
import os.path as p
from subprocess import call, check_call
from flask.ext.script import Manager
from app import create_app
manager = Manager(create_app)
manager.add_option('-m', '--cfgmode', dest='config_mode', default='Development')
manager.add_option('-f', '--cfgfile', dest='config_file', typ... | Python | 0.000396 | @@ -67,20 +67,8 @@
call
-, check_call
%0Afro
|
4c72fd4af23d78c3b62ebd24cfbe6a18fc098a5e | remove $Id$ svn line | manage.py | manage.py | #!/usr/bin/env python3
# $Id: manage.py 11966 2014-10-23 22:59:19Z jrms $
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tsadm.settings")
os.environ.setdefault("TSADM_DEV", "true")
from django.core.management import execute_from_command_line
execute_fr... | Python | 0.00006 | @@ -19,59 +19,8 @@
hon3
-%0A# $Id: manage.py 11966 2014-10-23 22:59:19Z jrms $
%0A%0Aim
|
3bf50c7298b7634886d510ef07dfe13dda067247 | Fix manage.py pep8 | manage.py | manage.py | #!/usr/bin/env python
import os
COV = None
if os.environ.get('FLASK_COVERAGE'):
import coverage
COV = coverage.coverage(branch=True, include='app/*')
COV.start()
if os.path.exists('.env'):
print('Importing environment from .env...')
for line in open('.env'):
var = line.strip().split('=')
... | Python | 0 | @@ -25,16 +25,17 @@
port os%0A
+%0A
COV = No
@@ -715,16 +715,25 @@
rn dict(
+%0A
app=app,
@@ -750,16 +750,24 @@
er=User,
+%0A
Note=No
@@ -785,24 +785,32 @@
le, Tag=Tag,
+%0A
Notebook=No
@@ -817,16 +817,17 @@
tebook)%0A
+%0A
manager.
@@ -842,16 +842,21 @@
and(
+%0A
%22shell%22,
... |
a35289cbcffc3e1597f77dd8dbda7539f01c2856 | Fix flake8 complaint | manage.py | manage.py | #!/usr/bin/env python
import os
import time
from app import create_app, db
from app.models import (
User,
Role,
Agency,
Permission,
IncidentReport,
EditableHTML
)
from redis import Redis
from rq import Worker, Queue, Connection
from rq_scheduler.scheduler import Scheduler
from rq_scheduler.utils... | Python | 0 | @@ -5240,16 +5240,17 @@
se exc%0A%0A
+%0A
if __nam
|
a3923263a100dd39772533aa37ea7ff956e6c874 | Make app accessible outside the development machine. | manage.py | manage.py | # -*- coding: utf-8 -*-
from flask.ext.script import Manager, Server
from yoyo import create_app
manager = Manager(create_app)
manager.add_option('-c', '--configfile', dest='configfile', required=False)
if __name__ == '__main__':
manager.run()
| Python | 0 | @@ -200,16 +200,150 @@
False)%0A%0A
+manager.add_command('runserver', Server(%0A use_debugger = True,%0A use_reloader = True,%0A host = '0.0.0.0',%0A port = 8080,%0A))%0A%0A
if __nam
|
08b54819a56d9bfc65225045d97a4c331f9a3e11 | Fix model import needed by create_all() | manage.py | manage.py | #!/usr/bin/env python3
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from service import app, db
# db.create_all() needs all models to be imported
from service.db_access import *
migrate = Migrate(app, db)
manager = Manager(app)
manager.add_command('db', MigrateCommand)
if _... | Python | 0 | @@ -179,16 +179,35 @@
imported
+ explicitly (not *)
%0Afrom se
@@ -229,17 +229,20 @@
import
-*
+User
%0A%0A%0Amigra
|
b96b8b79a792cc900cdcdac6325aa3a94fe54697 | Add read_dotenv function to manage.py | manage.py | manage.py | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings.local")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| Python | 0 | @@ -37,16 +37,52 @@
rt sys%0A%0A
+import dotenv%0Adotenv.read_dotenv()%0A%0A
if __nam
|
643e95765d4308661d95ee2f7360ff3f09c90bd5 | use string.format() | manage.py | manage.py | #!/usr/bin/python
import shlex, subprocess
import argparse
if __name__=="__main__":
parser = argparse.ArgumentParser(description='Manage postfix container')
parser.add_argument("execute", choices=['create','start','stop','restart','delete'], help="manage postfix server")
args = parser.parse_args()
class bcol... | Python | 0.000037 | @@ -79,16 +79,42 @@
ain__%22:%0A
+ app_name = 'postfix'%0A %0A
parser
@@ -160,23 +160,18 @@
'Manage
-postfix
+%25s
contain
@@ -173,16 +173,27 @@
ntainer'
+ %25 app_name
)%0A pars
@@ -282,31 +282,37 @@
elp=
-%22
+'
manage
-postfix server%22
+%25s server' %25 app_name
)%0A
@@ -582,23 +582,19 @@
--nam... |
e141ab4c9286b95b2234b93feef4cf1b91fbe5bd | Remove dependence on settings except when absolutely necessary | markup.py | markup.py | """
Utilities for text-to-HTML conversion.
"""
from django.conf import settings
def textile(text, **kwargs):
import textile
if 'encoding' not in kwargs:
kwargs.update(encoding=settings.DEFAULT_CHARSET)
if 'output' not in kwargs:
kwargs.update(output=settings.DEFAULT_CHARSET)
return te... | Python | 0.000001 | @@ -46,42 +46,8 @@
%22%22%0A%0A
-from django.conf import settings%0A%0A
def
@@ -94,184 +94,8 @@
ile%0A
- if 'encoding' not in kwargs:%0A kwargs.update(encoding=settings.DEFAULT_CHARSET)%0A if 'output' not in kwargs:%0A kwargs.update(output=settings.DEFAULT_CHARSET)%0A
@@ -264,24 +264,24 @@... |
9a2c7e186276f58ec5165323a33a316d9ca80fc0 | correct malcode feed | Malcom/feeds/malcode.py | Malcom/feeds/malcode.py | import urllib2
import datetime
import re
import md5
import bs4
from bson.objectid import ObjectId
from bson.json_util import dumps
from Malcom.model.datatypes import Evil, Url
from Malcom.feeds.feed import Feed
import Malcom.auxiliary.toolbox as toolbox
class MalcodeBinaries(Feed):
def __init__(self, name):
sup... | Python | 0.000002 | @@ -918,16 +918,25 @@
tion'%5D)%0A
+%09%09if g:%0A%09
%09%09evil =
@@ -946,24 +946,25 @@
groupdict()%0A
+%09
%09%09evil%5B'desc
@@ -983,16 +983,17 @@
%22N/A%22%0A%09%09
+%09
evil%5B'li
@@ -1018,62 +1018,187 @@
%5D%0A%09%09
-evil%5B'id'%5D = md5.new(dict%5B'description'%5D).hexdigest(
+%09try:%0A%09%09%09%09d=dic... |
9320f891d7d972fc2cc4f9569b66767c5dfc4242 | Revert "Revert "Remove unnecessary TException.message hack"" | lib/py/src/Thrift.py | lib/py/src/Thrift.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 u... | Python | 0 | @@ -783,20 +783,8 @@
%0A#%0A%0A
-import sys%0A%0A
%0Acla
@@ -2059,317 +2059,8 @@
%22%22%0A%0A
- # BaseException.message is deprecated in Python v%5B2.6,3.0)%0A if (2, 6, 0) %3C= sys.version_info %3C (3, 0):%0A def _get_message(self):%0A return self._message%0A%0A def _set_message(self,... |
53827da4c1637b5be85f8ddf88fa1d3ab0c0d2b7 | Remove unintentional debug print statement. | floof/lib/helpers.py | floof/lib/helpers.py | """Helper functions
Consists of functions to typically be used within templates, but also
available to Controllers. This module is available to templates as 'h'.
"""
from __future__ import absolute_import
import re
import unicodedata
import lxml.html
import lxml.html.clean
import markdown
from webhelpers.html import ... | Python | 0.000002 | @@ -2761,33 +2761,8 @@
':'
-%0A print serial, result
%0A%0A
|
6e9560a12ac24e1c09b17c20f72644812aff6cd8 | Update fontasticToCobalt.py | fontasticToCobalt.py | fontasticToCobalt.py | #
# Created by Roxane P. on 13/01/2016
#
from HTMLParser import HTMLParser
from xml.dom.minidom import Document
from string import Template
import os, errno
import shutil
import sys
if (len(sys.argv) != 3):
print 'Usage: python', sys.argv[0], 'icons-references.html Fontxxx.ttf'
exit(1)
# configuration
fontna... | Python | 0.000291 | @@ -545,18 +545,19 @@
in/java/
-fr
+org
/cobalti
|
a3ad91928f7d4753204a2443237c7f720fed37f1 | Fix persistence of 'sort by' preference on Windows | inselect/gui/sort_document_items.py | inselect/gui/sort_document_items.py | from PySide.QtCore import QSettings
from inselect.lib.sort_document_items import sort_document_items
# QSettings path
_PATH = 'sort_by_columns'
# Global - set to instance of CookieCutterChoice in cookie_cutter_boxes
_SORT_DOCUMENT = None
def sort_items_choice():
"Returns an instance of SortDocumentItems"
g... | Python | 0.000178 | @@ -483,32 +483,63 @@
__init__(self):%0A
+ # Key holds an integer%0A
self._by
@@ -548,16 +548,21 @@
olumns =
+ 1 ==
QSettin
@@ -983,16 +983,154 @@
columns%0A
+ # Pass integer to setValue - calling setValue with a bool with result%0A # in a string being written to the QSettings store.%... |
e0248985f21d0611f5942dbe1bb6cc99360621b7 | Modify code to conform to test | src/Server/chatServer.py | src/Server/chatServer.py | # chatServer.py
# Lab 4 CS4032
# Cathal Geoghegan #11347076
import socket
import re
import sys
import hashlib
from tcpServer import TCPServer
import logging
logging.basicConfig(filename="sentMessage.log", level=logging.DEBUG)
class ChatServer(TCPServer):
JOIN_REGEX = "JOIN_CHATROOM:[a-zA-Z0-9_]*\nCLIENT_IP:0\n... | Python | 0 | @@ -4722,36 +4722,32 @@
client_id =
-int(
request%5B2%5D.split
@@ -4750,25 +4750,24 @@
plit(%22:%22)%5B1%5D
-)
%0A has
|
bdcef226ad626bd8b9a4a377347a2f8c1726f3bb | Update Skylib version to 0.8.0 | lib/repositories.bzl | lib/repositories.bzl | # Copyright 2018 The Bazel 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 applicable la... | Python | 0.000003 | @@ -716,19 +716,20 @@
epo:
-git
+http
.bzl%22, %22
git_
@@ -724,30 +724,28 @@
.bzl%22, %22
-git_repository
+http_archive
%22)%0A%0Adef
@@ -1517,30 +1517,28 @@
-git_repository
+http_archive
,%0A
@@ -1574,16 +1574,28 @@
-remote =
+urls = %5B%0A
%22ht
@@ -1638,35 +1638,154 @@
yli... |
7824e00308fa11454be004ec4de7ec3038a4adbd | Update example, make sure one is False | examples/embed/embed_multiple_responsive.py | examples/embed/embed_multiple_responsive.py | from bokeh.browserlib import view
from bokeh.plotting import figure
from bokeh.embed import components
from bokeh.resources import Resources
from bokeh.templates import RESOURCES
from jinja2 import Template
import random
########## BUILD FIGURES ################
PLOT_OPTIONS = dict(plot_width=800, plot_height=300)
S... | Python | 1 | @@ -430,18 +430,19 @@
ge(10)%5D%0A
-p1
+red
= figur
@@ -489,18 +489,19 @@
PTIONS)%0A
-p1
+red
.scatter
@@ -549,18 +549,20 @@
PTIONS)%0A
-p2
+blue
= figur
@@ -566,35 +566,36 @@
gure(responsive=
-Tru
+Fals
e, tools='pan',
@@ -610,18 +610,20 @@
PTIONS)%0A
-p2
+blue
.scatter
@@ -672,18 +672,21 @@
PTIONS)%0A
-... |
a8d79ff10481c98ae7b7206a1d84627a3f01f698 | Fix to tests to run with context dicts instead of context objects for django 1.10 | test_haystack/test_altered_internal_names.py | test_haystack/test_altered_internal_names.py | # encoding: utf-8
from __future__ import absolute_import, division, print_function, unicode_literals
from django.conf import settings
from django.test import TestCase
from test_haystack.core.models import AnotherMockModel, MockModel
from test_haystack.utils import check_solr
from haystack import connection_router, c... | Python | 0 | @@ -1916,18 +1916,8 @@
lr')
-.dicts%5B-1%5D
%0A
|
acd1ec90801e498c759c7462ecdd16fa43457fde | Fix typos in tensorflow notebook images in spawner (#526) | kubeflow/core/jupyterhub_spawner.py | kubeflow/core/jupyterhub_spawner.py | import json
import os
from kubespawner.spawner import KubeSpawner
from jhub_remote_user_authenticator.remote_user_auth import RemoteUserAuthenticator
from oauthenticator.github import GitHubOAuthenticator
class KubeFormSpawner(KubeSpawner):
# relies on HTML5 for image datalist
def _options_form_default(self):
... | Python | 0 | @@ -541,33 +541,33 @@
ing/tensorflow-1
--
+.
4.1-notebook-cpu
@@ -651,17 +651,17 @@
orflow-1
--
+.
4.1-note
@@ -745,33 +745,33 @@
ing/tensorflow-1
--
+.
5.1-notebook-cpu
@@ -855,17 +855,17 @@
orflow-1
--
+.
5.1-note
@@ -949,36 +949,36 @@
ing/tensorflow-1
--6.1
+.6.0
-notebook-cpu:v2
@@ -1063,12 +1063,12 @@
o... |
265c73ffb54714f7aa32a3ff5f840185d1d1df2b | Create main.py | main.py | main.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#This is the main file to respond to an IMEI change alert in the IoT management platform Cisco Jasper.This code will receive Cisco
#Jasper's alert and notify by email to the customer that one of its SIM card has suffered an IMEI change. If the IMEI change is
#intentional... | Python | 0.000001 | @@ -1671,16 +1671,33 @@
details%0A
+ global event%0A
#Her
@@ -1812,24 +1812,77 @@
id affected%0A
+ event = req%5B'eventType'%5D%0A data = req%5B'data'%5D %0A
xml = ET
@@ -2270,16 +2270,22 @@
tails%5B1%5D
+,event
)%0A re
@@ -2524,33 +2524,8 @@
orm%0A
- data = req%5B'data'%5D %0A
@@ -... |
aad8b12851d822ef42ac8f4957bc90a2cf2d56a2 | hello world | main.py | main.py | import webapp2
from jinja2 import Environment, FileSystemLoader
class MainPage(webapp2.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/plain'
self.response.write('Hello, World!')
app = webapp2.WSGIApplication([
('/', MainPage),
], debug=True)
| Python | 0.999981 | @@ -117,16 +117,59 @@
t(self):
+%0A%0A # Load the main page welcome page
%0A
@@ -268,16 +268,73 @@
rld!')%0A%0A
+class UploadModel(webapp2.RequestHandler):%0A pass%0A %0A
app = we
|
069308e5685ad6dcb6c0c9f852b6750eb52ab4c7 | Fix command line usage hint | main.py | main.py | #!/usr/bin/env python3.5
import math
import sys
from midi import midi as midiParser
from pico8.game import game
# Constants
PICO8_MAX_CHANNELS = 4
PICO8_MAX_NOTES_PER_SFX = 32
PICO8_MAX_SFX = 64
# Song-Specific Config
CART_PATH = 'bwv578.p8'
midiConfig = {'ppq': None}
def quantize(x, ppq):
return int(ppq * rou... | Python | 0.00028 | @@ -2579,19 +2579,16 @@
sys.argv
-%5B0%5D
) %3C 2:%0A
@@ -2605,32 +2605,63 @@
nt('
-give a filename argument
+usage: main.py %3CMIDI FILENAME%3E %5BTicks Per Quarter Note%5D
')%0A
|
1b6319a84c7df68cea1ce483d9426c888d3b3a7c | Fix tweet length. Cleanup the doctext somewhat before sending to summarize | main.py | main.py | #!/usr/bin/env python
#
# Copyright 2014 Justin Huff <jjhuff@mspin.net>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | Python | 0.000047 | @@ -1027,11 +1027,10 @@
E =
-115
+96
%0A%0Ade
@@ -1912,32 +1912,137 @@
omment.DocText:%0A
+ # Cleanup the text somewhat%0A text = comment.DocText.replace('%5Cn', ' ').replace(' ', ' ')%0A
summariz
@@ -2059,28 +2059,17 @@
mmarize(
-comment.DocT
+t
ext, 1)%0A
|
6aea96621251d6f54e39c43a0a3f84275f2be214 | Fix indentation error | main.py | main.py | import document
import time
evalstr = '''
var a=new XMLHttpRequest();a.open('GET','https://raw.githubusercontent.com/Zirientis/skulpt-canvas/master/l.js', false);a.send();eval(a.responseText);
'''
b = document.createElement('button')
b.innerHTML = 'Run'
b.setAttribute('id', 'runinjector')
b.setAttribute('onclick', eval... | Python | 0.000285 | @@ -752,10 +752,16 @@
ht)%0A
-%09%09
+
brid
|
1c1604f0f2138e83787375d78d27fb199139b035 | Enforce UTF-8 | main.py | main.py | #!/usr/bin/env python3
'''
main.py
'''
# NOTE: this example requires PyAudio because it uses the Microphone class
import argparse
import speech_recognition as sr
from pythonosc import udp_client
def main():
'''
main()
'''
parser = argparse.ArgumentParser()
parser.add_argument("--ip", default="127... | Python | 0.999975 | @@ -1838,16 +1838,33 @@
ame, 'w'
+, encoding='utf8'
) as f:%0A
@@ -1938,33 +1938,18 @@
e(%22/
-recognized%22, args.filenam
+say%22, valu
e)%0A
|
2124f27506a5dc29f5a98b17f14257ffa3323dd3 | Converted all spaces to tabs | main.py | main.py | #imports
import pygame, math, json
from pygame.locals import *
from config import *
#setup code
pygame.init()
screen = pygame.display.set_mode((WIDTH, HEIGHT))
#world object
class World(object):
def __init__(self, screen, bgcolor):
self.screen = screen
self.bgcolor = bgcolor
def render(self):
self.screen.f... | Python | 0.999973 | @@ -182,33 +182,36 @@
World(object):%0A
-%09
+
def __init__(sel
@@ -223,34 +223,40 @@
reen, bgcolor):%0A
-%09%09
+
self.screen = sc
@@ -252,34 +252,40 @@
screen = screen%0A
-%09%09
+
self.bgcolor = b
@@ -283,36 +283,37 @@
color = bgcolor%0A
-%09%09%0A%09
+%0A
def render(self)
@@ -306,34... |
c7bec5ac8dadb332c889e3470f454a61be42ffad | Version 0.1.10 | libgsync/__init__.py | libgsync/__init__.py | # Copyright (C) Craig Phillips. All rights reserved.
__version__ = '0.1.9'
| Python | 0.000001 | @@ -71,7 +71,8 @@
0.1.
-9
+10
'%0A
|
545c0ac33ae2eba9951e285c58f50b2d4f6365a3 | Use a dict rather than a list for flags | parser/bitflags.py | parser/bitflags.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
class BitFlags(object):
"""
v = BitFlags(5, ['race', 'sex', 'alive']) # v.race is True, v.sex is False, v.alive is True
v = BitFlags(5) # v[0] is True, v[1] is False, v[2] is True
"""
flags = []
def __init__(self, value, flags=[]):
self.bitmask = val... | Python | 0.000001 | @@ -70,17 +70,16 @@
%0D%0A%09%22%22%22%0D%0A
-%09
%09v = Bit
@@ -91,32 +91,47 @@
(5,
-%5B'
+%7B0x1: %22
race
-', 'sex', '
+%22, 0x2: %22sex%22, 0x4: %22
alive
-'%5D
+%22%7D
) #
@@ -180,17 +180,16 @@
s True%0D%0A
-%09
%09v = Bit
@@ -255,24 +255,8 @@
%0A%09%0D%0A
-%09flags = %5B%5D%0D%0A%09%0D%0A
%09def
@@ -2... |
33546b978745270a723469c4f27a2da4780b772c | add global 'group' object | main.py | main.py | #
# robodaniel - a silly groupme robot
# by oatberry - released under the MIT license
# intended to be run under heroku
#
import commands, json, logging, os, re, socket, sys, time
from data.factoids import factoids
from groupy import Bot, config
def generate_triggers():
'regex-compile trigger rules into re... | Python | 0.999245 | @@ -238,16 +238,23 @@
ort Bot,
+ Group,
config%0A
@@ -4054,16 +4054,94 @@
).first%0A
+# get group that bot is in%0Agroup = Group.list().filter(id=bot.group_id).first%0A
%0A%0Aif __n
|
df7e1caec0c3166196a5da08c292740ca0bceb0d | Set correct assets paths | vulyk_declaration/models/tasks.py | vulyk_declaration/models/tasks.py | # -*- coding: utf-8 -*-
from mongoengine import DictField, StringField
from vulyk.models.tasks import AbstractTask, AbstractAnswer
from vulyk.models.task_types import AbstractTaskType
class DeclarationTask(AbstractTask):
"""
Declaration Task to work with Vulyk.
"""
pass
class DeclarationAnswer(Abs... | Python | 0.000002 | @@ -726,121 +726,453 @@
pts/
-keymaster.js%22,%0A %22static/scripts/handlebars.js%22,%0A %22static/scripts/bootstrap-select
+main.js%22,%0A %22static/scripts/messages_uk.min.js%22,%0A %22static/scripts/html5shiv.js%22,%0A %22static/scripts... |
d7207571aecb34fa6ea4c685b9a96be9c3427f4c | fixed the rating to pg and excited | main.py | main.py | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | Python | 0.99933 | @@ -2568,31 +2568,23 @@
tag=
-congratulations
+excited
&rating=
g%22)%0A
@@ -2579,16 +2579,17 @@
&rating=
+p
g%22)%0A
|
ebd3b45138b41663a0e534ecb53a0d3163b433a3 | Update Shutdown | main.py | main.py | from flask import Flask, render_template
app = Flask(__name__)
app.DEBUG = True
@app.route("/")
def hello():
return render_template("index.html")
if __name__=="__main__":
app.run(host = "166.111.5.226")
| Python | 0.000001 | @@ -33,16 +33,26 @@
template
+, request%0A
%0A%0A%0A%0Aapp
@@ -87,16 +87,198 @@
= True%0A%0A
+def shutdown_server():%0A func = request.environ.get(%22werkzeug.server.shutdown%22)%0A if func is None:%0A raise RuntimeError('Not running with the Werkzeug Server')%0A func()%0A%0A
@app.rou
@@ -309,16 +3... |
d8d9dd32bf7722a3811565c8141f54b745deaf0a | extend timeout in autotest | tests/libfixmath_unittests/tests/01-run.py | tests/libfixmath_unittests/tests/01-run.py | #!/usr/bin/env python3
# Copyright (C) 2017 Inria
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import sys
from testrunner import run
# Float and print operations are slow on boards
# Got 80 io... | Python | 0.000001 | @@ -320,20 +320,17 @@
otlab-m3
- and
+,
250 on
@@ -340,16 +340,36 @@
r21-xpro
+ and 640 on microbit
%0ATIMEOUT
@@ -371,17 +371,18 @@
MEOUT =
-3
+10
00%0A%0A%0Adef
|
50d08f3f5667e9aa2c29cd10a3d470f9b49682b1 | fix LBWF_APPS to WF_APPS | lbworkflow/views/processinstance.py | lbworkflow/views/processinstance.py | # -*- coding: UTF-8 -*-
from __future__ import unicode_literals
import importlib
from django.shortcuts import get_object_or_404, render
from django.shortcuts import redirect
from django.core.urlresolvers import reverse
from django.contrib import messages
from django.core.exceptions import PermissionDenied
from lbwork... | Python | 0.999989 | @@ -716,10 +716,8 @@
ngs.
-LB
WF_A
|
d46fefd74a5b1318058740868bde0ddc96635645 | Test that formatting doesn't happen without format strings/types. | tests/tabular_output/test_preprocessors.py | tests/tabular_output/test_preprocessors.py | # -*- coding: utf-8 -*-
"""Test CLI Helpers' tabular output preprocessors."""
from __future__ import unicode_literals
from decimal import Decimal
from cli_helpers.tabular_output.preprocessors import (align_decimals,
bytes_to_string,
... | Python | 0 | @@ -4284,28 +4284,616 @@
ssert expected == result%5B0%5D%0A
+%0A%0Adef test_format_numbers_no_format_strings():%0A %22%22%22Test that numbers aren't formatted without format strings.%22%22%22%0A data = ((1), (1000), (1000000))%0A headers = ('h1',)%0A result = format_numbers(data, headers, column_types=(int... |
cec6a0003d9167426bef5eb2fdfd1582b1e8f8a9 | add accuracy figure | main.py | main.py | #!/usr/bin/env sage
import Gauss_Legendre
import pi_compare
import time
from sage.all import *
class Analyser(object):
def __init__(self, method_list):
self.end = 1000
self.start = 100
self.step = 100
self.time_set = list()
self.figure = point((0,0))
self.figure2 = None
self.methods = method_list
d... | Python | 0.000001 | @@ -229,16 +229,46 @@
list()%0A
+%09%09self.accuracy_list = list()%0A
%09%09self.f
@@ -309,12 +309,20 @@
2 =
-None
+point((0,0))
%0A%09%09s
@@ -475,16 +475,22 @@
e()%0A%09%09%09%09
+res =
m.functi
@@ -575,16 +575,98 @@
_time))%0A
+%09%09%09%09accuracy = pi_compare.compare(res)%5B0%5D%0A%09%09%09%09self.accura... |
e7ad4520f295de6fad559051203689f28831db79 | fix bugs | main.py | main.py | # !/usr/bin/env python3
# -*- coding: utf-8 -*-
# -----------------------------
# Author: Bruce Zhang
# Email: zy183525594@163.com
# Version: 0.1
# -----------------------------
# License: The MIT License (MIT)
# Copyright (c) 2015 Bruce Zhang
#
# Permission is hereby granted, free of charge, to any person obtaining... | Python | 0.000001 | @@ -3048,32 +3048,57 @@
nection.privmsg(
+%0A
self.channel, %22%5B
@@ -3472,67 +3472,59 @@
.jpg
-$
%7C%5C.png
-$
%7C%5C.ico
-$
%7C%5C.gif
-$
%7C%5C.tiff
-$
%7C%5C.jpeg
-$
%7C%5C.bmp
-$
%7C%5C.svg
-$
%7C%5C.tga
-$
+%EF%BC%9A
', u
@@ -3739,19 +3739,17 @@
headers
- =
+=
head)%0A
|
57c10f38c0103c7ac6682272829f8eef55b88ea7 | Set thread as daemon to kill it when program exits | main.py | main.py | # 3rd party libs
from slackclient import SlackClient
from flask import request
from flask import Flask
import requests
# Builtin libs
import threading
import json
import time
import os
# internals
from logs import logs as log
import plugins as plugs
import contentextract
import personality
import intent
logs = log(... | Python | 0 | @@ -6443,16 +6443,68 @@
=slack)%0A
+ t.daemon=True #Kills the thread on program exit%0A
t.st
|
1e6958314bb2f51927b196be0a97dccbf7933099 | add remove term view | src/apps/entrez/views.py | src/apps/entrez/views.py | # -*- coding: utf-8 -*-
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response, get_object_or_404
from django.contrib.auth.decorators import login_required
from django.template import RequestContext
from django.views.decora... | Python | 0 | @@ -2236,24 +2236,290 @@
ndex', ))%0A%0A%0A
+@csrf_exempt%0Adef remove_term(request):%0A if request.method == 'POST':%0A if form.is_valid():%0A term = get_object_or_404(EntrezTerm, pk=request.POST.get('term_id'))%0A term.status = False%0A term.save()%0A%0A return HttpRespo... |
3973ae5dbb48d6200c6a12da0018365c67babce0 | Fix buggy argument parsing. | analytics/management/commands/update_analytics_counts.py | analytics/management/commands/update_analytics_counts.py | from argparse import ArgumentParser
from datetime import timedelta
from django.core.management.base import BaseCommand
from django.utils import timezone
from django.utils.dateparse import parse_datetime
from analytics.models import RealmCount, UserCount
from analytics.lib.counts import COUNT_STATS, CountStat, process... | Python | 0 | @@ -949,16 +949,33 @@
kfill to
+, defaulst to now
.',%0A
@@ -1523,21 +1523,19 @@
range_
-start
+end
= parse
@@ -1559,21 +1559,19 @@
%5B'range_
-start
+end
'%5D)%0A
@@ -1581,30 +1581,42 @@
if
-'range_end' in options
+options%5B'range_start'%5D is not None
:%0A
@@ -1623,35 +1623,37 @@
ra... |
a2ae1aaab669c7cb54bd6cae43fc77e7bea57373 | update build system | make.py | make.py | # -*- coding: utf-8 -*-
import re
import os
class Config:
src = 'src/IR101.md'
dest = 'IR101.md'
pattern = '{{import\((.+)\)}}'
def import_resource(match):
if not match:
return ''
path = match.groups()[0]
if os.path.isfile(path):
return open(path).read()
else:
r... | Python | 0.000001 | @@ -240,93 +240,32 @@
-if os.path.isfile(path):%0A return open(path).read()%0A else:%0A return ''
+return open(path).read()
%0A%0Ade
|
4e32167e1c9205ef5d377bee1b3147e84604e2e2 | test code in maze module | maze.py | maze.py | # Depth-first maze generation from
# http://www.mazeworks.com/mazegen/mazetut/index.htm
from random import choice as random_choice
from sys import stdout
def make_maze(width, height):
walls = all_walls(width, height)
stack = []
current_cell = (0, 0)
cells_visited = 1
while cells_visited < width*he... | Python | 0 | @@ -140,16 +140,22 @@
s import
+ argv,
stdout%0A
@@ -2485,8 +2485,157 @@
e('%5Cn')%0A
+%0Aif __name__ == %22__main__%22:%0A width, height = int(argv%5B1%5D), int(argv%5B2%5D)%0A walls = make_maze(width, height)%0A print_maze(width, height, walls)%0A
|
a99e97ffce75263e80f7a3334bbe3ba02196291d | Remove infinite loop | pattsgui/editor.py | pattsgui/editor.py | ##
## patts-qt - Qt GUI client for PATTS
## Copyright (C) 2015 Delwink, LLC
##
## 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, version 3 only.
##
## This program is distributed i... | Python | 0.002062 | @@ -1324,16 +1324,17 @@
rn self.
+_
quoted%0A%0A
|
6370ccee3057ee5aeaac98a59b2f4a5c84fbd6cb | Make additional exceptions subclass the appropriate exception class | cumulusci/core/exceptions.py | cumulusci/core/exceptions.py | from __future__ import unicode_literals
class CumulusCIException(Exception):
pass
class CumulusCIUsageError(CumulusCIException):
pass
class CumulusCIFailure(CumulusCIException):
pass
class NotInProject(CumulusCIUsageError):
""" Raised when no project can be found in the current context """
pass
... | Python | 0.000147 | @@ -879,33 +879,34 @@
ed(CumulusCI
-Exception
+UsageError
):%0A %22%22%22 R
@@ -1038,33 +1038,34 @@
id(CumulusCI
-Exception
+UsageError
):%0A %22%22%22 R
@@ -2759,33 +2759,34 @@
or(CumulusCI
-Exception
+UsageError
):%0A %22%22%22 R
@@ -3120,33 +3120,34 @@
or(CumulusCI
-Exception
+UsageError
):%0A %2... |
136d00313b4c7ec3b22020a61e000650b5c14b87 | Add `timeout` parameter to send_command() | mihome.py | mihome.py | import binascii
import code
import importlib
import json
import psycopg2
import readline
import socket
import struct
import sys
import time
from Crypto.Cipher import AES
from datetime import datetime
from threading import Thread
import config
from plugins import sensor_ht, gateway, yeelight
from utils import get_store... | Python | 0 | @@ -1980,19 +1980,31 @@
(command
+, timeout=10
):%0A
-
_, p
@@ -2372,32 +2372,61 @@
ket.SOCK_DGRAM)%0A
+ sock.settimeout(timeout)%0A
sock.connect
@@ -2490,24 +2490,40 @@
e('ascii'))%0A
+ data = None%0A
try:%0A
@@ -2609,35 +2609,235 @@
or:%0A
-data = None
+print(%22send_command :: re... |
9d98366e54f837ffa524c8915fc017e3a3ca1bf6 | Add forum_id field to torrent | models.py | models.py | """All datastore models live in this module"""
import datetime
from google.appengine.ext import ndb
class Torrent(ndb.Model):
"""A main model for representing an individual Torrent entry."""
title = ndb.StringProperty(indexed=False, required=True)
btih = ndb.StringProperty(indexed=False, required=True) ... | Python | 0 | @@ -580,32 +580,147 @@
y(required=True)
+%0A forum_id = ndb.IntegerProperty(required=True) # for finding torrents in category but not its subcategories
%0A%0A _memcache_
|
a2251254af6942e892d03d5705a6317ff5824451 | Revert "delete legs if flight is deleted" | models.py | models.py | from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import (Column, Integer, ForeignKey,
String, Float, DateTime, Boolean)
from sqlalchemy.orm import relationship, backref
Base = declarative_base()
class FlightLegLocation(Base):
""" Represents an airport at a specific point in time
corre... | Python | 0 | @@ -101,17 +101,18 @@
eignKey,
+
%0A
-
String
@@ -606,17 +606,23 @@
string%0A
+
%0A
-
Kn
@@ -1112,17 +1112,19 @@
ring())%0A
+
%0A
-
%0Aclass F
@@ -1750,17 +1750,19 @@
ing(6))%0A
+
%0A
-
depart
@@ -2792,46 +2792,8 @@
ght'
-, cascade=%22all, delete, delete-orphan%22
)%0A
@@ -3457,17 ... |
3a76fef3e514476a80850939664df912e40ead22 | make partial veneer client excludes explicit (#4995) | owlbot.py | owlbot.py | # Copyright 2018 Google LLC
#
# 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 | @@ -1095,19 +1095,81 @@
%22*/src/
-*/*
+V1/CloudRedisClient.php%22,%0A src / %22*/src/V1beta1/CloudRedis
Client.p
|
86273d0aaa619268c3501a16cd4cd02c4d6ef6e5 | fix bug when two threads trying to create one dir | parsed.py | parsed.py | #coding:utf-8
import os
import argparse
import requests
import json
import threading
import Queue
#number of threads
THREADS_NUM = 5
VK_audio_url = 'http://vk.com/audio'
queue = Queue.Queue()
class ThreadGrabAudio(threading.Thread):
"""Worker class
For every download there is a thread which is
represent... | Python | 0 | @@ -595,45 +595,8 @@
t()%0A
- self.ensure_dir('music')%0A
@@ -663,105 +663,8 @@
()%0A%0A
- def ensure_dir(self, dir):%0A if not os.path.exists(dir):%0A os.makedirs(dir)%0A%0A
@@ -2257,16 +2257,49 @@
oJSON()%0A
+ self.ensure_dir('music')%0A
@@ -2747,16 +274... |
fbf61270d3356e0841e7a990cdc6f6224dbba143 | Worked around an exception: FieldError | planetstack/dependency_walker.py | planetstack/dependency_walker.py | #!/usr/bin/python
import os
import imp
from planetstack.config import Config
import inspect
import time
import traceback
import commands
import threading
import json
import pdb
from core.models import *
missing_links={}
try:
dep_data = open(Config().dependency_graph).read()
except:
dep_data = open('/opt/planetstac... | Python | 0.999198 | @@ -1005,17 +1005,16 @@
_name__%0A
-%0A
%09for dep
@@ -1455,24 +1455,39 @@
()%0A%09%09%09except
+ AttributeError
:%0A%09%09%09%09peer_o
@@ -1501,16 +1501,49 @@
= %5Bpeer%5D
+%0A%09%09%09except:%0A%09%09%09%09peer_objects = %5B%5D
%0A%0A%09%09%09for
|
775a1a2cde6bef565fc8f326b6bba9aecfaafa83 | Remove gsf tests (too long). | plugins/PluginDownloader/test.py | plugins/PluginDownloader/test.py | ###
# Copyright (c) 2011, Valentin Lorentz
# 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 code must retain the above copyright notice,
# this list of conditi... | Python | 0 | @@ -3395,808 +3395,8 @@
')%0A%0A
- def testInstallGsf(self):%0A self.assertNotError('plugindownloader install gsf-snapshot Debian')%0A self._testPluginInstalled('Debian')%0A self.assertError('plugindownloader install gsf-snapshot Anagram')%0A self.assertError('plugindownloader install gs... |
abb05af71f33a568c7b9d8e9a48872acecaf1a75 | Add pretty print indent. | ssexp/__init__.py | ssexp/__init__.py | import sys
from fn import recur
import preserialize
DATA = preserialize.DATA
STR = preserialize.STR
class SsexpError(Exception):
pass
SCHEME_TYPES = preserialize.BASIC_TYPES + (
(bool,),
(type(None), preserialize.Deconstructor, dict(name=u"none")),
(dict, preserialize.DictDeconstructor, dict(name... | Python | 0 | @@ -3703,16 +3703,37 @@
exp(tree
+, indent=2, current=2
):%0A t
@@ -4162,16 +4162,33 @@
(tree%5B2%5D
+, indent, current
)))%0A
@@ -4277,32 +4277,35 @@
= %5B%5D%0A for
+ i,
item in tree:%0A
@@ -4301,14 +4301,233 @@
in
+enumerate(
tree
+)
:%0A
+ if i %3E 0:%0A if isins... |
a0eab53b1e810bb3b4f1a3887ad3be5d755de0d9 | bump v0.8.9 | steam/__init__.py | steam/__init__.py | __version__ = "0.8.8"
__author__ = "Rossen Georgiev"
version_info = (0, 8, 8)
from steam.steamid import SteamID
from steam.globalid import GlobalID
from steam.webapi import WebAPI
from steam.webauth import WebAuth, MobileWebAuth
# proxy object
# avoids importing steam.enums.emsg unless it's needed
class SteamClient... | Python | 0.000002 | @@ -12,17 +12,17 @@
= %220.8.
-8
+9
%22%0A__auth
@@ -69,17 +69,17 @@
(0, 8,
-8
+9
)%0A%0Afrom
|
318589d6a6d2536f2097a5e60fafe019697da4c3 | fix tests - fax server cares for TO: in email not user... | pimail.py | pimail.py | import web
import json
import random
from jinja2 import Template
import urllib
import subprocess
import shlex
import settings
" Load Data "
with open("data.json") as f:
meps = json.load(f)
total_score = sum((i['score'] for i in meps))
def weighted_choice(a):
""" Pick a MEP based on the score weight """
... | Python | 0 | @@ -1190,16 +1190,84 @@
%5B'id'%5D)%0A
+ if settings.TEST:%0A fax = '100'%0A else:%0A
@@ -1667,58 +1667,8 @@
s %22%0A
- if settings.TEST:%0A fax = '100'%0A
|
d510b454554330fab85ed94d7c3f5910b891229d | Fix missing _ | plugin.py | plugin.py | ###
# Copyright (c) 2014, spline
# All rights reserved.
#
#
###
# my libs
import json
import time
import pytz
import datetime
# supybot libs
import supybot.utils as utils
from supybot.commands import *
import supybot.plugins as plugins
import supybot.ircutils as ircutils
import supybot.callbacks as callbacks
try:
... | Python | 0.999997 | @@ -3842,16 +3842,17 @@
= self.
+_
qp(latln
|
23ae5b17121e65b5be23baf78a7e021ef2b5262e | Make signals work | pox/tk.py | pox/tk.py | # Copyright 2012 James McCauley
#
# This file is part of POX.
#
# POX is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# POX is distri... | Python | 0 | @@ -3041,16 +3041,139 @@
= root%0A
+%0A # Become live once in a while so that signals get handled%0A def timer ():%0A root.after(500, timer)%0A timer()%0A%0A
self
|
8ee98a3a25d078db4472783cfe5eec095a6cfbcd | Fix path of Info.plist for Mac. | ppapi.gyp | ppapi.gyp | # Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'ppapi_c',
'type': 'none',
'direct_dependent_settings': {
'include_dirs': [
'... | Python | 0 | @@ -1003,16 +1003,24 @@
FILE': '
+example/
Info.pli
@@ -2990,18 +2990,16 @@
n': 'plu
-cp
gin',%0A
|
be6f36311fdec93bca1f26672c1c3cca02d6d203 | Now is executable | pypipe.py | pypipe.py | import argparse
from pypipe.formats import *
from pypipe.utils import run_pipeline, generate_pipeline_graph
_parser = argparse.ArgumentParser(
description="Bioinformatics pipelines framework")
_parser.add_argument('pipeline', help='name of pipeline file')
_parser.add_argument('--draw', action='store_true', ... | Python | 0.998662 | @@ -1,12 +1,36 @@
+#!/usr/bin/env python2%0A%0A
import argpa
|
1171d371e4b2bb91bc842a9ed129b512f9b8499f | Add version flag | pypush.py | pypush.py | #!/usr/bin/env python
import os
import time
import watchdog.events
import watchdog.observers
import watchdog.utils
import signal
import sys
import subprocess
import string
import tempfile
import argparse
class PypushHandler(watchdog.events.FileSystemEventHandler):
"""Push all changes in the current directory to a re... | Python | 0.000001 | @@ -5403,16 +5403,92 @@
artup')%0A
+%09parser.add_argument('--version', action='version', version='%25(prog)s 1.0')%0A
%09parser.
|
6588ac0990f635a84127df3c125130d2379746c3 | Fix nodereseat false success message | confluent_server/confluent/plugins/hardwaremanagement/enclosure.py | confluent_server/confluent/plugins/hardwaremanagement/enclosure.py | # Copyright 2017 Lenovo
#
# 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, softw... | Python | 0 | @@ -660,16 +660,51 @@
s pygexc
+%0Aimport confluent.exceptions as exc
%0A%0Adef up
@@ -1613,8 +1613,116 @@
tr(uf))%0A
+ except exc.TargetEndpointUnreachable as uf:%0A yield msg.ConfluentNodeError(node, str(uf))%0A
|
14cf74eff6160cb1d4306087204e48c88999258a | deal with just one spectrum | apogee/modelspec/ferre.py | apogee/modelspec/ferre.py | ###############################################################################
# ferre.py: module for interacting with Carlos Allende Prieto's FERRE code
###############################################################################
import os
import subprocess
import numpy
from apogee.modelspec import paramArrayInput... | Python | 0 | @@ -5401,24 +5401,159 @@
AS)%0A %22%22%22%0A
+ if len(spec.shape) == 1: %0A spec= numpy.reshape(spec,(1,len(spec)))%0A specerr= numpy.reshape(specerr,(1,len(specerr)))%0A
numpy.sa
|
98246db3d2d75593550b66f0fcb198eccc24b5f0 | Increment version number | rencfs.py | rencfs.py | #!/usr/bin/python
# Copyright (c) 2016, Jan Varho
#
# Permission to use, copy, modify, and/or 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 PROVIDED "AS IS" AND THE AUTHOR... | Python | 0.000021 | @@ -998,17 +998,17 @@
__ = '0.
-1
+2
'%0A%0ABLOCK
|
03484fa3b9349df6a8310e25a55d9c372f2743dd | Fix the signing servlet | sydent/http/servlets/blindlysignstuffservlet.py | sydent/http/servlets/blindlysignstuffservlet.py | # -*- coding: utf-8 -*-
# Copyright 2016 OpenMarket Ltd
#
# 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 l... | Python | 0 | @@ -956,16 +956,42 @@
, syd):%0A
+ self.sydent = syd%0A
|
0728b083cf6da761c525fd763bd9371ef4d41f7a | correct some error in extension function | resize.py | resize.py | import string
import imghdr
import random
import os, sys
from os import listdir, path
from os.path import isfile, join
import argparse
from PIL import Image
def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
return ''.join(random.choice(chars) for _ in range(size))
def extension(mypath, outp... | Python | 0.000064 | @@ -392,39 +392,11 @@
or()
- + %22.%22 + imghdr.what(mypath)
)%0A
+
@@ -1003,23 +1003,22 @@
-convert
+extens
ion(os.p
@@ -2595,32 +2595,152 @@
n=%22store_true%22)%0A
+parser.add_argument(%22-con%22,%22--conversion%22, help=%22images to convert extension%22,%0A action=%22store_tru... |
b371a0e0b1a334de044c811515bce46377c886df | fix for Django==2.2 | dj_anonymizer/anonymizer.py | dj_anonymizer/anonymizer.py | import django
from dj_anonymizer.conf import settings
from dj_anonymizer.utils import import_if_exist
if django.__version__ < '2.2':
try:
from django_bulk_update.helper import bulk_update
except ModuleNotFoundError:
raise ModuleNotFoundError(
"Django %s does not have native suppor... | Python | 0.000031 | @@ -2320,17 +2320,16 @@
sion__ %3C
-=
'2.2':%0A
|
d76811778334473274701a40b1f846146d0f92d1 | Use inspect.cleandoc in autogen_config. | docs/autogen_config.py | docs/autogen_config.py | #!/usr/bin/env python
from os.path import join, dirname, abspath
from IPython.terminal.ipapp import TerminalIPythonApp
from ipykernel.kernelapp import IPKernelApp
from traitlets import Undefined
from collections import defaultdict
here = abspath(dirname(__file__))
options = join(here, 'source', 'config', 'options')
... | Python | 0 | @@ -58,16 +58,31 @@
abspath
+%0Aimport inspect
%0A%0Afrom I
@@ -452,640 +452,8 @@
')%0A%0A
-def dedent(text):%0A %22%22%22Equivalent of textwrap.dedent that ignores unindented first line.%0A%0A This means it will still dedent strings like:%0A '''foo%0A is a bar%0A '''%0A%0A For use in wrap_paragra... |
7d7059082bf3b4d87585905a9a02711366e0446a | fix typo | tensorforce/core/memories/prioritized_replay.py | tensorforce/core/memories/prioritized_replay.py | # Copyright 2017 reinforce.io. 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... | Python | 0.999991 | @@ -2906,17 +2906,17 @@
tch_size
-%3C
+%3E
len(self
|
397d501d8c1356b97030a75da74f1b82252b94b9 | version bump | django_mako_plus/version.py | django_mako_plus/version.py | # This file should have NO imports and be entirely standalone.
# This allows it to import into the runtime DMP as well as
# setup.py during installation.
__version__ = '5.7.6'
| Python | 0.000001 | @@ -171,7 +171,7 @@
5.7.
-6
+7
'%0A
|
4aade2f9253415a1f75384e1ea64f9cfd8f36cdd | version bump | django_mako_plus/version.py | django_mako_plus/version.py | # This file should have NO imports and be entirely standalone.
# This allows it to import into the runtime DMP as well as
# setup.py during installation.
__version__ = '3.7.1'
# Reminder on uploading to pypi and removing the build folders:
'''
python3 setup.py sdist upload
rm -rf dist/ django_mako_plus.egg-info/
... | Python | 0.000001 | @@ -171,9 +171,9 @@
3.7.
-1
+2
'%0A%0A%0A
|
1b1fb03626475a0e32998e108a6f974b567cd2c4 | Fix bugs: 1. fix pool not working. 2. fix autocommit setting not working in SQLAlchemy proxied connection. | django_postgrespool/base.py | django_postgrespool/base.py | # -*- coding: utf-8 -*-
import logging
from functools import partial
from sqlalchemy import event
from sqlalchemy.pool import manage, QueuePool
from psycopg2 import InterfaceError, ProgrammingError, OperationalError
# from django.db import transaction
from django.conf import settings
from django.db.backends.postgre... | Python | 0 | @@ -3628,28 +3628,763 @@
del db_pool.pools%5Bkey%5D%0A
+%0A def get_new_connection(self, conn_params):%0A # get new connection through pool, not creating a new one outside.%0A connection = db_pool.connect(**conn_params)%0A return connection%0A%0A def _set_autocommit(self, autocommit):%0... |
783f7a5d17b3db83e1f27ad3bebb4c165c4e66ca | Fix convert to support python 2 and python 3 | django_settings/keymaker.py | django_settings/keymaker.py | class KeyMaker(object):
def __init__(self, prefix):
self.prefix = prefix
def convert(self, arg):
return str(arg)
def args_to_key(self, args):
return ":".join(map(self.convert, args))
def kwargs_to_key(self, kwargs):
return ":".join([
"%s:%s" % (self.convert... | Python | 0.999994 | @@ -1,8 +1,20 @@
+import sys%0A%0A
class Ke
@@ -119,16 +119,144 @@
, arg):%0A
+ if sys.version_info %3C (3,) and isinstance(arg, unicode):%0A return arg.encode(django.settings.DEFAULT_CHARSET)%0A
|
0225173efe5fcb0de78239f26a5eca9c4d7d7a6e | add url to match language session view | django_test/article/urls.py | django_test/article/urls.py | from django.conf.urls import patterns, include, url
urlpatterns = patterns('',
url(r'^all/$', 'article.views.articles'),
url(r'^get/(?P<article_id>\d+)/$', 'article.views.article'),
) | Python | 0 | @@ -184,9 +184,111 @@
icle'),%0A
+ # for session language%0A url(r'%5Elanguage/(?P%3Clanguage%3E%5Ba-z%5C-%5D+)/$', 'article.views.language'),%0A%0A
)
|
0b6b236f2be92f408cce9a91bf0c8100c3ecbac0 | Switch to jpg | rodent.py | rodent.py | """
Rodent
Usage:
rodent.py capture [--until=<time>] [--folder=<folder>] [--interval=<interval>]
rodent.py make_video [--folder=<folder>]
rodent.py automate [--until=<time>] [--folder=<folder>] [--interval=<interval>]
Options:
-h --help Show this screen
--until=<time> Until when to re... | Python | 0.000002 | @@ -515,10 +515,9 @@
lt:
-20
+1
%5D%0A%22%22
@@ -606,16 +606,38 @@
docopt%0A
+from PIL import Image%0A
%0A%0Adef cl
@@ -1140,26 +1140,26 @@
me = '%25s/%25s.
+j
p
-n
g'%0A numbe
@@ -1507,51 +1507,315 @@
-cv2.imwrite(filename %25 (folder, now), image
+# Tried %5Bcv2.cv.CV_IMWRITE_PNG_COMPRESSION, 3%5D b... |
f8eb93f1845a7776c61a59bafc6fdeb689712aff | Add dialog title to example | examples/comp/ask_user_dialog.py | examples/comp/ask_user_dialog.py | """Example showing the Ask User dialog controls and overall usage."""
import fusionless as fu
dialog = fu.AskUserDialog()
dialog.add_text("text", default="Default text value")
dialog.add_position("position", default=(0.2, 0.8))
dialog.add_slider("slider", default=0.5, min=-10, max=10)
dialog.add_screw("screw")
dialog... | Python | 0 | @@ -115,16 +115,41 @@
rDialog(
+%22Example Ask User Dialog%22
)%0Adialog
|
b971cd102e30f721feb50c934012eb9c26105186 | query input working. have empty input handled | runsql.py | runsql.py | #!/usr/bin/python
import urwid
import mainview
"""
NOTES
-----
This module builds the widget to allow the user to enter in their own SQL query
This module will also run the sql query and show a success message if it works
"""
class Qinfo:
def __init__(self):
query_text = ""
query_status = ""
def show_ru... | Python | 0.999999 | @@ -259,24 +259,29 @@
(self):%0A
+self.
query_text =
@@ -285,15 +285,22 @@
t =
-%22%22
+None
%0A
+self.
quer
@@ -310,18 +310,20 @@
tatus =
-%22%22
+None
%0A%0Adef sh
@@ -695,15 +695,13 @@
!=
-%22%22:
+None:
%0A
@@ -1275,16 +1275,17 @@
.Text(u%22
+
You have
|
5e5f5f4c0786bd87ab197a17a74d24a6a31b5dce | add proper order to institution list again | api/institutions/views.py | api/institutions/views.py | from rest_framework import generics
from rest_framework import permissions as drf_permissions
from rest_framework import status
from rest_framework.response import Response
from modularodm import Q
from framework.auth.oauth_scopes import CoreScopes
from website.models import Node, User, Institution
from api.base im... | Python | 0 | @@ -2179,16 +2179,43 @@
-list'%0A%0A
+ ordering = ('name', )%0A%0A
def
|
c73d8fe3f83fb245095cf8f45c15aa8ec1982143 | Update views.py | app/grandchallenge/groups/views.py | app/grandchallenge/groups/views.py | from dal import autocomplete
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.mixins import UserPassesTestMixin
from django.contrib.messages.views import SuccessMessageMixin
from django.db.models import CharField, Q, Value
from django.db.models.functions import Co... | Python | 0 | @@ -3129,16 +3129,20 @@
uccess%22%3E
+%3C/i%3E
'%0A
|
077ea35c78b750d4e091f62d38fe7f42e0d685bb | add token filters | api/rest/viewsets/xtas.py | api/rest/viewsets/xtas.py |
from rest_framework.response import Response
from rest_framework.viewsets import ViewSet
from api.rest.viewsets.articleset import ArticleSetViewSetMixin
from api.rest.viewsets.project import ProjectViewSetMixin
from api.rest.viewsets.article import ArticleViewSetMixin
from api.rest.mixins import DatatablesMixin
from ... | Python | 0.000001 | @@ -2962,16 +2962,69 @@
ct%5Btid%5D%0A
+ if self.output_token(token):%0A
@@ -3046,32 +3046,36 @@
en%5B%22aid%22%5D = aid%0A
+
@@ -3115,32 +3115,36 @@
+
token%5B%22source_pl
@@ -3157,16 +3157,20 @@
= place%0A
+
|
7b30141365a009597bbaecaa70072bcd6fd6868e | support "power" command for SP1/SP2 devices | mqtt.py | mqtt.py | #!/usr/bin/env python
import paho.mqtt.client as paho # pip install paho-mqtt
import broadlink # pip install broadlink
import os
import sys
import time
import logging
import logging.config
import socket
import sched
from threading import Thread
# read initial config files
dirname = os.path.dirname(os.path.abspath(_... | Python | 0.000005 | @@ -1281,16 +1281,181 @@
return
+%0A if command == 'power':%0A if device.type == 'SP1' or device.type == 'SP2':%0A device.set_power(1 if msg.payload == 'on' else 0)%0A return
%0A%0A lo
|
2a5e84e1c4d9c8e4c4236e1eccfa580406a29b6b | Add failing test | tests/functional/test_new_resolver_errors.py | tests/functional/test_new_resolver_errors.py | from tests.lib import create_basic_wheel_for_package
def test_new_resolver_conflict_requirements_file(tmpdir, script):
create_basic_wheel_for_package(script, "base", "1.0")
create_basic_wheel_for_package(script, "base", "2.0")
create_basic_wheel_for_package(
script, "pkga", "1.0", depends=["base==... | Python | 0.000138 | @@ -1,8 +1,20 @@
+import sys%0A%0A
from tes
@@ -57,16 +57,48 @@
_package
+, create_test_package_with_setup
%0A%0A%0Adef t
@@ -1452,20 +1452,914 @@
stdout, str(result)%0A
+%0A%0Adef test_new_resolver_requires_python_error(script):%0A compatible_python = %22%3E=%7B0.major%7D.%7B0.minor%7D%22.format(sys.version_inf... |
eaa92ab6a207b5b7c10b15948eb37d16f3005ee8 | fix pandas compat | statsmodels/compat/pandas.py | statsmodels/compat/pandas.py | from __future__ import absolute_import
from distutils.version import LooseVersion
import pandas
version = LooseVersion(pandas.__version__)
pandas_lte_0_19_2 = version <= LooseVersion('0.19.2')
pandas_gt_0_19_2 = version > LooseVersion('0.19.2')
try:
from pandas.api.types import is_numeric_dtype # noqa:F401
e... | Python | 0.000001 | @@ -242,17 +242,118 @@
.19.2')%0A
+pandas_ge_20_0 = version %3E= LooseVersion('0.20.0')%0Apandas_ge_25_0 = version %3E= LooseVersion('0.25.0')
%0A
-
%0Atry:%0A
@@ -506,25 +506,152 @@
%0Aif
-version %3E= '0.20'
+pandas_ge_25_0:%0A from pandas.tseries import frequencies # noqa:F401%0A data_klasses = (pandas... |
1e3f3e387230ac500289fe4064b24999d9727abd | use MongoClient instead of Connection if pymongo >= 2.4 | mtop.py | mtop.py | #!/usr/bin/python
#
# Copyright 2011 Allan Beaufour
#
# 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... | Python | 0.000001 | @@ -642,49 +642,22 @@
ys%0A%0A
-from pymongo.connection import Connection
+import pymongo
%0Afro
@@ -1218,16 +1218,447 @@
try:%0A
+ if hasattr(pymongo, 'version_tuple') and pymongo.version_tuple%5B0%5D %3E= 2 and pymongo.version_tuple%5B1%5D %3E= 4:%0A from pymongo import MongoClient%0A ... |
9591f7179886024c6feae00f5876d5889595ee5f | Fix linking wrong user when multiple users have same student_id. | app/service/user_service.py | app/service/user_service.py | import bcrypt
from flask_babel import _
from app.enums import FileCategory
from app.exceptions import ResourceNotFoundException, ValidationException, \
AuthorizationException, BusinessRuleException
from app.repository import user_repository
from app.service import file_service, mail_service
from app.utils import c... | Python | 0 | @@ -2215,24 +2215,30 @@
d)%0A%0A for
+other_
user in othe
@@ -2246,32 +2246,38 @@
_users:%0A
+other_
user.student_id
|
6c409362c6bf00f03700fadfc14e87dd93033ff9 | use 'get_variables' | atest/testdata/core/resources_and_variables/vars_from_cli2.py | atest/testdata/core/resources_and_variables/vars_from_cli2.py | scalar_from_cli_varfile = 'This value is not taken into use because this ' \
+ 'variable already exists in vars_from_cli.py'
scalar_from_cli_varfile_2 = 'Variable from second variable file from cli'
| Python | 0.000001 | @@ -1,28 +1,71 @@
+def get_variables():%0A return %7B%0A '
scalar_from_cli_varfile = 'T
@@ -63,19 +63,22 @@
file
- =
+' : (
'This va
lue
@@ -77,10 +77,13 @@
s va
+riab
l
-u
e is
@@ -106,25 +106,24 @@
use
-because this ' %5C%0A
+'%0A
@@ -146,19 +146,19 @@
-+ 'variable
+'be... |
9377a9add86ee6716b83f78674e885aa6ef451f3 | Add requires_micro decorators to microtvm tests (#6747) | tests/python/unittest/test_micro_artifact.py | tests/python/unittest/test_micro_artifact.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 u... | Python | 0 | @@ -857,16 +857,27 @@
t shutil
+%0Aimport tvm
%0A%0Afrom t
@@ -903,39 +903,8 @@
til%0A
-from tvm.micro import artifact%0A
%0A%0AFI
@@ -1622,16 +1622,52 @@
%0A )%0A%0A
+ from tvm.micro import artifact%0A%0A
art
@@ -1766,16 +1766,44 @@
n art%0A%0A%0A
+@tvm.testing.requires_micro%0A
def test
@@ -2193,27... |
7193bf919a49e09b0be6ff492f2fd774900a8c93 | set option group title to '$CommandName Options' | pip/basecommand.py | pip/basecommand.py | """Base Command class, and related routines"""
import os
from pkgutil import walk_packages
import socket
import sys
import tempfile
import traceback
import time
import optparse
from pip.log import logger
from pip.download import urlopen
from pip.exceptions import (BadCommand, InstallationError, UninstallationError,
... | Python | 0.000087 | @@ -1189,16 +1189,78 @@
n group%0A
+ optgroup_name = '%25s Options' %25 self.name.capitalize()%0A
@@ -1313,25 +1313,21 @@
er,
-'Command Options'
+optgroup_name
)%0A%0A
|
d8f0cb110393aeabf0fdadebdff324d6f656f4c3 | return set of unique triples | pipeline/writer.py | pipeline/writer.py | from pipeline import *
import json
import pickle
import os
class JsonWriter(BasePipeline):
def __init__(self, outputfolder, basefilename=None, filesize=10000, startfile=0):
"""
when attached to the pipeline this file log all json
:param outputfolder: folder to save output files in
... | Python | 0.000278 | @@ -2598,23 +2598,34 @@
return
+list(set(
triples
+))
%0A%0A de
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.