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 |
|---|---|---|---|---|---|---|---|
3e9708cc7972f4fffed66bebbd6b93574a54744b | fix crash with empty docstring | core/main.py | core/main.py | import thread
import traceback
thread.stack_size(1024 * 512) # reduce vm size
class Input(dict):
def __init__(self, conn, raw, prefix, command, params,
nick, user, host, paraml, msg):
chan = paraml[0].lower()
if chan == conn.nick: # is a PM
chan = nick
... | Python | 0.000001 | @@ -3070,16 +3070,53 @@
nput.inp
+ %5C%0A and func.__doc__ is not None
:%0A
|
23b2e01231b2788b4544c523c05e5c8035130d61 | Clarify why polar coordinates are in this order | skyfield/functions.py | skyfield/functions.py | """Basic operations that are needed repeatedly throughout Skyfield."""
from numpy import arcsin, arctan2, array, cos, load, sin, sqrt
from pkgutil import get_data
from skyfield.constants import tau
def dots(v, u):
"""Given one or more vectors in `v` and `u`, return their dot products.
This works whether `v` ... | Python | 0 | @@ -1615,32 +1615,44 @@
z-axis%0A%0A The
+meaning and
order of the thr
@@ -1671,34 +1671,43 @@
lues is
-intend
+design
ed to
+%0A
match
+both
ISO 31-1
@@ -1699,33 +1699,285 @@
h both ISO 31-11
-.
+ and the traditional order used by physicists.%0A Mathematicians usually define %60%60theta%60%60 and... |
c9ae61bd0aba076c3b6ae937672339bdd90877da | Bump version to 1.1.0.dev1 | sortedm2m/__init__.py | sortedm2m/__init__.py | # -*- coding: utf-8 -*-
__version__ = '1.1.0'
| Python | 0 | @@ -39,10 +39,15 @@
= '1.1.0
+.dev1
'%0A
|
3970106ae0244c869cab790029664522a1e8910c | Fix migration 166 | migrations/versions/166_migrate_body_format.py | migrations/versions/166_migrate_body_format.py | """migrate body format
Revision ID: 3d4f5741e1d7
Revises: 29698176aa8d
Create Date: 2015-05-10 03:16:04.846781
"""
# revision identifiers, used by Alembic.
revision = '3d4f5741e1d7'
down_revision = '29698176aa8d'
import sqlalchemy as sa
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm imp... | Python | 0.000007 | @@ -827,24 +827,74 @@
.id)).one()%0A
+ if max_id is None:%0A max_id = 0%0A
for
|
84d870123c47f9d42c8ecc844bc15cefa503a38c | Change buildsystemdata to set jumps and kills to 0 upon data construction. | evewspace/core/management/commands/buildsystemdata.py | evewspace/core/management/commands/buildsystemdata.py | from django.core.management.base import NoArgsCommand, CommandError
from core.models import *
from Map.models import *
import datetime
import pytz
class Command(NoArgsCommand):
def handle_noargs(self, **options):
self.stdout.write('Beginning System Table Construction')
basedata = SystemData.object... | Python | 0 | @@ -421,32 +421,25 @@
stem.name))%0A
-
+%09
try:%0A
@@ -961,32 +961,138 @@
ta_ptr = system%0A
+%09%09 newdata.jumps = 0%0A%09%09 newdata.podkills = 0%0A%09%09 newdata.npckills = 0%0A%09%09 newdata.shipkills = 0%0A
@@ -1558,32 +1558,32 @@
field.attname))%0A
-
... |
3f422909416f14651e56cd5235275309df883964 | add ip to allowed_hosts | sparcssso/settings.py | sparcssso/settings.py | """
Django settings for sparcssso project.
Generated by 'django-admin startproject' using Django 1.8.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build pa... | Python | 0.000001 | @@ -872,16 +872,35 @@
rcs.org'
+, '143'248.234.129'
%5D%0A%0A%0A# Ap
|
933c138cb1a7b7e5afc7405a45a8d6f8865d4670 | fix bug: argument encoding | spider/mydm/ai/tag.py | spider/mydm/ai/tag.py | # -*- coding: utf-8 -*-
import re
def verify_tags(tags):
return True if all(len(tag) < 32 for tag in tags) else False
class ReExtractor:
PATTERN = re.compile(r'tags?\s*:.*')
def extract(self, s):
tags = [tag.strip() for tag in s[s.find(':')+1:-1].split(',')]
return tags
def __cal... | Python | 0.00002 | @@ -1455,16 +1455,34 @@
elf, doc
+, encoding='UTF-8'
):%0A
@@ -1566,16 +1566,60 @@
atch(doc
+,%0A encoding=encoding
)%0A
|
59f795f66b5ed433ad2b2aff7a9ffde9c39d445c | insert placeholder: automatically move focus to text control after pressing the button | editor/current_card.py | editor/current_card.py | from shared.card import CARD_PLACEHOLDER_LENGTH
import wx
class CurrCardWindow(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent=parent,
name="current card panel(this is a name)")
self.SetLabel("current card panel(this is a label)")
self.SetBackgroundColour("wh... | Python | 0 | @@ -3882,8 +3882,46 @@
LENGTH)%0A
+ self.current_card_text.SetFocus()%0A
|
26896aaed932a14b362d79d160111a79ffb8743c | rename this method | termcast_client/__init__.py | termcast_client/__init__.py | import argparse
import hashlib
import json
import os
import shutil
import signal
import socket
import ssl
import sys
from . import pity
class Client(object):
def __init__(self, host, port, username, password, tls, fingerprint):
self.host = host
self.port = port
self.username = username
... | Python | 0.03523 | @@ -557,21 +557,20 @@
self._s
-etup_
+tart
tls()%0A
@@ -784,13 +784,12 @@
f _s
-etup_
+tart
tls(
|
b02094fe025dca9ff64969a3141e87cba3bb82e1 | remove ts2dt | sqlite_tensor/util.py | sqlite_tensor/util.py | # -*- coding: utf-8 -*-
import time
from datetime import datetime
import shortuuid
shortuuid.set_alphabet(
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
)
def gen_id():
"""Return generated short UUID.
"""
return shortuuid.uuid()
def dt2ts(dt):
return int(time.mktime(dt.ti... | Python | 0.998026 | @@ -365,135 +365,8 @@
)%0A%0A%0A
-def ts2dt(ts):%0A return datetime.fromtimestamp(%0A int(ts) // 1000%0A ).replace(microsecond=(int(ts) %25 1000 * 1000))%0A%0A%0A
def
|
33020a8beafd64eb666e479897f9bab8606a463e | Change to relative import | sqlobject/__init__.py | sqlobject/__init__.py | """SQLObject"""
# Do import for namespace
# noqa is a directive for flake8 to ignore seemingly unused imports
from __version__ import version, version_info # noqa
from col import * # noqa
from index import * # noqa
from joins import * # noqa
from main import * # noqa
from sqlbuilder import AND, OR, NOT, IN, LIK... | Python | 0.000003 | @@ -110,16 +110,17 @@
s%0A%0Afrom
+.
__versio
@@ -166,16 +166,17 @@
a%0A%0Afrom
+.
col impo
@@ -193,16 +193,17 @@
qa%0Afrom
+.
index im
@@ -222,16 +222,17 @@
qa%0Afrom
+.
joins im
@@ -251,16 +251,17 @@
qa%0Afrom
+.
main imp
@@ -279,16 +279,17 @@
qa%0Afrom
+.
sqlbuild
@@ -376,16 +376,17 @@
qa%0Afrom
... |
c4c200db7feedd6aa8babd6c5ec5b54ff368febe | Update convert simple | web/views.py | web/views.py | import datetime
from celery import chain
from .tasks import *
from django.http import HttpResponse
from django.http import JsonResponse
from django.views.decorators.csrf import csrf_exempt
from django.contrib.auth import logout
from .serializers import VideoSerializer
from django.shortcuts import render
from rest_frame... | Python | 0.002396 | @@ -2150,16 +2150,88 @@
onvert%0A%0A
+ #validateConvert(new_video.user_email,new_video.original_video)%0A
%0A ret
|
9ac55bb9615bdda38df5d4cdc4357158e3b63f08 | Improve memoize | cupy/util.py | cupy/util.py | import atexit
import functools
from cupy import cuda
_memoized_funcs = []
def memoize(for_each_device=False):
"""Makes a function memoizing the result for each argument and device.
This decorator provides automatic memoization of the function result.
Args:
for_each_device (bool): If True, it ... | Python | 0.000003 | @@ -470,16 +470,108 @@
tor(f):%0A
+ global _memoized_funcs%0A f._cupy_memo = %7B%7D%0A _memoized_funcs.append(f)%0A%0A
@@ -628,44 +628,8 @@
s):%0A
- global _memoized_funcs%0A%0A
@@ -790,151 +790,20 @@
o =
-getattr(f, '_cupy_memo', None)%0A if memo is None:%... |
2916ac03bd958ad318568cd80279ad9d41ae6bfc | Remove wildcard imports from test_h5py | blaze/compute/tests/test_h5py.py | blaze/compute/tests/test_h5py.py | from __future__ import absolute_import, division, print_function
import numpy as np
import pytest
h5py = pytest.importorskip('h5py')
from blaze import compute
from blaze.expr import symbol
from datashape import discover
from blaze.utils import tmpfile
from blaze.compute.h5py import *
from blaze.compute.h5py import ... | Python | 0.000001 | @@ -129,16 +129,48 @@
h5py')%0A%0A
+from datashape import discover%0A%0A
from bla
@@ -221,39 +221,8 @@
bol%0A
-from datashape import discover%0A
from
@@ -252,42 +252,8 @@
file
-%0A%0Afrom blaze.compute.h5py import *
%0Afro
@@ -296,22 +296,8 @@
ute,
- post_compute,
opt
|
a0862fbd206b8ffe46db98f7c9a04211552b5a9d | Add blank functions | component.py | component.py | # -*- coding: utf-8 -*-
"""
component
~~~~~~~~~
A module that implements various helper functions to assist in using
component(1) with a python workflow.
:copyright: (c) 2013 by Daniel Chatfield
:license: MIT, see LICENSE for details.
"""
| Python | 0.835011 | @@ -250,12 +250,80 @@
etails.%0A%22%22%22%0A
+%0Adef require(component_name):%0A pass%0A%0Adef export(object):%0A pass
|
d1eb1b3ae69cfb5308a9561aa9fadd35e1718186 | Add description | conanfile.py | conanfile.py | from conans import ConanFile, CMake, tools
import os
class IlmBaseConan(ConanFile):
name = "IlmBase"
version = "2.2.0"
license = "BSD"
url = "https://github.com/Mikayex/conan-ilmbase.git"
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "namespace_versionin... | Python | 0.000005 | @@ -96,24 +96,215 @@
= %22IlmBase%22%0A
+ description = %22IlmBase is a component of OpenEXR. OpenEXR is a high dynamic-range (HDR) image file format developed by Industrial Light & Magic for use in computer imaging applications.%22%0A
version
|
c8753f7aafecac17d500ecf24488e885f7a97d31 | Update serializer -fix typo | website/addons/s3/serializer.py | website/addons/s3/serializer.py | from website.addons.base.serializer import OAuthAddonSerializer
from webs.addons.s3 import utils
class S3Serializer(OAuthAddonSerializer):
addon_short_name = 's3'
REQUIRED_URLS = []
@property
def addon_serialized_urls(self):
node = self.node_settings.owner
user_settings = self.node_se... | Python | 0 | @@ -66,16 +66,19 @@
rom webs
+ite
.addons.
@@ -93,16 +93,16 @@
t utils%0A
-
%0Aclass S
@@ -379,16 +379,77 @@
ult = %7B%0A
+ 'accounts': node.api_url_for('s3_account_list'),%0A
@@ -552,21 +552,16 @@
for('s3_
-node_
import_a
@@ -586,21 +586,16 @@
'create
-_auth
': node.
@@ -615,21 +615,23 @... |
c33c527d08b5a7fbe414c07819c69bb884a2e977 | use my version, cit compiles on every system | conanfile.py | conanfile.py |
import os
import fnmatch
from conans import ConanFile, CMake
class QuerysetCPP(ConanFile):
name = "queryset-cpp"
version = "0.4"
generators = "cmake"
settings = "os", "compiler", "build_type", "arch"
exports = "conanfile.py", "CMakeLists.txt", "queryset/*", "tests/*"
url = "https://github.com... | Python | 0 | @@ -507,19 +507,19 @@
es.add(%22
-SQL
+sql
ite3cc/0
@@ -527,202 +527,23 @@
1.1@
-monsdar/testing%22)%0A self.requires.add(%22sqlite3/3.15.2@jgsogo/stable%22) # This one is needed because sqlite3 dep in SQLite3cc/0.1.1@monsdar/testing does not copy libraries for debug version.
+jgsogo/stable%22)
%0A%0A
|
446d4919c5664ff27fc3bae09439000a1a46866b | Bump version: 0.0.7 -> 0.0.8 | conanfile.py | conanfile.py | from conans import ConanFile
from conans.tools import download, unzip
import os
VERSION = "0.0.7"
class CMakeModuleCommonConan(ConanFile):
name = "cmake-module-common"
version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION)
generators = "cmake"
url = "http://github.com/polysquare/cmake-module-com... | Python | 0 | @@ -93,9 +93,9 @@
0.0.
-7
+8
%22%0A%0A%0A
|
fc2864fd7d9c8b3b7955760b388244f5b5ff6fb5 | Use giflib fork with proper bool size in C | conanfile.py | conanfile.py | from conans import ConanFile, CMake
import os
class ImageFlowConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
requires = "littlecms/2.7@lasote/stable", "libpng/1.6.21@lasote/stable", "libjpeg-turbo/1.4.2@imazen/testing" , "giflib/5.1.3@lasote/stable"
options = {"build_tests": [True, Fals... | Python | 0 | @@ -257,22 +257,24 @@
b/5.1.3@
-lasote
+tostercx
/stable%22
|
4ae253fe59e4b5796340af8b21b8077d1a5536a8 | fix a bug if a state is not found, skip it | etk/classifiers/country_classifier.py | etk/classifiers/country_classifier.py | import json
import math
def country_next_to_city(knowledge_graph, given_country):
""" Distance between the country token and the city token.
If the country token doesn't exist, result is 0. Else, if it exists,
it is the min distance between end of all cities and start of country"""
result = 0
foun... | Python | 0.000001 | @@ -2724,24 +2724,75 @@
kg_states:%0A
+ if state in state_to_country_dict:%0A
@@ -2853,24 +2853,28 @@
+
for sp in kg
@@ -2901,32 +2901,36 @@
+
+
if %22origin%22 in s
@@ -2932,16 +2932,20 @@
in sp:%0A
+
@@ -2997,32 +2997,36 @@
cou... |
fb7c43de9eac04f2abd286c612a96138547cc2ff | k-means OK | Speech/exercises/GMM/gmm.py | Speech/exercises/GMM/gmm.py | #!/usr/bin/env python2
# -*- coding: UTF-8 -*-
# load training data
trainFile = open('train.txt', 'r')
data = [[],[]]
for line in trainFile:
tmp=line.split()
if tmp[2] == '1':
data[0].append((float(tmp[0]),float(tmp[1])))
elif tmp[2] == '2':
data[1].append((float(tmp[0]),float(tmp[1])))
... | Python | 0.999877 | @@ -14,17 +14,17 @@
v python
-2
+3
%0A# -*- c
@@ -41,16 +41,68 @@
-8 -*-%0A%0A
+import numpy as np%0Aimport matplotlib.pyplot as plt%0A%0A
%0A# load
@@ -368,81 +368,1483 @@
))%0A%0A
-%0A#set initial parameter theta(0) and iteration index k = 1%0Atheta = %5B0%5D%0Ak = 1
+class1 = np.array(data%5B0%5D)%0Aclass2 = n... |
9363a81019ba9932c2bcd913a24141ac06d7046a | Handle registrations with no requests or subs. Replaces repopulate command | registrations/management/commands/fix_registration_subscriptions.py | registrations/management/commands/fix_registration_subscriptions.py | from os import environ
from datetime import datetime
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from registrations.models import Registration
from ._utils import validate_and_return_url
class Command(BaseCommand):
help = ("Creates or updates all Subscript... | Python | 0 | @@ -150,42 +150,160 @@
ror%0A
-from registrations.models import R
+%0Afrom seed_services_client import StageBasedMessagingApiClient%0A%0Afrom registrations.models import Registration%0Afrom registrations.tasks import validate_r
egis
@@ -2089,16 +2089,1079 @@
today)%0A%0A
+ client = StageBasedMessagingApiClien... |
defe5256532a3dfdc437996aec88ef7b04908d01 | Add names to the coverity buildsteps | buildbotextras/steps/coverity.py | buildbotextras/steps/coverity.py | # Copyright (C) 2008-2013 Anders Waldenborg et al.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge... | Python | 0 | @@ -1258,32 +1258,61 @@
(ShellCommand):%0A
+ name = %22coverityanalyze%22%0A
def describe
@@ -1923,32 +1923,60 @@
(ShellCommand):%0A
+ name = %22coverityreport%22%0A
def describe
@@ -2949,24 +2949,52 @@
llCommand):%0A
+ name = %22coveritycommit%22%0A
def desc
|
df3f94e96e5c28f8eff503b3ce264b2cf0cda209 | Make lint | donut/modules/groups/constants.py | donut/modules/groups/constants.py | from enum import Enum
# Enum for group types in the groups table
class GroupTypes(Enum):
HOUSE = 'house'
COMMITTEE = 'committee' # i.e IHC, BOC, CRC
ASCIT = 'ascit' # For all groups that are involved with ascit
PUBLICATION = 'publication' # i.e The Tech
UGCURRENT = 'ugcurrent' # current student gro... | Python | 0.999636 | @@ -16,16 +16,17 @@
t Enum%0A%0A
+%0A
# Enum f
@@ -131,16 +131,17 @@
mmittee'
+
# i.e I
@@ -172,16 +172,17 @@
'ascit'
+
# For a
@@ -251,16 +251,17 @@
ication'
+
# i.e T
@@ -295,16 +295,17 @@
current'
+
# curre
@@ -356,16 +356,17 @@
ugalumn'
+
# alumn
@@ -384,10 +384,9 @@
e ug2010
-
%0A
|
22549161a50b26c21343b9bec8a9e075dd46b223 | fix unittest to filter a request with same url as start_requests. rel r868. ref #49 | scrapy/trunk/scrapy/tests/test_spidermiddleware_duplicatesfilter.py | scrapy/trunk/scrapy/tests/test_spidermiddleware_duplicatesfilter.py | import unittest
from scrapy.spider import spiders
from scrapy.http import Request, Response
from scrapy.contrib.spidermiddleware.duplicatesfilter import DuplicatesFilterMiddleware, SimplePerDomainFilter
class DuplicatesFilterMiddlewareTest(unittest.TestCase):
def setUp(self):
spiders.spider_modules = ['s... | Python | 0.000001 | @@ -564,19 +564,26 @@
r
-q = Request
+esponse = Response
('ht
@@ -617,35 +617,42 @@
response
- = Response
+.request = Request
('http://scr
@@ -658,32 +658,33 @@
rapytest.org/')%0A
+%0A
response
@@ -680,28 +680,45 @@
r
-esponse.request = rq
+0 = Request('http://scrapytest.org/')
%0A
@@ -919,... |
2af01c0293db53dc80c552df3986d0e088b65b76 | improve player params extraction(closes #22638) | youtube_dl/extractor/bokecc.py | youtube_dl/extractor/bokecc.py | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import compat_parse_qs
from ..utils import ExtractorError
class BokeCCBaseIE(InfoExtractor):
def _extract_bokecc_formats(self, webpage, video_id, format_id=None):
player_params_str = self._h... | Python | 0 | @@ -375,45 +375,98 @@
src=
-%22http://p%5C.bokecc%5C.com/player%5C?(%5B%5E%22%5D+
+(?P%3Cq%3E%5B%22%5C'%5D)(?:https?:)?//p%5C.bokecc%5C.com/(?:player%7Cflash/player%5C.swf)%5C?(?P%3Cquery%3E.+?)(?P=q
)',%0A
@@ -501,16 +501,31 @@
params'
+, group='query'
)%0A%0A
@@ -1279,122 +1279,154 @@
id=E
-44D40C15E65EA30... |
d72aea25f2a6d18c7f6d213144e0861fac65a4f9 | Use named match for Gravatar email | zephyr/lib/bugdown/__init__.py | zephyr/lib/bugdown/__init__.py | import re
import markdown
from zephyr.lib.avatar import gravatar_hash
from zephyr.lib.bugdown import codehilite
class Gravatar(markdown.inlinepatterns.Pattern):
def handleMatch(self, match):
# NB: the first match of our regex is match.group(2) due to
# markdown internal matches
img = mark... | Python | 0 | @@ -195,112 +195,8 @@
h):%0A
- # NB: the first match of our regex is match.group(2) due to%0A # markdown internal matches%0A
@@ -423,17 +423,23 @@
h.group(
-2
+'email'
)),))%0A
@@ -802,16 +802,25 @@
vatar%5C((
+?P%3Cemail%3E
%5B%5E)%5D*)%5C)
|
2d83d3743d8450ad66d0a0c23813ff6623984ded | set root oid on construction | zerodb/storage/transforming.py | zerodb/storage/transforming.py | from zc.zlibstorage import ZlibStorage
import logging
import zope.interface
from zerodb.transform import encrypt, decrypt, compress, decompress
from zerodb.util import encode_hex
from zerodb.util.debug import debug_loads
class TransformingStorage(ZlibStorage):
"""
Storage which can transform (encrypt and/or c... | Python | 0.000001 | @@ -1210,20 +1210,34 @@
t_oid =
-None
+base.get_root_id()
%0A%0A de
|
63c69e85951266268693ec4b74d167adf63867dc | fix #3: rstrip before return | aligntab.py | aligntab.py | import sublime
import sublime_plugin
import re, string, os
if not 'HIST' in globals(): HIST = []
def colwidth(lines_content):
width = [0]*max([len(lc) for lc in lines_content])
for lc in lines_content:
for i,x in enumerate(lc):
if width[i]<len(x): width[i] = len(x)
return width
def f... | Python | 0.000003 | @@ -4419,35 +4419,20 @@
-view.replace(edit,lines%5Bk%5D,
+newcontent =
spa
@@ -4465,16 +4465,76 @@
tent%5Bk%5D)
+%0A view.replace(edit,lines%5Bk%5D, newcontent.rstrip()
)%0A
|
85c6904b42027bfd5f416a3ed683d2f1ca1e839f | Test new config support for alternate frontends. | test/backend/test_config.py | test/backend/test_config.py | import unittest
from saliweb.backend import Config, ConfigError
from StringIO import StringIO
import config
import re
basic_config = """
[general]
admin_email: test@salilab.org
service_name: test_service
socket: test.socket
[backend]
user: test
state_file: state_file
check_minutes: 10
[database]
db: testdb
frontend_... | Python | 0 | @@ -282,16 +282,84 @@
es: 10%0A%0A
+%5Bfrontend:foo%5D%0Aservice_name: Foo%0A%0A%5Bfrontend:bar%5D%0Aservice_name: Bar%0A%0A
%5Bdatabas
@@ -1376,16 +1376,214 @@
ng'%5D, 5)
+%0A self.assertEqual(len(conf.frontends.keys()), 2)%0A self.assertEqual(conf.frontends%5B'foo'%5D%5B'service_name'%5D, 'Foo')%0A ... |
068119677d8c5d97689d4ac9ab6d912f7116cd7c | fix var pass | cabby/model/text/dual_encoder/model_trainer.py | cabby/model/text/dual_encoder/model_trainer.py | # coding=utf-8
# Copyright 2020 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | Python | 0.000002 | @@ -4357,18 +4357,24 @@
fer_only
-:
+= FLAGS.
infer_on
|
f61148ba6faeba204c2fb9499f51b1be721e9f4d | update size category layer | cartoframes/viz/helpers/size_category_layer.py | cartoframes/viz/helpers/size_category_layer.py | from __future__ import absolute_import
from .. import defaults
from ..layer import Layer
def size_category_layer(
source, value, title='', top=5, cat=None,
size=None, color=None, opacity=None, stroke_width=None,
stroke_color=None, description='', footer='',
legend=True, popup=True, wi... | Python | 0.000001 | @@ -43,17 +43,21 @@
om .
-.
+utils
import
defa
@@ -52,24 +52,25 @@
import
-defaults
+get_value
%0Afrom ..
@@ -2357,16 +2357,90 @@
se '1'%0A%0A
+ if opacity is None:%0A opacity = '%7B0%7D'.format(opacity or '0.8')%0A%0A
retu
@@ -2445,24 +2445,24 @@
turn Layer(%0A
-
sour
@@ -2724,33 +27... |
af16a55be73fd88c7a07faee13917092109ecb72 | Add test for iCal export for workouts | wger/manager/tests/test_ical.py | wger/manager/tests/test_ical.py | # This file is part of wger Workout Manager.
#
# wger Workout Manager is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# wger W... | Python | 0 | @@ -650,16 +650,62 @@
tetime%0A%0A
+from django.core.urlresolvers import reverse%0A%0A
from wge
@@ -1397,8 +1397,1362 @@
12, 7))%0A
+%0A%0Aclass WorkoutICalExportTestCase(WorkoutManagerTestCase):%0A '''%0A Tests exporting the ical file for a workout%0A '''%0A%0A def export_ical(self, fail=False):%0A ... |
6fdb04e47bdfc80e17a8c34cebabec98c3c5ee0e | Increase filters | eva/models/pixelcnn.py | eva/models/pixelcnn.py | from keras.models import Model
from keras.layers import Input, Convolution2D, Activation, Flatten, Dense
from keras.layers.advanced_activations import PReLU
from keras.optimizers import Nadam
from eva.layers.residual_block import ResidualBlockList
from eva.layers.masked_convolution2d import MaskedConvolution2D
def Pi... | Python | 0.000001 | @@ -609,33 +609,42 @@
= Convolution2D(
-1
+filters//2
, 1, 1)(model)%0A
@@ -688,33 +688,42 @@
= Convolution2D(
-1
+filters//2
, 1, 1)(model)%0A
|
ed1de617b5fcca499f9ca620ea0d16641e113b30 | Fix wiimoteac | wiimoteAC.py | wiimoteAC.py | #! /usr/bin/python
import cwiid
import time
class InputWiimoteAC(object):
def makeConnection(self):
print "Press 1 + 2 on the wiimote for Acceleration"
try:
wm = cwiid.Wiimote()
except RuntimeError:
wm = None
else:
wm.led = 2
#wm.enable(cwiid.FLAG_MOTIONPLUS)
wm.rpt_mode = cwiid.RPT_BTN | cwiid... | Python | 0.000002 | @@ -846,23 +846,16 @@
termine(
-wiimote
)%0A%0Aif __
|
0866b795d3da3f0e3b20759ad597b3b2ca0be126 | enable `/gettext/{aoid}` route | aore/app.py | aore/app.py | import asyncpg
from aiohttp import web
from aiohttp_pydantic import oas
from settings import AppConfig
from . import log
from .search import FiasFactory
from .views import NormalizeAoidView, error_middleware, ExpandAoidView, ConvertAoidView, FindAoView, cors_middleware
async def init_fias(app: web.Application) -> No... | Python | 0.000003 | @@ -263,16 +263,39 @@
ddleware
+, %5C%0A GetAoidTextView
%0A%0A%0Aasync
@@ -1565,32 +1565,92 @@
onvertAoidView)%0A
+ app.router.add_view('/gettext/%7Baoid%7D', GetAoidTextView)%0A
app.router.a
|
44bfdc7f81183c3a4aa79b0075c2ad2288026e14 | update backend interface | burpui/misc/backend/interface.py | burpui/misc/backend/interface.py | # -*- coding: utf8 -*-
class BUIbackend:
def __init__(self, app=None, host='127.0.0.1', port=4972):
self.app = app
self.host = host
self.port = port
def status(self, query='\n', agent=None):
raise NotImplementedError("Sorry, the current Backend does not implement this method!")... | Python | 0.000001 | @@ -1591,24 +1591,28 @@
ef read_conf
+_srv
(self, agent
@@ -1708,32 +1708,315 @@
this method!%22)%0A%0A
+ def read_conf_cli(self, agent=None):%0A raise NotImplementedError(%22Sorry, the current Backend does not implement this method!%22)%0A%0A def store_conf_srv(self, data, agent=None):%0A raise ... |
cadbc876577f72406b50e39c8e7c59d9f60e2c6d | Fix crash in k:line command execution | txircd/modules/core/bans_kline.py | txircd/modules/core/bans_kline.py | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.config import ConfigValidationError
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from txircd.modules.xlinebase import XLineBase
from txircd.utils import durationToSeconds, ircLower, now
from zope.int... | Python | 0.000004 | @@ -3300,15 +3300,8 @@
elf.
-module.
matc
|
059d445f40d7c829b2d5888e1c0e700e03552d47 | Fix tag params in user directory | wirecurly/directory/__init__.py | wirecurly/directory/__init__.py | import logging
log = logging.getLogger(__name__)
__all__ = ['User']
class User(object):
"""A user object for the directory"""
def __init__(self, user_id, password=None):
super(User, self).__init__()
self.user_id = user_id
self.variables = []
self.parameters = []
if password:
self.addParameter('passw... | Python | 0.000001 | @@ -1388,20 +1388,16 @@
: 'param
-eter
s', 'chi
|
1cce7e41f77a784b46bc8e483d562b6578bcf187 | Add "silent" mode with no printing to the console | ding/ding.py | ding/ding.py | #!/usr/bin/env python
"""Simple CLI beep tool"""
from __future__ import unicode_literals
from __future__ import print_function
import os
import sys
import time
import datetime
EXIT_MSG = """Invalid arguments: {}\n---------
$ ding at hh[:mm[:ss]]
$ ding in \d+[smh]( +\d+[smh])*
Examples:
$ ding at 15:30
$ d... | Python | 0.000001 | @@ -2261,34 +2261,47 @@
)%0A%0A%0Adef
-print_time(seconds
+countdown(seconds, silent=False
):%0A %22
@@ -2306,15 +2306,9 @@
%22%22%22
-Print c
+C
ount
@@ -2325,20 +2325,76 @@
seconds%60
-%22%22%22%0A
+, printing values unless %60silent%60%22%22%22%0A if not silent:%0A
os.s
@@ -2638,16 +2638,43 @@
... |
79e1a2c0bcb6298dc316b22931bf8bf7279996d5 | Updated the visualizer so that output is a) from 10 to -70 volts and b) rectangular instead of square outputs | examples/testLPU/visualize_testLPU.py | examples/testLPU/visualize_testLPU.py | #@author: Amol Kapoor
#date: 3-13-15
#Visualizer for simpleLPU stuff
import matplotlib as mpl
mpl.use('agg')
import neurokernel.LPU.utils.visualizer as vis
import networkx as nx
# Temporary fix for bug in networkx 1.8:
nx.readwrite.gexf.GEXF.convert_bool = {'false':False, 'False':False,
... | Python | 0.999994 | @@ -1471,17 +1471,17 @@
.rows =
-3
+5
%0AV.cols
|
dbe28da1be7415ad5f496b983c0345c5e9714fb9 | Add fake devices for non-existant serial ports. | src/dev/x86/Pc.py | src/dev/x86/Pc.py | # Copyright (c) 2008 The Regents of The University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this list ... | Python | 0 | @@ -2547,16 +2547,278 @@
rminal%0A%0A
+ # Devices to catch access to non-existant serial ports.%0A fake_com_2 = IsaFake(pio_addr=x86IOAddress(0x2f8), pio_size=8)%0A fake_com_3 = IsaFake(pio_addr=x86IOAddress(0x3e8), pio_size=8)%0A fake_com_4 = IsaFake(pio_addr=x86IOAddress(0x2e8), pio_size=8)%0A%0A
de... |
b474c7368f3a8152296acf9cad7459510b71ada5 | Fix SSHOpener to use the new ClosingSubFS | fs/opener/sshfs.py | fs/opener/sshfs.py | from ._base import Opener
from ._registry import registry
@registry.install
class SSHOpener(Opener):
protocols = ['ssh']
@staticmethod
def open_fs(fs_url, parse_result, writeable, create, cwd):
from ..sshfs import SSHFS
ssh_host, _, dir_path = parse_result.resource.partition('/')
... | Python | 0 | @@ -51,16 +51,48 @@
egistry%0A
+from ..subfs import ClosingSubFS
%0A%0A@regis
@@ -633,56 +633,128 @@
-return ssh_fs.opendir(dir_path) if dir_path else
+%0A if dir_path:%0A return ssh_fs.opendir(dir_path, factory=ClosingSubFS)%0A else:%0A return
ssh
|
f4c9b193bda5836888e8b90c907bcf5d695401b0 | update git push | api/urls.py | api/urls.py | from django.conf.urls import url, include
from rest_framework_jwt.views import obtain_jwt_token
from api.views import UserList,BrandDetail,NewsList,ArticleDetail
urlpatterns = [
url(r'^user/(?P<pk>[0-9]+)/$', BrandDetail.as_view(), name='user-detail'),
url(r'^user-list/$', UserList.as_view(), name='user-list'... | Python | 0.000001 | @@ -39,62 +39,8 @@
ude%0A
-from rest_framework_jwt.views import obtain_jwt_token%0A
from
@@ -500,53 +500,6 @@
)),%0A
- url(r'%5Eapi-token-auth/', obtain_jwt_token),
%0A%5D
|
6b30b916ebca1c8f2fde36467ae1189d0cb83361 | Bump version number | VMEncryption/main/Common.py | VMEncryption/main/Common.py | #!/usr/bin/env python
#
# VM Backup extension
#
# Copyright 2015 Microsoft Corporation
#
# 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
#
# ... | Python | 0.000002 | @@ -769,17 +769,17 @@
.0.99924
-0
+1
'%0A ex
|
5543bb8a7f1cb18a59dbff34e449a7d0ca719768 | Add a (minor) hack to fix one of the inline todo items. | cc/license/selectors/standard.py | cc/license/selectors/standard.py | import re
import zope.interface
import glob
import os
import RDF
import cc.license
from cc.license.lib.interfaces import ILicenseSelector, ILicense
from cc.license.lib.rdf_helper import query_to_single_value, NS_DC, \
NS_DCQ, NS_CC
from cc.license.lib.exceptions import NoValuesFoun... | Python | 0 | @@ -3296,32 +3296,45 @@
%0A ret.update(
+%5B l for l in
glob.glob(os.pat
@@ -3367,50 +3367,171 @@
PATH
- , '*sa*.rdf'))) # FIXME: %22
+,%0A '*sa*.rdf'))%0A if l.find('
sa
-%22
mpling
- ! )-:
+') != -1 )%0A # hack to remove samplin... |
a8593e0c318b55abf2efc9a82b42d25a1d6ebd69 | update some stuff in forms.py | wpc/forms.py | wpc/forms.py | from wpc.models import Subscriber, Streamer, YoutubeChannel, YoutubeStream
from wpc.flask_utils import get_or_create
from utils import youtube_video_id
from flask_wtf import Form
from wtforms import StringField, SubmitField, validators, TextAreaField
from wtforms.validators import ValidationError
from flask.ext.login ... | Python | 0 | @@ -1311,25 +1311,25 @@
ngField(%22You
-t
+T
ube link%22, %5B
@@ -1564,17 +1564,17 @@
alid You
-t
+T
ube URL%22
@@ -1889,15 +1889,8 @@
ld(%22
-Soo...
Stre
@@ -2252,29 +2252,29 @@
Field(%22R
-tmp r
+TMP R
edirect
1%22)%0A
@@ -2265,16 +2265,17 @@
edirect
+#
1%22)%0A
@@ -2306,29 +2306,29 @@
Field(%2... |
ad331ef64849ec568fc406183c06a1c9c6a34d44 | Change constants | constants.py | constants.py | class Constants:
APP_NAME = "EVOLUTION_CHAMBER"
COMPARISONS_PER_GENERATION = 50
POPULATION_SIZE = 15
KILL_SIZE = 8
| Python | 0.000001 | @@ -78,17 +78,18 @@
ATION =
-5
+10
0%0A PO
@@ -108,10 +108,10 @@
E =
-15
+20
%0A
@@ -127,6 +127,7 @@
E =
-8
+10
%0A
|
664feb720f7f4b173a47c579217795638ec4d6c4 | add NOQA | fulltext/compat.py | fulltext/compat.py | """Mainly backports of Python 3 functionalities."""
import os
import sys
import six
if six.PY3:
from contextlib import ExitStack
else:
# Backport from Python 3.3.
from contextlib2 import ExitStack
try:
from shutil import which
except ImportError:
# Backport from Python 3.3.
def which(cmd, m... | Python | 0.999953 | @@ -128,16 +128,24 @@
xitStack
+ # NOQA
%0Aelse:%0A
@@ -212,16 +212,24 @@
xitStack
+ # NOQA
%0A%0Atry:%0A
|
2d4c9aeddf92c144def13647c8be9178582cea11 | Correct FilmHandler.save to instantiate film even if there are form errors. | wsgi/film.py | wsgi/film.py | # -*- coding: utf-8 -*-
from templating import render
from errors import NotFound, Redirect
from bl.film import Film
class FilmForm(object):
def __init__(self, **data):
for attr in ['id', 'title', 'release_year']:
if attr in data:
setattr(self, attr, data.get(attr, 0)[0])
... | Python | 0 | @@ -3723,35 +3723,8 @@
ors%0A
- if not errors:%0A
@@ -3771,32 +3771,55 @@
m.release_year)%0A
+ if not errors:%0A
try:
|
1f8192285a5dd1a687237a9b7067e3741db88c54 | Implement _get_pk_val() method for GeographicAreaProxy | yepes/apps/standards/proxies.py | yepes/apps/standards/proxies.py | # -*- coding:utf-8 -*-
from __future__ import unicode_literals
from django.db.models.base import ModelState
from django.utils import six
from django.utils import translation
from django.utils.encoding import force_str, python_2_unicode_compatible
from yepes.apps.standards.model_mixins import NAME_RE
from yepes.conf ... | Python | 0.000024 | @@ -3420,24 +3420,75 @@
age%5B:2%5D)))%0A%0A
+ def _get_pk_val(self):%0A return self.pk%0A%0A
def cont
|
1e20674140021965b8cd68e5bd646463ec6d30ff | Convert description IDs to str | ynr/apps/bulk_adding/helpers.py | ynr/apps/bulk_adding/helpers.py | import csv
from parties.models import Party, PartyDescription
from popolo.models import Membership
from people.models import Person
from bulk_adding.models import RawPeople
from candidates.models import LoggedAction, raise_if_unsafe_to_delete
from candidates.models.auth import check_creation_allowed
from candidates.... | Python | 0.999998 | @@ -7166,15 +7166,20 @@
%5D =
+str(
desc.pk
+)
%0A
|
cf72bd10e60b172f03be6db2001e36b2cc2d7304 | Support empty list as api-def default | neutron_lib/tests/unit/api/definitions/base.py | neutron_lib/tests/unit/api/definitions/base.py | # 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, software
# d... | Python | 0.001905 | @@ -1345,18 +1345,47 @@
nce(
+%0A
value,
+(
str
+, list)
):%0A
|
647e831864ce932278d8c705626f07a96fc56491 | Fix publisher method is published, set tzinfo none | opps/core/models/publisher.py | opps/core/models/publisher.py | #!/usr/bin/env python
from django.db import models
from django.utils.translation import ugettext_lazy as _
from datetime import datetime
class PublisherMnager(models.Manager):
def all_published(self):
return super(PublisherMnager, self).get_query_set().filter(
date_available__lte=datetim... | Python | 0 | @@ -864,16 +864,34 @@
hed and
+%5C%0A
self.dat
@@ -901,16 +901,37 @@
vailable
+.replace(tzinfo=None)
%3C= date
|
0822ac42c4d0debff885dca6557d2e9b0593f5d2 | Revert "[lit] Temporarily disable shtest-timeout.py on darwin" | utils/lit/tests/shtest-timeout.py | utils/lit/tests/shtest-timeout.py | # REQUIRES: python-psutil
#
# rdar://problem/38774530
# UNSUPPORTED: darwin
#
# PR33944
# XFAIL: windows
# Test per test timeout using external shell
# RUN: not %{lit} \
# RUN: %{inputs}/shtest-timeout/infinite_loop.py \
# RUN: %{inputs}/shtest-timeout/short.py \
# RUN: %{inputs}/shtest-timeout/slow.py \
# RUN: -j 1 -... | Python | 0.000004 | @@ -23,59 +23,8 @@
til%0A
-#%0A# rdar://problem/38774530%0A# UNSUPPORTED: darwin%0A#
%0A# P
|
8aeecbf81834f481b072d0319770f110570c856a | fix 502 on homepage... | APITaxi/backoffice/home.py | APITaxi/backoffice/home.py | # -*- coding: utf-8 -*-
from flask import Blueprint, render_template, url_for, jsonify
from flask.ext.security import login_required, current_user
from APITaxi_utils.request_wants_json import request_wants_json
mod = Blueprint('home_bo', __name__)
@mod.route('/')
@login_required
def home():
if not request_wants_j... | Python | 0 | @@ -302,27 +302,8 @@
not
-request_wants_json.
requ
|
80f3d630673ccd126b3e7cc64970ce3f7feac4d0 | Add flask command to change user password | APITaxi2/commands/users.py | APITaxi2/commands/users.py | import uuid
import click
from flask import Blueprint, current_app
from flask.cli import with_appcontext
from flask_security.utils import hash_password
from APITaxi_models2 import db, Role, User
blueprint = Blueprint('commands_users', __name__, cli_group=None)
@with_appcontext
def valid_role(value):
roles = [r... | Python | 0.000001 | @@ -1526,8 +1526,445 @@
ommit()%0A
+%0A%0A@blueprint.cli.command('update_password', help='Update user password')%0A@click.argument('email')%0A@click.option('--password', prompt=True, hide_input=True, confirmation_prompt=True)%0Adef update_password(email, password):%0A user = User.query.filter_by(email=email).one_or... |
5d1eedd75a35c5cb1c6023d586480af0d0034217 | Remove doctest runner cruft from dddp.alea (now in dddp.tests). | dddp/alea.py | dddp/alea.py | #!/usr/bin/env python
"""
Alea PRNG.
This implementation of Alea defaults to a more secure initial internal state.
>>> r1, r2 = Alea(), Alea()
>>> assert r1.state != r2.state, 'r1: %r, r2: %r' % (r1.state, r2.state)
>>> random = Alea("my", 3, "seeds")
>>> (random.s0, random.s1, random.s2)
(0.23922116006724536, 0.6147... | Python | 0 | @@ -4111,74 +4111,4 @@
f')%0A
-%0A%0Aif __name__ == '__main__':%0A import doctest%0A doctest.testmod()%0A
|
493e728ad49093470d47f4c844ee1b971c22f882 | Call async_result.get with a timeout so that KeyboardInterrupts are handled better | deco/conc.py | deco/conc.py | from multiprocessing import Pool
from multiprocessing.pool import ThreadPool
import inspect
import ast
from . import astutil
import types
def concWrapper(f, args, kwargs):
result = concurrent.functions[f](*args, **kwargs)
operations = [inner for outer in args + list(kwargs.values()) if type(outer) is argProxy... | Python | 0 | @@ -5363,24 +5363,28 @@
_result.get(
+3e+6
)%0A se
|
93d696713ff148262a917e85a426f9b06ef27651 | Add --forwards/--backwards command line options. | detect.py | detect.py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Copyright 2016 Eddie Antonio Santos <easantos@ualberta.ca>
#
# 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/license... | Python | 0.000001 | @@ -1709,16 +1709,203 @@
.5.h5')%0A
+group = parser.add_mutually_exclusive_group()%0Agroup.add_argument('--forwards', action='store_true', default=True)%0Agroup.add_argument('--backwards', dest='forwards', action='store_false')%0A
%0A%0Adef to
@@ -2904,19 +2904,20 @@
ckwards=
-Tru
+Fals
e):%0A
@@ -5976,20 +5976... |
0ed979ea3e25661c4fab254c758a3c2db1f38d8a | Fix PytzUsageWarning for Python versions >= 3.6 (#1062) | dateparser/date_parser.py | dateparser/date_parser.py | from tzlocal import get_localzone
from .timezone_parser import pop_tz_offset_from_string
from .utils import strip_braces, apply_timezone, localize_timezone
from .conf import apply_settings
class DateParser:
@apply_settings
def parse(self, date_string, parse_method, settings=None):
date_string = str(... | Python | 0 | @@ -1,12 +1,24 @@
+import sys%0A%0A
from tzlocal
@@ -1082,32 +1082,62 @@
stz, 'localize')
+ and sys.version_info %3C (3, 6)
:%0A
|
379aa1d7d3f7388a08878b2df328e035e2da1484 | Remove save | cgi-bin/paint_x2_unet/cgi_exe.py | cgi-bin/paint_x2_unet/cgi_exe.py | #!/usr/bin/env python
import numpy as np
import chainer
import chainer.functions as F
import chainer.links as L
import six
import os
import cv2
from chainer import cuda, optimizers, serializers, Variable
from chainer import training
from chainer.training import extensions
#from train import Image2ImageDataset
from i... | Python | 0 | @@ -4714,32 +4714,34 @@
memory%0A%0A
+ #
self.save_as_im
|
d8362b30f50e7e193e2e6d3b17b9db50d45694db | Add TestCase for RecoverPasswordViewSet | ovp_users/tests/test_views.py | ovp_users/tests/test_views.py | from django.test import TestCase
from django.core import mail
from rest_framework.reverse import reverse
from rest_framework.test import APIClient
def create_user(email="validemail@gmail.com", password="validpassword"):
data = {
'name': 'Valid Name',
'email': email,
'password': password
}
client = ... | Python | 0 | @@ -1,20 +1,31 @@
+import re%0A%0A
from django.test imp
@@ -822,25 +822,25 @@
erCreateView
-s
+S
etTestCase(T
@@ -1470,17 +1470,17 @@
okenView
-s
+S
etTestCa
@@ -2395,16 +2395,991 @@
== 0)%0A%0A
+class RecoverPasswordViewSetTestCase(TestCase):%0A def test_can_recover_password(self):%0A %22%22%22Assert the us... |
0c75a5922b506ea12c9bdb69178df91f967eb756 | Update CLI example mgp25/Instagram-API@d7eda0d105b2fb6ff15e757323fa146628361275 | examples/checkpoint.py | examples/checkpoint.py | from InstagramAPI import Checkpoint
username = '' # // Your username
settingsPath = None
debug = False
c = Checkpoint(username, settingsPath, debug)
print("####################")
print("# #")
print("# CHECKPOINT #")
print("# #")
print("####################")
if username == '... | Python | 0 | @@ -34,122 +34,21 @@
nt%0A%0A
-username = '' # // Your username%0AsettingsPath = None%0Adebug = False%0A%0Ac = Checkpoint(username, settingsPath, debug)
+debug = True%0A
%0A%0Apr
@@ -196,16 +196,69 @@
####%22)%0A%0A
+username = raw_input(%22%5Cn%5CnYour username: %22).strip()%0A%0A
if usern
@@ -329,16 +329,219 @@
... |
9245dc994735e7060414eaa4b3df1b6f2447414f | Add some docstrings | hierarchy.py | hierarchy.py | """Reason about a directed graph in which the (non-)existance of some edges
must be inferred by the disconnectedness of certain vertices"""
def transitive_closure_set(vertices, edges):
neighbours = {b for a, b in edges if a in vertices}
if neighbours.issubset(vertices):
return vertices
return trans... | Python | 0.000067 | @@ -1,11 +1,11 @@
-%22%22%22
+'''
Reason a
@@ -129,19 +129,19 @@
vertices
-%22%22%22
+'''
%0A%0Adef tr
@@ -175,24 +175,84 @@
es, edges):%0A
+ '''Find the transitive closure of a set of vertices.'''%0A
neighbou
@@ -451,32 +451,81 @@
vertex, edges):%0A
+ '''Find the downward closure of a vertex.'''%0A
... |
fa775e501dfd30c0348d488252f65ef32d363504 | Add date prettifier | diy/utils.py | diy/utils.py | import codecs, glob, os, re
import db
import markdown
from flask import Markup
# Snippet borrowed from: http://flask.pocoo.org/snippets/5/
_punct_re = re.compile(r'[\t !"#$%&\'()*\-/<=>?@\[\\\]^_`{|},.]+')
def slugify(text, delim=u'-'):
"""Generates an ASCII-only slug."""
result = []
for word in _punct_r... | Python | 0.999888 | @@ -20,16 +20,22 @@
, os, re
+, time
%0Aimport
@@ -1008,16 +1008,98 @@
(tags)%0A%0A
+def prettify_time(time_param):%0A return time.strftime(%22%25d %25b. %25Y%22, time_param)%0A%0A
class En
@@ -1380,16 +1380,30 @@
ate'%5D =
+prettify_time(
db.get_e
@@ -1413,32 +1413,33 @@
y_date(entry_id)
+)
%0A sel... |
2676982dd3d1beee5446d5d5d5fb6d2d19c44320 | try making the accountbar unicode | channelguide/cache/middleware.py | channelguide/cache/middleware.py | from Cookie import SimpleCookie
from django.conf import settings
from django.core.handlers.wsgi import WSGIRequest
from django.template import Context, loader
import client
class CacheMiddlewareBase(object):
def get_cache_key_tuple(self, request):
"""Return a tuple that will be used to create the cache ... | Python | 0.999995 | @@ -3062,16 +3062,24 @@
t_bar =
+unicode(
t.render
@@ -3111,16 +3111,17 @@
.user%7D))
+)
%0A
|
c97e2a9f0bac1c0d15d5e4aea1a420df79dab689 | Add credit API support added | chargebee/models/subscription.py | chargebee/models/subscription.py | import json
from chargebee.model import Model
from chargebee import request
from chargebee import APIError
class Subscription(Model):
class Addon(Model):
fields = ["id", "quantity"]
pass
class Coupon(Model):
fields = ["coupon_id", "apply_till", "applied_count"]
pass
fields = ["id",... | Python | 0 | @@ -1697,28 +1697,175 @@
ctivate' %25 id, params, env)%0A
+%0A @staticmethod%0A def add_credit(id, params, env=None):%0A return request.send('post', '/subscriptions/%25s/add_credit' %25 id, params, env)%0A
|
95bda3016920bd8806d53aaba96f7082f53c2d5b | Represent command field as human-readibile whether list or string | datacats/error.py | datacats/error.py | from clint.textui import colored
class DatacatsError(Exception):
def __init__(self, message, format_args=(), parent_exception=None):
try:
self.message = message.format(*format_args)
except (ValueError, KeyError):
self.message = message
if parent_exception and hasat... | Python | 0.999983 | @@ -1620,32 +1620,174 @@
__str__(self):%0A
+ serialized_command = %22 %22.join(self.command) %5C%0A if type(self.command) is list else %5C%0A str(self.command)%0A%0A
return (
@@ -1803,24 +1803,24 @@
and: %7B0%7D%5Cn'%0A
-
@@ -1902,38 +1902,34 @@
.format(
-... |
9c008e02214cb3f126c6e7fd02b7ffcdebf916eb | Fix test imports | Yank/tests/test_pipeline.py | Yank/tests/test_pipeline.py | #!/usr/bin/env python
# =============================================================================
# MODULE DOCSTRING
# =============================================================================
"""
Test pipeline functions in pipeline.py.
"""
# =================================================================... | Python | 0.000002 | @@ -424,16 +424,76 @@
======%0A%0A
+import os%0A%0Afrom simtk import openmm%0A%0Afrom yank import utils%0A
from yan
|
311833200540fe1f52345a9e229755e7b523341b | Use str(blah) instead of blah.__str__() as its more idiomatic | datacats/error.py | datacats/error.py | from clint.textui import colored
class DatacatsError(Exception):
def __init__(self, message, format_args=(), parent_exception=None):
self.message = message
if parent_exception and hasattr(parent_exception, 'user_description'):
vals = {
"original": self.message,
... | Python | 0.99948 | @@ -404,16 +404,20 @@
ssage%22:
+str(
parent_e
@@ -424,25 +424,16 @@
xception
-.__str__(
),%0A
@@ -477,16 +477,20 @@
%22.join(%5B
+str(
colored.
@@ -511,25 +511,16 @@
l%7D%5Cn%5Cn%22)
-.__str__(
),%0A
@@ -659,16 +659,20 @@
+str(
colored.
@@ -696,17 +696,8 @@
%5Cn%22)
-.__str__(
)%5D%0A
|
24f0863522f877c4b5d3ba14d0f653f8c4fb1f44 | fix list list into list problem when validate using smt formulas | validate_module.py | validate_module.py | import logging as log
import z3
import json
import itertools
def run_validate(
features,
initial_features,
contexts,
attributes,
constraints,
preferences,
context_constraints,
features_as_boolean,
out_stream):
"""
Perform the validation t... | Python | 0.000002 | @@ -1087,18 +1087,13 @@
ulas
-.append(i)
+ += i
%0A%0A
|
583c101c3614190b18640e001e37e6bb8b732268 | Validate that project name is not empty when creating | ide/views.py | ide/views.py | import json
from flask import (render_template, request, abort, flash, redirect, url_for,
send_file)
import requests
import sh
from werkzeug.routing import BaseConverter
import ide.analyzer
import ide.callgraph
from ide.util import shell_out, root_relative_path
import ide.parser
import ide.settings... | Python | 0.000246 | @@ -2199,27 +2199,24 @@
project
- = Project(
+_name =
request.
@@ -2227,16 +2227,175 @@
%5B'name'%5D
+%0A if not project_name:%0A flash('Please specify a project name.', 'error')%0A return redirect(url_for('index'))%0A project = Project(project_name
)%0A if
|
e90e206bcd34d79e7e12474a89cc001c2dae3a08 | Fix misleading comment regarding normalization of vectors | eval/python/evaluate.py | eval/python/evaluate.py | import argparse
import numpy as np
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--vocab_file', default='vocab.txt', type=str)
parser.add_argument('--vectors_file', default='vectors.txt', type=str)
args = parser.parse_args()
with open(args.vocab_file, 'r') as f:
words... | Python | 0.000045 | @@ -938,16 +938,14 @@
nit
-variance
+length
%0A
|
3c9b61c4ef302cf3463f8d82b7976be7e3400147 | Add a note to compat.py. | jsonschema/compat.py | jsonschema/compat.py | import contextlib
import operator
import sys
try:
from collections.abc import MutableMapping, Sequence # noqa
except ImportError:
from collections import MutableMapping, Sequence # noqa
PY3 = sys.version_info[0] >= 3
if PY3:
zip = zip
from functools import lru_cache
from io import StringIO as ... | Python | 0 | @@ -1,12 +1,94 @@
+%22%22%22%0APython 2/3 compatibility helpers.%0A%0ANote: This module is *not* public API.%0A%22%22%22%0A
import conte
|
f2835f951f8f2517a8f05db12fc676a2a4a37bc8 | remove broken os path join for secret key fix. | deploy/fabfile.py | deploy/fabfile.py | """
file : fabfile.py
date : 2016-04-01
module : deploy
description : fabric fabfile for deploying to staging/production
"""
from __future__ import print_function
import os
import random
from fabric.contrib.files import exists, sudo, append
from fabric.api import env, local, run, get, put
... | Python | 0 | @@ -2801,38 +2801,16 @@
y_file =
- os.path.join('/tmp/',
text_fi
@@ -2811,17 +2811,16 @@
ext_file
-)
%0A%0A
|
53d8721de792afb71fabb4c908fab97d1040c926 | add rw argument to with open statement. | deploy/fabfile.py | deploy/fabfile.py | """
file : fabfile.py
date : 2016-04-01
module : deploy
description : fabric fabfile for deploying to staging/production
"""
from __future__ import print_function
import os
import random
from fabric.contrib.files import exists, sudo, append
from fabric.api import env, local, run, get, put
... | Python | 0 | @@ -2694,16 +2694,17 @@
_file, '
+r
w') as t
|
0d37f27413b7b9273b841e0f2b38d11265aa63a5 | rollback is just fine on pyodbc3 | virtuoso/tests/test_sqlalchemy.py | virtuoso/tests/test_sqlalchemy.py | from nose.plugins.skip import SkipTest
from sqlalchemy.engine import create_engine
from sqlalchemy.exc import DBAPIError
from sqlalchemy.orm import sessionmaker, mapper, relation
from sqlalchemy.sql import text, bindparam
from sqlalchemy import Table, Column, Integer, String, MetaData, ForeignKey
engine = create_engi... | Python | 0 | @@ -3156,22 +3156,8 @@
e)%0A%0A
- @SkipTest%0A
@@ -3806,16 +3806,17 @@
ert
+r.
scalar(
-r
) ==
|
834c451641dfbaf8b275fbb63351b10d34796cfd | Update config | vcdriver/config.py | vcdriver/config.py | from getpass import getpass
import os
# Session config
HOST = os.getenv('VCDRIVER_HOST')
PORT = os.getenv('VCDRIVER_PORT')
USERNAME = os.getenv('VCDRIVER_USERNAME')
PASSWORD = os.getenv('VCDRIVER_PASSWORD') or getpass('Vcenter password: ')
# Virtual machine config
RESOURCE_POOL = os.getenv('VCDRIVER_RESOURCE_POOL')
D... | Python | 0.000001 | @@ -1,32 +1,4 @@
-from getpass import getpass%0A
impo
@@ -176,41 +176,8 @@
RD')
- or getpass('Vcenter password: ')
%0A%0A#
|
b7ff4eae91b010e29f03a68e842bb342fd65480c | simplify formular | voctogui/lib/audioleveldisplay.py | voctogui/lib/audioleveldisplay.py | import logging, math
from gi.repository import Gst, Gtk
class AudioLevelDisplay(object):
""" Displays a Level-Meter of another VideoDisplay into a GtkWidget """
def __init__(self, drawing_area):
self.log = logging.getLogger('AudioLevelDisplay[%s]' % drawing_area.get_name())
self.drawing_area = drawing_area
... | Python | 0.999992 | @@ -1783,16 +1783,20 @@
gscale =
+ 1 -
math.lo
@@ -1808,16 +1808,16 @@
0.15
+
*
-(
db
-)
+
+
1)%0A%09
@@ -1829,20 +1829,16 @@
alized =
- 1 -
self.cl
|
9df06cb13539a63897cbca05fb4f89d2a57438a2 | correct typo in struct_member who failed the array_struct search | _dynStruct/struct_member.py | _dynStruct/struct_member.py |
class StructMember:
def __init__(self, offset, size, block):
self.offset = offset
self.size = size
self.name = "offset_0x%x" % offset
self.access = []
self.t = "uint%d_t" % (self.size * 8)
self.is_array = False
self.number_unit = 0
self.size_unit ... | Python | 0.000007 | @@ -1424,19 +1424,16 @@
(self.t
-ype
, self.n
@@ -1621,19 +1621,16 @@
self.t
-ype
= t%0A%0A
|
1941b0bbdc356245eff4d66cc44d18a2396a5493 | fix test | test/functional/feature_asset.py | test/functional/feature_asset.py | #!/usr/bin/env python3
# Copyright (c) 2019-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import SyscoinTestFramework
from test_framework.util import wait_until... | Python | 0.000006 | @@ -307,61 +307,20 @@
ort
-wait_until, get_datadir_path, connect_nodes%0Aimport os
+assert_equal
%0A%0A%0Ac
@@ -613,32 +613,8 @@
00)%0A
- self.sync_all()%0A
|
b29f99d67d60fcdcbad069e98b121297b361f617 | Remove monotonic usage | futurist/_utils.py | futurist/_utils.py | # -*- coding: utf-8 -*-
# Copyright (C) 2015 Yahoo! Inc. 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... | Python | 0.000001 | @@ -738,133 +738,71 @@
ing%0A
-import traceback%0A%0Atry:%0A from monotonic import monotonic as now # noqa%0Aexcept ImportError:%0A import time%0A
+from time import monotonic%0Aimport traceback%0A%0Aimport six%0A%0A
now =
-time.
mono
@@ -808,28 +808,16 @@
otonic%0A%0A
-import six%0A%0A
try:%0A
|
9f0b03fbfd7ffdb4635d777ef34b37d2894d709c | Add --no-save argument. Fixes #5 | fwgen/fwgen_cmd.py | fwgen/fwgen_cmd.py | import argparse
import signal
import sys
import subprocess
from collections import OrderedDict
from pkg_resources import resource_filename
import yaml
import fwgen
# Python 2.7 compatibility
try:
input = raw_input
except NameError:
pass
class TimeoutExpired(Exception):
pass
def alarm_handler(signum, f... | Python | 0.000002 | @@ -1752,24 +1752,168 @@
ion.'%0A )%0A
+ parser.add_argument(%0A '--no-save',%0A action='store_true',%0A help='Apply the ruleset but do not make it persistent'%0A )%0A
mutex_gr
@@ -2883,16 +2883,82 @@
onfirm:%0A
+ if args.no_save:%0A fw.apply()%0A else:%0A ... |
7b4fb97fde74d7d4e4d441900c66f6eb8c04dc13 | create Jupyterhub log file at /var/log | jupyterhub_config.py | jupyterhub_config.py |
# Whitelist of environment variables for the subprocess to inherit
# c.Spawner.env_keep = ['PATH', 'PYTHONPATH', 'CONDA_ROOT', 'CONDA_DEFAULT_ENV', 'VIRTUAL_ENV', 'LANG', 'LC_ALL']
c.Spawner.env_keep = [ 'PATH', 'LD_LIBRARY_PATH', 'JAVA_HOME', 'CPATH', 'CMAKE_ROOT', 'GOROOT' ]
# set of usernames of admin users
#
# I... | Python | 0 | @@ -428,8 +428,65 @@
dmin'%5D)%0A
+%0Ac.JupyterHub.extra_log_file = '/var/log/jupyterhub.log'%0A
|
e3822dee395a2cfa7d3b98e84f01a09c66309364 | fix pep8 errors | example/example/urls.py | example/example/urls.py | from __future__ import unicode_literals
from blog.views import BlogListView, BlogDetailView
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 djadmin2.site import djadmin2_site
admin.autodiscover()
djadmin2_site... | Python | 0.000031 | @@ -283,29 +283,9 @@
te%0A%0A
-admin.autodiscover()
%0A
+
djad
@@ -493,32 +493,40 @@
log_list.html%22),
+%0A
name='blog_list
@@ -566,16 +566,24 @@
%5Cd+)/$',
+%0A
BlogDet
@@ -633,24 +633,32 @@
tail.html%22),
+%0A
name='blog_
@@ -735,16 +735,24 @@
.html%22),
+%0A
name='h
|
6adcc0875218a7e00e260885c2b3caf0fc179122 | Fix #24 | fdp-api/python/tests/dump_metadata.py | fdp-api/python/tests/dump_metadata.py | #
# This script creates dump files of metadata in different formats upon requests to FDP.
#
from os import path, makedirs
from urllib2 import urlopen, urlparse, Request
from rdflib import Graph
from logging import getLogger, StreamHandler, INFO
from myglobals import *
logger = getLogger(__name__)
logger.setLevel(INF... | Python | 0.000001 | @@ -90,84 +90,29 @@
%0A#%0A%0A
-from os import path, makedirs%0Afrom urllib2 import urlopen, urlparse, Request
+import os%0Aimport six%0A
%0Afro
@@ -209,16 +209,248 @@
port *%0A%0A
+if six.PY2:%0A from urllib2 import (urlopen, urlparse, Request)%0A urljoin = urlparse.urljoin%0A urlparse = urlparse.urlparse%... |
b6ef71dd8754bf33672f9954cd1d41cce1773599 | fix import statement | examples/simpletest.py | examples/simpletest.py | #!/usr/bin/python
# Author: Joe Gutting
# With use of Adafruit SI1145 library for Arduino, Adafruit_GPIO.I2C & BMP Library by Tony DiCola
#
# 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 wi... | Python | 0.000008 | @@ -1317,16 +1317,23 @@
t SI1145
+.SI1145
as SI11
|
1c35f0c68502ab4a41fec2ae9393066a8195b3f8 | Update simpletest.py | examples/simpletest.py | examples/simpletest.py | # Can enable debug output by uncommenting:
#import logging
#logging.basicConfig(level=logging.DEBUG)
import Adafruit_BMP.BMP085 as BMP085
# Default constructor will pick a default I2C bus.
#
# For the Raspberry Pi this means you should hook up to the only exposed I2C bus
# from the main GPIO header and the library wi... | Python | 0.000001 | @@ -1,8 +1,1129 @@
+# Copyright (c) 2014 Adafruit Industries%0A# Author: Tony DiCola%0A#%0A# Permission is hereby granted, free of charge, to any person obtaining a copy%0A# of this software and associated documentation files (the %22Software%22), to deal%0A# in the Software without restriction, including without limit... |
d21648ab963e5ebdf2729e528fc31c8a9ce93772 | update speed_test | examples/speed_test.py | examples/speed_test.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import initExample
import os
import time
import numpy as np
import matplotlib.pyplot as plt
from utilities import load_instrument
from ldk.drivers import Oscillo
def speed_test(host, n_pts=1000):
time_array = np.zeros(n_pts)
client = load_instrument(host, instrum... | Python | 0.000001 | @@ -204,16 +204,50 @@
scillo%0A%0A
+cmd = os.getenv('CMD','get_adc')%0A%0A
def spee
@@ -420,11 +420,12 @@
ing(
-Tru
+Fals
e)%0A%0A
@@ -501,22 +501,131 @@
-driver.get_adc
+if cmd == 'get_adc':%0A driver.get_adc()%0A elif cmd == 'get_num_average':%0A driver.get_num_average
()%0A
|
e1bd629a5692f8abceaec85beaa64d1dedb3ff6d | fix a default link in the quicklink widget | fedoracommunity/widgets/quicklinks.py | fedoracommunity/widgets/quicklinks.py | # This file is part of Fedora Community.
# Copyright (C) 2008-2009 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) ... | Python | 0.000001 | @@ -889,16 +889,19 @@
'/
+my_
profile'
|
2be5159ade58c3d0365ea9694ab579b184295cd1 | add comments around dataframe column renaming | blaze/compute/pandas.py | blaze/compute/pandas.py | """
>>> from blaze.expr.table import TableSymbol
>>> from blaze.compute.pandas import compute
>>> accounts = TableSymbol('accounts', '{name: string, amount: int}')
>>> deadbeats = accounts[accounts['amount'] < 0]['name']
>>> from pandas import DataFrame
>>> data = [['Alice', 100], ['Bob', -50], ['Charlie', -20]]
>>>... | Python | 0 | @@ -3413,32 +3413,394 @@
%7Bt.child: df%7D))
+%0A%0A # Pandas and Blaze column naming schemes differ%0A # Coerce DataFrame column names to match Blaze's names%0A # In particular, reductions include reduction name%0A # t.amount.sum() is named 'amount_sum' rather than 'amount'%0A # We do this before th... |
65516591a95906a21c0b5fa5f147a85f8f1b026e | remove redundant/erroneous curl command | mariner/util.py | mariner/util.py | import os
import pecan
import tempfile
import logging
from StringIO import StringIO
logger = logging.getLogger(__name__)
def generate_inventory_file(group_name, hosts, task_uuid, tmp_dir=None):
"""
Generates a host file to use with an ansible-playbook call.
Given a group_name, a lists of hosts and a ta... | Python | 0.000001 | @@ -4637,70 +4637,8 @@
le%0A%0A
-echo %22--%3E fetching public ssh key%22%0Acurl -s -L -o ansible.pub%0A%0A
echo
|
b66e13d3069fdd0fef6727dd60a018c98cb3dde6 | Use a dropdown for the application content administration | feincms/content/application/models.py | feincms/content/application/models.py | import re
from django.conf import settings
from django.core import urlresolvers
from django.core.urlresolvers import Resolver404, resolve, reverse as _reverse, NoReverseMatch
from django.db import models
from django.http import HttpResponse
from django.utils.safestring import mark_safe
from django.utils.thread_support... | Python | 0.000001 | @@ -1115,80 +1115,8 @@
l):%0A
- urlconf_path = models.CharField(_('URLconf path'), max_length=100)%0A%0A
@@ -1252,24 +1252,259 @@
contents')%0A%0A
+ @classmethod%0A def initialize_type(cls, APPLICATIONS):%0A cls.add_to_class('urlconf_path', models.CharField(_('application'), max_length=100,%0A ... |
029796c42edd200c13e4ee7b4adfc6730c871856 | Add prebuilt widget example | examples/application/app_suite.py | examples/application/app_suite.py | '''
Application Suite
=================
Explore how applications start. Starts applications one after another, waiting for
each to be closed first.
'''
import sys
import re
from random import choice
import kivy
kivy.require('1.8.0') # Minimum API as 1.8 is when kv_directory became part of app.
from kivy.app impor... | Python | 0 | @@ -385,16 +385,226 @@
uilder%0A%0A
+from kivy.uix.floatlayout import FloatLayout%0A# Note that importing FloatLayout causes Kivy to execute, including%0A# starting up the Logger and some other messages.%0Aprint %22** In main program, done with imports%22%0A%0A
class Te
@@ -2046,16 +2046,644 @@
widget%0A%0A
+class T... |
3f648678bcad2305c5c68c0cd98bfb86da92ffaf | Fix duplicate fping_path config option | nova/api/openstack/compute/plugins/v3/fping.py | nova/api/openstack/compute/plugins/v3/fping.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Grid Dynamics
# Copyright 2011 OpenStack Foundation
# 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 ... | Python | 0.000007 | @@ -1137,39 +1137,42 @@
s')%0A
-fping_opts = %5B%0A cfg.StrOpt(%22
+%0ACONF = cfg.CONF%0ACONF.import_opt('
fpin
@@ -1181,145 +1181,53 @@
path
-%22,%0A default=%22/usr/sbin/fping%22,%0A help=%22Full path to fping.%22),%0A%5D%0A%0ACONF = cfg.CONF%0ACONF.register_opts(fping_opts
+', 'nova... |
a603e70d4e955c0bd19630a61ba0bd3db5575d6d | fix _cost_func test | test/strategies/test_minimize.py | test/strategies/test_minimize.py | from __future__ import print_function
from collections import OrderedDict
from kernel_tuner.strategies import minimize
from kernel_tuner.interface import Options
try:
from mock import Mock
except ImportError:
from unittest.mock import Mock
def fake_runner():
fake_result = {'time': 5}
runner = Mock(... | Python | 0.000277 | @@ -561,16 +561,28 @@
g=False,
+ snap=False,
tune_pa
@@ -1220,16 +1220,57 @@
=False,%0A
+ snap=False,%0A
|
77fbeee1711ce02bcb2c63c567de55246c948499 | add table for blocks | markovChains.py | markovChains.py | #!/usr/bin/env python3.3
import bcrypt
import cgi
import configparser
import http.cookies
import os
import pymysql # https://github.com/PyMySQL/PyMySQL/
import random
import string
import sys
"""
markovChains.py
This file contains helper functions that are common to all pages of the webapp.
It should contain function... | Python | 0.000001 | @@ -1977,17 +1977,18 @@
rsion =
-8
+13
%0A%0Adef in
@@ -3136,32 +3136,34 @@
%0A c.execute(%22
+%22%22
CREATE TABLE use
@@ -3164,16 +3164,24 @@
LE users
+%0A
(userna
@@ -3208,16 +3208,24 @@
ARY KEY,
+%0A
passwor
@@ -3227,24 +3227,32 @@
ssword TEXT,
+%0A
cookie TEXT
@@ -3252,16 +3252... |
3428c9b3567b3aa5964e6026152bfdcd5fba4bf0 | Revert "Revert debug output in ESBMCDEPTHK" | benchexec/tools/esbmcdepthk.py | benchexec/tools/esbmcdepthk.py | """
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
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
... | Python | 0 | @@ -1233,16 +1233,45 @@
kenizer%22
+,%0A %22graphml%22
%0A
@@ -1397,19 +1397,27 @@
('depthk
-.py
+-wrapper.sh
')%0A%0A
@@ -2336,16 +2336,36 @@
ions + %5B
+'-c', propertyfile,
sourcefi
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.