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 |
|---|---|---|---|---|---|---|---|
23fbbb1e164360287b775ab33da321a29136b2a4 | Drop `six` module from coverage. | rest_framework/runtests/runcoverage.py | rest_framework/runtests/runcoverage.py | #!/usr/bin/env python
"""
Useful tool to run the test suite for rest_framework and generate a coverage report.
"""
# http://ericholscher.com/blog/2009/jun/29/enable-setuppy-test-your-django-apps/
# http://www.travisswicegood.com/2010/01/17/django-virtualenv-pip-and-fabric/
# http://code.djangoproject.com/svn/django/tr... | Python | 0 | @@ -1779,22 +1779,31 @@
compat
+and six
module
+s
from co
@@ -1870,25 +1870,25 @@
of
-a
module
+s
which
-is
+are
spe
@@ -2106,24 +2106,90 @@
ompat.py')%0A%0A
+ if 'six.py' in files:%0A files.remove('six.py')%0A%0A
# Sa
|
ec15f90be6e6035225f4dd581cce08c7335eca7e | Generalized the function "centerWindow" | GUI/GuiUtilities.py | GUI/GuiUtilities.py | from Tkinter import *
def createFrame(parent, nRows, nCols, labelFrame = False, msg = None):
fr = None
if labelFrame == True:
fr = LabelFrame(parent, text=msg)
else:
fr = Frame(parent)
for r in range(nRows):
fr.rowconfigure(r, weight=1)
for c in range(nCols):
fr.columnconfigur... | Python | 0.999884 | @@ -787,12 +787,361 @@
sCols%5Bc%5D) %0A
+%0Adef centerWindow(frame, w = 600, h = 400):%0A%09try:%0A%09%09sw = frame.master.winfo_screenwidth()%0A%09%09sh = frame.master.winfo_screenheight()%0A%09except:%0A%09%09sw = frame.winfo_screenwidth()%0A%09%09sh = frame.winfo_screenheight()%0A%09x = (sw - w)/2%0A%09y = (sh - ... |
164dc5e5e425d42efba4f21a604a514ca61055f4 | Fix tempdir | tests/tests_eraint/test_eraint_reshuffle.py | tests/tests_eraint/test_eraint_reshuffle.py | # -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright (c) 2016, TU Wien
#
# 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
... | Python | 0.000001 | @@ -1387,22 +1387,8 @@
RATs
-%0Aimport shutil
%0A%0Ade
@@ -3354,35 +3354,4 @@
=5)%0A
- shutil.rmtree(ts_path)%0A
|
707b0d884cc550b699b10518048f5d4dd5621f10 | update CLI test outputs | tests/unit/stream_alert_cli/test_outputs.py | tests/unit/stream_alert_cli/test_outputs.py | """
Copyright 2017-present, Airbnb 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 writing, sof... | Python | 0 | @@ -1033,32 +1033,48 @@
onfig():%0A %22%22%22
+CLI - Outputs -
Load outputs con
@@ -1083,24 +1083,24 @@
guration%22%22%22%0A
-
config =
@@ -1215,16 +1215,50 @@
keys = %5B
+%0A u'aws-firehose',%0A
u'aws-la
@@ -1263,16 +1263,24 @@
lambda',
+%0A
u'aws-s
@@ -1282,16 +1282,24 @@
aws-s... |
3944429edc0219cfd35816bd4cce5faa6c0be034 | add pwm frequency control | example/rpi_gpio.py | example/rpi_gpio.py | #!/usr/bin/env python
"""
An example server for RaspberryPi GPIO control/monitor.
One output and one input are defined using ``PIN_OUT`` and ``PIN_INP``.
The output can either output constant low/high ('OUT'), or output a pulse of 100ms width ('TRIG').
"""
from pcaspy import Driver, SimpleServer
import RPi.GPIO as G... | Python | 0 | @@ -641,24 +641,65 @@
nt',%0A %7D,%0A
+ 'FREQ' : %7B%0A 'value': 1%0A %7D,%0A
'INP' :
@@ -2103,24 +2103,99 @@
ycle(value)%0A
+ elif reason == 'FREQ':%0A self.pwm.ChangeFrequency(value)%0A
else
|
3a6486ea882bbece49d609359b57acaf3c9b2519 | configure django broker as default | example/settings.py | example/settings.py | # Django settings for example project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'folivora',
}
}
# Local time zone for this installa... | Python | 0.000001 | @@ -3765,16 +3765,42 @@
elery',%0A
+ 'djcelery.transport',%0A
'gun
@@ -4925,8 +4925,56 @@
oader()%0A
+%0A# Use django database%0ABROKER_URL = 'django://'%0A
|
0772044240df3b4780a5efd81c35a027a91e2cc9 | example_european.py uses N = 2 ** 16 | example_european.py | example_european.py | # MODULES
import time
from payoffs import *
from options import *
from simpleMC import *
from parameters import *
from statisticsMC import *
from randomBase import SimpleStratifiedPM, AntiThetic
# CONSTANTS
N = 2 ** 18 #100000
SPOT_100 = 100
SPOT_130 = 130
# INPUTS
call_100_1 = VanillaOption(VanillaCall(100),1)
... | Python | 0.981759 | @@ -215,17 +215,17 @@
= 2 ** 1
-8
+6
#100000
|
b62d702cd18cdcfb14f895e32f505645854d606f | remove unused | examples/RunLoop.py | examples/RunLoop.py | #!/usr/bin/env python3
"""
To generate eigenprofiles, use -E option
default parameter values like those of Stan's fortran examples--yield rather similar output
Note that the number of bins for altitude and energy are "compiled in" the Fortran.
It would require substantial changes to the Fortran code to make these dyna... | Python | 0.998846 | @@ -60,16 +60,169 @@
E option
+.%0A%0APoker Flat eigenprofile example from command line:%0Apython 2013-03-01T10:48Z -c 65 -148 -E ~/code/transcar/transcar/BT_E1E2prev.csv --f107 --f107a --ap
%0A%0Adefaul
@@ -935,32 +935,8 @@
how%0A
-from os import makedirs%0A
from
@@ -2113,16 +2113,65 @@
ult=1.)%0A
+ #grp = par... |
8266f664d0fcd2907a8d5166c77dd4546e2fdb69 | which python | examples/classic.py | examples/classic.py | """
One PGM to own them all.
"""
# Deal with the path for import.
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
import daft
if __name__ == "__main__":
# Instantiate the PGM.
pgm = daft.PGM((3.5, 3))
# Hierarchical parameters.
pgm.add_node(daft.Node("alpha", r"$\a... | Python | 0.999429 | @@ -1,12 +1,34 @@
+#!/usr/bin/env python%0A
%22%22%22%0AOne PGM
|
8aaac6104d9f135c1f8fe16998b32237b0491122 | Test fix. | libcontextprovider/customer-tests/types/types.py | libcontextprovider/customer-tests/types/types.py | #!/usr/bin/env python2.5
##
## This file is part of ContextKit.
##
## Copyright (C) 2008, 2009 Nokia. All rights reserved.
##
## Contact: Marius Vollmer <marius.vollmer@nokia.com>
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public License
##... | Python | 0 | @@ -2243,24 +2243,199 @@
nged 5000%22)%0A
+%09%09# a fix: don't assert %22ValueChanged: ...%22 since commander might%0A%09%09# send other values in the same message (depending on which real%0A%09%09# providers are running in the system).%0A
@@ -2466,30 +2466,16 @@
expect(%22
-ValueChanged:
org.free
|
03ed0fa1242238757bb1c70ee9cfb4700a22efc1 | use batch of 29 images | test_localization_pascal_rf.py | test_localization_pascal_rf.py | #Copyright (C) 2016 Paolo Galeone <nessuno@nerdz.eu>
#
#This Source Code Form is subject to the terms of the Mozilla Public
#License, v. 2.0. If a copy of the MPL was not distributed with this
#file, you can obtain one at http://mozilla.org/MPL/2.0/.
#Exhibit B is not attached; this software is compatible with the
#lic... | Python | 0 | @@ -2237,17 +2237,18 @@
est_ds,
-1
+29
, input_
|
8c132d8b5cca510873d8cc92f07e784f596a3c92 | Call stop_episode before every test run | tests/agents_tests/test_a3c.py | tests/agents_tests/test_a3c.py | from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases()
import logging
import os
import tempfile
import unittest
from chain... | Python | 0 | @@ -583,50 +583,8 @@
ies%0A
-from chainerrl.recurrent import Recurrent%0A
from
@@ -5722,27 +5722,28 @@
-model = agent.model
+agent.stop_episode()
%0A%0A
@@ -5958,90 +5958,8 @@
.0%0A%0A
- if isinstance(model, Recurrent):%0A model.reset_state()%0A%0A
@@ -6168,16 +6168,16 @@
r... |
91cc69cc44483bb15cb03cb949c1e78c96307b51 | add test | tests/build/test_build_case.py | tests/build/test_build_case.py | # -*- coding: utf-8 -*-
import pytest
from pprint import pprint as pp
from scout.exceptions import PedigreeError, ConfigError, IntegrityError
from scout.build import build_case
def test_build_case(parsed_case, adapter, institute_obj, testpanel_obj):
"""Test function that build a case object when a case is loaded... | Python | 0.000002 | @@ -4501,18 +4501,16 @@
pter)%0A%0A%0A
-#
def test
@@ -4525,117 +4525,500 @@
ase_
-config(parsed_case):%0A#
+no_valid_panel():%0A %22%22%22Test loading a case containing a non-valid gene panel%22%22%22%0A%0A def test_build_minimal_case(adapter, institute_obj):%0A
-case_obj = build_case(parsed_case)%0... |
37b154952245a83c0645d0db180f16fe7dc1f29b | copy babel.messages.plural doctests as unit tests | tests/messages/test_plurals.py | tests/messages/test_plurals.py | # -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2011 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software consists... | Python | 0 | @@ -560,53 +560,386 @@
ls%0A%0A
+%0A
def
-suite():%0A suite = unittest.TestS
+test_get_plural():%0A assert plurals.get_plural(locale='en') == (2, '(n != 1)')%0A assert plurals.get_plural(locale='ga') == (3, '(n==1 ? 0 : n==2 ? 1 : 2)')%0A%0A tup = plurals.get_plural(%22ja%22)%0A assert tup.num_plurals... |
5a276dd96e3a361689ebece15d2ff38eb5ac5167 | Fix typo related to coverage tests. | tests/optimizations/run_all.py | tests/optimizations/run_all.py | #!/usr/bin/env python
# Copyright 2019, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Python test originally created or extracted from other peoples work. The
# parts from me are licensed as below. It is at least Free Software where
# it's copied from other people. In these cases, that will normally be
# ... | Python | 0 | @@ -6469,16 +6469,37 @@
%22-c%22
+,%0A
%22import
|
9f58f2ec2d3bf5a42e2d81e12d30d8bb37c4e04b | fix python 2.6 tests | tests/reporter/test_librato.py | tests/reporter/test_librato.py | import requests
import sys
from mock import patch
from unittest import TestCase, skipIf
from metrology import Metrology
from metrology.reporter.librato import LibratoReporter
@skipIf("java" in sys.version.lower(), "doesn't support jython")
class LibratoReporterTest(TestCase):
def setUp(self):
self.repor... | Python | 0.00006 | @@ -19,16 +19,30 @@
port sys
+%0Aimport pytest
%0A%0Afrom m
@@ -91,16 +91,8 @@
Case
-, skipIf
%0A%0Afr
@@ -183,15 +183,28 @@
%0A%0A%0A@
+pytest.mark.
skip
-I
+i
f(
+'
%22jav
@@ -232,34 +232,9 @@
er()
-, %22doesn't support jython%22
+'
)%0Acl
|
763a2e55d04779e8c9d339b74bff4b876736c8a9 | add data/lib/* to the driver class path | tests/runPixiedustNotebooks.py | tests/runPixiedustNotebooks.py | # -------------------------------------------------------------------------------
# Copyright IBM Corp. 2016
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licens... | Python | 0 | @@ -1938,39 +1938,107 @@
%22--
-master local%5B10%5D pyspark-shell%22
+driver-class-path %7B0%7D/data/libs/* --master local%5B10%5D pyspark-shell%22.format(os.path.expanduser('~'))
,%0A
|
1f36cb7bfc2b8d7e8b5c4720c6c57562fca9ad63 | Update tests/test_aggr_regressions.py | tests/test_aggr_regressions.py | tests/test_aggr_regressions.py | """
Regression tests for issues 386, 449, 484, and 558 — all related to processing complex aggregations and projections.
"""
import itertools
from nose.tools import assert_equal, raises
import datajoint as dj
from . import PREFIX, CONN_INFO
import datetime
import numpy as np
import uuid
from .schema_uuid import Topic,... | Python | 0 | @@ -239,55 +239,8 @@
NFO%0A
-import datetime%0Aimport numpy as np%0Aimport uuid%0A
from
|
9397c176f6eb0a98ac901085465a9ef4377d2687 | Add comment about matplotlib backend | tests/test_image_regression.py | tests/test_image_regression.py | import io
from functools import partial
from pytest_regressions.common import Path
from pytest_regressions.testing import check_regression_fixture_workflow
def test_image_regression(image_regression, datadir):
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
matplotlib.use("Agg")... | Python | 0 | @@ -288,16 +288,87 @@
as np%0A%0A
+ # this ensures matplot lib does not use a GUI backend (such as Tk)%0A
matp
|
322eb8b9bc096dd13b2621d25dae4983eb81edbc | support numpy 1.3.0 | tests/test_quality/test_rms.py | tests/test_quality/test_rms.py | import unittest
if not hasattr(unittest.TestCase, 'assertIsInstance'):
import unittest2 as unittest
import os
import numpy
from numpy.testing import assert_array_equal, assert_almost_equal
from tkp.utility import accessors
import tkp.quality
from tkp.quality import statistics
import tkp.lofar.noise
import tkp.conf... | Python | 0.000508 | @@ -166,32 +166,38 @@
y_equal, assert_
+array_
almost_equal%0Afro
@@ -3224,32 +3224,38 @@
assert_
+array_
almost_equal(ds,
@@ -3547,32 +3547,38 @@
assert_
+array_
almost_equal(ds,
@@ -3928,16 +3928,22 @@
assert_
+array_
almost_e
|
c998488afa1e7a4028386eab79647665cc30c4fe | Make the tests pass with docutils 0.18 | tests/test_restructuredtext.py | tests/test_restructuredtext.py | # vim: ts=8:sts=8:sw=8:noexpandtab
# This file is part of python-markups test suite
# License: 3-clause BSD, see LICENSE file
# Copyright: (C) Dmitry Shachnev, 2012-2021
import unittest
from markups import ReStructuredTextMarkup
basic_text = '''\
Hello, world!
=============
Some subtitle
~~~~~~~~~~~~~
This is an e... | Python | 0 | @@ -2014,24 +2014,34 @@
f.assertIn('
+%3Cp class=%22
system-messa
@@ -2034,32 +2034,65 @@
=%22system-message
+-title%22%3ESystem Message: WARNING/2
', body)%0A%09%09self.
@@ -2363,24 +2363,24 @@
tNotIn('
-s
+S
ystem
--m
+ M
essage',
|
f85b9f234c1a36aa657e1a75497f6fc1d3775ea7 | Update test based on using service descriptions | tests/unit/docs/test_client.py | tests/unit/docs/test_client.py | # Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | Python | 0.00004 | @@ -1163,16 +1163,34 @@
yService
+',%0A '
::',%0A
|
3293783d0df47d864ecf2734869f8d23f0e83d0f | Integrate LLVM at llvm/llvm-project@81b51b61f849 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "deadda749aef22dba4727f5c4d76090ecca559ac"
LLVM_SHA256 = "ae39878b45d0047fc11569409355938b0254d1080e9aa5cfc50d97b498a6812f"
tf_http_archive(
... | Python | 0.000001 | @@ -160,133 +160,133 @@
= %22
-deadda749aef22dba4727f5c4d76090ecca559ac%22%0A LLVM_SHA256 = %22ae39878b45d0047fc11569409355938b0254d1080e9aa5cfc50d97b498a6812f
+81b51b61f849fa91bdf5d0695918578abae846e3%22%0A LLVM_SHA256 = %224efa8c26189f4b9d1d137d04f48895bae716320246108cf05885293be5d5b6bc
%22%0A%0A
|
941ec9e2eb31686ecf51c753034b0d36fcc77f47 | Integrate LLVM at llvm/llvm-project@df7606a066b7 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tfrt_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "fa79dff8bc8b2da923d4935f4b2035f7e1e11e0a"
LLVM_SHA256 = "cf940b7e6f047fdbae94c8f01197400e81782685ff39736023bd07c249c6cf83"
tfrt_http_archive(
... | Python | 0.000001 | @@ -162,133 +162,133 @@
= %22
-fa79dff8bc8b2da923d4935f4b2035f7e1e11e0a%22%0A LLVM_SHA256 = %22cf940b7e6f047fdbae94c8f01197400e81782685ff39736023bd07c249c6cf83
+df7606a066b75ce55ae4a186c785f996e0985db1%22%0A LLVM_SHA256 = %2229a2854dab1f8a8282630d6475be7d59a03b78bd30c30f96ae0afe672a81995c
%22%0A%0A
|
184fe1b24a6f5936f8688b81a05aa97fce31757f | Integrate LLVM at llvm/llvm-project@1830ec94ac02 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "6069a6a5049497a32a50a49661c2f4169078bdba"
LLVM_SHA256 = "695c18f11fde8a2aebd2f4144c04878439a382b303e62a2da0d64553b9611efb"
tf_http_archive(
... | Python | 0.000004 | @@ -160,133 +160,133 @@
= %22
-6069a6a5049497a32a50a49661c2f4169078bdba%22%0A LLVM_SHA256 = %22695c18f11fde8a2aebd2f4144c04878439a382b303e62a2da0d64553b9611efb
+1830ec94ac022ae0b6d6876fc2251e6b91e5931e%22%0A LLVM_SHA256 = %22a85d5c8dd40fe7a94a8eec5d5d4794cad018435899b68aac079812686779a858
%22%0A%0A
|
2719fa58a5decb4f71a8f36d929117ec729231c3 | Integrate LLVM at llvm/llvm-project@86cdb2929cce | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "bf59cd72447facdb7b17fc00c502d18a02135abb"
LLVM_SHA256 = "5321e1f1c16a7920f9e96c75bdf5bf112bf7bb5c086054b92e6f3008f4e787d5"
tf_http_archive(
... | Python | 0.000001 | @@ -160,133 +160,133 @@
= %22
-bf59cd72447facdb7b17fc00c502d18a02135abb%22%0A LLVM_SHA256 = %225321e1f1c16a7920f9e96c75bdf5bf112bf7bb5c086054b92e6f3008f4e787d5
+86cdb2929ccea1968cbbac6387380a6162e78d21%22%0A LLVM_SHA256 = %227ba716b33b48ba1da8cda299d1feb6a545aefdae67794a6da8a595473c6ed5ce
%22%0A%0A
|
17fadbfa00cffddd6abb6c558b4ffa2099814de8 | Integrate LLVM at llvm/llvm-project@0e92cbd6a652 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tfrt_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "8e5f3d04f269dbe791076e775f1d1a098cbada01"
LLVM_SHA256 = "51f4950108027260a6dfeac4781fdad85dfde1d8594f8d26faea504e923ebcf2"
tfrt_http_archive(
... | Python | 0.000001 | @@ -162,133 +162,133 @@
= %22
-8e5f3d04f269dbe791076e775f1d1a098cbada01%22%0A LLVM_SHA256 = %2251f4950108027260a6dfeac4781fdad85dfde1d8594f8d26faea504e923ebcf2
+0e92cbd6a652c4f86fa76a3af2820009d5b6c300%22%0A LLVM_SHA256 = %22cac34f6de9b704259b26cfb4fa52ed9563330fc1dc01e1594266d4e00bafb91d
%22%0A%0A
|
a22a8dd23ade41fcefab17328d38a966afa41ec7 | Integrate LLVM at llvm/llvm-project@42102bce98e5 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "d56b171ee965eba9ba30f4a479a9f2e1703105cf"
LLVM_SHA256 = "bce89fe2ac52b1d3165d8e85c3df02da1a222f4f61dced63bbfe2fc35ad97d4a"
tf_http_archive(
... | Python | 0.000003 | @@ -160,133 +160,133 @@
= %22
-d56b171ee965eba9ba30f4a479a9f2e1703105cf%22%0A LLVM_SHA256 = %22bce89fe2ac52b1d3165d8e85c3df02da1a222f4f61dced63bbfe2fc35ad97d4a
+42102bce98e527f994a7bc68b2255d9e0462f6eb%22%0A LLVM_SHA256 = %22946a0b227e7435531e5286d84cad60011e9613a3198e0e3c07d199babee0db5c
%22%0A%0A
|
639232e16a85c7146f13b54a94ee388322129b27 | Integrate LLVM at llvm/llvm-project@03512ae9bf31 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tfrt_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "131f7bac63b8cc1700bbae908bdac60f438e69d1"
LLVM_SHA256 = "f3c917ddab6f8e629569ee59df37020098e718d7d7429e149d9df6e6aba211c4"
tfrt_http_archive(
... | Python | 0.000001 | @@ -162,133 +162,133 @@
= %22
-131f7bac63b8cc1700bbae908bdac60f438e69d1%22%0A LLVM_SHA256 = %22f3c917ddab6f8e629569ee59df37020098e718d7d7429e149d9df6e6aba211c4
+03512ae9bf31b725d8233c03094fd463b5f46285%22%0A LLVM_SHA256 = %227022aac9ace736042b9363fb8becb5bc17efd78c045592506d866d88b34ba271
%22%0A%0A
|
b8b0a570c1762364d904e0e2fd82cafe8bee9726 | Integrate LLVM at llvm/llvm-project@54cc7de4bc01 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tfrt_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "077f90315bec29443784a1bb2c55f3d7fc2eab64"
LLVM_SHA256 = "b8204098753a27847e6084c95d7aa62083cc752ba29899b55058e38ea3f1c4f6"
tfrt_http_archive(
... | Python | 0.000001 | @@ -162,133 +162,133 @@
= %22
-077f90315bec29443784a1bb2c55f3d7fc2eab64%22%0A LLVM_SHA256 = %22b8204098753a27847e6084c95d7aa62083cc752ba29899b55058e38ea3f1c4f6
+54cc7de4bc01e6178213e4487d6ab49b809ba2b0%22%0A LLVM_SHA256 = %22a939c493893b2d27ea87d0d28efc79f33cdee4c56ac5954bc19ca2222a29af9d
%22%0A%0A
|
fe8e227f3e9b98341effa1ea92c4391cdc955c31 | Integrate LLVM at llvm/llvm-project@86bde99a9027 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tfrt_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "5e90f384243f64265814828896168316c80aabc0"
LLVM_SHA256 = "818a3264700fd07a24c6ff81fb64196638f17ab78de1afcfbdbd5138a087df77"
tfrt_http_archive(
... | Python | 0.000001 | @@ -162,133 +162,133 @@
= %22
-5e90f384243f64265814828896168316c80aabc0%22%0A LLVM_SHA256 = %22818a3264700fd07a24c6ff81fb64196638f17ab78de1afcfbdbd5138a087df77
+86bde99a9027f875383e38bfd3a863abae3d0e75%22%0A LLVM_SHA256 = %22bdd4964d0e0d389cc3a73f04b4ebbd2da3618622a0f3774dd97223d00c7f13a8
%22%0A%0A
|
0905a345b5a13ceffc3081f3579d4c0a4c5fe2f4 | Integrate LLVM at llvm/llvm-project@bf60a5af0a21 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tfrt_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "81b51b61f849fa91bdf5d0695918578abae846e3"
LLVM_SHA256 = "4efa8c26189f4b9d1d137d04f48895bae716320246108cf05885293be5d5b6bc"
tfrt_http_archive(
... | Python | 0.000001 | @@ -162,133 +162,133 @@
= %22
-81b51b61f849fa91bdf5d0695918578abae846e3%22%0A LLVM_SHA256 = %224efa8c26189f4b9d1d137d04f48895bae716320246108cf05885293be5d5b6bc
+bf60a5af0a21323f257719a08d57b28a3389b283%22%0A LLVM_SHA256 = %2288a9441686bc19d9b559b4342af76c4757878197940a6dafa85b5022be384105
%22%0A%0A
|
57b178cd6c81727feb6fad6a49831ab60de46a01 | Integrate LLVM at llvm/llvm-project@1fa4c188b5a4 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "57dfa12e4ca8d8f5642a3c3a1e80040fd5cba3c9"
LLVM_SHA256 = "9f54c2946fa692c1fa699b782c240dd8a118c8acfd910624b208736c0024a35d"
tf_http_archive(
... | Python | 0.000008 | @@ -160,133 +160,133 @@
= %22
-57dfa12e4ca8d8f5642a3c3a1e80040fd5cba3c9%22%0A LLVM_SHA256 = %229f54c2946fa692c1fa699b782c240dd8a118c8acfd910624b208736c0024a35d
+1fa4c188b5a4187dba7e3809d8fd6d6eccff99f4%22%0A LLVM_SHA256 = %2224155665d0537320a3b20c668c8cc3142106a0bc2e901d6c99d9ca807c1ef141
%22%0A%0A
|
9fb08850e9b44bb420a74050a4ecd338fc686141 | Integrate LLVM at llvm/llvm-project@72136d8ba266 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tfrt_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "4b33ea052ab7fbceed4c62debf1145f80d66b0d7"
LLVM_SHA256 = "b6c61a6c81b1910cc34ccd9800fd18afc2dc1b9d76c640dd767f9e550f94c8d6"
tfrt_http_archive(
... | Python | 0.000001 | @@ -162,133 +162,133 @@
= %22
-4b33ea052ab7fbceed4c62debf1145f80d66b0d7%22%0A LLVM_SHA256 = %22b6c61a6c81b1910cc34ccd9800fd18afc2dc1b9d76c640dd767f9e550f94c8d6
+72136d8ba266eea6ce30fbc0e521c7b01a13b378%22%0A LLVM_SHA256 = %2254d179116e7a79eb1fdf7819aad62b4d76bc0e15e8567871cae9b675f7dec5c1
%22%0A%0A
|
767acbaab7d61c7328b3cbe1bb459e40ea485c10 | Move context creation in __init__ | spyne/server/zeromq.py | spyne/server/zeromq.py |
#
# spyne - Copyright (C) Spyne contributors.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This libra... | Python | 0 | @@ -1,13 +1,12 @@
-%0A
#%0A# spyne -
@@ -1018,58 +1018,8 @@
se%0A%0A
-context = zmq.Context()%0A%22%22%22The ZeroMQ context.%22%22%22%0A
%0Acla
@@ -1335,19 +1335,29 @@
url=None
+, ctx=None
):%0A
-
@@ -1397,16 +1397,57 @@
_(app)%0A%0A
+ self.ctx = ctx or zmq.Context()%0A%0A
@@ -1529,23 ... |
83c369e1bada134fb09e28f251d711374a33b0a8 | Use sys.argv[0] instead of __file__ path | albumr.py | albumr.py | #!/usr/bin/env python3
# Nikita Kouevda
# 2014/08/22
from argparse import ArgumentParser
from html.parser import HTMLParser
from multiprocessing import Pool
import os
import re
import sys
from urllib.request import urlopen
PROGRAM = os.path.basename(__file__)
def print_error(message):
print('%s: %s' % (PROGRAM,... | Python | 0.996964 | @@ -45,13 +45,13 @@
014/
-08/22
+11/27
%0A%0Afr
@@ -119,20 +119,22 @@
LParser%0A
-from
+import
multipr
@@ -145,20 +145,8 @@
sing
- import Pool
%0Aimp
@@ -214,47 +214,8 @@
n%0A%0A%0A
-PROGRAM = os.path.basename(__file__)%0A%0A%0A
def
@@ -249,26 +249,34 @@
nt('
-%25s: %25s' %25 (PROGRAM
+%7B%7D: %7B%7D'.format... |
ccd3a50d5518d6fe4d45f31360ebf2c7849af62c | Add OCA as author of OCA addons | l10n_es_account_asset/__openerp__.py | l10n_es_account_asset/__openerp__.py | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the G... | Python | 0 | @@ -1139,16 +1139,49 @@
M. Baeza
+,Odoo Community Association (OCA)
%22,%0A %22
|
edb52dcbd58e4f31dff26a6e60ae4d670619121e | correct settings for SMTP | C4GD_web/default_settings.py | C4GD_web/default_settings.py | # coding=utf-8
RELATIVE_TO_API_HOURS_SHIFT = 0 # our system has 13, keystone db 14 => 1
SECRET_KEY = 'g.U(\x8cQ\xbc\xdb\\\xc3\x9a\xb2\xb6,\xec\xad(\xf8"2*\xef\x0bd'
NEXT_TO_LOGIN_ARG = 'next' # GET/POST field name to store next after login URL
DEFAULT_NEXT_TO_LOGIN_VIEW = 'dashboard' # no next? redirect to this view
DE... | Python | 0.000002 | @@ -942,13 +942,11 @@
'Do
-
Not
-
Repl
|
601f543d60a15a61b501d85d364a710d21ecc90d | fix encoding bug | extract_headings.py | extract_headings.py | #!/usr/bin/env python
# -*- encoding: UTF-8 -*-
# @author: wilbur.ma@foxmail.com
# @date: 2013-08-23
# @license: BSD 3-Clause License
# @brief: parse h1~h6 headings and generate
# toc of a markdwon file
from bs4 import BeautifulSoup
from pelican import signals, readers, contents
import os, sys, re, md5, markdo... | Python | 0.000001 | @@ -505,16 +505,17 @@
return
+u
%22%7B%7D:%7B%7D%22.
@@ -985,16 +985,17 @@
er.warn(
+u
%22found d
|
68a49aa5ad009afd5e58b88f414be898d02b2b30 | add solution for permutation sequence | leetcode/permutation-sequence/sol.py | leetcode/permutation-sequence/sol.py | #!/usr/bin/env python
class Solution:
# @return a string
def getPermutation(self, n, k):
p = {0:1, 1:1}
for i in range(2,n+1):
p[i]=p[i-1]*i
sk = []
for i in range(n):
sk.append(True)
kl = k-1
res = []
for i in ra... | Python | 0.000385 | @@ -291,18 +291,18 @@
res =
-%5B%5D
+%22%22
%0A
@@ -611,23 +611,27 @@
res
-.append
+ += %22%25d%22 %25
(ji+1)%0A
|
6bd9fe1b3ce0a1ecb9e0b499ef728c631a28fe97 | Refactor handling of SID/PID return values to response middleware | d1_mn_generic/src/service/mn/middleware/response_handler.py | d1_mn_generic/src/service/mn/middleware/response_handler.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This work was created by participants in the DataONE project, and is
# jointly copyrighted by participating institutions in DataONE. For
# more information on DataONE, see our web site at http://dataone.org.
#
# Copyright 2009-2012 DataONE
#
# Licensed under the Apache... | Python | 0 | @@ -1455,24 +1455,187 @@
ew_result):%0A
+ # If view_result is a HttpResponse, return it unprocessed.%0A if isinstance(view_result, django.http.response.HttpResponseBase):%0A response = view_result%0A
# If res
@@ -1706,14 +1706,22 @@
+el
if
-typ
+isinstanc
e(vi
@@ -1733,17 +1733,15 @@
sult
-) ... |
040a53a0e27f7bcc65d2b8d8cd7cb30b209b7915 | add name command and extract data from 'get-like' requests | blinky.py | blinky.py | __author__ = "Paul Dumoulin"
__email__ = "paul.l.dumoulin@gmail.com"
import sys
import urllib2
import socket
ports = [49153, 49152]
commands = {
'on' : {
'body' : '<u:SetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"><BinaryState>1</BinaryState></u:SetBinaryState>',
'header' : '"urn:Belk... | Python | 0.000001 | @@ -78,16 +78,27 @@
rt sys%0D%0A
+import re%0D%0A
import u
@@ -356,32 +356,33 @@
SetBinaryState%22'
+,
%0D%0A %7D,%0D%0A 'off'
@@ -790,24 +790,305 @@
inaryState%22'
+,%0D%0A 'data' : 'BinaryState'%0D%0A %7D,%0D%0A 'name' : %7B%0D%0A 'body' : '%3Cu:GetFriendlyName xmlns:u=%22urn:Belkin:service:basice... |
90abcfc316bcd3b998ea3d120adbe49a1b89d9ec | Update tests_globals.py | trendpy/tests/tests_globals.py | trendpy/tests/tests_globals.py | # -*- coding: utf-8 -*-
# tests_globals.py
# MIT License
# Copyright (c) 2017 Rene Jean Corneille
# 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 li... | Python | 0.000001 | @@ -1262,24 +1262,25 @@
inf%0A%0Acurrent
+_
dir = os.pat
@@ -1353,16 +1353,17 @@
)%0Aparent
+_
dir = os
@@ -1395,24 +1395,25 @@
name(current
+_
dir))%0Asys.pa
@@ -1430,16 +1430,17 @@
0,parent
+_
dir)%0A%0Aim
|
ae78bd758c690e28abaae2c07e8a3890e76044e0 | Allow papers/maxout to be tested without MNIST data | pylearn2/scripts/papers/maxout/tests/test_mnist.py | pylearn2/scripts/papers/maxout/tests/test_mnist.py | import os
import numpy as np
import pylearn2
from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix
from pylearn2.termination_criteria import EpochCounter
from pylearn2.utils.serial import load_train_file
def test_mnist():
"""
Test the mnist.yaml file from the dropout
paper on random input
... | Python | 0.000001 | @@ -214,16 +214,17 @@
n_file%0A%0A
+%0A
def test
@@ -625,17 +625,16 @@
els=10)%0A
-%0A
trai
@@ -696,16 +696,75 @@
ochs=1)%0A
+ train.algorithm._set_monitoring_dataset(train.dataset)%0A
trai
|
fca5e3d1f1a2c9a2378c4aff7b3d14c37b4de6af | Fix update_api to work with 1.8 | readthedocs/core/management/commands/update_api.py | readthedocs/core/management/commands/update_api.py | import logging
from optparse import make_option
from django.core.management.base import BaseCommand
from readthedocs.projects import tasks
from readthedocs.api.client import api
log = logging.getLogger(__name__)
class Command(BaseCommand):
"""Custom management command to rebuild documentation for all projects ... | Python | 0 | @@ -493,16 +493,77 @@
t=False)
+%0A parser.add_argument('projects', nargs='+', type=str)
%0A%0A de
@@ -646,34 +646,8 @@
se)%0A
- if len(args):%0A
@@ -662,20 +662,35 @@
slug in
-args
+options%5B'projects'%5D
:%0A
@@ -695,20 +695,16 @@
-
-
project_
@@ -734,20 +734,16 ... |
f51105e048d8f07ae5a1409b271246ae508c052a | Fix the iteration | lib/python/autobahn/case/case5_16.py | lib/python/autobahn/case/case5_16.py | ###############################################################################
##
## Copyright 2011 Tavendo GmbH
##
## 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
##
## ht... | Python | 0.99992 | @@ -1290,15 +1290,16 @@
in
+x
range(
-1
+0
, 2)
|
05ecc1f721d4683c2412e28a82eabe607c3a9129 | allow additional args for installing package | fabtask/packages.py | fabtask/packages.py | from fabric.api import env, sudo, run
from fabtask.utils import program_exists, is_linux, is_macos
def find_package_management_program():
if env.get('install_package_command'):
return
if is_linux():
if program_exists('apt-get'):
env.install_package_command = 'sudo apt-get install -y'
elif program_exists('yu... | Python | 0 | @@ -664,24 +664,41 @@
package(name
+, install_args=%22%22
):%0A%09find_pac
@@ -724,20 +724,22 @@
gram()%0A%09
-run(
+cmd =
'%25s %25s'
@@ -775,16 +775,71 @@
d, name)
+%0A%09if install_args:%0A%09%09cmd += ' ' + install_args%0A%09run(cmd
)%0A%0Adef e
|
1670b9ae583ae151ea6aeb2ac09c468cfc30f266 | fix homebrew issues | fabtask/packages.py | fabtask/packages.py | from fabric.api import env, sudo, run
from fabtask.utils import program_exists, is_linux, is_macos
def find_package_management_program():
if env.get('install_package_command'):
return
if is_linux():
if program_exists('apt-get'):
env.install_package_command = 'sudo apt-get install -y'
elif program_exists('yu... | Python | 0.000001 | @@ -30,16 +30,26 @@
udo, run
+, settings
%0Afrom fa
@@ -103,16 +103,57 @@
_macos%0A%0A
+class PackageError(Exception):%0A pass%0A%0A
def find
@@ -183,17 +183,20 @@
gram():%0A
-%09
+
if env.g
@@ -230,18 +230,27 @@
'):%0A
-%09%09
+
return%0A
-%09
+
if i
@@ -260,18 +260,24 @@
inux():%0A
-%09%0... |
b85307aed2a2f909674734a5f5b84e353701eaaf | update version to 0.7.7 | fastapp/__init__.py | fastapp/__init__.py | __version__ = "0.7.6"
import os
from django.core.exceptions import ImproperlyConfigured
# load plugins
from django.conf import settings
try:
plugins_config = getattr(settings, "FASTAPP_PLUGINS_CONFIG", {})
plugins = plugins_config.keys()
plugins = plugins + getattr(settings, "FASTAPP_PLUGINS", [])
fo... | Python | 0.000001 | @@ -16,9 +16,9 @@
0.7.
-6
+7
%22%0A%0Ai
|
fe5c562d3e452b77ee97d8ebeb805d1084eaada5 | change to test_formula -- linalg renaming | lib/statistics/tests/test_formula.py | lib/statistics/tests/test_formula.py | import unittest, csv, os
import numpy as N
import numpy.random as R
import numpy.linalg as L
import scipy, string
from neuroimaging.statistics import utils, formula, contrast
class FormulaTest(unittest.TestCase):
def setUp(self):
self.X = R.standard_normal((40,10))
self.namespace = {}
sel... | Python | 0 | @@ -2124,27 +2124,12 @@
, L.
-generalized_inverse
+pinv
(X))
|
67ea1674184bd71a88019575a2cc61388b6ac26d | Move an import statement | helusers/management/commands/sync_helusers.py | helusers/management/commands/sync_helusers.py | from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.management.base import BaseCommand
from django.contrib.sites.models import Site
from allauth.socialaccount.models import SocialApp
from helusers.providers.helsinki.provider import HelsinkiProvider
class Command(B... | Python | 0.000334 | @@ -138,53 +138,8 @@
and%0A
-from django.contrib.sites.models import Site%0A
from
@@ -1569,16 +1569,74 @@
ists():%0A
+ from django.contrib.sites.models import Site%0A%0A
|
45256880a063e99ea40944044b2acfabf4fc7af1 | change media list key to 'media_list' | twilio/rest/resources/media.py | twilio/rest/resources/media.py | from twilio.rest.resources import InstanceResource, ListResource
from twilio.rest.resources.util import normalize_dates, parse_date
class Media(InstanceResource):
""" Represents media associated with a :class:`Message`.
.. attribute:: sid
A 34 character string that uniquely identifies this resource.... | Python | 0.000183 | @@ -1163,24 +1163,29 @@
key = %22media
+_list
%22%0A instan
|
7911ffa17d693f6428e7f78f12c0912b5c294ba6 | add reaction to triggering messages | typingtrigger/typingtrigger.py | typingtrigger/typingtrigger.py | #!/usr/bin/env python3
import os
import logging
import datetime
import discord
from discord.ext import commands
from cogs.utils import checks
from cogs.utils.dataIO import fileIO
from __main__ import send_cmd_help
log = logging.getLogger('red.TypingTrigger')
class UnCache(object):
def __init__(self, ttl=datetim... | Python | 0.000001 | @@ -3329,35 +3329,40 @@
bot.
-send_typing(message.channel
+add_reaction(message, ':bigred:'
)%0A%0A
|
e3b457c141ee4258db4a1b71b8632cee4f1bc929 | Change frequency per server | upol_search_engine/__main__.py | upol_search_engine/__main__.py | from datetime import datetime
from time import sleep
from upol_search_engine.upol_crawler import tasks
def main():
blacklist = """portal.upol.cz
stag.upol.cz
library.upol.cz
adfs.upol.cz
portalbeta.upol.cz
idp.upol.cz
famaplus.upol.cz
es.upol.cz
smlouvy.upol.cz
menza.upol.cz
... | Python | 0 | @@ -620,17 +620,17 @@
ver': 0.
-5
+7
,%0A
|
76abfd7914b5521cd3d59308adbb2a7049aaf50b | add comment that version is a required field | user-management/python/user.py | user-management/python/user.py | import time
import PureCloudPlatformClientV2, os
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Credentials
CLIENT_ID = os.environ['GENESYS_CLOUD_CLIENT_ID']
CLIENT_SECRET = os.environ['GENESYS_CLOUD_CLIENT_SECRET']
ORG_REGION = os.environ['GENESYS_CLOUD_REGION'] # eg. us_east_1
... | Python | 0.000004 | @@ -1037,16 +1037,78 @@
w Name%22%0A
+# Take note that version is a required value in updating user%0A
updateus
@@ -1381,12 +1381,13 @@
updateuser)
+%0A
|
3b4f0270dc7185a2143ae9aa62bcba7219983e95 | test fix | utest/result/test_reporting.py | utest/result/test_reporting.py | import unittest
from robot.result import ResultWriter
import robot.result.builders
import resources
def set_write_log_mock():
results = {'log_path': None}
def write_log(self):
results['log_path'] = self._path
robot.result.builders.LogBuilder._write_file = write_log
return results
def set_wr... | Python | 0.000001 | @@ -1053,20 +1053,40 @@
round':
-None
+('green', 'pink', 'red')
,%0A
|
c5855e30560538abf3410c1cf456134131ea1a2e | Add version number | src/clocker.py | src/clocker.py | """A small Python 3 module that keeps track of elapsed time
and its current state"""
import time
from util import round_two_decimals, round_three_decimals
class Clocker(object):
"""The time watcher class that keeps track of elapsed time and state"""
def __init__(self):
self.mode = 'init'
... | Python | 0.000009 | @@ -157,16 +157,41 @@
mals%0D%0A%0D%0A
+__version__ = '0.1'%0D%0A%0D%0A%0D%0A
class Cl
@@ -3250,28 +3250,30 @@
se:%0D%0A return None
+%0D%0A
|
a13cb4e50f33aa148b1a5603f232c261bce61687 | Use precision parameter | src/compas/files/stl.py | src/compas/files/stl.py | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import struct
from compas.utilities import geometric_key
__all__ = [
'STL',
'STLReader',
'STLParser',
]
class STL(object):
def __init__(self, filepath, precision=None):
self.reader ... | Python | 0.000001 | @@ -5948,24 +5948,40 @@
tric_key(xyz
+, self.precision
)%0A
|
fbabf15f1db758c732b5be3a485f039d7c2a82dd | Simplify connecting to rmake servers by defaulting in the correct port, not using the user + password when connecting to a unix socket (your unix user is used instead) and defaulting to the local connection. | rmake_plugins/multinode_client/build/buildcfg.py | rmake_plugins/multinode_client/build/buildcfg.py | #
# Copyright (c) 2007 rPath, Inc. All Rights Reserved.
#
import urllib
from conary.lib import cfgtypes
from rmake.build import buildcfg
from rmake.lib import apiutils
class BuildContext(object):
rmakeUrl = (cfgtypes.CfgString, 'https://localhost:9999')
rmakeUser = (buildcfg.CfgUser, None)
clientCert =... | Python | 0 | @@ -235,30 +235,36 @@
g, '
-https://localhost:9999
+unix:///var/lib/rmake/socket
')%0A
@@ -521,167 +521,182 @@
-if self.rmakeUser:%0A url = '%25s://%25s:%25s@%25s%25s' %25 (type, self.rmakeUser%5B0%5D, self.rmakeUser%5B1%5D,%0A host, path)%0A else:%0A
+host, port... |
0f89209a4a95297aa50f9944309b6021938d4b58 | Remove debugging print | rnacentral_pipeline/rnacentral/genome_mapping.py | rnacentral_pipeline/rnacentral/genome_mapping.py | # -*- coding: utf-8 -*-
"""
Copyright [2009-2018] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by... | Python | 0.000012 | @@ -3446,67 +3446,8 @@
t):%0A
- if hit.upi == 'URS0000584A85_9606':%0A print(hit)%0A
|
c895cb258d28d581585fad76ffd15dafbb05d947 | version bump | endpoints/__init__.py | endpoints/__init__.py |
from .reflection import Reflect, VersionReflect
from .call import Call, VersionCall
from .exception import CallError, Redirect, CallStop, AccessDenied
from .http import Request, Response
from .utils import AcceptHeader
from .core import Controller, CorsMixin
from . import decorators
__version__ = '0.8.43'
| Python | 0.000001 | @@ -303,8 +303,8 @@
.8.4
-3
+4
'%0A%0A
|
ee668373e1483c610960b519402951df958e210c | FIX _get_report_values | report_compassion/models/report_bvr_sponsorship.py | report_compassion/models/report_bvr_sponsorship.py | ##############################################################################
#
# Copyright (C) 2015 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py
#
#####################... | Python | 0 | @@ -392,38 +392,8 @@
ng%0A%0A
-from datetime import datetime%0A
from
@@ -1653,24 +1653,340 @@
if data:%0A
+ if data.get(%22date_start%22) and isinstance(data%5B%22date_start%22%5D, str):%0A data%5B%22date_start%22%5D = fields.Date.from_string(data%5B%22date_start%22%5D)%0A if ... |
4b9e86c1547f1513e42e443668d7998b8ae03b3c | Remove unneeded code | rnacentral_pipeline/databases/ensembl/databases.py | rnacentral_pipeline/databases/ensembl/databases.py | # -*- coding: utf-8 -*-
"""
Copyright [2009-2018] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by... | Python | 0.000018 | @@ -1894,118 +1894,34 @@
def
-load_known(url):%0A return set()%0A%0A%0Adef write_max(handle, output, db_url=None):%0A known = load_known(db_url)
+write_max(handle, output):
%0A
@@ -1957,42 +1957,8 @@
e):%0A
- if name not in known:%0A
@@ -1980,20 +1980,16 @@
e(name)%0A
-
|
be1d614c2995868ee76709233a9a66183946e3cb | Fix PySide6 dir detection if passing SRCDIR | fetch_qt_version.py | fetch_qt_version.py | #!/usr/bin/env python3
"""Module to return the Qt version of a Qt codebase.
This module provides a function that returns the version of a Qt codebase, given
the toplevel qt5 repository directory. Note, the `qt5` directory applies to both
Qt 5.x and Qt 6.x
If it is run standalone with a python interpreter and not as p... | Python | 0 | @@ -3572,17 +3572,32 @@
.isfile(
-%22
+f%22%7Bargs.srcdir%7D/
README.p
|
d25a5f7d2f3916eb4c9f047309edb22c716ce346 | Fix invalid import issue | filters/__init__.py | filters/__init__.py | from filters import cleanup, fix_emoji
| Python | 0.000004 | @@ -1,13 +1,14 @@
from
+.
filters
|
468055d017ca46dd0aafaf608098473ec0a23414 | Add styling to loadtopicscontent log for readability | csunplugged/topics/management/commands/loadtopicscontent.py | csunplugged/topics/management/commands/loadtopicscontent.py | from django.core.management.base import BaseCommand, CommandError
from topics.models import Topic, CurriculumLink, LearningOutcome
from django.utils.text import slugify
from django.db import transaction
import yaml
import os
import os.path
import sys
import markdown
import mdx_math
from kordac import Kordac
class Comm... | Python | 0 | @@ -1002,19 +1002,29 @@
for
+(
log
+, indent)
in self
@@ -1064,19 +1064,100 @@
t.write(
-log
+'%7Bindent%7D%7Btext%7D'.format(indent=' '*indent,text=log))%0A self.stdout.write('%5Cn'
)%0A%0A @
@@ -2012,25 +2012,28 @@
_log.append(
-'
+('%5Cn
Added Topic:
@@ -2051,24 +2051,28 @@
(topic.name)
+, 0... |
8620c91f95a2bd27dd144988467aaee087a15597 | fix test | vehicles/test_siri_one_shot.py | vehicles/test_siri_one_shot.py | import vcr
from freezegun import freeze_time
from django.core.cache import cache
from django.test import TestCase, override_settings
from busstops.models import Region, Service, ServiceCode, StopPoint, DataSource, SIRISource, Operator
from bustimes.models import Route, Calendar, Trip
class SIRIOneShotTest(TestCase):
... | Python | 0.000002 | @@ -2408,17 +2408,17 @@
ueries(4
-8
+9
):%0A
|
9312d59cdb1e2df0a4d6142a55dbd6dc046edea5 | split long line | appengine_config.py | appengine_config.py | """App Engine configuration file."""
import os
import re
import sys
# append 'mimic' directory to sys.path
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'mimic'))
from __mimic import common
from __mimic import datastore_tree
from __mimic import mimic
import caching_urlfetch_tree
import se... | Python | 0.000382 | @@ -106,37 +106,18 @@
ath%0A
-sys.path.append(os.path.join(
+DIRNAME =
os.p
@@ -153,17 +153,53 @@
_file__)
-)
+%0Asys.path.append(os.path.join(DIRNAME
, 'mimic
|
03c0bc1c23e622afbe66c0ba166fe2baaddb5750 | Bump version | fleece/__about__.py | fleece/__about__.py | """Fleece package attributes and metadata."""
__all__ = (
'__title__',
'__summary__',
'__author__',
'__email__',
'__license__',
'__version__',
'__copyright__',
'__url__',
)
__title__ = 'fleece'
__summary__ = 'Wrap the lamb...da'
__author__ = 'Rackers'
__email__ = 'bruce.stringer@racksp... | Python | 0 | @@ -343,11 +343,11 @@
'0.
-0.1
+1.0
'%0A__
|
2c9c6ad9ee808fa27f1d52c280e6501f1d712921 | Prepare v1.2.234.dev | flexget/_version.py | flexget/_version.py | """
Current FlexGet version.
This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by
release scripts in continuous integration. Should (almost) never be set manually.
The version should always be set to the <next release version>.dev
The jenkins release job wi... | Python | 0.000001 | @@ -439,11 +439,15 @@
'1.2.23
-3
+4.dev
'%0A
|
462cfe2f406deaafd320402bd8209e0261f9aa3e | Prepare v2.8.1.dev | flexget/_version.py | flexget/_version.py | """
Current FlexGet version.
This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by
release scripts in continuous integration. Should (almost) never be set manually.
The version should always be set to the <next release version>.dev
The jenkins release job wi... | Python | 0.000005 | @@ -441,7 +441,11 @@
2.8.
-0
+1.dev
'%0A
|
ec918563683f8c4c1898f1c575cce2c817a38c52 | Prepare v3.2.12.dev | flexget/_version.py | flexget/_version.py | """
Current FlexGet version.
This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by
release scripts in continuous integration. Should (almost) never be set manually.
The version should always be set to the <next release version>.dev
The jenkins release job wi... | Python | 0.000004 | @@ -438,11 +438,15 @@
= '3.2.1
-1
+2.dev
'%0A
|
500cd2b709599fbe33dd9d1df37cfaa862f4449e | Prepare v1.2.427.dev | flexget/_version.py | flexget/_version.py | """
Current FlexGet version.
This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by
release scripts in continuous integration. Should (almost) never be set manually.
The version should always be set to the <next release version>.dev
The jenkins release job wi... | Python | 0.000002 | @@ -443,7 +443,11 @@
2.42
-6
+7.dev
'%0A
|
649f496c937680a22cab63b8b327cf394610b590 | Prepare v1.2.423.dev | flexget/_version.py | flexget/_version.py | """
Current FlexGet version.
This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by
release scripts in continuous integration. Should (almost) never be set manually.
The version should always be set to the <next release version>.dev
The jenkins release job wi... | Python | 0.000002 | @@ -439,11 +439,15 @@
'1.2.42
-2
+3.dev
'%0A
|
261a37f0780aedc63f6e2563562e2e2347a985ae | remove sss-specific logging | octopus/modules/swordv2/swordv2_server.py | octopus/modules/swordv2/swordv2_server.py | from flask import Blueprint, Response, request, url_for, make_response
from functools import wraps
from octopus.core import app
from octopus.lib.webapp import ssl_required
from sss.spec import Errors, HttpHeaders, ValidationException
from sss.core import Auth, SwordError, AuthException, DepositRequest, DeleteRequest... | Python | 0.000001 | @@ -611,82 +611,8 @@
()%0A%0A
-from sss.sss_logging import logging%0Assslog = logging.getLogger(__name__)%0A%0A
blue
@@ -2682,81 +2682,8 @@
%22%22%22%0A
- ssslog.debug(%22GET on Service Document (retrieve service document)%22)%0A%0A
|
40dfa87543f741e9280041d0bab5e61a077a4796 | Add test | tests/test_transport.py | tests/test_transport.py | import asyncio
import time
import unittest
from aioes.transport import Endpoint, Transport
class TestTransport(unittest.TestCase):
def setUp(self):
self.loop = asyncio.new_event_loop()
asyncio.set_event_loop(None)
def tearDown(self):
self.loop.close()
def make_transport(self, e... | Python | 0.000005 | @@ -3353,28 +3353,349 @@
op.run_until_complete(go())%0A
+%0A def test_get_connection_without_sniffing(self):%0A tr = self.make_transport(sniffer_interval=1000)%0A%0A @asyncio.coroutine%0A def go():%0A t0 = tr.last_sniff%0A yield from tr.get_connection()%0A self.... |
f5cb6c46dc27390feef032b42ea5e23bc7925246 | Add random_alphanumeric fixture | virtool/tests/fixtures/core.py | virtool/tests/fixtures/core.py | import pytest
import datetime
import virtool.web.dispatcher
@pytest.fixture
def static_time(monkeypatch):
time = datetime.datetime(2017, 10, 6, 20, 0, 0, tzinfo=datetime.timezone.utc)
monkeypatch.setattr("virtool.utils.timestamp", lambda: time)
return time
@pytest.fixture
def test_dispatch(mocker, mon... | Python | 0.000042 | @@ -55,16 +55,922 @@
tcher%0A%0A%0A
+@pytest.fixture%0Adef test_random_alphanumeric(monkeypatch):%0A class RandomAlphanumericTester:%0A%0A def __init__(self):%0A self.choices = %5B%0A %22aB67nm89jL56hj34AL90%22,%0A %22fX1l90Rt45JK34bA7890%22,%0A %22kl84... |
41430c2735eb11bd663bc6d1a5b051dade1c1b76 | Fix binding issue for the dns server | src/dns/dns.py | src/dns/dns.py | from dnslib import *
import sys
import argparse
import socket
import binascii
import struct
from datetime import *
class Decode_Packet(object):
def __init__(self):
pass
def transaction_id(self, segment):
TID = ''
raw_tid = ''
tid = struct.unpack("!H", segment)
for i in tid:
TID += hex(i)
raw_tid = ... | Python | 0 | @@ -1366,23 +1366,16 @@
nd((
-'192.168.1.115'
+local_ip
, 53
|
75f46292a8dccb04e233986c18e415dbfffb9e68 | Fix calls to reverse | wagtailvideos/wagtail_hooks.py | wagtailvideos/wagtail_hooks.py | from django.conf.urls import include, url
from django.contrib.staticfiles.templatetags.staticfiles import static
from django import urls
from django.utils.html import format_html, format_html_join
from django.utils.translation import ugettext_lazy as _
from wagtail.admin.menu import MenuItem
from wagtail.core import ho... | Python | 0.000003 | @@ -117,24 +117,29 @@
m django
+.urls
import
urls%0Afro
@@ -126,28 +126,31 @@
urls import
-urls
+reverse
%0Afrom django
@@ -970,21 +970,16 @@
-urls.
reverse(
@@ -1266,13 +1266,8 @@
'),
-urls.
reve
|
13272ed9ea649c66d9b9472039de401e397362bc | Use some command line options | src/fidibot.py | src/fidibot.py | #! /usr/bin/env python
#
# Author: Nick Raptis <airscorp@gmail.com>
import argparse
import irc.bot
from irc.strings import lower
from logsetup import setup_logging
import logging
log = logging.getLogger(__name__)
class FidiBot(irc.bot.SingleServerIRCBot):
def __init__(self, channel, nickname, server, port=6667, ... | Python | 0.002369 | @@ -342,16 +342,130 @@
rd=''):%0A
+ if channel%5B0%5D != %22#%22:%0A # make sure channel starts with a #%0A channel = %22#%22 + channel%0A
@@ -3081,16 +3081,59 @@
gs.port,
+%0A realname= args.realname,
passwor
|
db0fccc8aec250054dd788e54e3f0f537cf4af24 | add default value to Y/n Prompt (#28) | substance/command/hatch.py | substance/command/hatch.py | import subprocess
import os
import random
import string
import urllib
try:
import readline # Make raw_input nicer to use, but don't make it required
readline
except ImportError:
pass # Optional dependency
from substance import (Command)
from substance.logs import (logging)
from substance.config import (Co... | Python | 0 | @@ -7342,16 +7342,23 @@
prompt)
+ or 'Y'
%0A
|
ad31376488836550a85e4d695fed9774981b3671 | Add docstring, missing import | sugar/activity/Activity.py | sugar/activity/Activity.py | # Copyright (C) 2006, Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distrib... | Python | 0.000001 | @@ -927,16 +927,38 @@
ctivity%0A
+from sugar import env%0A
import s
@@ -3637,32 +3637,100 @@
ult_type(self):%0A
+ %22%22%22Gets the type of the default activity network service%22%22%22%0A
return a
|
5653403e04cfcb00ebecb93659cb6e0725fa5415 | drop unnecessary constants and rename quantum -> tacker | tacker/common/constants.py | tacker/common/constants.py | # Copyright (c) 2012 OpenStack Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | Python | 0.000003 | @@ -680,842 +680,8 @@
able
-%0ANET_STATUS_ACTIVE = 'ACTIVE'%0ANET_STATUS_BUILD = 'BUILD'%0ANET_STATUS_DOWN = 'DOWN'%0ANET_STATUS_ERROR = 'ERROR'%0A%0APORT_STATUS_ACTIVE = 'ACTIVE'%0APORT_STATUS_BUILD = 'BUILD'%0APORT_STATUS_DOWN = 'DOWN'%0APORT_STATUS_ERROR = 'ERROR'%0A%0AFLOATINGIP_STATUS_ACTIVE = 'ACTIVE'%0AFLOATING... |
39d45e79383b155f4808143a1e0cad159af11362 | Reducting the number of tasks(p2) | tasks/exp-rand-idx-task.py | tasks/exp-rand-idx-task.py | #!/usr/bin/python
import numpy as np
import scipy as sp
import scipy.linalg
import sqlite3
import os
unif = np.random.uniform
vocab = 10000
def zero_is_one(a):
a[a==0]=1
return a
l1_norm = lambda x: x / zero_is_one(x.sum(axis=1).reshape(-1, 1))
l2_norm = lambda x: x / zero_is_one(np.sqrt((x*x).sum(axis=1)).re... | Python | 0.999346 | @@ -1606,10 +1606,13 @@
10):
-
%0A
+
prin
@@ -1661,16 +1661,20 @@
s_exp%22)%0A
+
print(%22#
@@ -1700,16 +1700,20 @@
bid)%5D))%0A
+
(apname,
@@ -1774,16 +1774,20 @@
obid)%5D%0A%0A
+
fill = 0
@@ -1807,16 +1807,20 @@
ll_exp)%0A
+
factors
@@ -1836,16 +1836,20 @@
ors_exp%0A
+
rmses =
... |
12f993b7454454ed468e0d484aa7477d395b05c9 | Update the default EPIDB_SERVER location. | src/epiweb/settings.py | src/epiweb/settings.py | # Django settings for epiweb project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = 'epiweb.db' # Or path to dat... | Python | 0 | @@ -4019,30 +4019,24 @@
_HOST='1
-92.168.10
+27.0.
0.1
-00
'%0A%0AEPIDB
@@ -4113,26 +4113,24 @@
http
-s
://1
-92.168.100.10
+27.0.0.1:808
0/'%0A
|
b042bc4b5106df46ecce77ab52904f20f691e0da | Rename components | ipynb/_TODO_5-BidirectionalAnnotation_flat.py | ipynb/_TODO_5-BidirectionalAnnotation_flat.py | import numpy as np
import theano
from theano import tensor
#from blocks import initialization
from blocks.bricks import Identity, Linear, Tanh, MLP, Softmax
from blocks.bricks.lookup import LookupTable
from blocks.bricks.recurrent import SimpleRecurrent, Bidirectional, BaseRecurrent
from blocks.bricks.parallel import... | Python | 0.000002 | @@ -717,16 +717,77 @@
= 128%0A%0A
+batch_of_sentences = (max_sentence_length, mini_batch_size)%0A%0A
%22%22%22%0ACost
@@ -2237,68 +2237,8 @@
%22%22%0A%0A
-x = tensor.lmatrix('data')%0A#x = tensor.imatrix('features')%0A%0A
look
@@ -2282,23 +2282,19 @@
g_dim)%0A%0A
-encoder
+rnn
= Bidir
@@ -2363,16 +2363,21 @@
#... |
6d42f25c776ebcede6d0b5368165f72ae495e7ca | Change expected length in Image.__repr__ test | ipywidgets/widgets/tests/test_widget_image.py | ipywidgets/widgets/tests/test_widget_image.py | # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
"""Test Image widget"""
import io
import os
from ipywidgets import Image
import hashlib
import pkgutil
import tempfile
from contextlib import contextmanager
# Data
@contextmanager
def get_logo_png():
# Once t... | Python | 0.000005 | @@ -3927,17 +3927,17 @@
_()) %3C 1
-2
+8
0%0A
@@ -3953,39 +3953,40 @@
ert
-img.__repr__().endswith(%22...')%22
+%22...', layout=%22 in img.__repr__(
)%0A%0A%0A
|
853a53c23b2320554c1491884c41700bbedb1214 | add explicit django_admin = False to context | django_productline/features/djpladmin/context_processors.py | django_productline/features/djpladmin/context_processors.py | from django.conf import settings
def django_admin(request):
'''
Adds additional information to the context:
``django_admin`` - boolean variable indicating whether the current
page is part of the django admin or not.
``ADMIN_URL`` - normalized version of settings.ADMIN_URL; starts with a slash, en... | Python | 0.999448 | @@ -808,20 +808,16 @@
context%0A
-
%0A if
@@ -987,10 +987,53 @@
return %7B
+%0A 'django_admin': False%0A
%7D%0A
|
aa491a8074a27e7e2228d44d431f50aead0cd640 | Add date object to weather capability | weboob/capabilities/weather.py | weboob/capabilities/weather.py | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Romain Bignon
#
# This file is part of weboob.
#
# weboob 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... | Python | 0.000004 | @@ -758,16 +758,22 @@
datetime
+, date
%0A%0Afrom .
@@ -2101,16 +2101,22 @@
atetime,
+ date,
basestr
|
0f128f7ef6a19b29bb2ff06f2fd4e639a79ba149 | Make qs argument optional in PatchUrlconfMiddleware.get_urlconf | widgy/contrib/urlconf_include/middleware.py | widgy/contrib/urlconf_include/middleware.py | import imp
import re
from django.utils.importlib import import_module
from django.conf import settings
from django.conf.urls import include, url, patterns
from django.conf.urls.i18n import i18n_patterns
from django.core import urlresolvers
from .models import UrlconfIncludePage
class PatchUrlconfMiddleware(object):... | Python | 0 | @@ -1060,18 +1060,94 @@
conf, qs
+=None):%0A if qs is None:%0A qs = cls.get_pages(logged_in=False
)
-:
%0A
|
4e65ec43ecdd30495e1e9da41ddfa3374d6ba7ac | remove a stray semicolon | util/create_database.py | util/create_database.py | #!/usr/bin/env python
import os
import sys
import sqlite3
base_dir = os.path.dirname(os.path.realpath(os.path.join(__file__, '..')))
db_path = os.path.join(base_dir, 'db/lightspeed.db')
if len(sys.argv) == 2:
db_path = os.path.realpath(sys.argv[1])
try:
conn = sqlite3.connect(db_path)
c = conn.cursor();
... | Python | 0.999999 | @@ -311,17 +311,16 @@
cursor()
-;
%0A%0A c.
|
0dbab66ffc108d4a0405dc19cacd64a236c209e7 | Make --threshold required and correct a typo (use instead of usage) | packs/st2-demos/actions/check_dir_size.py | packs/st2-demos/actions/check_dir_size.py | #!/usr/bin/python
import argparse
import json
import re
import subprocess
import sys
parser = argparse.ArgumentParser()
parser.add_argument("-D", "--directory",
help="Evaluate size of this directory",
dest="directory", required=True)
parser.add_argument("-t", "--threshold",
... | Python | 0.000006 | @@ -401,16 +401,31 @@
reshold%22
+, required=True
)%0Aparser
@@ -2327,16 +2327,18 @@
ults%5B'us
+ag
e'%5D) + '
|
13bc65adf712841375d08bf717d7e56743a3c592 | fix error 500 plugin detail if user not authenticated | website/apps/plugins/models.py | website/apps/plugins/models.py | from django.contrib.auth.models import User
from django.db import models
from django.urls import reverse
from model_utils.models import TimeStampedModel
from core.behaviors import Expirationable
from main.utils import generate_token
class Plugin(TimeStampedModel, models.Model):
name = models.CharField(max_length... | Python | 0 | @@ -1055,16 +1055,81 @@
user):%0A
+ if not user.is_authenticated():%0A return False%0A
|
6f360a2c6da40282d2ae2a2c9f2f5cb6530d7807 | fix shape normalization | cupy/padding/pad.py | cupy/padding/pad.py | import numpy
import cupy
import six
def _prepend_const(narray, pad_amount, value, axis=-1):
if pad_amount == 0:
return narray
padshape = tuple(x if i != axis else pad_amount
for i, x in enumerate(narray.shape))
if value == 0:
return cupy.concatenate((cupy.zeros(padsha... | Python | 0.000001 | @@ -1219,35 +1219,31 @@
* ndims%0A
+nd
shape
-_array
= numpy.asa
@@ -1262,21 +1262,97 @@
-try:%0A
+if ndshape.ndim %3C= 1:%0A if ndshape.shape == () or ndshape.shape == (1,):%0A
shap
@@ -1351,87 +1351,690 @@
+ nd
shape
-_array = numpy.broadcast_to(shape_array, (ndims, 2))%0A ... |
2dab398bfde9a830a0f0c320200a020bc129a70b | fix typo in interface testbench | myhdl/test/conversion/general/test_interfaces.py | myhdl/test/conversion/general/test_interfaces.py |
from myhdl import *
from myhdl import ConversionError
from myhdl.conversion._misc import _error
from myhdl.conversion import analyze, verify
class MyIntf(object):
def __init__(self):
self.x = Signal(intbv(2,min=0,max=16))
self.y = Signal(intbv(3,min=0,max=18))
def m_one_level(clock,reset,ia,ib):
... | Python | 0.000082 | @@ -512,16 +512,18 @@
),MyIntf
+()
,)%0A g
@@ -1589,20 +1589,16 @@
,ia,ib)%0A
-
%0A @in
@@ -2116,24 +2116,16 @@
tb_stim
-
%0A%0Adef te
@@ -2555,20 +2555,16 @@
,ia,ib)%0A
-
%0Adef tes
|
6bf12c141bab4c698d0324d3ef006ae2d14e6f16 | FIX migration script | product_uom_prices_currency/migrations/8.0.0.5.0/post-migration.py | product_uom_prices_currency/migrations/8.0.0.5.0/post-migration.py | # -*- encoding: utf-8 -*-
from openerp import SUPERUSER_ID
from openerp.modules.registry import RegistryManager
def migrate(cr, version):
print 'Migrating product_uom_prices'
if not version:
return
create_product_sale_uom(cr)
def create_product_sale_uom(cr):
registry = RegistryManager.get(cr... | Python | 0 | @@ -628,16 +628,31 @@
m_id', '
+other_currency_
list_pri
|
e6171680ad5255e8c7d85ea4d71de7a10e8fc08f | Deploy separate cloud storage config files for each development environment | python_apps/airtime_analyzer/airtime_analyzer/analyzer_pipeline.py | python_apps/airtime_analyzer/airtime_analyzer/analyzer_pipeline.py | """ Analyzes and imports an audio file into the Airtime library.
"""
import logging
import threading
import multiprocessing
from metadata_analyzer import MetadataAnalyzer
from filemover_analyzer import FileMoverAnalyzer
from cloud_storage_uploader import CloudStorageUploader
from cuepoint_analyzer import CuePointAnal... | Python | 0 | @@ -117,17 +117,36 @@
ocessing
-
+%0Aimport ConfigParser
%0Afrom me
@@ -3291,21 +3291,45 @@
age_
-enabled, bool
+config, ConfigParser.SafeConfigParser
):%0A
@@ -3374,23 +3374,22 @@
storage_
-enabled
+config
must be
@@ -3395,15 +3395,24 @@
e a
-boolean
+SafeConfigParser
. Wa
@@ -3444,23 +3444,22 @@
storage_... |
7b656aa3d244628a26730658468e02781cf444e6 | Add FeaturedProject to admin | private_sharing/admin.py | private_sharing/admin.py | from django.contrib import admin
from . import models
class DataRequestProjectMemberAdmin(admin.ModelAdmin):
"""
Display and make the 'created' field read-only in the admin interface.
"""
readonly_fields = ('created',)
search_fields = ('member__user__username',
'project_memb... | Python | 0 | @@ -662,8 +662,52 @@
rAdmin)%0A
+admin.site.register(models.FeaturedProject)%0A
|
41175d4f97118d5c9ece31bafb2bb521e0faa98f | fix unit tests | reference_data/management/tests/update_all_reference_data_tests.py | reference_data/management/tests/update_all_reference_data_tests.py | import mock
from django.core.management import call_command
from django.core.management.base import CommandError
from django.test import TestCase
def omim_exception(omim_key):
raise Exception('Omim exception, key: '+omim_key)
def primate_ai_exception():
raise Exception('Primate_AI failed')
def mgi_except... | Python | 0.000001 | @@ -954,22 +954,10 @@
ity.
-GeneCopyNumber
+CN
Sens
|
eaee09dcb163f4a359bdb960109bc94f9c99ea37 | Stop excluded chromecasts. | pychromecast/__init__.py | pychromecast/__init__.py | """
PyChromecast: remote control your Chromecast
"""
from __future__ import print_function
from collections import namedtuple
import threading
import logging
# pylint: disable=wildcard-import
from .config import *
from .error import *
from . import socket_client
from .upnp import discover_chromecasts
from .dial impor... | Python | 0 | @@ -1557,24 +1557,66 @@
ce.%0A %22%22%22%0A
+ logger = logging.getLogger(__name__)%0A%0A
cc_list
@@ -2200,16 +2200,148 @@
uded_cc%0A
+%0A for cc in excluded_cc:%0A logger.debug(%22Stopping excluded chromecast %7B%7D%22.format(cc))%0A cc.socket_client.stop.set()%0A%0A
retu
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.