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 |
|---|---|---|---|---|---|---|---|
be1b5cf4804888bab2314692120929da3ff5b9e8 | Handle empty PackagePushErrors | cumulusci/tasks/push/pushfails.py | cumulusci/tasks/push/pushfails.py | """ simple task(s) for reporting on push upgrade jobs.
this doesn't use the nearby push_api module, and was just a quick ccistyle
get the job done kinda moment.
"""
import re
import unicodecsv
from cumulusci.core.utils import process_list_arg
from cumulusci.tasks.salesforce import BaseSalesforceApiTask
class Report... | Python | 0.000005 | @@ -2701,16 +2701,17 @@
rrors =
+(
record.p
@@ -2733,16 +2733,25 @@
Errors%22,
+ None) or
%7B%7D).get
|
4751608cf77fc9a35d2df4c42a91b6fc38a2a963 | Make seen plugin understand actions | plugins/seen/plugin.py | plugins/seen/plugin.py | from datetime import datetime, timezone
from cardinal.decorators import command, help, event
from cardinal.util import formatting as F
PRIVMSG = 'PRIVMSG' # [channel, message]
NOTICE = 'NOTICE' # [channel, message]
NICK = 'NICK' # [new_nick]
MODE = 'MODE' # [channel, mode]
TOPIC = 'TOPIC' # [channel, topic]
JOIN... | Python | 0 | @@ -439,16 +439,389 @@
mp(0)%0A%0A%0A
+def is_action(message):%0A return message.startswith(%22%5Cx01ACTION%22)%0A%0A%0Adef parse_action(nick, message):%0A if not is_action(message):%0A raise ValueError(%22This message is not an ACTION message%22)%0A%0A message = message%5Blen(%22%5Cx01ACTION%22):%5D%0... |
1628ad872ca07e225dc7e923b7824cb2b0835b20 | Make it possible to use detect_assertions.py with arbitrary log files. (Still works as a module for af_timed_run as well.) | dom/automation/detect_assertions.py | dom/automation/detect_assertions.py | #!/usr/bin/env python
# Recognizes NS_ASSERTIONs based on condition, text, and filename (ignoring irrelevant parts of the path)
# Recognizes JS_ASSERT based on condition only :(
import os
def amiss(logPrefix):
global ignoreList
foundSomething = False
currentFile = file(logPrefix + "-err", "r")
... | Python | 0 | @@ -186,29 +186,34 @@
t os
-%0A%0Adef amiss(logPrefix
+, sys%0A%0A%0Adef fs(currentFile
):%0A
@@ -229,24 +229,25 @@
ignoreList%0A
+%0A
foundSom
@@ -266,61 +266,8 @@
se%0A%0A
- currentFile = file(logPrefix + %22-err%22, %22r%22)%0A %0A
@@ -1876,8 +1876,242 @@
eList))%0A
+%0A# For use by af_timed_... |
2314b49f5451d3bcb07d5b432ffe5d1dca2583e3 | Add unit test to call function with a proper arguments | tests/unit/states/test_module.py | tests/unit/states/test_module.py | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Nicole Thomas (nicole@saltstack.com)`
'''
# Import Python Libs
from __future__ import absolute_import
from inspect import ArgSpec
# Import Salt Libs
from salt.states import module
# Import Salt Testing Libs
from tests.support.unit import skipIf, TestCase
from test... | Python | 0.000001 | @@ -2125,16 +2125,393 @@
t(CMD)%0A%0A
+ def test_xrun_correct_arg(self):%0A '''%0A Tests the return of module.xrun state when arguments are correct%0A :return:%0A '''%0A with patch.dict(module.__salt__, %7BCMD: _mocked_func_named%7D):%0A ret = module.xrun(**%7BCMD: %5B%... |
d2c9a90c1697fc04a9e4b6b8c7b114a743797620 | Raise an exception if BASE_DOMAIN is not defined | subdomains/utils.py | subdomains/utils.py | import functools
try:
from urlparse import urlunparse
except ImportError:
from urllib.parse import urlunparse
from django.conf import settings
from django.core.urlresolvers import reverse as simple_reverse
def current_site_domain():
domain = getattr(settings, 'BASE_DOMAIN', False)
prefix = 'www.'
... | Python | 0.00002 | @@ -281,23 +281,16 @@
_DOMAIN'
-, False
)%0A%0A p
|
0e2059c4b8c975b6cfdc2197d2e35808db967980 | Build a hand-crafted response object by calling instead of a simple redirect | WS/Sklearn2SQL_Heroku.py | WS/Sklearn2SQL_Heroku.py |
from __future__ import absolute_import
from flask import Flask, redirect #import objects from the Flask model
import os, platform
app = Flask(__name__)
sklearn2sql_uri = os.environ.get("SKLEARN2SQL_URI", "http://c:1888")
@app.route('/', methods=['GET'])
def test():
return redirect(sklearn2sql_uri, code=307)
@a... | Python | 0.000038 | @@ -67,16 +67,25 @@
redirect
+, request
#import
@@ -133,16 +133,38 @@
platform
+%0Aimport requests, json
%0A%0Aapp =
@@ -249,16 +249,379 @@
1888%22)%0A%0A
+%0Adef get_post_response(request1):%0A # request1 = request%0A print(request1.json)%0A r = requests.post(sklearn2sql_uri + %22/model%22, json=reques... |
cd660350f82ff38b6d566b6f1c8198695e7e63de | Add more initial data | SatNOGS/base/management/commands/initialize.py | SatNOGS/base/management/commands/initialize.py | from orbit import satellite
from django.core.management.base import BaseCommand
from base.tests import ObservationFactory, StationFactory
from base.models import Satellite
class Command(BaseCommand):
help = 'Create initial fixtures'
def handle(self, *args, **options):
ObservationFactory.create_batc... | Python | 0.000001 | @@ -317,16 +317,17 @@
batch(20
+0
)%0A
@@ -358,16 +358,17 @@
batch(20
+0
)%0A%0A
@@ -1074,8 +1074,9 @@
j.name))
+%0A
|
a83de7bb6bb0836b754e0670c9bbe3fa4f76f4c0 | fix docstring in log method | shpkpr/cli.py | shpkpr/cli.py | # stdlib imports
import os
import sys
# third-party imports
import click
# local imports
from shpkpr.marathon import MarathonClient
from shpkpr.mesos import MesosClient
CONTEXT_SETTINGS = dict(auto_envvar_prefix='SHPKPR')
class Context(object):
def __init__(self):
self.marathon_client = None
def... | Python | 0.000002 | @@ -304,16 +304,49 @@
t = None
+%0A self.mesos_client = None
%0A%0A de
@@ -406,11 +406,11 @@
std
-err
+out
.%22%22%22
|
9ccd7a555db6382bbbed138e4d153f49ff3ff3e3 | Add checkboxes to show automatic dep resolution | shutit_srv.py | shutit_srv.py | import os
import json
from bottle import route, run, request
import shutit_main
import shutit_global
config_dict = None
orig_mod_config_dict = {}
shutit_map = None
def start_shutit():
global config_dict
global orig_mod_config_dict
global shutit_map
config_dict = shutit_global.config_dict
shutit_map = shutit_ma... | Python | 0 | @@ -14,16 +14,28 @@
ort json
+%0Aimport copy
%0A%0Afrom b
@@ -1525,17 +1525,17 @@
hildren%5B
-0
+1
%5D.textCo
@@ -1672,16 +1672,148 @@
('li');%0A
+%09var checkbox = document.createElement('input');%0A%09checkbox.type = 'checkbox';%0A%09checkbox.addEventListener('change', changelistener);%0A
%09var des
@@ -1871,16... |
a4263c3d4156d8b419103e23cdd176b50b737e02 | Change "--no-patch" to "-s", which has the same behavior | slave/skia_slave_scripts/run_bench.py | slave/skia_slave_scripts/run_bench.py | #!/usr/bin/env python
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Run the Skia benchmarking executable. """
from build_step import BuildStep
from utils import shell_utils
import os
import re
i... | Python | 0.00004 | @@ -727,17 +727,9 @@
, '-
--no-patch
+s
', c
|
43a1d565db5cffde4dd9d11f1b80ae9918d1e2ff | version bump | taca_ngi_pipeline/__init__.py | taca_ngi_pipeline/__init__.py | """ Main taca_ngi_pipeline module
"""
__version__ = '0.7.0'
| Python | 0.000001 | @@ -51,11 +51,11 @@
= '0.7.
-0
+1
'%0A
|
23964bb3bb9b4d850bc60708eab82d1636cde9c8 | make pretty | soccer/gameplay/positions/position.py | soccer/gameplay/positions/position.py | import robocup
import single_robot_composite_behavior
import enum
import typing
## Parent class of any position
# Deals with relative positions as well
# as the generic pass options
class Position(single_robot_composite_behavior.SingleRobotCompositeBehavior):
class Type(enum.Enum):
Striker = 0
Mid... | Python | 0.000004 | @@ -620,16 +620,17 @@
ons = %5B%5D
+
# type:
@@ -1875,16 +1875,18 @@
s(self):
+
# -%3E typ
@@ -2001,16 +2001,17 @@
ptions):
+
#: typi
|
d6fa685f0df760a10e90e7adce5f35bcaf167c2b | fix wh97 | evolib/stats/PopGenStats.py | evolib/stats/PopGenStats.py | import math
from scipy import misc
def Dxy(xa, xb, ya, yb):
d = (xa * yb) + (xb * ya)
n12 = (xa + xb) * (ya + yb)
if d == 0:
dxy = 0.0
else:
dxy = d / float(n12)
return dxy
def WattersonsTheta(n, s):
if s == 0:
tw = 0.0
else:
a1 = sum(1.0 / i for... | Python | 0.000004 | @@ -1616,24 +1616,25 @@
or index in
+x
range(nsites
@@ -1751,20 +1751,31 @@
1 =
-'0' in
+sum(site1) %3C len(
site1
+)
%0A
@@ -1791,20 +1791,32 @@
2 =
-'0' in
+sum(site2) %3C len(
site2
+)%0A
%0A
@@ -1831,20 +1831,22 @@
1 =
-'1' in site1
+sum(site1) %3E 0
%0A
@@ -1861,20 +1861,22 @@
2 =
-'1' i... |
d5d359c5ec0f1735e97355839f1a12c6ea45c460 | Add add_remote to pygit2 implementation | polygamy/pygit2_git.py | polygamy/pygit2_git.py | from __future__ import absolute_import
import pygit2
from .base_git import NoSuchRemote
from .plain_git import PlainGit
class Pygit2Git(PlainGit):
@staticmethod
def is_on_branch(path):
repo = pygit2.Repository(path)
return not (repo.head_is_detached or repo.head_is_unborn)
@staticmetho... | Python | 0 | @@ -573,8 +573,169 @@
ote.url%0A
+%0A @staticmethod%0A def add_remote(path, remote_name, remote_url):%0A repo = pygit2.Repository(path)%0A repo.create_remote(remote_name, remote_url)%0A
|
77ed1eb11759b9d7e4239d0bd2be7d2ed2d9df8a | disable example apps testing | example/example/settings.py | example/example/settings.py | """
Django settings for example project.
Generated by 'django-admin startproject' using Django 1.9.6.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
#... | Python | 0.000001 | @@ -1316,16 +1316,17 @@
3',%0A
+#
'blog',%0A
@@ -1342,16 +1342,17 @@
s',%0A
+#
'polls'%0A
|
c8c29109b4f44bf1b251c67b208c3cf7a6269692 | Improve error handling/detection. | docker_status.py | docker_status.py | from flask import Flask
from multiprocessing import Process, Value
from time import sleep
import datetime
import os
import re
import urllib2
import sys
OK_STATUSES = [ 200, 301, 302 ]
HTTP_TIMEOUT = os.environ.get('HTTP_TIMEOUT', 30)
TEST_INTERVAL = os.environ.get('TEST_INTERVAL', 30)
DEBUG = os.environ.get('DEBUG', ... | Python | 0 | @@ -145,16 +145,33 @@
port sys
+%0Aimport traceback
%0A%0AOK_STA
@@ -489,16 +489,254 @@
s = %7B%7D%0A%0A
+class NoRedirectHTTPErrorProcessor(urllib2.HTTPErrorProcessor):%0A def http_response(self, request, response):%0A return response%0A%0A https_response = http_response%0A%0Aurl_opener = urllib2.build... |
91672fc5ec76790ac14e1af226a9340d5793fa7a | Remove preferences directory stuff | python3.py | python3.py | #!/usr/bin/env python3
import warnings
with warnings.catch_warnings():
import re
import sys
import argparse
import os
import logging
import logging.config
import json
from pathlib import Path
script_dir=Path(__file__).parent.absolute()
def get_logger():
return logging.getLogger(__... | Python | 0 | @@ -786,428 +786,8 @@
)%0A%0A%0A
-def create_preferences_directory():%0A if os.name != %22posix%22:%0A from win32com.shell import shellcon, shell%0A homedir = %22%7B%7D%5C%5C%22.format(shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0))%0A else:%0A homedir = %22%7B%7D/%22.format(os.path.... |
0498b2196a866ec4b4536ee90d758a1330e6ca5e | use hasAttr not in | account/forms.py | account/forms.py | from __future__ import unicode_literals
import re
try:
from collections import OrderedDict
except ImportError:
OrderedDict = None
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.contrib import auth
from django.contrib.auth.models import User
from account.conf im... | Python | 0 | @@ -3424,33 +3424,40 @@
or
-%22keyOrder%22 in self.fields
+hasattr(self.fields, %22keyOrder%22)
:%0A
@@ -4007,33 +4007,40 @@
or
-%22keyOrder%22 in self.fields
+hasattr(self.fields, %22keyOrder%22)
:%0A
|
23b8fe45cd7c274c19be9410becac480df441979 | use ckantoolkit instead of conditional config | ckanext/envvars/tests.py | ckanext/envvars/tests.py | import os
import pytest
import ckan.plugins.toolkit as toolkit
import ckan.plugins as p
try:
p.toolkit.requires_ckan_version("2.8")
except p.toolkit.CkanVersionException:
from pylons import config
else:
from ckan.common import config
from ckanext.envvars.plugin import EnvvarsPlugin
class TestEnvVarToIn... | Python | 0 | @@ -87,151 +87,24 @@
p%0A%0A
-try:%0A p.toolkit.requires_ckan_version(%222.8%22)%0Aexcept p.toolkit.CkanVersionException:%0A from pylons import config%0Aelse:%0A from ckan.common
+from ckantoolkit
imp
|
ab07c2b2ee29c851c3b8045a9012a388642f1603 | Use subprocess to kick off multiscanner | utils/api.py | utils/api.py | #!/usr/bin/env python
'''
THIS APP IS NOT PRODUCTION READY!! DO NOT USE!
Flask app that provides a RESTful API to
the multiscanner.
Proposed supported operations:
GET / ---> Test functionality. {'Message': 'True'}
GET /api/v1/tasks/list ---> Receive list of tasks in multiscanner
GET /api/v1/tasks/list/<task_id> --->... | Python | 0 | @@ -817,16 +817,34 @@
ort sys%0A
+import subprocess%0A
import u
@@ -3324,16 +3324,63 @@
le_path)
+%0A full_path = os.path.join(MS_WD, file_path)
%0A%0A #
@@ -3453,16 +3453,18 @@
done%0A
+ #
output
@@ -3490,19 +3490,126 @@
iscan(%5Bf
-ile
+ull_path%5D)%0A subprocess.call(%5B'/opt/venv_multiscanner/... |
0826b8fa1157eccef406b108928f7be516d054e2 | add some more generic service tests. | lib/svtplay_dl/tests/test_service.py | lib/svtplay_dl/tests/test_service.py | from __future__ import absolute_import
import unittest
from svtplay_dl.service import opengraph_get
from svtplay_dl.service import Service
from svtplay_dl.service import service_handler
from svtplay_dl.service.services import sites
from svtplay_dl.utils.parser import setup_defaults
class MockService(Service):
s... | Python | 0 | @@ -50,16 +50,55 @@
ittest%0A%0A
+from svtplay_dl.service import Generic%0A
from svt
@@ -1922,28 +1922,1052 @@
ttp://example.com/img3.jpg%22%0A
+%0A%0Aclass test_generic(unittest.TestCase):%0A def test_nothing(self):%0A config = setup_defaults()%0A generic = Generic(config, %22http://example.com%22)... |
0d1d699b4002f5a5701f917b2987da37f8245d9f | Allow active and archived pipelines to be publicly visible. | src/encoded/types/base.py | src/encoded/types/base.py | from functools import lru_cache
from pyramid.security import (
ALL_PERMISSIONS,
Allow,
Authenticated,
Deny,
DENY_ALL,
Everyone,
)
from pyramid.threadlocal import get_current_request
from pyramid.traversal import (
find_root,
traverse,
)
import contentbase
from ..schema_formats import is_... | Python | 0 | @@ -3913,24 +3913,112 @@
LOW_CURRENT,
+%0A%0A # pipeline%0A 'active': ALLOW_CURRENT,%0A 'archived': ALLOW_CURRENT,
%0A %7D%0A%0A
|
d2b016ff7448bc8e76041110765e03409195ffa6 | Update api to use backend datastore | utils/api.py | utils/api.py | #!/usr/bin/env python
'''
THIS APP IS NOT PRODUCTION READY!! DO NOT USE!
Flask app that provides a RESTful API to
the multiscanner.
Proposed supported operations:
GET / ---> Test functionality. {'Message': 'True'}
GET /api/v1/tasks/list ---> Receive list of tasks in multiscanner
GET /api/v1/tasks/list/<task_id> --->... | Python | 0 | @@ -1065,16 +1065,44 @@
atabase%0A
+from storage import Storage%0A
%0A%0ATASK_N
@@ -1368,16 +1368,48 @@
abase()%0A
+db_store = Storage.get_storage()
%0A%0A@app.e
@@ -3655,64 +3655,28 @@
t =
-%5Breport for report in REPORTS if report%5B'report_id'%5D ==
+db_store.get_report(
repo
@@ -3676,33 +3676,33 @@
rt(repo... |
e2cc81f5f6b9ae49a3917b02db6630854d72723e | fix bug in lru cache returned index | utils/dnd.py | utils/dnd.py | import numpy as np
from annoy import AnnoyIndex
from collections import deque, OrderedDict
class LRUCache(object):
def __init__(self, capacity):
self.capacity = capacity
self.keys = OrderedDict()
def update(self, idx):
if idx in self.keys:
del self.keys[idx]
self.k... | Python | 0 | @@ -299,32 +299,36 @@
ys%5Bidx%5D%0A
+
self.keys%5Bidx%5D =
@@ -329,25 +329,100 @@
idx%5D = True%0A
-%0A
+ return None%0A else:%0A self.keys%5Bidx%5D = True%0A
if l
@@ -458,32 +458,36 @@
-1:%0A
+
+
return self.keys
@@ -510,38 +510,46 @@
lse)%5B... |
2a8092579e6507f685c6f60cb68d615ef1b5f4a7 | change vis script source to point to cdn cloudflare. | develop/scripts/vis.py | develop/scripts/vis.py | from IPython.display import IFrame
import json
import uuid
import os
def vis_network(nodes, edges, physics=False, graph_name=None):
html = """
<html>
<head>
<script type="text/javascript" src="../lib/vis/dist/vis.js"></script>
<link href="../lib/vis/dist/vis.css" rel="stylesheet" type="text/cs... | Python | 0 | @@ -206,35 +206,72 @@
t%22 src=%22
-..
+https://cdnjs.cloudflare.com/ajax
/lib
+s
/vis/
-dist/vis
+4.8.2/vis.min
.js%22%3E%3C/s
@@ -299,30 +299,66 @@
ef=%22
-..
+https://cdnjs.cloudflare.com/ajax
/lib
+s
/vis/
-dist/vis.cs
+4.8.2/vis.min.j
s%22 r
|
51e45fcd35674a43e0ece08131c1d95a4b2e372c | fix tests for py3 | telegrambot/test/testcases.py | telegrambot/test/testcases.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.test import TestCase
from telegrambot.models import Update
from telegrambot.test import factories
from django.core.urlresolvers import reverse
from rest_framework import status
from telegram.replykeyboardhide import ReplyKeyboardHide
try:
from unittest impor... | Python | 0 | @@ -364,16 +364,65 @@
# noqa%0A
+import sys %0A %0APY3 = sys.version_info %3E (3,)
%0A%0Aclass
@@ -2893,32 +2893,95 @@
rd)%0A
-
+if not PY3:%0A kwargs%5B'text'%5D = kwargs%5B'text'%5D.decode('utf-8')
%0A sel
|
301924877984658716d69425f18bb5bd6e75cae8 | update server | server/app.py | server/app.py | from flask import Flask, request
from pymongo import MongoClient
import os
import json
import pprint
app = Flask(__name__)
client = MongoClient(os.environ["MONGOLAB_URI"])
db = client["heroku_gw4w78g9"]
col = db["locations"]
print col
@app.route('/location', methods=["POST"])
def addLocation():
try:
print "REQU... | Python | 0.000001 | @@ -302,61 +302,8 @@
ry:%0A
- print %22REQUEST.JSON%22, %22---%22, request.json, %22---%22%0A
@@ -533,16 +533,26 @@
return
+ %22%3Cpre%3E%22 +
pprint.
@@ -564,16 +564,27 @@
at(locs)
+ + %22%3C/pre%3E%22
%0A%0Aif __n
|
06129fa94e6286958a74c5ac479000b3ef4c5f80 | Split resource_setup for messaging tests | tempest/api/messaging/base.py | tempest/api/messaging/base.py | # Copyright (c) 2014 Rackspace, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | Python | 0.000005 | @@ -1090,30 +1090,27 @@
def
-resource_setup
+skip_checks
(cls):%0A
@@ -1150,22 +1150,19 @@
ls).
-resource_setup
+skip_checks
()%0A
@@ -1270,24 +1270,136 @@
uired%22)%0A
-
+%0A @classmethod%0A def setup_credentials(cls):%0A super(BaseMessagingTest, cls).setup_credentials()%0A cls.... |
73c390697bf3e6485485249e2984a4b156557ee3 | Revise visiting by directions | lc0079_word_search.py | lc0079_word_search.py | """Leetcode 79. Word Search
Medium
URL: https://leetcode.com/problems/word-search/
Given a 2D board and a word, find if the word exists in the grid.
The word can be constructed from letters of sequentially adjacent cell,
where "adjacent" cells are those horizontally or vertically neighboring.
The same letter cell ... | Python | 0 | @@ -1160,27 +1160,41 @@
-result = (self._dfs
+is_exist = False%0A dirs = %5B
(i -
@@ -1202,205 +1202,107 @@
1, j
+)
,
-board, word, pos + 1, visited) or%0A self._dfs(i + 1, j, board, word, pos + 1, visited) or%0A self._dfs(i, j - 1, board, word, pos + 1, visited) or%0A... |
91ac1ea53a26d1d6e5686f0811620b1c36eedb89 | return original onion_bordas.py otherwise would upsurp #248 | abel/onion_bordas.py | abel/onion_bordas.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np
from scipy.ndimage.interpolation import shift
################################################################################... | Python | 0.998056 | @@ -3717,19 +3717,14 @@
(IM,
- (0,
-1/2)
-)
%0A%0A
@@ -5531,18 +5531,13 @@
arr,
- (0,
1/2)
-)
%0A%0A
|
0aafba5834f4448d798452d00dfc53efcaa39898 | update shuffling | disaggregator/utils.py | disaggregator/utils.py | import appliance
import pandas as pd
import numpy as np
import os
import pickle
def concatenate_traces(traces, metadata=None, how="strict"):
'''
Given a list of appliance traces, returns a single concatenated
trace. With how="strict" option, must be sampled at the same rate and
consecutive, without ove... | Python | 0.000002 | @@ -74,16 +74,954 @@
pickle%0A%0A
+def aggregate_instances(instances, metadata, how=%22strict%22):%0A '''%0A Given a list of temporally aligned instances, aggregate them into a single%0A signal.%0A '''%0A if how == %22strict%22:%0A traces = %5Binstance.traces for instance in instances%5D%0A ... |
88bfcad3e764bab14a057f092ba9562301db89eb | fix to `_standardize` | tests/chainer_tests/functions_tests/normalization_tests/test_standardize.py | tests/chainer_tests/functions_tests/normalization_tests/test_standardize.py | import numpy
from chainer import functions
from chainer import testing
@testing.parameterize(*(testing.product({
'ch_out': [1, 5],
'size': [10, 20],
'dtype': [numpy.float32, numpy.float16],
'eps': [1e-5, 1e-1],
})))
@testing.backend.inject_backend_tests(
None,
# CPU tests
testing.product(... | Python | 0.999753 | @@ -23,25 +23,65 @@
iner
- import functions
+.functions.normalization._standardize import _standardize
%0Afro
@@ -1474,26 +1474,17 @@
return
-functions.
+_
standard
|
9a2ed6de02d4b4d872c31d3262737a674c180a8d | Version 05/07/2017 | prova.py | prova.py | import matplotlib.pyplot as plt
from VanillaRNN import *
from Tools import *
def printResults():
K, eta, H_size = 10, 0.9, 100
'''
print('Dataset creation')
# Create dictionary
dictionary, train, valid, test = build_dictionary('Dataset.txt')
print('RNN initialization')
# Initialize RNN
... | Python | 0 | @@ -690,16 +690,47 @@
it(' ')%0A
+ lossTrain = lossTrain%5B:-1%5D%0A
loss
@@ -740,32 +740,36 @@
in = %5Bfloat(
-i)
+x)/100
for
-i
+x
in lossTrai
@@ -770,16 +770,89 @@
ssTrain%5D
+ #It's no needed in the final version%0A print('LossTrain: ', lossTrain)
%0A los
@@ -873,13 +873,39 @@
it('
-%5Cn
+
... |
a11a5deb0f87e9abe939f864c7f929552ea07d98 | Fix likelihood (#83) | examples/gaussianmixture.py | examples/gaussianmixture.py | import unittest
import numpy as np
import cpnest.model
class GaussianMixtureModel(cpnest.model.Model):
"""
A simple gaussian model with parameters mean and sigma
Shows example of using your own data
"""
def __init__(self):
self.names=['mean1','sigma1','mean2','sigma2','weight']
self... | Python | 0.000001 | @@ -597,17 +597,9 @@
3))%0A
-
%0A
+
@@ -633,13 +633,9 @@
ta)%0A
-
%0A
+
@@ -702,23 +702,16 @@
logL1 =
-np.sum(
np.log(w
@@ -771,25 +771,24 @@
sigma1'%5D)**2
-)
%0A log
@@ -796,15 +796,8 @@
2 =
-np.sum(
np.l
@@ -869,17 +869,16 @@
a2'%5D)**2
-)
%0A
@@ -908,14 +908,21 @@... |
dc6f1ecadda15cb14e09ca2e6e33306b05628d11 | Resolve merge conflict | K2ephem/K2ephem.py | K2ephem/K2ephem.py | """Checks whether a Solar System Body is in a future K2 field of view.
"""
from __future__ import print_function
import os
import sys
import argparse
import logging
from io import StringIO
try:
# Python 3
from urllib.request import urlopen
except ImportError:
# Legacy Python
from urllib2 import urlope... | Python | 0.000001 | @@ -39,16 +39,24 @@
is in a
+past or
future K
|
0612cd7eb3cbabdf6a9a23a819f83da9d2a20b65 | Fix RuntimeError in aiohttp | aiohttp_wsgi/wsgi.py | aiohttp_wsgi/wsgi.py | import asyncio, io, sys, threading
from contextlib import contextmanager
from wsgiref.util import is_hop_by_hop
from aiohttp.web import StreamResponse
from aiohttp_wsgi.utils import parse_sockname
EMPTY = object()
class WSGIHandler:
def __init__(self, application, *,
# Handler config.
script... | Python | 0.002818 | @@ -4544,16 +4544,50 @@
.close)%0A
+ return response._response%0A
%0A%0Aclass
|
596aa26e61f073103ae3e26fc362fca4df22d48d | add path validation | aiourllib/rfc2369.py | aiourllib/rfc2369.py | import string
import re
REGEX_SPECIAL_CHARACTERS = {
'.': '\.',
'^': '\^',
'$': '\$',
'*': '\*',
'+': '\+',
'?': '\?',
'[': '\[',
']': '\]',
'(': '\(',
')': '\)',
'{': '\{',
'}': '\}',
'-': '\-',
'%': '\%',
}
class Protocol(object):
LOWALPHA = string.ascii_l... | Python | 0.000001 | @@ -841,16 +841,80 @@
%5E' '%60'%0A%0A
+ PCHAR = UNRESERVED + ESCAPED + ':' '@' '&' '=' '+' '$' ','%0A%0A
%0Aclass U
@@ -1092,16 +1092,51 @@
UM + '-'
+%0A SEGMENT = Protocol.PCHAR + ';'
%0A%0A PO
@@ -5141,45 +5141,638 @@
-else:%0A self.path = '/'
+ if not path.startswith('/'):%0A ... |
4f2a77093ba4305ec673d73281033f91eb70e511 | prepare for release 1.2.129-dev | aminator/__init__.py | aminator/__init__.py | # -*- coding: utf-8 -*-
#
#
# Copyright 2013 Netflix, 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 ... | Python | 0 | @@ -1026,9 +1026,9 @@
2.12
-5
+9
-dev
|
579b11b16d6e6b7f53c6ea8debd1163f3eb50bb9 | Update example for symmetry detection | examples/gto/13-symmetry.py | examples/gto/13-symmetry.py | #!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
from pyscf import gto
'''
Specify symmetry.
Mole.symmetry can be True/False to turn on/off the symmetry (default is off),
or a string to specify the symmetry of molecule. symmetry_subgroup keyword
can be set to generate a subgroup of the dectecte... | Python | 0 | @@ -307,17 +307,16 @@
f the de
-c
tected s
@@ -560,38 +560,32 @@
('Symmetry %25-4s,
- using
subgroup %25s. T
@@ -585,114 +585,41 @@
%25s.
- The molecule geometry is changed' %25%0A (mol.topgroup, mol.groupname))%0Afor x in mol._atom:%0A print(x
+' %25 (mol.topgroup, mol.groupname)
)%0Apr
@@ -745,38 +7... |
b0cd7f7d3296028bcc28dff9e222a2a5f4537afa | Fix division by zero | analyze.py | analyze.py | import sys
import re
def main(argv):
# Message to perform sentiment analysis on
message = argv[0] if len(argv) > 0 else ""
if message == "":
print("Usage: python analyze.py [message]")
sys.exit(1)
# Load the positive and negative words
words = {}
with open("words/positive.txt"... | Python | 0.999261 | @@ -830,24 +830,74 @@
found += 1%0A%0A
+ if found == 0:%0A print(0)%0A else:%0A
print(ro
|
e5a6957fc7bcdf7568065df796d3048ffe20ca2e | remove typo | authenticators/simple_authenticators.py | authenticators/simple_authenticators.py | from authenticators.abstract_authenticator import AbstractAuthenticator
class OracleAuthenticator(AbstractAuthenticator):
def authorise_transaction(self, customer):
if customer.fraudster:
return False
else:
return True
class NeverSecondAuthenticator(AbstractAuthenticator... | Python | 0.999999 | @@ -693,17 +693,16 @@
thresh):
-g
%0A
|
a0e024b273bcdad825b84e2527fc93d24ed9d098 | Make the functional testing annotated steps script call the eggplant starting script | tools/bots/functional_testing.py | tools/bots/functional_testing.py | #!/usr/bin/python
# Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
"""
Buildbot steps for functional testing master and slaves
"""
import os
import re
im... | Python | 0.00167 | @@ -366,16 +366,46 @@
_utils%0A%0A
+utils = bot_utils.GetUtils()%0A%0A
FT_BUILD
@@ -459,16 +459,43 @@
aster'%0A%0A
+HOST_OS = utils.GuessOS()%0A%0A
EDITOR_L
@@ -1174,20 +1174,20 @@
%0Adef FTS
-teps
+lave
(config)
@@ -1194,103 +1194,49 @@
:%0A
-if config.builder_tag == 'master':%0A print 'Not doing anything ... |
6f77910ac036209a852bc3b08989de7b84b5ee29 | Print error if job is missing config | app/run.py | app/run.py | #!/usr/bin/env python
"""JARVIS 2 helper script
Usage:
run.py -j [-s] [NAME]
run.py [-d]
Options:
-h --help Show usage
-d --debug Run app in debug mode
-j --job Run a job, will prompt if NAME is not given
-s --json Print job output as JSON
"""
from __future__ import print... | Python | 0.000007 | @@ -1214,25 +1214,154 @@
job
- = cls(conf%5Bname%5D
+_conf = conf.get(name)%0A if job_conf is None:%0A print('No config found for job: %25s' %25 (name,))%0A sys.exit(1)%0A%0A job = cls(job_conf
)%0A
|
990d35cf6a7a7f3be508be9af08dbcaa90d889cc | refactor of errors handling | backend/geonature/core/errors/routes.py | backend/geonature/core/errors/routes.py | import logging
from urllib.parse import urlparse
from flask import current_app, jsonify, Response, request, json, redirect
from werkzeug.exceptions import Unauthorized, HTTPException
from werkzeug.urls import url_encode
from pypnusershub.db.tools import InsufficientRightsError
from sqlalchemy.exc import SQLAlchemyErr... | Python | 0 | @@ -1,19 +1,4 @@
-import logging%0A
from
@@ -62,27 +62,8 @@
app,
- jsonify, Response,
req
@@ -128,16 +128,37 @@
horized,
+ InternalServerError,
HTTPExc
@@ -206,1475 +206,102 @@
de%0A%0A
-from pypnusershub.db.tools import InsufficientRightsError%0Afrom sqlalchemy.exc import SQLAlchemyError%0A%0Afrom utils_flask_... |
014b03e703a7fe804d684da8cfdd9919c12a564f | update image lib | airtest/image.py | airtest/image.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'hzsunshx'
import cv2
MIN_MATCH_COUNT = 8
def _middlePoint(pts):
def add(p1, p2):
return (p1[0]+p2[0], p1[1]+p2[1])
def distance(p1, p2):
import math
l2 = (p1[0]-p2[0])*(p1[0]-p2[0]) + (p1[1]-p2[1])*(p1[1]-p2[1])
retu... | Python | 0.000001 | @@ -2204,17 +2204,50 @@
p1) %3C 0.
-5
+3 and len(good) %3E= MIN_MATCH_COUNT
:%0A #i
|
807ef44715c9d25a22a73d3c201ce54e569df65b | Add type hints | djangae/environment.py | djangae/environment.py | import os
from functools import wraps
from djangae.utils import memoized
from django.http import HttpResponseForbidden
# No SDK imports allowed in module namespace because `./manage.py runserver`
# imports this before the SDK is added to sys.path. See bugs #899, #1055.
def application_id():
# Fallback to exampl... | Python | 0 | @@ -30,16 +30,44 @@
rt wraps
+%0Afrom typing import Optional
%0A%0Afrom d
@@ -311,24 +311,31 @@
ication_id()
+ -%3E str
:%0A # Fall
@@ -541,32 +541,40 @@
on_environment()
+ -%3E bool
:%0A return not
@@ -633,24 +633,32 @@
nvironment()
+ -%3E bool
:%0A return
@@ -743,16 +743,24 @@
n_task()
+ -%3E bool
... |
5fc65183e40dd1d06bd6ae3e4e7ba0f0a0e2bdd6 | Add DAG & non-DAG adjacency dicts | alg_check_dag.py | alg_check_dag.py | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def _previsit():
pass
def _postvisit():
pass
def _dfs_explore():
pass
def check_dag():
"""Check Directed Acyclic Graph (DAG)."""
pass
def main():
# DAG.
dag_adj_d = {
'... | Python | 0.000022 | @@ -280,16 +280,47 @@
):%0A #
+ Graph adjacency dictionary for
DAG.%0A
@@ -523,16 +523,289 @@
%0A %7D%0A%0A
+ # Graph adjacency dictionary for non-DAG.%0A nondag_adj_d = %7B%0A 'A': %5B'B'%5D,%0A 'B': %5B'C', 'E'%5D,%0A 'C': %5B'C', 'F'%5D,%0A 'D': %5B'B', 'G'%5D,%0A ... |
17688f5ea2261345cbc0df6b4ffe99a076deaec2 | Tidy up and optimize Client creation | django_afip/clients.py | django_afip/clients.py | import pytz
from django.utils.functional import LazyObject
from zeep import Client
TZ_AR = pytz.timezone(pytz.country_timezones['ar'][0])
# XXX: Below are a set of clients for each WS. Each one is
# lazy-initialized ONCE, and only once.
#
# The code layout is somewhat ugly, so, if you have better code-pattern,
# pat... | Python | 0 | @@ -14,437 +14,244 @@
rom
-django.utils.functional import LazyObject%0Afrom zeep import Client%0A%0ATZ_AR = pytz.timezone(pytz.country_timezones%5B'ar'%5D%5B0%5D)%0A%0A%0A# XXX: Below are a set of clients for each WS. Each one is%0A# lazy-initialized ONCE, and only once.%0A#%0A# The code layout is somewhat ugly, so, ... |
e77480eaef553567073af2a7e0cdf7d42628a0c4 | fix #5, use run('sudo ..') instead of sudo('..') in uwsgi restart | django_fabric/uwsgi.py | django_fabric/uwsgi.py | # -*- coding: utf-8 -*-
from fabric.operations import sudo
from django_fabric.base import App
class UwsgiApp(App):
ini_files = {}
def __init__(self, ini_files, *args, **kwargs):
super(UwsgiApp, self).__init__(*args, **kwargs)
self.ini_files = ini_files
def restart_app(self, instance):
... | Python | 0.000002 | @@ -47,20 +47,19 @@
import
-sudo
+run
%0A%0Afrom d
@@ -323,14 +323,18 @@
+run(%22
sudo
-(%22
+
touc
|
275550542a7696bcbf7526999198fc4229d4f305 | Fix crash when logging in through gmail OpenID | apps/auth/backends.py | apps/auth/backends.py | # Amara, universalsubtitles.org
#
# Copyright (C) 2012 Participatory Culture Foundation
#
# 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 op... | Python | 0 | @@ -2439,38 +2439,14 @@
-email = request.openid.ax.get(
+key =
'htt
@@ -2468,33 +2468,32 @@
g/contact/email'
-)
%0A
@@ -2501,35 +2501,54 @@
email =
-email.pop()
+request.openid.ax.get(key)%5B-1%5D
%0A
@@ -4693,36 +4693,12 @@
il')
-%0A email = email.pop()
+%5B-1%5D
%0A... |
06ef8037e8439d70dd229ff465887e8bfd0373a3 | Allow archive generation even when some JSON files are missing | archive.py | archive.py | import units
import tarfile
import os
def save_db_info(pa_root=None, version=None):
if pa_root:
units.CONFIG['pa_root'] = pa_root
else:
pa_root = units.CONFIG['pa_root']
db = units.VersionDb()
db.load_units()
if version is None:
version = open(pa_root +'/../version.txt').r... | Python | 0 | @@ -701,16 +701,71 @@
things:%0A
+ if os.path.exists(pa_root + filename):%0A
@@ -816,32 +816,36 @@
+
arcname=archive_
@@ -860,16 +860,103 @@
ilename)
+%0A else:%0A print('WARNING: missing file %7B!r%7D'.format(filename))
%0A%0A
|
61b55fa9bf2aa8a8f15803033ee34347d009c1e7 | Use CompositionProgress refactoring in console script | analyse_sound.py | analyse_sound.py | #!/usr/bin/env python3
import logging
import os
from contextlib import contextmanager
import click
from composition import Composition
logging.basicConfig()
log = logging.getLogger(__name__)
class CompositionWithProgressbar(Composition):
def get_whole_image(self, chunks, decimate):
with click.progres... | Python | 0 | @@ -78,16 +78,46 @@
tmanager
+%0Afrom functools import partial
%0A%0Aimport
@@ -159,16 +159,24 @@
position
+Progress
%0A%0A%0Aloggi
@@ -233,400 +233,8 @@
)%0A%0A%0A
-class CompositionWithProgressbar(Composition):%0A def get_whole_image(self, chunks, decimate):%0A with click.progressbar(chunks,%0A ... |
eab715f92018b43e8c083b2e9bcb7e1e21fd4844 | Fix cross-platform wildcard issue | archive.py | archive.py | #!/usr/bin/python
# -*- coding: UTF-8 -*-
#
# Copyright © 2014 by Adam Hellberg <adam.hellberg@sharparam.com>.
#
import os
import re
import sys
import fnmatch
import zipfile
from subprocess import call
SCRIPT = sys.argv[0]
TOC_VERSION_PATTERN = re.compile("^## Version: (\d+\.\d+\.\d+(?:-[a-z0-9]+)?)$")
def log(msg,... | Python | 0.000006 | @@ -168,16 +168,28 @@
zipfile%0A
+import glob%0A
from sub
@@ -1670,24 +1670,56 @@
nt_addon():%0A
+ files = glob.glob('*.moon')%0A
ret = ca
@@ -1735,22 +1735,25 @@
c%22, %22-l%22
-, %22.%22%5D
+%5D + files
)%0A if
@@ -1892,16 +1892,52 @@
addon()%0A
+ moonfiles = glob.glob('*.moon')%0A
ret
@@ -1... |
343ad64efe98f950284ca4ccb8de363d3b535c08 | print tests | myhdl/test/toVHDL/test_print.py | myhdl/test/toVHDL/test_print.py | from myhdl import *
def PrintBench():
@instance
def logic():
i1 = intbv(0)[8:]
i2 = intbv(0, min=-10, max=12)
b = bool(1)
i1[:] = 10
print int(i1)
yield delay(10)
print "Test"
yield delay(10)
print i1
yield delay(10)
i2[:]... | Python | 0.000001 | @@ -31,16 +31,116 @@
Bench():
+%0A si1 = Signal(intbv(0)%5B8:%5D)%0A si2 = Signal(intbv(0, min=-10, max=12))%0A sb = Signal(bool(0))
%0A%0A @i
@@ -280,21 +280,62 @@
-print int(i1)
+si1.next = 11%0A i2%5B:%5D = -7%0A si2.next = -5
%0A
@@ -373,38 +373,45 @@
int
-%22Test%22%0A ... |
db34e1f4580b28f4d3f7c1b6289cac6ef91b5447 | Write get_postgresql_status exception into log file | helpers/api.py | helpers/api.py | import json
import logging
import psycopg2
import sys
from threading import Thread
if sys.hexversion >= 0x03000000:
from http.server import BaseHTTPRequestHandler, HTTPServer
else:
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
logger = logging.getLogger(__name__)
class RestApiHandler(BaseH... | Python | 0.000025 | @@ -490,16 +490,71 @@
Error):%0A
+ logging.exception('get_postgresql_status')%0A
|
503dfd707275789af1d143db16b177ca48a86468 | Fix typo in docs | anna/model/bridge.py | anna/model/bridge.py | """Bridges transform the state from the encoders so they fit the decoder
Inspired by OpenNMT & google/seq2seq
## Available bridges
@@Bridge
@@NoBridge
@@ZeroBridge
@@DenseBridge
"""
import tensorflow as tf
class Bridge:
"""Transforms the state from the encoders so they fit the decoder"""
def __call__(self... | Python | 0.001431 | @@ -131,17 +131,8 @@
es%0A%0A
-@@Bridge%0A
@@No
|
fe6d615633cd60063a1d337afd8432b84aca1428 | Update plugin.py | OnJoin/plugin.py | OnJoin/plugin.py | ###
# Copyright (c) 2016, Barry Suridge
# All rights reserved.
#
# Python 3
###
from future.utils import raise_from
import random
import os.path
# Text formatting library
from .local import color
import supybot.utils as utils
from supybot.commands import *
import supybot.plugins as plugins
import supybot.ircutils as ... | Python | 0.000001 | @@ -2064,23 +2064,19 @@
se_from(
-Databas
+Fil
eError('
@@ -2147,15 +2147,11 @@
ass
-Databas
+Fil
eErr
@@ -2284,8 +2284,9 @@
idth=79:
+%0A
|
8818fbb0c406c28006f40a66b22e6297ba710905 | Fix service genericity in service repository | angus/service.py | angus/service.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 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 Licens... | Python | 0.000055 | @@ -1256,18 +1256,24 @@
-%22honorata%22
+self.service_key
: %7B%0A
|
8cb58a6eb7ee5034cd3992cb15fb0865d2ab7aec | Encrypt Transifex password | apps/pontoon/views.py | apps/pontoon/views.py |
import logging
import urllib2
import base64
import json
import traceback
from django import http
from django.http import HttpResponse
from django.shortcuts import render
from django.core.validators import URLValidator
from django.core.exceptions import ValidationError
import commonware
from funfactory.log import lo... | Python | 0.999276 | @@ -2402,24 +2402,44 @@
password%5D',
+base64.decodestring(
profile.tran
@@ -2453,16 +2453,17 @@
assword)
+)
%0A%0A if
@@ -4225,32 +4225,52 @@
ifex_password =
+base64.encodestring(
request.GET%5B'aut
@@ -4282,16 +4282,17 @@
sword%5D'%5D
+)
%0A
|
cc77c6affaa34333e3eebc6638a53f56f1323348 | Remove extraneous import. | inbox/models/util.py | inbox/models/util.py | from inbox.models import (Calendar, Contact, Message, Event, Block, Message,
Tag, Thread)
def reconcile_message(new_message, session):
"""
Check to see if the (synced) Message instance new_message was originally
created/sent via the Inbox API (based on the X-Inbox-Uid header. If ... | Python | 0.000003 | @@ -61,23 +61,19 @@
Block,
-Mess
+T
ag
-e
,%0A
@@ -91,21 +91,16 @@
- Tag,
Thread)
|
438c3c3e224fea17536529dcf9c59b1913040f63 | Add back private ip address support | aws_ssh.py | aws_ssh.py | #!/usr/bin/python
import configargparse
import boto
import boto.ec2
import boto.exception
import collections
import os
import signal
import sys
import tabulate
aws_regions = boto.ec2.regions()
discovered_instances = collections.OrderedDict((('#', []), ('IP Address', []), ('Name', [])))
parser = configargparse.ArgP... | Python | 0 | @@ -1117,16 +1117,180 @@
SH as')%0A
+parser.add_argument('-p', '--private-ip-address', dest='private_ip_address', action='store_true', env_var='AWS_SSH_PRIVATE_IP_ADDRESS', help='SSH to the prive IP')%0A
args = p
@@ -2604,16 +2604,180 @@
ounter)%0A
+%0A if (args.private_ip_address):%0A ... |
9cce9ac6f183e035cb5fbead1b83830058cacd8d | Set default tips app | apps/tips/__init__.py | apps/tips/__init__.py | Python | 0.000001 | @@ -0,0 +1,44 @@
+default_app_config = 'tips.apps.TipsConfig'%0A
| |
c0c3c0129d551f18fa4cf65fc7f90b4cd9293fa4 | make commit for small definie statement regex bug fix | PPCLFunctions.py | PPCLFunctions.py | '''
PPCLFunctions.py is a PPCL plugin for the Sublime Text 3 text editor.
Copyright (C) 2016 Brien Blandford (Smith Engineering, PLLC)
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 Foundat... | Python | 0 | @@ -4373,21 +4373,12 @@
,%22)(
-%5BA-Z0-9%5C. %5D
+.
*)
+%22
',%0A%09
@@ -4396,17 +4396,16 @@
TILINE)%0A
-%0A
%09%09define
|
09b2040fa02775615c9b1ecc3308e9706dd27d06 | add handler for bad UTF8 | pycat.py | pycat.py | #!/usr/bin/env python3
from pprint import pprint
from select import select
import importlib
import json
import re
import sys
import telnetlib
import traceback
telnetlib.GMCP = b'\xc9'
def log(*args):
sys.stdout.write(" ----- ")
print(*args)
pass
class Session(object):
def __init__(self, world_m... | Python | 0.000001 | @@ -3467,32 +3467,16 @@
_eager()
-.decode('utf-8')
%0A
@@ -3541,16 +3541,202 @@
raise%0A
+ try:%0A data = data.decode('utf-8')%0A except UnicodeError as e:%0A print(%22Unicode error:%22, e)%0A print(%22Data was:%22, data)%0A data = ''%0A%0A
... |
28a18e941b31845fcee05d2b05e894957bf9811b | Use 'inbox' consistently | pykka.py | pykka.py | from multiprocessing import Queue, Pipe
from multiprocessing.dummy import Process
from multiprocessing.reduction import reduce_connection
import pickle
import sys
import time
def pickle_connection(connection):
return pickle.dumps(reduce_connection(connection))
def unpickle_connection(pickled_connection):
# Fr... | Python | 0.000201 | @@ -1651,29 +1651,29 @@
self._actor_
-queue
+inbox
= actor.inb
@@ -1922,21 +1922,21 @@
._actor_
-queue
+inbox
, name)%0A
@@ -2190,29 +2190,29 @@
self._actor_
-queue
+inbox
.put(message
@@ -2309,21 +2309,21 @@
, actor_
-queue
+inbox
, attrib
@@ -2341,27 +2341,28 @@
self.
+_
actor_
-queue
+inbox
= actor
@... |
d1717b7b274e12770af419896f3c23276a5ec4a3 | clean pylint reports | deployutils/management/commands/pullapp.py | deployutils/management/commands/pullapp.py | # Copyright (c) 2014, Djaodjin Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and t... | Python | 0 | @@ -6106,17 +6106,17 @@
print
-(
+
%22error:
@@ -6131,33 +6131,32 @@
%25s%22 %25 (app, err)
-)
%0A except
@@ -6183,33 +6183,33 @@
print
-(
+
%22warning: App %25s
@@ -6226,17 +6226,16 @@
pp, err)
-)
%0A
@@ -6273,33 +6273,33 @@
print
-(
+
%22warning: App %25s
@@ -6338... |
cb10566954467f4a1b7a5c347d59c17f6406da48 | Add status to session inline | project/api/inlines.py | project/api/inlines.py | # Django
from django.contrib import admin
# Local
from .models import (
Appearance,
Assignment,
Award,
Contest,
Contestant,
Convention,
Entry,
Member,
Officer,
Panelist,
Participant,
Repertory,
Round,
Score,
Session,
Slot,
Song,
)
class AppearanceIn... | Python | 0 | @@ -4961,32 +4961,50 @@
'kind',%0A
+ 'status',%0A
%5D%0A raw_id
|
46738818354d42fa93a6358aba7763de91d14bb0 | Comment example Selenium script | dev/examples/qa/selenium/selenium-tests.py | dev/examples/qa/selenium/selenium-tests.py | #!/usr/bin/python
from selenium import webdriver
browser = webdriver.Firefox()
browser.implicitly_wait(60)
browser.get("http://www.bbc.co.uk/")
browser.find_element_by_link_text("News").click()
browser.find_element_by_link_text("US & Canada").click()
browser.find_element_by_link_text("Europe").click()
browser.find_... | Python | 0 | @@ -102,9 +102,10 @@
ait(
-6
+18
0)%0A%0A
@@ -142,16 +142,485 @@
.uk/%22)%0A%0A
+# this is just a website we had picked as an example,%0A# it may have different links by the time you are trying it out%0A#%0A# why this doesn't go all of below links all the time apparently is a Selenium issue,%0A# possibly specific to... |
e75e5806719832513aa9b1bb82e726e60c0816de | send a few more fields taken from the about section | binstar_client/inspect_package/conda.py | binstar_client/inspect_package/conda.py | from __future__ import print_function
# Standard library imports
from os import path
from pprint import pprint
import json
import re
import sys
import tarfile
import tempfile
# Local imports
from ..utils.notebook.data_uri import data_uri_from
os_map = {'osx': 'darwin', 'win': 'win32'}
specs_re = re.compile('^([=><]... | Python | 0 | @@ -4383,36 +4383,361 @@
'
-license': about.get('license
+description': about.get('description'),%0A 'license': about.get('license'),%0A 'license_url': about.get('license_url'),%0A 'dev_url': about.get('dev_url'),%0A 'doc_url': about.get('doc_url'),%0A 'home': about.get('home'),%0... |
e9c9076090540f093a368be8b8e6076774ba93fd | fix response | devtools/travis-ci/update_versions_json.py | devtools/travis-ci/update_versions_json.py | import json
try:
from urllib.request import urlopen
except ImportError:
from urllib2 import urlopen
from msmexplorer import version
if not version.release:
print("This is not a release.")
exit(0)
URL = 'http://www.msmbuilder.org/msmexplorer'
versions = json.load(urlopen(URL + '/versions.json'))
# new... | Python | 0.000002 | @@ -257,29 +257,14 @@
er'%0A
-versions = json.load(
+res =
urlo
@@ -290,16 +290,65 @@
s.json')
+.read().decode('utf-8')%0Aversions = json.loads(res
)%0A%0A# new
|
08e0b8a7917a2cb40d6b413e3434ac74a5a83a24 | handle internet error exction | dependencies.py | dependencies.py | """Get dependencies from packages on the Python Package Index (PyPI)
Adapted from Olivier Girardot's notebook:
https://github.com/ogirardot/meta-deps/blob/master/PyPi%20Metadata.ipynb
licensed under the Creative Commons Attribution 3.0 Unported License.
To view a copy of that license, visit
http://creativecommons.o... | Python | 0.000001 | @@ -2976,16 +2976,33 @@
s fout:%0A
+ try:%0A
@@ -3042,16 +3042,118 @@
s(name)%0A
+ except Exception as e:%0A print(e, %22internet connection issues?%22)%0A return%0A
|
8f7004a9930c4006bfb2218c695380ba7e72086b | fix s3_artifact_store verbosity | studio/s3_artifact_store.py | studio/s3_artifact_store.py | import logging
import calendar
try:
from urlparse import urlparse
except ImportError:
from urllib.parse import urlparse
try:
import boto3
except ImportError:
boto3 = None
from .tartifact_store import TartifactStore
logging.basicConfig()
class S3ArtifactStore(TartifactStore):
def __init__(self, ... | Python | 0.000061 | @@ -437,106 +437,8 @@
e):%0A
- self.logger = logging.getLogger('S3ArtifactStore')%0A self.logger.setLevel(verbose)%0A%0A
@@ -1372,16 +1372,45 @@
pression
+,%0A verbose=verbose
)%0A%0A d
|
4b665bb2e85994e3df0324afacb2453b8f4998a1 | Handle dask TimeoutError exception in tests | contact_map/tests/test_dask_runner.py | contact_map/tests/test_dask_runner.py |
# pylint: disable=wildcard-import, missing-docstring, protected-access
# pylint: disable=attribute-defined-outside-init, invalid-name, no-self-use
# pylint: disable=wrong-import-order, unused-wildcard-import
from .utils import *
from contact_map.dask_runner import *
class TestDaskContactFrequency(object):
def te... | Python | 0.000001 | @@ -263,16 +263,556 @@
port *%0A%0A
+def dask_setup_test_cluster(distributed, n_workers=4, n_attempts=3):%0A %22%22%22Set up a test cluster using dask.distributed. Try up to n_attempts%0A times, and skip the test if all attempts fail.%0A %22%22%22%0A cluster = None%0A for _ in range(n_attempts):%0A ... |
bbda0a77d564631379616b416e830c2f9432ffb5 | Fix log. | Pancake/pancake.py | Pancake/pancake.py | #
# Copyright (c) 2017 Shota Shimazu
#
# 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 w... | Python | 0 | @@ -593,25 +593,13 @@
t Co
-re.debug as debug
+nsole
%0Aimp
@@ -661,15 +661,17 @@
-debug.L
+Console.l
og(%22
|
049bbf3e79c05b004b7edbf7284d174382009bf8 | Update bdd.py | bdd/bdd.py | bdd/bdd.py | """Behavior driven development module
.. :moduleauthor:: Jared Patrick <jared.patrick@gmail.com>
"""
import re
import pdb
import time
import inspect
import termcolor
import collections
_bdd_context = collections.OrderedDict()
class Expect(object):
"""The except, BDD style assertion handler"""
pdb = False... | Python | 0.000001 | @@ -261,19 +261,19 @@
%22%22The ex
-cep
+pec
t, BDD s
@@ -294,24 +294,29 @@
handler%22%22%22%0A
+ %0A
pdb = Fa
|
74b99fe9eb68cd57e64648690a2e158952b6b18e | fix import_path None error | archivebox/archive.py | archivebox/archive.py | #!/usr/bin/env python3
# ArchiveBox
# Nick Sweeting 2017 | MIT License
# https://github.com/pirate/ArchiveBox
import os
import sys
from datetime import datetime
from subprocess import run
from parse import parse_links
from links import (
new_links,
validate_links
)
from archive_methods import archive_links, ... | Python | 0.000019 | @@ -1989,16 +1989,40 @@
print()%0A
+ if import_path:%0A
prin
@@ -2102,24 +2102,28 @@
at(%0A
+
num_new_link
@@ -2129,24 +2129,28 @@
ks,%0A
+
+
pretty_path(
@@ -2167,24 +2167,28 @@
h),%0A
+
parser_name,
@@ -2184,24 +2184,28 @@
arser_name,%0A
+
))%0A%0A
|
4c702b0149311b4356adc3f801163f091268b300 | fix call | ion/agents/agent_alert_manager.py | ion/agents/agent_alert_manager.py | #!/usr/bin/env python
"""
@package ion.agents.agent_alert_manager
@file ion/agents/agent_alert_manager.py
@author Edward Hunter
@brief Class for managing alerts and aggregated alerts based on data streams,
state changes, and command errors, for opt-in use by agents.
"""
__author__ = 'Edward Hunter'
__license__ = 'Ap... | Python | 0.000001 | @@ -7349,16 +7349,18 @@
%5Ba.stop
+()
for a i
|
0fc0c00f7ab1a90bf673ba1a01b021d3b1fa7df0 | Drop unused get_machine function | contrib/devtools/test-symbol-check.py | contrib/devtools/test-symbol-check.py | #!/usr/bin/env python3
# Copyright (c) 2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Test script for symbol-check.py
'''
import os
import subprocess
import unittest
def call_symbol_check(cc, ... | Python | 0 | @@ -634,152 +634,8 @@
))%0A%0A
-def get_machine(cc):%0A p = subprocess.run(%5Bcc,'-dumpmachine'%5D, stdout=subprocess.PIPE, universal_newlines=True)%0A return p.stdout.rstrip()%0A%0A
clas
|
d7982e977318f59fe044f08a1ac710efdfe3e07a | fix for djangodocument register index | dockit/backends/djangodocument/managers.py | dockit/backends/djangodocument/managers.py | from django.db import models
from django.utils import simplejson
from django.core.serializers.json import DjangoJSONEncoder
from dockit.schema.common import DotPathTraverser, DotPathNotFound
class DocumentManager(models.Manager):
pass
class NotGiven(object):
def __nonzero__(self):
return False
class... | Python | 0 | @@ -2697,13 +2697,16 @@
to_p
-ython
+rimitive
(doc
|
3a3b1ac34119c6b6bcb9add10589ca13b1ed5f27 | Add fallback to use local rhyme db if not installed | rhyme.py | rhyme.py | #!/usr/bin/env python
import sqlite3 as sql
import sys, os, os.path
_conn = sql.connect(os.path.join(sys.prefix, 'data/rhyme.db'))
def rhymes_with(word):
"""Returns a list of words that rhyme, or [] if no words rhyme."""
global _conn
cursor = _conn.execute("select * from words where word=?", (word.lower()... | Python | 0 | @@ -67,27 +67,158 @@
h%0A%0A_
-conn = sql.connect(
+rhymedb_path = os.path.join(sys.prefix, 'data/rhyme.db')%0Atry:%0A _conn = sql.connect(_rhymedb_path)%0Aexcept sql.OperationalError:%0A _rhymedb_path =
os.p
@@ -230,37 +230,127 @@
oin(
-sys.prefix, 'data/rhyme.db'))
+os.path.dirname(sys.argv%5B0%5D), 'data/r... |
4d59bca4aa01976d58d7ad06217562778c70a54a | Support animated avatars in User.avatar_url. | discord/user.py | discord/user.py | # -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2015-2016 Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to u... | Python | 0 | @@ -3170,24 +3170,25 @@
turn ''%0A
+%0A
return '
@@ -3171,38 +3171,37 @@
urn ''%0A%0A
-return
+url =
'https://discor
@@ -3186,32 +3186,39 @@
url = 'https://
+images.
discordapp.com/a
@@ -3216,19 +3216,17 @@
app.
-com/api/use
+net/avata
rs/%7B
@@ -3235,31 +3235,154 @@
id%7D/
+%7B0.
avatar
-... |
76771bf8e34e18966d972301626bd252903b8002 | Raise exceptions rather than exiting if a shell command fails | sshslot.py | sshslot.py | from utility import get_time
import subprocess
import sys
import os
binaries = {
'daala':['examples/encoder_example'],
'x264': ['x264'],
'x265': ['build/linux/x265'],
'vp8': ['vpxenc','vpxdec'],
'vp9': ['vpxenc','vpxdec'],
'vp10': ['vpxenc','vpxdec'],
'vp10-rt': ['vpxenc','vpxdec'],
'av1': ['aomenc','a... | Python | 0.000003 | @@ -2046,35 +2046,42 @@
-sys.exit(1)
+raise RuntimeError
%0A sel
@@ -2478,19 +2478,26 @@
-sys.exit(1)
+raise RuntimeError
%0A
|
7a53c1acb2bb8df863c48a7fb753fa49d29e5a85 | Set cores to 18 for Machine. | sshslot.py | sshslot.py | from utility import *
import subprocess
import sys
import os
import time
binaries = {
'daala':['examples/encoder_example'],
'x264': ['x264'],
'x265': ['build/linux/x265'],
'vp8': ['vpxenc','vpxdec'],
'vp9': ['vpxenc','vpxdec'],
'vp10': ['vpxenc','vpxdec'],
'vp10-rt': ['vpxenc','vpxdec'],
'av1': ['aomen... | Python | 0 | @@ -814,10 +814,10 @@
res=
-32
+18
,wor
|
cd79fb297fd0675fb0a2a9bfb3824826225feffd | Allow home page URL to be turned off. | icekit/urls.py | icekit/urls.py | """
URLconf for ``icekit`` app.
"""
# Prefix URL names with the app name. Avoid URL namespaces unless it is likely
# this app will be installed multiple times in a single project.
from django.apps import apps
from django.conf import settings
from django.conf.urls import include, patterns, url
from django.contrib.auth... | Python | 0 | @@ -405,17 +405,267 @@
_forms%0A%0A
-%0A
+# HOME ############################################################################################%0A# Optional home view by default. To turn off place %60ICEKIT_USE_HOME_VIEW = False%60 in settings.%0Aif getattr(settings, 'ICEKIT_USE_HOME_VIEW', True):%0A
urlpatte
@@ -6... |
fdc139414ef0c0415448088d55f3c34aa56ef349 | Update RebuildMetadata.py | RebuildMetadata.py | RebuildMetadata.py | import MySQLdb
import re
import sys
import json
import os
from subprocess import call
import ParseDate
#These three libraries define the Bookworm-specific methods.
from CreateDatabase import *
from ImportNewLibrary import *
from WordsTableCreate import WordsTableCreate
# Pull a dbname from command line input.
dbname... | Python | 0 | @@ -80,22 +80,20 @@
t call%0A%0A
-import
+from
ParseDa
@@ -98,70 +98,17 @@
Date
-%0A%0A#These three libraries define the Bookworm-specific methods.
+ import *
%0Afro
@@ -397,58 +397,101 @@
ing
-the dates to a native format%22%0AParseDate.DateParser
+field_descriptions.json%22%0AParseFieldDescs()%0A%0Aprint %22Pa... |
c140b616993f2f733a345322b02851906f7b2a62 | change verbosity | initdb_worker/app.py | initdb_worker/app.py | #!/usr/bin/env python3
import requests
from math import degrees, sinh, atan, pi
import configparser
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import time
import logging
import os
config = configparser.ConfigParser()
config.read("app.conf")
LOG = logging.getLogger(__n... | Python | 0.000019 | @@ -1759,16 +1759,57 @@
event):%0A
+ LOG.debug(f%22New event: %7Bevent%7D%22)%0A
@@ -1908,37 +1908,36 @@
LOG.
-debug
+info
(f%22New entries i
|
61dc22ffd1fc2eed8625e7bc3d1431f8b5d92fbd | remove gen_image | image_utils.py | image_utils.py | import tensorflow as tf
import numpy as np
import imageio
import cv2
def down_sampling(img):
shape = img.get_shape() # [batch, height, width, channels]
h2 = int(shape[1] // 2)
w2 = int(shape[2] // 2)
return tf.image.resize_images(img, [h2, w2], tf.image.ResizeMethod.BILINEAR)
def up_sampling(img)... | Python | 0.001109 | @@ -1284,192 +1284,4 @@
mg)%0A
-%0A%0Adef get_image(path, w, h):%0A img = cv2.imread(path)%0A img = cv2.resize(img, (w, h))%0A%0A # bgr to rgb%0A # b, g, r = cv2.split(img)%0A # img = cv2.merge(%5Br, g, b%5D)%0A%0A return img%0A
|
e6a1c5fbeb3f0bb370dd459092ae52e69e45bbc6 | Tidy up imports | incuna_mail.py | incuna_mail.py | from django.conf import settings
from django.contrib.sites.models import Site
from django.template.loader import render_to_string
from django.core.mail import EmailMultiAlternatives, EmailMessage
from django.contrib.auth.models import User
def get_manager_emails():
"""
Get a list of the managers email addres... | Python | 0.000031 | @@ -50,13 +50,12 @@
rib.
-sites
+auth
.mod
@@ -65,20 +65,20 @@
import
-Site
+User
%0Afrom dj
@@ -86,47 +86,40 @@
ngo.
-template.loader import render_to_string
+contrib.sites.models import Site
%0Afro
@@ -143,16 +143,30 @@
l import
+ EmailMessage,
EmailMu
@@ -184,67 +184,60 @@
ives
-, EmailMessage%0A%0Afrom ... |
bfe77ad7206e345fa0dee99196890d8bc4a28f85 | Add touchforms check | corehq/apps/hqadmin/service_checks.py | corehq/apps/hqadmin/service_checks.py | """
A collection of functions which test the most basic operations of various services.
"""
from collections import namedtuple
import datetime
import json
import logging
from StringIO import StringIO
import time
from django.core import cache
from django.conf import settings
from django.contrib.auth.models import User
... | Python | 0 | @@ -342,16 +342,32 @@
esource%0A
+import requests%0A
from soi
@@ -2347,53 +2347,530 @@
-return ServiceStatus(False, %22Not implemented%22
+try:%0A res = requests.post(settings.XFORMS_PLAYER_URL,%0A data='%7B%22action%22: %22heartbeat%22%7D',%0A timeou... |
ad77024c97540532ab18c1a7c2cc9f0452c1f363 | Randomize observability in evidence_extractor if 0 | src/main/python/scripts/evidence_extractor.py | src/main/python/scripts/evidence_extractor.py | # Copyright 2017 Rice University
#
# 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 writin... | Python | 0.999993 | @@ -2490,32 +2490,141 @@
keywords'%5D = %5B%5D%0A
+ observability = clargs.observability if clargs.observability %3E 0 else random.randint(1, 100)%0A
@@ -2685,23 +2685,16 @@
nces) *
-clargs.
observab
@@ -4251,16 +4251,28 @@
50, etc.
+. 0 = random
)')%0A
|
58e3a0a09600f2b99df4eee74b39c462e56a2e0a | Use py.test for running tests in invoke tasks file | django/tasks.py | django/tasks.py | import os
from invoke import run, task
@task
def test(speed='fast'):
if speed == 'fast':
os.environ['DATABASE_URL'] = "sqlite://"
run("coverage run manage.py test")
run("coverage html")
| Python | 0 | @@ -151,59 +151,14 @@
un(%22
-coverage run manage.
py
-
+.
test%22)%0A
- run(%22coverage html%22)%0A
|
c8de67ea6ffbdfa18f59c061d2c2dd09b5d446e3 | use sphinxdoc theme | doc-src/conf.py | doc-src/conf.py | # -*- coding: utf-8 -*-
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
from os import path
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
import imapclient
# -- General configuration --------------------------------------... | Python | 0 | @@ -2660,23 +2660,25 @@
heme = '
-default
+sphinxdoc
'%0A%0A# The
|
791ee4a19313242fd16e4460b0d4b06d96fdc226 | fix documentation version | doc-src/conf.py | doc-src/conf.py | #!/usr/bin/env python3
import recommonmark
from recommonmark.parser import CommonMarkParser
from recommonmark.transform import AutoStructify
from pkg_resources import DistributionNotFound, get_distribution
try:
__version__ = get_distribution("benchbuild").version
except DistributionNotFound:
LOG.error("could no... | Python | 0.000011 | @@ -36,16 +36,81 @@
monmark%0A
+from pkg_resources import DistributionNotFound, get_distribution%0A
from rec
@@ -203,72 +203,8 @@
ify%0A
-from pkg_resources import DistributionNotFound, get_distribution
%0Atry
@@ -299,56 +299,12 @@
-LOG.error(%22could not find version information.%22)
+pass
%0A%0Apr
@@ -406,... |
1bb4d511723682568c0683450cdedf6b4878643e | Add detailed Maintenance admin | system_maintenance/admin.py | system_maintenance/admin.py | from django.contrib import admin
from .models import Maintenance, MaintenanceType, Software, SysAdmin, System
admin.site.register(Maintenance)
admin.site.register(MaintenanceType)
admin.site.register(Software)
admin.site.register(SysAdmin)
admin.site.register(System)
| Python | 0 | @@ -106,27 +106,23 @@
ystem%0A%0A%0A
+@
admin.
-site.
register
@@ -134,16 +134,1258 @@
tenance)
+%0Aclass MaintenanceAdmin(admin.ModelAdmin):%0A%0A fieldset_basic = ('Basic', %7B%0A 'fields': %5B%0A 'system',%0A 'sys_admin',%0A 'maintenance_type',%0A 'software',... |
75c5a6c5562938da67c8c0930fbaa6faaf972d32 | update version | setup.py | setup.py | from distutils.core import setup
setup(
name="mlimages",
packages=[
"mlimages",
"mlimages.imagenet"
],
install_requires=[
"requests",
"aiohttp"
],
version="0.1",
description="gather and create image dataset for machine learning",
author="icoxfog417",
... | Python | 0 | @@ -109,25 +109,77 @@
limages.
-imagenet%22
+gather%22,%0A %22mlimages.scripts%22,%0A %22mlimages.util%22,
%0A %5D,%0A
@@ -261,17 +261,17 @@
sion=%220.
-1
+2
%22,%0A d
@@ -289,16 +289,27 @@
%22gather
+image data
and crea
@@ -315,21 +315,21 @@
ate
-image
+training
data
-set
for
@@ -533,... |
c486a761d98ba5af46a8076da7f867ef00433805 | version bump (x2 since the previous version bump must have never been committed) | setup.py | setup.py | from distutils.core import setup
setup(
name='pybamboo',
version='0.5.7.5',
author='modilabs',
author_email='info@modilabs.org',
packages=['pybamboo'],
package_dir={'pybamboo': 'pybamboo'},
url='http://pypi.python.org/pypi/pybamboo/',
description='A Python package to interact wi... | Python | 0 | @@ -76,17 +76,17 @@
='0.5.7.
-5
+7
',%0A
|
d3545dabf741528e0b95fae995861299dbba5e52 | Change version to 0.1.7 | setup.py | setup.py | from setuptools import setup
from sys import version
if version < '2.6.0':
raise Exception("This module doesn't support any version less than 2.6")
import sys
sys.path.append("./test")
with open('README.rst', 'r') as f:
long_description = f.read()
classifiers = [
'Development Status :: 4 - Beta',
'I... | Python | 0.000249 | @@ -1040,17 +1040,17 @@
= '0.1.
-6
+7
',%0A p
|
ded1c14e192d691982168b1982ba5ee26df4d80b | Fix build on windows | setup.py | setup.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# source d'inspiration: http://wiki.wxpython.org/cx_freeze
import sys, os, subprocess, multiprocessing, site
from cx_Freeze import setup, Executable
from PyQt5 import QtCore
from os import listdir
from os.path import isfile, join
#############################################... | Python | 0 | @@ -802,270 +802,8 @@
%5B%5D%0A%0A
-schemas = os.path.join(site.getsitepackages()%5B0%5D, %22jsonschema%22, %22schemas%22)%0A%0Aonlyfiles = %5B f for f in listdir(schemas) if isfile(join(schemas,f)) %5D%0A%0Afor f in onlyfiles:%0A zipincludes.append((os.path.join(schemas, f), os.path.join(%22jsonschema%22, %22schem... |
42b5ce9a1f2c320597e80b49b58b8f0fc9e80661 | bump 0.1.2 | setup.py | setup.py | #! /usr/bin/env python
import os
import sys
from setuptools import setup
if sys.version_info[:2] < (2, 7):
sys.exit('mayalauncher requires Python 2.7 or higher.')
here = os.path.abspath(os.path.dirname(__file__))
# Get long description
try:
import pypandoc
pypandoc.convert_file('README.md', 'rst', outpu... | Python | 0.000014 | @@ -596,17 +596,17 @@
on='0.1.
-1
+2
',%0A d
|
9937071cfb85ab39c1c22a862f826c226b0e71ba | change long description to markdown | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from io import open
from setuptools import setup
version = '1.3.0'
def readme():
with open('README.md', encoding='utf-8') as f:
return f.read()
setup(name='persiantools',
version=version,
description='Jalali date and datetime with other tools',... | Python | 0.999764 | @@ -347,16 +347,69 @@
adme(),%0A
+ long_description_content_type=%22text/markdown%22,%0A
cl
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.