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 |
|---|---|---|---|---|---|---|---|
2f34e330d1d99594dab156e8d3816ba5fce8cd31 | fix test_unionfs.py | benchbuild/tests/test_unionfs.py | benchbuild/tests/test_unionfs.py | """ Testing suite for the mounting process. """
import unittest
import os
from benchbuild.project import Project
from benchbuild.utils.container import get_base_dir
from benchbuild.utils.downloader import Wget
from benchbuild.settings import CFG
from benchbuild.utils.cmd import ls
class ProjectMock(Project):
"""... | Python | 0.000007 | @@ -111,60 +111,8 @@
ect%0A
-from benchbuild.utils.container import get_base_dir%0A
from
@@ -152,16 +152,16 @@
rt Wget%0A
+
from ben
@@ -438,76 +438,8 @@
fs%0A%0A
- #adjust parameters in the unionfs call to test different mounts%0A
@@ -606,20 +606,16 @@
unionfs
- and
%0A
@@ -619,16 +619,20 @@
... |
c1ff243cb0eeca41f793ecf365e2fcfd053b396d | revert to template format | soccer/gameplay/plays/training/skills_practice.py | soccer/gameplay/plays/training/skills_practice.py | import robocup
import constants
import play
import skills
# This is a file where you can learn how skills work!
class SkillsPractice(play.Play):
def __init__(self):
super().__init__(continuous=True)
# To make a robot move, use skills.move.Move(<point to move to>)
# To create a point, we i... | Python | 0.000001 | @@ -50,16 +50,31 @@
t skills
+%0Aimport tactics
%0A%0A# This
@@ -434,15 +434,17 @@
# Th
-is
+ese
line
+s
mov
@@ -513,12 +513,12 @@
int(
-3, 9
+0, 0
)%0A
@@ -686,20 +686,5 @@
ill%22
-, required=True
)
|
5f201a66332b661a818c1721b4d4836b783e9fb6 | add current_user property | wxbreads/login.py | wxbreads/login.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import wx
from pyldaplite import ldap, PyLDAPLite
import utils
HIGHLIGHT_RED = '#F75D59'
class LoginWindow(wx.Dialog):
def __init__(self, parent=None, title='User Login',
size=(500, 240),
styl... | Python | 0.000002 | @@ -833,16 +833,49 @@
ast_user
+%0A self.current_user = None
%0A%0A
|
85ef4988e1f25b586d8dff63b4ade83a2222849f | Add api_key to filtered variables. | zerver/filters.py | zerver/filters.py | from __future__ import absolute_import
from django.views.debug import SafeExceptionReporterFilter
from django.http import build_request_repr
class ZulipExceptionReporterFilter(SafeExceptionReporterFilter):
def get_post_parameters(self, request):
filtered_post = SafeExceptionReporterFilter.get_post_paramet... | Python | 0 | @@ -505,16 +505,27 @@
retoken'
+, 'api_key'
%5D%0A%0A
|
cf2ee1a09f550d278163797beba6c87713064c50 | Move imports in iss component (#28003) | homeassistant/components/iss/binary_sensor.py | homeassistant/components/iss/binary_sensor.py | """Support for International Space Station data sensor."""
import logging
from datetime import timedelta
import requests
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.components.binary_sensor import BinarySensorDevice, PLATFORM_SCHEMA
from homeassistant.const import ... | Python | 0 | @@ -56,23 +56,8 @@
%22%22%22%0A
-import logging%0A
from
@@ -83,16 +83,44 @@
medelta%0A
+import logging%0A%0Aimport pyiss
%0Aimport
@@ -158,61 +158,8 @@
ol%0A%0A
-import homeassistant.helpers.config_validation as cv%0A
from
@@ -204,16 +204,33 @@
r import
+ PLATFORM_SCHEMA,
BinaryS
@@ -244,25 +244,8 @@
vice
-,... |
187fb57baa3c728d26d47a169fcb47379e4ca78d | remove unnecessary skip on test_insert | ibis/backends/clickhouse/tests/test_client.py | ibis/backends/clickhouse/tests/test_client.py | from io import StringIO
import pandas as pd
import pandas.testing as tm
import pytest
import ibis.config as config
import ibis.expr.types as ir
def test_get_table_ref(db):
table = db.functional_alltypes
assert isinstance(table, ir.TableExpr)
table = db['functional_alltypes']
assert isinstance(table... | Python | 0 | @@ -145,198 +145,8 @@
r%0A%0A%0A
-def test_get_table_ref(db):%0A table = db.functional_alltypes%0A assert isinstance(table, ir.TableExpr)%0A%0A table = db%5B'functional_alltypes'%5D%0A assert isinstance(table, ir.TableExpr)%0A%0A%0A
def
@@ -157,28 +157,24 @@
_run_sql(con
-, db
):%0A query
@@ -176,17... |
a8d5f42caac15c80dabea6adcfd62954154ff1f8 | Add print statement to the markdown_to_html command | ckanext/showcase/commands/migrate.py | ckanext/showcase/commands/migrate.py | from ckan import model
from ckan.lib.cli import CkanCommand
from ckan.lib.munge import munge_title_to_name, substitute_ascii_equivalents
from ckan.logic import get_action
from ckan.lib.helpers import render_markdown
import logging
log = logging.getLogger(__name__)
class MigrationCommand(CkanCommand):
'''
CK... | Python | 0.000081 | @@ -6659,20 +6659,75 @@
%7D%0A )%0A
+ print('All notes were migrated successfully.')%0A
|
c6e56bbcebe07acb560d5a24b0b856d5b512dba7 | Check for TRIPS ready before proceeding. | indra/tools/reading/readers/trips/__init__.py | indra/tools/reading/readers/trips/__init__.py | import os
import subprocess as sp
from datetime import datetime, timedelta, timezone
from indra.tools.reading.readers.core import Reader
from indra.sources.trips import client, process_xml
startup_path = '/sw/drum/bin/startup.sh'
service_host = 'drum'
DRUM_DOCKER = '292075781285.dkr.ecr.us-east-1.amazonaws.com/drum'... | Python | 0 | @@ -3,16 +3,31 @@
port os%0A
+import logging%0A
import s
@@ -200,16 +200,55 @@
ss_xml%0A%0A
+%0Alogger = logging.getLogger(__name__)%0A%0A
startup_
@@ -995,16 +995,72 @@
'true':%0A
+ logger.info(%22Starting up a TRIPS service.%22)%0A
@@ -1151,16 +1151,242 @@
STDOUT)%0A
+ for line i... |
9d442b1b45245e5c6d43ea8ea0bed98dc055e04e | Update version | cea/__init__.py | cea/__init__.py | __version__ = "2.29.0"
class ConfigError(Exception):
"""Raised when the configuration of a tool contains some invalid values."""
rc = 100 # sys.exit(rc)
class CustomDatabaseNotFound(Exception):
"""Raised when the InputLocator can't find a user-provided database (region=='custom')"""
rc = 101 # sys... | Python | 0 | @@ -14,10 +14,10 @@
%222.
-29
+30
.0%22%0A
|
3090d65dd66acc0acdb5cccee82d2c6abc81eac4 | Remove config option ckan.ab_scheming.deployment | ckanext/workflow/logic/validation.py | ckanext/workflow/logic/validation.py | from ckan.plugins.toolkit import Invalid, _
from ckan.lib.navl.dictization_functions import unflatten
from ckan.plugins import toolkit
import ckan.logic as logic
import ckan.lib.base as base
import re
import ckanext.workflow.helpers as helpers
import pylons.config as config
NotFound = logic.NotFound
abort =... | Python | 0 | @@ -945,90 +945,8 @@
':%0D%0A
- if not config.get('ckan.ab_scheming.deployment', False):%0D%0A
|
2466a5b0c7f278c9c11669aa686ca7e3ec4e774a | Fix emails | members/crm/management/commands/mailing-emails.py | members/crm/management/commands/mailing-emails.py | # -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand
from crm.models import Contact
class Command(BaseCommand):
help = "generates a list of emails with Lead Contact, Certifier and Voting representatives"
def handle(self, *args, **options):
address_list = []
for contact... | Python | 0.000344 | @@ -344,37 +344,8 @@
ter(
-contact_type__in=(6, 9, 10),
orga
@@ -387,16 +387,20 @@
3, 5, 7
+, 99
), bounc
@@ -401,32 +401,57 @@
bouncing=False)
+.exclude(contact_type=13)
:%0A # for
@@ -751,17 +751,16 @@
rint %22%25s
-,
%22 %25 emai
|
1b219f1e6f82f355c60fa90b954010c538f475c6 | fix hybrid backend pickling | claripy/frontends/hybrid_frontend.py | claripy/frontends/hybrid_frontend.py | #!/usr/bin/env python
import logging
l = logging.getLogger("claripy.frontends.full_frontend")
from .full_frontend import FullFrontend
class HybridFrontend(FullFrontend):
def __init__(self, solver_backend, approximation_backend=None, **kwargs):
FullFrontend.__init__(self, solver_backend, **kwargs)
... | Python | 0 | @@ -520,37 +520,49 @@
(self._
-approximation_backend
+solver_backend.__class__.__name__
, FullFr
@@ -634,51 +634,112 @@
-self._approximation_backend, full_state = s
+approx_backend_name, full_state = s%0A self._approximation_backend = _backends%5Bapprox_backend_name%5D
%0A
|
8d1b17546122c7f5ea55d0b8d5477a20f86ccf2b | Fix description on VMware output files (playerimage -> player image) | jobslave/generators/vmware_image.py | jobslave/generators/vmware_image.py | #
# Copyright (c) 2004-2007 rPath, Inc.
#
# All Rights Reserved
#
import os
import stat
from jobslave.generators import bootable_image, raw_hd_image, constants
from jobslave.imagegen import logCall
from conary.lib import util
def vmEscape(data, eatNewlines = True):
data = data.replace('|', '|7C')
escapeDict ... | Python | 0.000048 | @@ -4062,17 +4062,18 @@
Name + '
-i
+ I
mage'),)
|
2fa88f7ebf947989a7fd2e22756374dafd29c52f | Change result.yaml to api-config.yaml | pump-conf/config-generator.py | pump-conf/config-generator.py | import argparse
import yaml
parser = argparse.ArgumentParser(description="Yaml generator")
# Source parameters
parser.add_argument("-source_openstack_user", dest='source_openstack_user',
type=str, help="Source OpenStack username",
default='admin')
parser.add_argument("-sourc... | Python | 0.000001 | @@ -4225,38 +4225,42 @@
%7D%0A%7D%0A%0Awith open('
-result
+api-config
.yaml', 'w') as
@@ -4346,14 +4346,18 @@
en('
-result
+api-config
.yam
|
6ad1cf1d365881ca4dfbd400bcfe66ed7e4893a5 | Use the same interpreter when running devserver | contrib/internal/devserver.py | contrib/internal/devserver.py | #!/usr/bin/env python
import getopt
import os
import sys
DEFAULT_PORT = "8080"
def usage():
print "usage: %s options" % sys.argv[0]
print
print "OPTIONS:"
print " -h Show this message"
print " -p PORT Set server port (defaults to %s)" % DEFAULT_PORT
def main():
# Assig... | Python | 0 | @@ -2199,15 +2199,26 @@
tem(
-'python
+sys.executable + '
./r
|
14f3f3659bc727ef1ac46e4ec4dcaba58e5922c4 | Fix for Python 3 in conll dataset loading | keras_contrib/datasets/conll2000.py | keras_contrib/datasets/conll2000.py | from __future__ import print_function
import numpy
from keras.utils.data_utils import get_file
from zipfile import ZipFile
from collections import Counter
from keras.preprocessing.sequence import pad_sequences
from keras.datasets import cifar10
def load_data(path='conll2000.zip', min_freq=2):
path = get_file(path... | Python | 0.000001 | @@ -732,16 +732,21 @@
w, f in
+iter(
word_cou
@@ -753,19 +753,16 @@
nts.
-iter
items()
+)
if
@@ -1296,16 +1296,25 @@
string.
+decode().
strip().
|
88d3600064fa5461ea1aeb818349e8b7ab910283 | Fix a varname typo | pylib/gfxprim/render_utils.py | pylib/gfxprim/render_utils.py | #
# gfxprim.render_utils
#
import jinja2
import logging as log
import os
import time
import re
def template_error(s, *args):
raise Exception(s, *args)
def create_environment(config, template_dir):
env = jinja2.Environment(
line_statement_prefix = "%%",
line_comment_prefix = "##",
undefined = ji... | Python | 0.999999 | @@ -987,20 +987,20 @@
source_
-text
+file
.close()
@@ -1499,17 +1499,17 @@
resul
-f
+t
_file.cl
|
85a2b5d9b6f5bf0d03b24d70f41b3353aa43b9ba | remove Controller's self.errors, just use c.form_errors | pylons/decorators/__init__.py | pylons/decorators/__init__.py | """Pylons Decorators: ``jsonify``, ``validate``, REST, and Cache decorators"""
import logging
import sys
import warnings
import formencode
import formencode.variabledecode as variabledecode
import simplejson
from decorator import decorator
from formencode import htmlfill
from paste.util.multidict import UnicodeMultiDi... | Python | 0 | @@ -2652,22 +2652,8 @@
rs =
- self.errors =
err
|
bf79a85242686db6b832d767897a39c74bf480f8 | Add test for #229 | pymysql/tests/test_nextset.py | pymysql/tests/test_nextset.py | from pymysql.tests import base
from pymysql import util
try:
import unittest2 as unittest
except ImportError:
import unittest
class TestNextset(base.PyMySQLTestCase):
def setUp(self):
super(TestNextset, self).setUp()
self.con = self.connections[0]
def test_nextset(self):
cur... | Python | 0 | @@ -790,24 +790,352 @@
list(cur))%0A%0A
+ def test_ok_and_next(self):%0A cur = self.con.cursor()%0A cur.execute(%22SELECT 1; commit; SELECT 2;%22)%0A self.assertEqual(%5B(1,)%5D, list(cur))%0A self.assertTrue(cur.nextset())%0A self.assertTrue(cur.nextset())%0A self.assertEq... |
57b31d9e86b9846f3556ef13dcc295b97f87c422 | Implement pack/unpack methods for Hello Elements | pyof/v0x04/symmetric/hello.py | pyof/v0x04/symmetric/hello.py | """Defines Hello message."""
# System imports
from enum import IntEnum
from pyof.foundation.base import GenericMessage, GenericStruct
from pyof.foundation.basic_types import BinaryData, FixedTypeList, UBInt16
from pyof.v0x04.common.header import Header, Type
# Third-party imports
__all__ = ('Hello', 'HelloElemHead... | Python | 0 | @@ -205,16 +205,69 @@
UBInt16%0A
+from pyof.foundation.exceptions import PackException%0A
from pyo
@@ -391,45 +391,8 @@
pe',
-%0A 'HelloElemVersionbitmap',
'Li
@@ -681,30 +681,8 @@
t16(
-enum_ref=HelloElemType
)%0A
@@ -701,16 +701,43 @@
BInt16()
+%0A content = BinaryData()
%0A%0A de
@@ -779,2... |
0498756893b50ccd8bc774c49d4696fb5daf970d | add missing bold options (mainly for cobol) | pyqode/core/styles/darcula.py | pyqode/core/styles/darcula.py | from pygments.style import Style
from pygments.token import Comment, Error, Generic, Keyword, Literal, Name, \
Operator, Text, Punctuation
class DarculaStyle(Style):
"""
Pygments color scheme inspired by the darcula theme (Pycharm/IntelliJ Idea)
"""
background_color = '#252525'
highlight_colo... | Python | 0.000035 | @@ -1106,32 +1106,37 @@
served: '#CC7832
+ bold
',%0A Keywo
@@ -1371,16 +1371,21 @@
'#94558D
+ bold
',%0A
|
e07eff5c6dfd11517bc6d62157fd9b4ddb527a72 | Add logo to shell startup | python/thunder/utils/shell.py | python/thunder/utils/shell.py | import thunder
from thunder.utils.context import ThunderContext
tsc = ThunderContext(sc)
print('\n')
print('Running thunder version ' + thunder.__version__)
print('A thunder context is available as tsc') | Python | 0 | @@ -56,16 +56,46 @@
rContext
+%0Afrom termcolor import colored
%0A%0Atsc =
@@ -125,79 +125,556 @@
nt('
-%5Cn')%0Aprint('Running thunder version ' + thunder.__version__)%0Aprint('A t
+')%0Aprint(colored(' IIIII ', 'yellow'))%0Aprint(colored(' IIIII ', 'yellow'))%0Aprint(colored(' ... |
87959bd1b4ff220ffadd15ef8dd4f1d114016c3f | Use env | queue_job/controllers/main.py | queue_job/controllers/main.py | # -*- coding: utf-8 -*-
# Copyright (c) 2015-2016 ACSONE SA/NV (<http://acsone.eu>)
# Copyright 2013-2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
import logging
import traceback
from cStringIO import StringIO
from psycopg2 import OperationalError
import odoo
from odoo import... | Python | 0 | @@ -1789,32 +1789,35 @@
ttp.request.env.
+cr.
commit()%0A%0A
@@ -1801,32 +1801,32 @@
env.cr.commit()%0A
-
%0A _logger
@@ -1871,19 +1871,16 @@
perform(
-env
)%0A
@@ -1908,32 +1908,32 @@
job.store()%0A
-
http.req
@@ -1941,16 +1941,19 @@
est.env.
+cr.
commit()
|
a76ecb81853dcd277999e810a51f3a04a7d75b3a | Print kernelspec | recipes/sos-julia/run_test.py | recipes/sos-julia/run_test.py | import unittest
import sys
from sos_notebook.test_utils import sos_kernel
from ipykernel.tests.utils import execute, wait_for_idle, assemble_output
@unittest.skipIf(sys.platform == 'win32', 'julia does not exist on win32')
class TestSoSKernel(unittest.TestCase):
def testKernel(self):
with sos_kernel() as ... | Python | 0.000002 | @@ -147,82 +147,373 @@
ut%0A%0A
-@unittest.skipIf(sys.platform == 'win32', 'julia does not exist on win32')
+import jupyter_client%0A%0Atry:%0A print(jupyter_client.kernelspec.get_kernel_spec('julia-1.0').to_dict())%0Aexcept jupyter_client.kernelspec.NoSuchKernel:%0A print('julia-1.0 kernel was not installed')%0... |
b4ff065c8a58506de1b46cc5b58a19779c942f34 | Replace widget with panel | redactor/coloring/Coloring.py | redactor/coloring/Coloring.py | import re
from coloring.config_tags import config_tags
class Coloring:
def __init__(self, text_editor, language):
self.root = text_editor.get_root()
self.text_widget = text_editor.get_text_widget()
self.keywords = config_tags(self.text_widget, language)
self.pattern = r"\w+"
... | Python | 0.000002 | @@ -205,22 +205,21 @@
et_text_
-widget
+panel
()%0A
|
baf76ad484cc4386a9919e2f7322c541ef2d46d9 | 更新 modules Groups API 中的 serializers.py, 新增函式功能宣告註解 | commonrepo/groups_api/serializers.py | commonrepo/groups_api/serializers.py | # -*- coding: utf-8 -*-
#
# Copyright 2016 edX PDR Lab, National Central University, Taiwan.
#
# http://edxpdrlab.ncu.cc/
#
# 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://w... | Python | 0 | @@ -738,16 +738,81 @@
.org%0A#%0A%0A
+%22%22%22%0ASerializer of group information in Common Repo project.%0A%22%22%22%0A%0A
from __f
@@ -1049,32 +1049,101 @@
odelSerializer):
+%0A %22%22%22%0A Serializer of group information. (API version 1)%0A %22%22%22
%0A%0A class Meta
@@ -1381,16 +1381,16 @@
)%... |
1be747d95bf9da4bc0c64351f6ea587701be5416 | Remove unneeded imports from nifregistry plugin | src/app/nifregistry/plugin.py | src/app/nifregistry/plugin.py | '''
Created on 26 Mar 2013
@author: hoekstra
'''
from flask import render_template, g, request, jsonify
from flask.ext.login import login_required
import xml.etree.ElementTree as ET
import requests
import re
from app import app
from app.util.baseplugin import plugin
from app.util.provenance import provenance
NIF_... | Python | 0 | @@ -48,63 +48,8 @@
''%0A%0A
-from flask import render_template, g, request, jsonify%0A
from
|
e75318a0f71c1681a594dd5b4614dd6d1ef14832 | Use single import for service | src/autobot/src/pathFinder.py | src/autobot/src/pathFinder.py | #!/usr/bin/env python
import rospy
import math
from autobot.msg import drive_param
from sensor_msgs.msg import LaserScan
from autobot.msg import pid_input
from autobot.msg import wall_dist
# from autobot.srv import AdjustWallDist
from autobot.srv import *
"""
TODO:
- [x] Decide if you want to hug right/left/or closest... | Python | 0 | @@ -40,16 +40,31 @@
rt math%0A
+import autobot%0A
from aut
@@ -197,18 +197,16 @@
ll_dist%0A
-#
from aut
@@ -239,34 +239,8 @@
Dist
-%0Afrom autobot.srv import *
%0A%0A%22%22
@@ -433,16 +433,16 @@
ng node%0A
-
- %5Bx%5D Se
@@ -472,16 +472,79 @@
ft wall%0A
+- %5B %5D Use a command line argument to enable/disable... |
9af12312bb6fa27916b360be289d301a4276fa15 | Fix bug for skipping first line of data | package/reporter/reporter.py | package/reporter/reporter.py | import logging
import os
import argparse
import yaml
import pymysql.cursors
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from collections import OrderedDict
from inflection import titleize
import locale
def read_file_to_string(path):
with open(path, 'r') as f:
... | Python | 0.000001 | @@ -1468,28 +1468,40 @@
_list):%0A
-
+%09
-
+if row_num == 0:%0A%09%09
html +=
@@ -1513,28 +1513,18 @@
%3Ctr%3E'%0A
-
+%09%09
for k, v
@@ -1548,147 +1548,159 @@
():%0A
- if row_num == 0:%0A html += '%3Cth%3E' + titleize(str(k)) + '%3C/th%3E'%0A ... |
b249ab68a9e9ba3d0710a7791c4aadb925949a09 | Add batch normalization to CNN tagger | examples/cnn_tagger.py | examples/cnn_tagger.py | from thinc.neural.id2vec import Embed
from thinc.neural.vec2vec import Model, ReLu, Softmax
from thinc.neural.vecs2vecs import ExtractWindow
from thinc.neural.util import score_model
from thinc.neural.optimizers import linear_decay
from thinc.neural.ops import NumpyOps
from thinc.loss import categorical_crossentropy
... | Python | 0.000001 | @@ -133,16 +133,79 @@
ctWindow
+%0Afrom thinc.neural._classes.batchnorm import BatchNormalization
%0A%0Afrom t
@@ -698,16 +698,237 @@
update%0A%0A
+_i = 0%0A@toolz.curry%0Adef health_check(name, X, **kwargs):%0A global _i%0A if _i and _i %25 500 == 0:%0A print(X.mean(axis=0).mean(), X.var(axis=0).mean()... |
1a7be8feb68fec91459d6dc625f0114692dac885 | edit kinematic example to show waypoints | examples/kinematics.py | examples/kinematics.py | import toppra as ta
import toppra.constraint as constraint
import toppra.algorithm as algo
import numpy as np
import matplotlib.pyplot as plt
import time
ta.setup_logging("INFO")
def main():
# Parameters
N_samples = 5
SEED = 9
dof = 7
# Random waypoints used to obtain a random geometric path. He... | Python | 0 | @@ -1179,16 +1179,22 @@
aux_traj
+, data
= insta
@@ -1216,25 +1216,281 @@
jectory(0, 0
-)
+, return_data=True)%0A # return_data flag outputs internal data obtained while computing%0A # the paramterization. This include the time stamps corresponding%0A # to the original waypoints. See below (line 53) to see... |
08f93e930e6f0046d3617a47f629e681f3511825 | Add departure and arrival platform | examples/trip-query.py | examples/trip-query.py | #!/usr/bin/python3
# vim: set fileencoding=utf-8 :
#
# Query trips between the two locations given on the command line
#
# Copyright (C) 2014 Guido Günther
#
# 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 ... | Python | 0.000001 | @@ -4107,32 +4107,130 @@
at(%22%25F %25H:%25M%22))%0A
+ if start.props.dep_plat:%0A print(%22 Platform: %25s%22 %25 start.props.dep_plat)%0A
print(%22
@@ -4405,32 +4405,126 @@
at(%22%25F %25H:%25M%22))%0A
+ if end.props.arr_plat:%0A print(%22 Platform: %25s%... |
20feb1cadea064e3e701ca4fbd94026624e3987f | Update experimental/wxtest for pyglet api change. | experimental/wxtest.py | experimental/wxtest.py | #!/usr/bin/python
# $Id:$
# wxPython + pyglet integration, by subclassing wx.Window.
# Win32 works fine, though flickery resize.
# GDK sort of works, but keeps getting overdrawn by the window background
# (resize to see).
import wx
import pyglet
from pyglet.gl import *
import sys
if sys.platform == ... | Python | 0.000001 | @@ -5677,14 +5677,16 @@
-valign
+anchor_x
='ce
@@ -5696,14 +5696,16 @@
r',
-halign
+anchor_y
='ce
|
f3bc53e4d6293265801655a4273067c690fab989 | fix tests | test.py | test.py | import unittest
from mock import patch
from flask.ext.github import GitHub
from pypi_notifier import create_app, db
from pypi_notifier.models import User, Repo, Requirement, Package
from pypi_notifier.config import TestingConfig
class PyPINotifierTestCase(unittest.TestCase):
def setUp(self):
self.app =... | Python | 0.000001 | @@ -838,16 +838,66 @@
tion'%5D%0A%0A
+ @patch.object(User, 'get_emails_from_github')%0A
@pat
@@ -1022,16 +1022,40 @@
nse, get
+, get_emails_from_github
):%0A
@@ -1175,16 +1175,219 @@
@x.com'%7D
+%0A get_emails_from_github.return_value = %5B%7B'email': 'cenk@x.com',%0A ... |
ca6f55628c131360aadb9e33732af93306671718 | Test commit part 2. | test.py | test.py | print("Test", "added")
class Test():
pass | Python | 0 | @@ -14,16 +14,26 @@
%22added%22
+, %22second%22
)%0A%0Aclass
|
20556010d1ec4c5f6c3f412f7f64d9965586d75a | add args parser | test.py | test.py | import logging
from random import random
from pyglet import app
from pyglet.window import Window
from pyglet.clock import schedule_interval
from pyglet.gl import glClearColor
from render import MapView
from mutations import Map
from mutations import Body
from mutations import EnergyBank
logging.basicConfig(level=lo... | Python | 0.000153 | @@ -8,16 +8,52 @@
logging%0A
+from argparse import ArgumentParser%0A
from ran
@@ -325,255 +325,513 @@
k%0A%0A%0A
-logging.basicConfig(level=logging.INFO)%0A%0A%0Adef test():%0A%09map_ = Map(1
+parser = ArgumentParser(description='Start a Mutations simulation.')%0Aparser.add_argument('--width', dest='map_width', defa... |
6b798e3df9efb63e258851d9411402a8666a18db | add test for sparse input | test.py | test.py | import unittest
import numpy as np
from tffm import TFFMClassifier
class TestFM(unittest.TestCase):
def setUp(self):
# Reproducibility.
np.random.seed(0)
self.X = np.random.rand(20, 10)
self.linear_weights = np.random.rand(10)
self.y = np.sign(self.X.dot(self.linear_weig... | Python | 0.000001 | @@ -60,16 +60,71 @@
ssifier%0A
+from scipy import sparse as sp%0Aimport tensorflow as tf%0A
%0A%0A%0Aclass
@@ -414,13 +414,8 @@
def
-test_
deci
@@ -436,24 +436,36 @@
order_4(self
+, input_type
):%0A m
@@ -490,61 +490,313 @@
ier(
-order=4, rank=10, n_epochs=1)%0A model.fit(self.
+%0A ord... |
04696bef5505fba96bf212278d36388e4d1add96 | Add missing "os" import | test.py | test.py | #!/usr/bin/env python
try:
import unittest2 as unittest
except ImportError:
import unittest
import ghstats
import sys
class TestStats(unittest.TestCase):
def test_cli(self):
"""
Test command line arguments.
"""
self.assertTrue(ghstats.main_cli(["kefir500", "apk-icon-edi... | Python | 0.999225 | @@ -16,17 +16,16 @@
python%0A%0A
-%0A
try:%0A
@@ -121,16 +121,26 @@
ort sys%0A
+import os%0A
%0A%0Aclass
|
f948ee79bd04078f360996fc3e99cb20d6f49561 | Add --name filtering option | test.py | test.py | #!/usr/bin/env python3
import os
import sys
import argparse
import subprocess
all_tests = [
'futures_test',
'smp_test',
'memcached/test_ascii_parser',
'sstring_test',
'output_stream_test',
]
last_len = 0
def print_status(msg):
global last_len
print('\r' + ' '*last_len, end='')
last_le... | Python | 0.000001 | @@ -578,16 +578,122 @@
tests%22)%0A
+ parser.add_argument('--name', action=%22store%22, help=%22Run only test whose name contains given string%22)%0A
pars
@@ -1573,16 +1573,99 @@
_path)%0A%0A
+ if args.name:%0A test_to_run = %5Bt for t in test_to_run if args.name in t%5D%0A
%0A all
|
eb1bf148ea5990522d746a2acdb3e2d8347cc249 | Update tests to match new way of creating objects | test.py | test.py | import lib.database
lib.database.db.connect(host="10.11.11.24", database="dev_medlem2", username="postgres")
import model.bylaw
import model.user
import model.address
#__builtins__.db=db
params=dict()
params['bylaw']='asd'
m=model.bylaw.Bylaw.create(params, 0)
print m['bylaw']
m['bylaw'] = "aoieusth8isuey4zhj8rifu4... | Python | 0 | @@ -218,16 +218,39 @@
%5D='asd'%0A
+params%5B'created_by'%5D=0%0A
m=model.
@@ -278,19 +278,16 @@
rams
-, 0
)%0A%0Aprint
m%5B'
@@ -278,24 +278,31 @@
rams)%0A%0Aprint
+ %22asd%22,
m%5B'bylaw'%5D%0A
@@ -351,16 +351,47 @@
%22%0A%0Aprint
+ %22aoieusth8isuey4zhj8rifu4hkr%22,
m%5B'byla
@@ -422,16 +422,25 @@
)%0A%... |
f2a5cc71a144d96fc09ac4ffb65bdad40137fd3b | Update at 2017-07-23 21-07-25 | test.py | test.py | import json
from pathlib import Path
import numpy as np
import pandas as pd
import tensorflow as tf
from keras.backend.tensorflow_backend import set_session
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
set_session(tf.Session(config=config))
from keras.models import Sequential, Model
from keras.pr... | Python | 0 | @@ -1034,33 +1034,33 @@
(8, kernel_size=
-4
+2
, strides=1, act
@@ -1094,35 +1094,69 @@
del.add(
-BatchNormalization(
+Conv3D(4, kernel_size=2, strides=1, activation='relu'
))%0A
|
c7cf1dd458d2d11ef76a94742b9fcbc10c489820 | Fix tmap bug | tmap.py | tmap.py | import threading
import Queue as queue
def worker(function, work_queue, result_queue):
"""
Worker thread that consumes from and produces to two Queues. Each item
in the work queue is assumed to be a tuple of (index, item). When the
work is processed, it is put into the result queue with the same index
... | Python | 0 | @@ -595,24 +595,97 @@
d.%0A %22%22%22%0A%0A
+ # keep getting work until there's no more to be had%0A while 1:%0A
try:%0A
@@ -685,24 +685,28 @@
ry:%0A
+
+
index, item
@@ -723,32 +723,36 @@
ue.get_nowait()%0A
+
result_q
@@ -792,32 +792,36 @@
item)))%0A
+
+
... |
d028fe1e662a5cf9e3561c606444f103a611a558 | remove unused import | _pytest/monkeypatch.py | _pytest/monkeypatch.py | """ monkeypatching and mocking functionality. """
import os, sys
import re
import pytest
from py.builtin import _basestring
RE_IMPORT_ERROR_NAME = re.compile("^No module named (.*)$")
def pytest_funcarg__monkeypatch(request):
"""The returned ``monkeypatch`` funcarg provides these
helper methods to modify ... | Python | 0.000001 | @@ -73,22 +73,8 @@
t re
-%0Aimport pytest
%0A%0Afr
|
beea7b7cc1e53d1b553a5f055f93ab2fd34d79ba | Make !pie run in an executor | DaveBOT/core.py | DaveBOT/core.py | import logging
import logging.handlers
import platform
import queue
import signal
import sys
import discord
import feedparser
from discord.ext import commands
class Dave:
"""Main class for Bot."""
def __init__(self, code, loglevel, redid, redsc, wk):
self.client = commands.Bot(command_... | Python | 0 | @@ -5679,33 +5679,195 @@
pie =
-feedparser.parse(
+await self.client.loop.run_in_executor(None,%0D%0A feedparser.parse,%0D%0A
%22https:/
@@ -5904,47 +5904,8 @@
xml?
-%22%0D%0A ... |
c2de5dc0398394c0a1df49bd61f34f5b51c2bc5c | Change some of the TODO's in the bot's base (__main__) file. | DecoraterBot.py | DecoraterBot.py | # coding=utf-8
import os
import sys
sys.dont_write_bytecode = True
try:
import discord
except ImportError:
appendpath = sys.path[0] + "\\resources\\Dependencies"
sys.path.append(appendpath)
import discord
import DecoraterBotCore
import asyncio
DecoraterBotCore.Core.BotCore._asyncio_logger()
DecoraterBo... | Python | 0 | @@ -925,55 +925,71 @@
-# TODO: Add this to logging and stuff.%0A pass
+yield from DecoraterBotCore.Core.BotCore.channeldelete(channel)
%0A%0A%0A@
@@ -3036,55 +3036,79 @@
-# TODO: Add this to logging and stuff.%0A pass
+yield from DecoraterBotCore.Core.BotCore.errors(event, *args, **kwargs)
%0A%0A%0A... |
9c969f44992db669a4f4da22ab8472be8fff6a24 | Fix missing whitespaces | accounts/ldap/utils.py | accounts/ldap/utils.py | import crypt
import ldap
from django.conf import settings
from .connection.generic import LDAPGenericConnection
def generate_crypt_password(password):
salt = crypt.mksalt(method=crypt.METHOD_SHA512)
salt = '$1${}$'.format(salt)
return '{{CRYPT}}{}'.format(str(crypt.crypt(password, salt)))
def test_user... | Python | 0.999999 | @@ -108,16 +108,17 @@
ection%0A%0A
+%0A
def gene
@@ -1157,16 +1157,17 @@
n True%0A%0A
+%0A
def get_
|
885954e98ec7c6c34caf4c5a957dd52bc2fae3ac | Replace 'kafka_brokers_sasl' with the (correct) 'brokers' (#212) | action/kafkaProduce.py | action/kafkaProduce.py | """Kafka message producer.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
... | Python | 0.99929 | @@ -7022,26 +7022,15 @@
ms%5B'
-kafka_
brokers
-_sasl
'%5D%0A
|
8be7205128eb96fd52dc922ff45aa5356a59d318 | Change paths in PML-XML tool | src/main/translator-xml/PMLToXML.py | src/main/translator-xml/PMLToXML.py | #!/usr/bin/env/python
import sys
import os.path
import subprocess
# Read in a pml file and save to an xml file
def translate_pml_file(xml_file, pml_file):
pml_path = os.path.abspath(pml_file.name)
xml_path = os.path.abspath(xml_file.name)
# Call XML generator
return_code = subprocess.call("Pmlxml %... | Python | 0 | @@ -270,16 +270,44 @@
nerator%0A
+ # TODO: Remove abs-path%0A
retu
@@ -333,16 +333,34 @@
s.call(%22
+/opt/pml-bnfc/xml/
Pmlxml %25
|
685403106bb7db706037f451fc1b51a49db9582d | Remove slicing | project/apps/website/views.py | project/apps/website/views.py | import logging
log = logging.getLogger(__name__)
from django.shortcuts import (
render,
redirect,
)
from django.db import IntegrityError
from django.contrib import messages
from apps.api.models import (
Group,
Song,
Person,
Collection,
Duplicate,
GroupF,
SongF,
)
def home(reques... | Python | 0.000002 | @@ -7271,15 +7271,8 @@
me')
-%5B:1000%5D
%0A
|
30b794254f9573e4d960e0211370b06e83a10f25 | add version 0.13 (#6382) | var/spack/repos/builtin/packages/py-pysam/package.py | var/spack/repos/builtin/packages/py-pysam/package.py | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | Python | 0 | @@ -1503,16 +1503,72 @@
ar.gz%22%0A%0A
+ version('0.13', 'a9b502dd1a7e6403e35e6972211688a2')%0A
vers
|
cce0263fc320e82fcb9acce5115f251e0007a0bb | Update corescanner.py | lib/active/corescanner.py | lib/active/corescanner.py |
try:
import os
import time
import datetime
import subprocess
from lib.core.core import Core,InitDirFile
except ImportError, err:
from lib.core.core import Core
Core.print_error(err)
class CoreScanner(object):
__scan_type_options = { "PingScan":"-n -sn -T5", "PortScan":"-n -Pn -T5 --open", "OsScan"... | Python | 0 | @@ -654,16 +654,17 @@
%5D, Core.
+_
nmap_opt
|
a05f549a958f312dd13232dacb72729c4d79f175 | VOL-1265 Infinite Loop MIB Uploading with OpenOMCI MIB Upload Task | voltha/adapters/cig_openomci_onu/cig_openomci_onu.py | voltha/adapters/cig_openomci_onu/cig_openomci_onu.py | #
# Copyright 2017 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | Python | 0.999969 | @@ -2720,34 +2720,32 @@
faults)%0A%0A
- #
self.broadcom_o
@@ -2806,34 +2806,32 @@
hronizer%0A
- #
self.broadcom_o
@@ -2893,18 +2893,16 @@
%0A
- #
self.br
|
a9e642ad2a0cb5eae7e7a17655c77ef9328a06b8 | Fix bug for real... | ScheduleBot/ScheduledPost.py | ScheduleBot/ScheduledPost.py | import praw
import time
import re
# ### BOT CONFIGURATION ### #
CONFIG_WIKIPAGE = "schedulebot-config"
# ### END BOT CONFIGURATION ### #
class ScheduledPost:
def __init__(self, sub, first, title="Scheduled Post", text=None, link=None, repeat="-1", times="-1", flair_text="", flair_css="", distinguish="False", sticky=... | Python | 0 | @@ -1521,17 +1521,17 @@
f.times
-+
+-
1:%0A%09%09%09%09
|
0d173c2bc5c342a7b577eb95f73434b6df79ac00 | fix minor comment typo | catalogue.py | catalogue.py | # coding: utf8
from __future__ import unicode_literals
from collections import OrderedDict
import sys
try: # Python 3.8
import importlib.metadata as importlib_metadata
except ImportError:
import importlib_metadata
if sys.version_info[0] == 2:
basestring_ = basestring # noqa: F821
else:
basestring_ ... | Python | 0.001097 | @@ -324,16 +324,17 @@
tr%0A%0A# On
+l
y ever c
|
0a747629cb7d87c6e586c8eadb5ac26d280497c4 | write bids naming interface (mostly from fmriprep) | src/nibetaseries/interfaces/bids.py | src/nibetaseries/interfaces/bids.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
import os
from nipype.interfaces.base import (
traits, isdefined, TraitedSpec, BaseInterfaceInputSpec,
File, Directory, InputMultiPath, OutputMultiPath,... | Python | 0 | @@ -163,16 +163,26 @@
port os%0A
+import re%0A
from nip
@@ -283,61 +283,8 @@
ile,
- Directory, InputMultiPath, OutputMultiPath, Str,%0A
Sim
@@ -1335,24 +1335,8 @@
e =
-OutputMultiPath(
File
@@ -1374,17 +1374,16 @@
e path')
-)
%0A%0A%0Aclass
@@ -2080,86 +2080,1397 @@
t()%0A
-%0A betaseries_dict = BE... |
14be04fcd136dbedcc40cb56928f206497d76f27 | remove QQQ debug | Source/Svn/wb_svn_factory.py | Source/Svn/wb_svn_factory.py | '''
====================================================================
Copyright (c) 2003-2017 Barry A Scott. All rights reserved.
This software is licensed as described in the file LICENSE.txt,
which you should have received as part of this distribution.
======================================================... | Python | 0.000002 | @@ -4098,11 +4098,13 @@
r
-c =
+eturn
((s
@@ -4248,63 +4248,8 @@
l())
-%0A print( 'QQQ rc %25r' %25 (rc,) )%0A return rc
%0A%0Acl
|
3cc08765f7952aafcfca5bf4dfc05d04ddd30143 | rollback changes to snakemake utils | moduleultra/pipeline_instance_snakemake_utils.py | moduleultra/pipeline_instance_snakemake_utils.py | import sys
from subprocess import call
from .snakemake_rule_builder import SnakemakeRuleBuilder
def snakemake_cli_api(snakefile,
workdir=self.muRepo.getResultDir(),
cluster=clusterScript,
keepgoing=True,
printshellcmds=True,
... | Python | 0 | @@ -8,36 +8,8 @@
sys%0A
-from subprocess import call%0A
from
@@ -67,1055 +67,8 @@
r%0A%0A%0A
-def snakemake_cli_api(snakefile,%0A workdir=self.muRepo.getResultDir(),%0A cluster=clusterScript,%0A keepgoing=True,%0A printshellcmds=True... |
d9a4e3800ef9ac0f9b72c3357838a6cc66ba12f7 | Fix typo in the disaggregationlabel url | tola/urls.py | tola/urls.py | from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth import views as auth_views
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic import TemplateView
fro... | Python | 0.001906 | @@ -3088,18 +3088,18 @@
er(r'dis
-s
a
+g
gregatio
|
00b9970696f0ba67f96690545f32a0584b4dd14f | Update dependency bazel_skylib to v1 (#724) | repositories/repositories.bzl | repositories/repositories.bzl | # Copyright 2016 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | Python | 0 | @@ -2209,72 +2209,72 @@
= %22
-2ea8a5ed2b448baf4a6855d3ce049c4c452a6470b1efd1504fdb7c1c134d220a
+e5d90f0ec952883d56747b7604e2a15ee36e288bb556c3d0ed33e818a4d971f2
%22,%0A
@@ -2313,21 +2313,21 @@
-skylib-
-0.8.0
+1.0.2
%22,%0A
@@ -2397,13 +2397,13 @@
ive/
-0.8.0
+1.0.2
.tar
|
45f9b48d18b4af43a7a0968b1d4055365d87cd7c | Fix imports | repour/adjust/pme_provider.py | repour/adjust/pme_provider.py | import asyncio
import json
import logging
import os
import shlex
import xml.etree.ElementTree as etree
from . import process_provider
logger = logging.getLogger(__name__)
def get_pme_provider(execution_name, pme_jar_path, pme_parameters, output_to_logs=False):
@asyncio.coroutine
def get_result_data(work_dir... | Python | 0.000002 | @@ -69,37 +69,9 @@
ort
-xml.etree.ElementTree as etre
+r
e%0A%0Af
@@ -99,16 +99,44 @@
provider
+%0Afrom xml.dom import minidom
%0A%0Alogger
|
5113b090105f64de47af950923ad2d1e11bf02f9 | Change to use unittest runner | testcases/unstable/load_generation.py | testcases/unstable/load_generation.py | #!/usr/bin/python
import unittest
import time
from eucaops import Eucaops
from eutester import xmlrunner
import os
import re
import random
class InstanceBasics(unittest.TestCase):
def setUp(self):
# Setup basic eutester object
self.tester = Eucaops( config_file="../input/2b_tested.lst", password="f... | Python | 0 | @@ -1372,37 +1372,37 @@
result =
-xmlrunner.XML
+unittest.Text
TestRunner(v
@@ -1954,21 +1954,21 @@
t =
-xmlrunner.XML
+unittest.Text
Test
|
63c2e6ab0160387a73e77562fd6c9c5b38ddebd6 | reorganize class | entity_extract/extractor/parsers/rel_grammer_parser.py | entity_extract/extractor/parsers/rel_grammer_parser.py | import nltk
class RelationGrammerParser(object):
def __init__(self):
grammer = r"""
V: {<RB>?<MD|VB|VBD|VBP|VBG|VBN><RP|RB>?}
P: {<RB>?<IN|TO|RP><RB>?}
W: {<PRP$|CD|DT|JJ|JJS|JJR|NN|NNS|NNP|NNPS|POS|RB|RBR|RBS|VBN|VBG>*}
RelP1: {(<V><P>?)*}
R... | Python | 0.000124 | @@ -56,37 +56,18 @@
-def __init__(self):%0A g
+RelPhraseG
ramm
@@ -373,24 +373,104 @@
+%22%22%22%0A
-%22%22%22
%0A
-
+def __init__(self, grammer = self.RelPhraseGrammer):%0A self.grammer = grammer
%0A
|
e79c22c7d76fe7107492dc22df082b6db573e6ff | Update at 2017-07-22 17-00-22 | train_vgg.py | train_vgg.py | import json
from pathlib import Path
import numpy as np
import pandas as pd
import tensorflow as tf
from keras.backend.tensorflow_backend import set_session
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
set_session(tf.Session(config=config))
from keras.models import Sequential, Model
from keras.pr... | Python | 0 | @@ -395,16 +395,59 @@
import *
+%0Afrom keras.applications.vgg16 import VGG16
%0A%0Afrom u
|
ead5de52d24b52a0b5e8ed89ded55cb63e3381e2 | Use the named topics from sequencing run instead of composing them by hand. | API/runuploader.py | API/runuploader.py | from Validation.onlineValidation import project_exists, sample_exists
from wx.lib.pubsub import pub
import logging
from Exceptions.ProjectError import ProjectError
from API.pubsub import send_message
from os import path
import json
class RunUploaderTopics(object):
start_online_validation = "start_online_validation... | Python | 0 | @@ -4429,38 +4429,16 @@
ing_run.
-sample_sheet_name + %22.
upload_s
@@ -4443,17 +4443,22 @@
_started
-%22
+_topic
)%0A%0A l
@@ -4779,30 +4779,8 @@
run.
-sample_sheet_name + %22.
uplo
@@ -4790,17 +4790,23 @@
complete
-%22
+d_topic
)%0A ap
|
4c753be1a56c5cbbe094fda661598c89e72a2e36 | Update params against current Firedrake for Poisson conv test | resolution_tests/poisson_conv_test.py | resolution_tests/poisson_conv_test.py | from __future__ import absolute_import, print_function, division
import matplotlib.pyplot as plt
import numpy as np
from firedrake import *
def RT0DGO0(res, degree):
mesh = UnitSquareMesh(2 ** res, 2 ** res, quadrilateral=False)
V = FunctionSpace(mesh, "RT", degree + 1)
U = FunctionSpace(mesh, "DG", de... | Python | 0 | @@ -648,32 +648,80 @@
r_parameters = %7B
+'ksp_type': 'preonly',%0A
'mat_type': 'mat
@@ -719,32 +719,32 @@
pe': 'matfree',%0A
-
@@ -875,63 +875,21 @@
'
-trace_ksp_rtol': 1e-10,%0A 'trace
+hybridization
_pc_
@@ -919,37 +919,45 @@
... |
84824fbf8c21babf689dd14ba3f1a4ec3896f0c5 | Make temp files | tests/checks/integration/test_file.py | tests/checks/integration/test_file.py | # project
from checks import AgentCheck
from tests.checks.common import AgentCheckTest, load_check
class TestFileUnit(AgentCheckTest):
CHECK_NAME = 'file'
def assert_tags(self, expected_tags, present_tags):
for tag in expected_tags:
self.assertTrue(tag in present_tags)
def test_presen... | Python | 0.000004 | @@ -1,8 +1,50 @@
+from tempfile import mkstemp, gettempdir%0A%0A
# projec
@@ -1143,32 +1143,119 @@
_success(self):%0A
+ # Make some temporary files, just in case%0A mkstemp()%0A mkstemp()%0A%0A
conf = %7B
@@ -1342,16 +1342,27 @@
h':
-'/tmp/*'
+gettempdir() + %22/*%22
, 'e
|
2ed876dd37c326569c20ad7e4063eef8e20a1171 | Use epsilon-greedy in tabular q agent. | open_spiel/python/algorithms/tabular_qlearner.py | open_spiel/python/algorithms/tabular_qlearner.py | # Copyright 2019 DeepMind Technologies Ltd. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | Python | 0.999967 | @@ -2045,107 +2045,63 @@
-if info_state not in self._q_values or np.random.rand() %3C epsilon:%0A action = np.random.choice(
+greedy_q = max(%5Bself._q_values%5Binfo_state%5D%5Ba%5D for a in
lega
@@ -2113,35 +2113,29 @@
ions
+%5D
)%0A
- probs%5Blegal
+greedy
_actions
%5D =
@@ -2134,22 +2134,23 @@... |
5f0554434965c504ba872f54a1a556bf8ad2f07e | Add some more docstrings | ExampleGame/examplegame/test/test_quiche.py | ExampleGame/examplegame/test/test_quiche.py |
from twisted.trial import unittest
from imaginary import objects, iimaginary
from imaginary.test import commandutils
from examplegame import quiche
class VendingTest(commandutils.CommandTestCaseMixin, unittest.TestCase):
def _create(self):
"""
Create the vending machine.
"""
sel... | Python | 0 | @@ -502,32 +502,90 @@
ef _drop(self):%0A
+ %22%22%22%0A Drop the vending machine.%0A %22%22%22%0A
self._te
@@ -1154,32 +1154,81 @@
e_quiche(self):%0A
+ %22%22%22%0A Create a quiche.%0A %22%22%22%0A
self._te
@@ -1382,32 +1382,101 @@
t_quiche(self):%0A
+ ... |
3e4835d17bb034207c73e02f71f9d76eeb6c44fb | Fix with call [ci skip] | examples/techniques/post-processing/post-processing.py | examples/techniques/post-processing/post-processing.py | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -------------------------------------------------------------------------... | Python | 0 | @@ -600,20 +600,16 @@
ispy
-.app
import
Canv
@@ -608,21 +608,11 @@
ort
-Canvas, Timer
+app
%0A%0Afr
@@ -2113,25 +2113,27 @@
%0A%0Aclass
-My
Canvas(
+app.
Canvas):
@@ -2166,16 +2166,20 @@
+app.
Canvas._
@@ -2229,16 +2229,20 @@
ssing',%0A
+
@@ -3767,16 +3767,20 @@
timer =
+app.
Ti... |
e605f44ae74734779326fd6e36e628db6d945c54 | fix encode username | rest_framework_services_auth/utils.py | rest_framework_services_auth/utils.py | from __future__ import unicode_literals
import base64
from django.apps import apps as django_apps
from datetime import datetime, timedelta
import jwt
from django.core.exceptions import ImproperlyConfigured
from jwt.exceptions import InvalidTokenError
from rest_framework_services_auth.settings import auth_settings
... | Python | 0.999736 | @@ -849,12 +849,17 @@
ars=
+str(
%22+-%22
+)
%0A
|
913c794b459f845d3e6d8e7c3410112a45339d51 | Fix thinglang VM executable path | tests/integration/test_integration.py | tests/integration/test_integration.py | import collections
import io
import json
import os
import pytest
import glob
import subprocess
import thinglang
from thinglang import run, utils
SEARCH_PATTERN = os.path.join(os.path.dirname(os.path.abspath(__file__)), '**/*.thing')
TestCase = collections.namedtuple('TestCase', ['code', 'metadata', 'name', 'byteco... | Python | 0.000005 | @@ -145,38 +145,20 @@
ls%0A%0A
-SEARCH_PATTERN = os.path.join(
+BASE_PATH =
os.p
@@ -195,18 +195,58 @@
file__))
+%0A%0ASEARCH_PATTERN = os.path.join(BASE_PATH
,
-
'**/*.t
@@ -352,90 +352,8 @@
'%5D)%0A
-EXECUTABLE = r%22C:%5CUsers%5CYotam%5CDevelopment%5Cthinglang%5Ccmake-build-debug%5Cthingc.exe%22%0A
%0A%0Ad... |
c8d691d88642c750dffce47a56d3f69fb7c1fac9 | Add create many machines | provisioner/models/machine.py | provisioner/models/machine.py | import boto.ec2
# EU-WEST-1: RHEL7 HVM
AMI_ID = 'ami-25158352'
class Machine:
@staticmethod
def create_new(data):
# boto create instance
name = data['name']
cpu = int(0 if not 'cpu' in data else data['cpu'])
memory = int(0 if not 'memory' in data else data['memory'])
disk = int( 0)
region = str('eu-wes... | Python | 0.000028 | @@ -8,16 +8,38 @@
boto.ec2
+%0Aimport muliprocessing
%0A%0A# EU-W
@@ -84,22 +84,151 @@
2'%0A%0A
-class Machine:
+pool = muliprocessing.Pool()%0A%0Aclass Machine:%0A%0A%09@staticmethod%0A%09def create_many(definitions):%0A%09%09return pool.map(Machine.create_new, definitions)%0A
%0A%0A%09@
|
3ceed6665d74da577395a62bcea00c0846a00a78 | Remove invalid comment | tests/laser/evm_testsuite/evm_test.py | tests/laser/evm_testsuite/evm_test.py | from mythril.laser.ethereum.svm import LaserEVM
from mythril.laser.ethereum.state.account import Account
from mythril.disassembler.disassembly import Disassembly
from mythril.laser.ethereum.transaction.concolic import execute_message_call
from mythril.laser.smt import Expression, BitVec
from mythril.analysis.solver imp... | Python | 0 | @@ -4560,88 +4560,8 @@
)
- # Comparisons should be done with == than 'is' here as actual can be a BoolRef
%0A
|
3f6989e03b9024f61d64b9919f1a5bfed19f1761 | Update problem1.py | 09-05-2017/python/problem1.py | 09-05-2017/python/problem1.py | f1 = 1
f2 = 1
f3 = f1 + f2
for count in range(4,39):
f1 = f2
f2 = f3
f3 = f1 + f2
print("39th Fibnocci number is:")
print(f3) | Python | 0 | @@ -96,17 +96,17 @@
print(%223
-9
+8
th Fibno
@@ -131,8 +131,9 @@
rint(f3)
+%0A
|
6a263d7203d6cc8fb8650836b93fb62aaacca5f4 | remove site from CategoryAdmin | cms/admin.py | cms/admin.py | import pygit2
from datetime import datetime
# ensure celery autodiscovery runs
from djcelery import admin as celery_admin
from djcelery.models import (
TaskState, WorkerState, PeriodicTask, IntervalSchedule, CrontabSchedule)
from django.contrib import admin
from django.contrib.admin import SimpleListFilter
from... | Python | 0 | @@ -313,53 +313,8 @@
ter%0A
-from django.contrib.sites.models import Site%0A
from
@@ -5884,14 +5884,8 @@
e',
-'site'
),%0A
|
ce77fecc5e2a63a1720dea622fbce233cdb9f0b1 | Fix & in markup text | kivy/core/text/text_pango.py | kivy/core/text/text_pango.py | '''
Pango text provider
===================
'''
__all__ = ('LabelPango', )
from kivy.compat import PY2
from kivy.core.text import LabelBase
from kivy.core.text._text_pango import (KivyPangoRenderer, kpango_get_extents,
kpango_get_ascent, kpango_get_descent)
class LabelPango(... | Python | 0.000003 | @@ -524,16 +524,17 @@
arkup =
+(
text.rep
@@ -543,19 +543,87 @@
ce('
-%3C', '<')
+&', '&')%0A .replace('%3C', '<')%0A
.rep
@@ -635,24 +635,25 @@
'%3E', '>')
+)
%0A opt
|
636d7b0ae22280187b0da7713dd8ccdf2baa4a00 | Fix typo | samples/core/get_started/iris_data.py | samples/core/get_started/iris_data.py | import pandas as pd
import tensorflow as tf
TRAIN_URL = "http://download.tensorflow.org/data/iris_training.csv"
TEST_URL = "http://download.tensorflow.org/data/iris_test.csv"
CSV_COLUMN_NAMES = ['SepalLength', 'SepalWidth',
'PetalLength', 'PetalWidth', 'Species']
SPECIES = ['Sentosa', 'Versicolor'... | Python | 0.999999 | @@ -293,17 +293,16 @@
S = %5B'Se
-n
tosa', '
|
9b3a7ed889722b50f5339ccf47de4ebe4c9af587 | use moto manually in setUp rather than decorator | lacli/t/test_mpconnection.py | lacli/t/test_mpconnection.py | from testtools import TestCase
from moto import mock_s3
class MPConnectionTest(TestCase):
@classmethod
def setup_class(cls):
cls._token = {
'token_access_key': '',
'token_secret_key': '',
'token_session': '',
'token_expiration': '',
'token_ui... | Python | 0 | @@ -332,16 +332,233 @@
%7D%0A%0A
+ def setUp(self):%0A self.s3 = mock_s3()%0A self.s3.start()%0A super(MPConnectionTest, self).setUp()%0A%0A def tearDown(self):%0A self.s3.stop()%0A super(MPConnectionTest, self).tearDown()%0A%0A
def
@@ -585,16 +585,16 @@
**kw):%0A
... |
f01b999bc890a2f8c424398510eba1e77dd9b7fa | move to a simpler dict for pagination | cogs/news.py | cogs/news.py | #!/bin/evn python
import discord
import json
import asyncio
from datetime import datetime
from utils import aiohttp_wrap as aw
from discord.ext import commands
class News:
def __init__(self, bot):
self.bot = bot
self.redis_client = bot.redis_client
self.aio_session = bot.aio_session
... | Python | 0.000002 | @@ -1554,16 +1554,377 @@
em_
-list = %5B
+dict = %7B%7D%0A%0A # Add Emojis for navigation%0A emoji_map = %5B'1%5CU000020e3',%0A '2%5CU000020e3',%0A '3%5CU000020e3',%0A '4%5CU000020e3',%0A '5%5CU000020e3',%0A ... |
8285bb89f401f83ad5634e2a51b608fccdcfe75c | drop photo requirement | cogs/nsfw.py | cogs/nsfw.py | import re
import math
import discord
from discord.ext import commands
class NSFW:
"""NSFW commands for the lewd people."""
def __init__(self, bot):
self.bot = bot
self.discord_max_embed = 5
self.tumblr_api_key = bot.config['tumblr']['apikey']
self.tumblr_post_regex = r'([a-z0-9... | Python | 0 | @@ -1612,14 +1612,8 @@
osts
-/photo
?id=
|
5b0973faeebbabe24fc029a50a2f4580b869962c | create class NewBoids V1.4.0 | Boids/Bad_Boids.py | Boids/Bad_Boids.py | from matplotlib import pyplot as plt
from matplotlib import animation
import random
import numpy as np
Birds = 50 #number of birds in the simulation
def new_flock(count, lower_limits, upper_limits):
#returns two colums of random numbers between the limits
#for ll=[a,b] & ul=[c,d], colum1 is between a-c and 2... | Python | 0.000001 | @@ -101,56 +101,99 @@
np%0A%0A
-Birds = 50 #number of birds in the simulation%0A%0A%0A
+class NewBoids(object):%0A def __init__(self, birds):%0A self.birds = birds%0A %0A
def
@@ -202,16 +202,22 @@
w_flock(
+self,
count, l
@@ -240,24 +240,28 @@
er_limits):%0A
+
#returns
@@ -313,16 +313,2... |
5fa70ef9bbe4b1291160cf85df21c6b9fdbe7eb2 | Fix `search` command format string argument | fac/commands/search.py | fac/commands/search.py | import sys
from fac.commands import Command, Arg
from textwrap import fill
from shutil import get_terminal_size
class SearchCommand(Command):
'Search the mods database.'
name = 'search'
arguments = [
Arg('query', help='search string', nargs='?'),
Arg('-t', help='filter by tag', nargs='... | Python | 0.998478 | @@ -2499,16 +2499,31 @@
t(result
+, result=result
))%0A
|
82d60483e95127c7d946799cee241012a572188f | Remove extraneous comments | cellcounter/cc_kapi/marshalls.py | cellcounter/cc_kapi/marshalls.py | from .models import Keyboard
from .serializers import KeyboardSerializer, KeyboardListItemSerializer, BuiltinKeyboardSerializer, BuiltinKeyboardListItemSerializer
from .defaults import BUILTIN_KEYBOARDS
from pydictobject import DictObject
from abc import ABC, abstractmethod
class KeyboardLayoutsMarshall():
def ... | Python | 0 | @@ -2856,103 +2856,8 @@
None
-%0A# raise NotFound(f%22%7Bself.device_type_display()%7D keyboard with id '%7Bpk%7D' not found%22)
%0A%0A
@@ -4495,22 +4495,8 @@
ata%0A
- # XXX%0A
|
e00fb2e6eccc15593c6d5bad19afa2153bb5a5e8 | Rename match to match_info in ServerRequest | aiohttp/web/request.py | aiohttp/web/request.py | import asyncio
import http.cookies
import json
from urllib.parse import urlsplit, parse_qsl
from aiohttp.multidict import MultiDict, MutableMultiDict
from aiohttp.protocol import Response
from aiohttp.streams import EOF_MARKER
__all__ = [
'ServerRequest',
'ServerResponse',
]
class ServerResponse:
... | Python | 0 | @@ -5126,16 +5126,21 @@
y, match
+_info
, host,
@@ -5951,16 +5951,21 @@
atch
+_info
= match
%0A%0A
@@ -5960,16 +5960,21 @@
= match
+_info
%0A%0A
|
06f37c059c1ddb593e050524833db1336e8183c5 | Build bison on osx | cerbero/bootstrap/build_tools.py | cerbero/bootstrap/build_tools.py | # cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; eit... | Python | 0.000001 | @@ -1311,32 +1311,41 @@
'yasm', 'cmake'
+, 'bison'
%5D,%0A Platf
|
516dba400af4125cd94ac657eca72d1aae67abb9 | Fix Travis build | src/svn_ignore.py | src/svn_ignore.py | import os
import subprocess
import logging
class SVNIgnore:
def __init__(self, recursive=True, directory='.', ignore_file='.svnignore', overwrite = False):
"""
:param recursive: Apply the ignore file also to the children of the directory
:param directory: The initial directory to start
... | Python | 0 | @@ -2970,16 +2970,64 @@
r.error(
+'Could not write ignores to %25s: %25s', directory,
exceptio
@@ -3027,24 +3027,16 @@
xception
-.message
)%0A%0A%0A%0A%0A
@@ -3566,16 +3566,25 @@
cess%5B0%5D.
+decode().
splitlin
|
2eca9f17ea4a900b0da6a03e5c314987a81b6564 | Add minimal docs to StepSequencer and clean up some indentation | Sketches/JT/Jam/library/trunk/Kamaelia/Apps/Jam/UI/StepSequencer.py | Sketches/JT/Jam/library/trunk/Kamaelia/Apps/Jam/UI/StepSequencer.py | #!/usr/bin/env python
import time
from Kamaelia.Apps.Jam.Util.MusicTiming import MusicTimingComponent
class StepSequencer(MusicTimingComponent):
def __init__(self):
super(StepSequencer, self).__init__()
self.steps = {"1" : [1, 0, 0, 0]*self.loopBars,
"2" : [0, 0, 1, 0]*self.... | Python | 0 | @@ -15,16 +15,159 @@
python%0A
+%22%22%22%0A==============%0AStep Sequencer%0A==============%0A%0AA simple step sequencer component for programming rhythmic patterns such as%0Adrum beats.%0A%22%22%22%0A%0A
import t
@@ -239,17 +239,16 @@
ponent%0A%0A
-%0A
class St
@@ -290,27 +290,283 @@
-def __init__(self):
+... |
4a0abc12203113819119a6d86d88a94998f6a6c9 | Fix typo | qingcloud_cli/iaas_client/actions/image/delete_images.py | qingcloud_cli/iaas_client/actions/image/delete_images.py | # coding: utf-8
from qingcloud_cli.misc.utils import explode_array
from qingcloud_cli.iaas_client.actions.base import BaseAction
class DeleteImagesAction(BaseAction):
action = 'DeleteImages'
command = 'delete-images'
MSG_USAGE = '%(prog)s -i image_id, ... [-f <conf_file>]'
@classmethod
def add_e... | Python | 0.999999 | @@ -229,17 +229,13 @@
-MSG_USAGE
+usage
= '
@@ -336,24 +336,16 @@
arser):%0A
-
%0A
@@ -682,28 +682,16 @@
rn None%0A
-
%0A
|
d1a5399f37c8f446ea362b72604332f6405fe70d | Bump version to 0.3 for PyPi release | feedreader/__init__.py | feedreader/__init__.py | import os.path
__all__ = ('__version__', '__build__')
__version__ = (0, 2)
def _get_git_revision(path):
revision_file = os.path.join(path, 'refs', 'heads', 'master')
if not os.path.exists(revision_file):
return None
fh = open(revision_file, 'r')
try:
return fh.read()
finally:
... | Python | 0 | @@ -71,9 +71,9 @@
(0,
-2
+3
)%0A%0Ad
|
5bdf69695e5cc28d231577e106ab54f3435cc18e | remove identification of schema.py by autoloader | launcher.py | launcher.py | #!/usr/bin/env python
"""
This is the launcher for Titan
"""
import logging
from sys import argv,exit
from itertools import chain
from lib.ti_orm import TiORM
from lib.config import TiConfig
from lib.helpers import system
from socket import gethostname
from time import strftime, gmtime
from collections import namedtup... | Python | 0.000001 | @@ -1619,16 +1619,29 @@
%22README%22
+, %22schema.py%22
%5D):%0A
|
7489ac1142882dd4eafb7b9ccc26718cbedc84de | Change file mode to 'w' instead of 'H'. | Lib/io/npfile.py | Lib/io/npfile.py | # Author: Matthew Brett, Travis Oliphant
"""
Class for reading and writing numpy arrays from / to files
"""
import sys
import numpy as N
sys_endian_code = (sys.byteorder == 'little') and '<' or '>'
class npfile(object):
''' Class for reading and writing numpy arrays to/from files
Inputs:
file_na... | Python | 0.000001 | @@ -474,17 +474,17 @@
('r', '
-H
+w
', 'a')%0A
|
e02308dc1f68408ea3d74bdc154a883cdc3c797e | test adjacent | src/test_graph.py | src/test_graph.py | # _*_ encoding: utf-8 _*_
"""Test graph.py."""
import pytest
@pytest.fixture()
def native_graph():
"""Fixture for graph."""
from graph import Graph
test_graph = Graph()
test_graph.add_node("codefellows")
test_graph.add_node("python")
return test_graph
@pytest.fixture()
def ample_graph():
... | Python | 0.000001 | @@ -2766,8 +2766,429 @@
rs('z')%0A
+%0A%0Adef test_adjacent(ample_graph):%0A %22%22%22Test adjacent function with bad values.%22%22%22%0A with pytest.raises(IndexError):%0A ample_graph.adjacent('y', 'z')%0A%0A%0Adef test_adjacent_0(ample_graph):%0A %22%22%22Test adjacent function with good values.%22%2... |
af446590c73c22d1738ba7d8331dd410dfed2d79 | allow calling script to use argparse | ros_ws/src/crazyswarm/scripts/pycrazyswarm/crazyswarm.py | ros_ws/src/crazyswarm/scripts/pycrazyswarm/crazyswarm.py | import argparse
from . import genericJoystick
class Crazyswarm:
def __init__(self):
parser = argparse.ArgumentParser()
parser.add_argument("--sim", help="Run using simulation", action="store_true")
parser.add_argument("--vis", help="(sim only) Visualization backend [mpl]", choices=['mpl', ... | Python | 0.000001 | @@ -560,16 +560,25 @@
args
+, unknown
= parse
@@ -585,16 +585,22 @@
r.parse_
+known_
args()%0A%0A
|
6aaa973595c66005d9fb471da618fa8071d456e5 | support playlist | src/you_get/extractors/yinyuetai.py | src/you_get/extractors/yinyuetai.py | #!/usr/bin/env python
__all__ = ['yinyuetai_download', 'yinyuetai_download_by_id']
from ..common import *
def yinyuetai_download_by_id(vid, title=None, output_dir='.', merge=True, info_only=False):
video_info = json.loads(get_html('http://www.yinyuetai.com/insite/get-video-info?json=true&videoId=%s' % vid))
... | Python | 0 | @@ -794,18 +794,24 @@
s):%0A
-id
+playlist
= r1(r'
@@ -839,55 +839,417 @@
com/
-video
+playlist
/(%5Cd+)
-$
', url
-.split('?')%5B0%5D)%0A assert id
+)%0A if playlist:%0A html = get_html(url)%0A data_ids = re.findall(r'data-index=%22%5Cd+%22%5Cs*data-id=(%5Cd+)', html)%0A for data_i... |
e6d7932a543a89ad3d34b0be39b549bc04f22a5b | Fix global envars | pybossa_discourse/__init__.py | pybossa_discourse/__init__.py | # -*- coding: utf8 -*-
"""
pybossa-discourse
-----------------
A PyBossa plugin for Discourse integration.
"""
import os
import inspect
from flask import current_app as app
from flask.ext.plugins import Plugin
from .client import DiscourseClient
from .sso import DiscourseSSO
__plugin__ = "PyBossaDiscourse"
__version... | Python | 0.003528 | @@ -1810,11 +1810,8 @@
= %5Bm
-%5B1%5D
for
@@ -1980,16 +1980,63 @@
ethods:%0A
+ key = 'discourse_%7B0%7D'.format(m%5B0%5D)%0A
@@ -2072,11 +2072,19 @@
ate(
-m=m
+%7Bkey: m%5B1%5D%7D
)%0A%0A%0A
|
bba685b948f686714f2b62b6c59318204d5af2c2 | Move parser & packer to network. | pycoin/networks/bitcoinish.py | pycoin/networks/bitcoinish.py | from pycoin.block import Block
from pycoin.coins.bitcoin.extras import Extras
from pycoin.coins.bitcoin.ScriptTools import BitcoinScriptTools
from pycoin.coins.bitcoin.Tx import Tx
from pycoin.ecdsa.secp256k1 import secp256k1_generator
from pycoin.encoding.hexbytes import h2b
from pycoin.ui.uiclass import UI
from pycoi... | Python | 0 | @@ -229,16 +229,198 @@
nerator%0A
+from pycoin.message.make_parser_and_packer import (%0A make_parser_and_packer, standard_messages,%0A standard_message_post_unpacks, standard_streamer, standard_parsing_functions%0A)%0A
from pyc
@@ -452,16 +452,16 @@
ort h2b%0A
-
from pyc
@@ -1497,33 +1497,40 @@
cript_prefix... |
26101eba50c93cfc555534723a6acffde896fafe | Add default Espresso config to minimization module | pyeda/boolalg/minimization.py | pyeda/boolalg/minimization.py | """
Boolean Minimization
Interface Functions:
espresso_exprs
"""
from pyeda.boolalg import boolfunc
from pyeda.boolalg.espresso import (
FTYPE, DTYPE, RTYPE,
espresso, EspressoError,
)
from pyeda.boolalg.expr import exprvar, Expression, Or, And
from pyeda.boolalg.table import TruthTable, PC_ZERO, PC_ONE, ... | Python | 0 | @@ -160,24 +160,36 @@
, RTYPE,%0A
+ set_config,
espresso, E
@@ -202,16 +202,16 @@
oError,%0A
-
)%0Afrom p
@@ -332,16 +332,190 @@
PC_DC%0A%0A
+CONFIG = dict(%0A single_expand=False,%0A remove_essential=True,%0A force_irredundant=True,%0A unwrap_onset=True,%0A recompute_onset=False,%0A use_sup... |
59522f3530bef10de614f86f082c77a91a2814b4 | Remove unused potential derivative. | pyflation/multifieldmodels.py | pyflation/multifieldmodels.py | '''multifield.py - Classes for multi field cosmological models
Author: Ian Huston
For license and copyright information see LICENSE.txt which was distributed with this file.
'''
import numpy as np
from scipy import interpolate
import cosmomodels as c
class MultiFieldModels(c.CosmologicalModel):
'''
Parent ... | Python | 0 | @@ -3976,18 +3976,8 @@
dphi
-, d2Udphi2
= s
@@ -4013,17 +4013,17 @@
rams)%5B0:
-3
+2
%5D
|
0039ae1d106451928b08ad8fa96888b43f223b8e | Remove line feed | pygraphc/output/OutputText.py | pygraphc/output/OutputText.py | import csv
class OutputText(object):
"""OutputText the clustering result to various types of file such as txt, csv, and html.
"""
@staticmethod
def txt_perline(perline_file, perline_analysis, max_cluster_id, cluster_labels, original_logs):
"""Write clustering result per line to txt file. This ... | Python | 0.000001 | @@ -2346,23 +2346,16 @@
gs%5Bnode%5D
- + '%5Cn'
)%0A
|
93593a321fa941c2284a9c5520d06d47d380088c | Fix invalid updating of evecentral caching | stationspinner/evecentral/models.py | stationspinner/evecentral/models.py | from django.db import models
from stationspinner.libs.pragma import get_location_name
from stationspinner.sde.models import InvType
from datetime import datetime, timedelta
from pytz import UTC
class Market(models.Model):
locationID = models.IntegerField()
cached_until = models.DateTimeField(null=True)
de... | Python | 0.000001 | @@ -347,20 +347,20 @@
elf.
-last_updated
+cached_until
= d
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.