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 |
|---|---|---|---|---|---|---|---|
17933131c3f78a41a4aa803959e31e200cecd97e | add missing label declarator to all fields in forms | forums/forms.py | forums/forms.py | from django import forms
class TopicCreateForm(forms.Form):
topic = forms.CharField("Topic", min_length=3)
message = forms.CharField("Message", min_length=3, widget=forms.Textarea())
class PostCreateForm(forms.Form):
message = forms.CharField("Message", min_length=3, widget=forms.Textarea())
| Python | 0.000001 | @@ -83,16 +83,22 @@
arField(
+label=
%22Topic%22,
@@ -134,32 +134,38 @@
forms.CharField(
+label=
%22Message%22, min_l
@@ -264,16 +264,22 @@
arField(
+label=
%22Message
|
7abd08b2219276c8924e537c4a3709d01e1c6bf7 | update device resolution default setting | common/testlib.py | common/testlib.py | #
# Copyright 2010 Intuit, Inc.
#
# Licensed under the Eclipse Public License, Version 1.0 (the "License");
# you may not use this file except in compliance with the License. Please
# see the License for the specific language governing permissions and
# limitations. You may obtain a copy of the License at
#
# http:/... | Python | 0 | @@ -2467,125 +2467,135 @@
-# set resolution is done by device implementation%0A self.resX = ''%0A self.resY = ''%0A self.res = ''
+self.res = os.getenv('DEVICE_RESOLUTION')%0A self.resX = self.res.split('x')%5B0%5D%0A self.resY = self.res.split('x')%5B1%5D
%0A%0A
@@ -4915,12 ... |
8fa358b0ab8b2892ca062ceec399d58e4b077e46 | update config path | cricinfo/my_bot.py | cricinfo/my_bot.py | #!/usr/bin/python
import requests
from bs4 import BeautifulSoup
import xmltodict
import click
from ConfigParser import SafeConfigParser
def get_config(key):
""" Fetch config from config file """
parser = SafeConfigParser()
parser.read('.config')
return parser.get(key)
class Match(object):
""" Represents ... | Python | 0.000001 | @@ -240,16 +240,19 @@
.read('.
+./.
config')
|
c0815fb71a97a6dd0ddce99755012738a137e6cc | remove access token | zazu/github_helper.py | zazu/github_helper.py | # -*- coding: utf-8 -*-
"""github functions for zazu"""
import zazu.util
zazu.util.lazy_import(locals(), [
'click',
'getpass',
'github',
'keyring',
're',
'requests',
'socket'
])
__author__ = "Nicholas Wiles"
__copyright__ = "Copyright 2016"
def get_gh_token():
"""Make new GitHub token... | Python | 0 | @@ -1831,53 +1831,8 @@
n =
-'80fa911ab6337aaa2e166939951786a008d45b4d' #
key
|
924ac2f2fabdb29f417b22d9c3387da332f5e6ca | Update lyrics.py | lyrics/lyrics.py | lyrics/lyrics.py | from discord.ext import commands
from .utils.chat_formatting import pagify
import discord, requests
try:
from bs4 import BeautifulSoup
soupAvailable = True
except:
soupAvailable = False
class LyricsCog:
def __init__(self, bot):
self.bot = bot
self.song = ""
self.artist = ""
@com... | Python | 0.000001 | @@ -1262,21 +1262,80 @@
'Bearer
-token
+2wjXkB5_rWzVnEFOKwFMWhJOwvNPAlFDTywyaRK0jc3gtrCZjx8CsaXjzcE-2_4j
'%7D # Bea
|
4023fe8da9bab625089fc6965a3bfbbab8b5f34c | update add server roles | rushwars/rushwars.py | rushwars/rushwars.py | """
The MIT License (MIT)
Copyright (c) 2018 SML
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, publish,... | Python | 0 | @@ -3254,58 +3254,8 @@
= %5B
-%0A discord.utils.get(name) for name in %5B
'Rus
@@ -3279,18 +3279,8 @@
er'%5D
-%0A %5D
%0A%0A
|
1a357cdcb6b204bb7df147461b16d1cc15b05143 | add filter capability | proboscis.py | proboscis.py | import time
from datetime import datetime
import pymongo
db = pymongo.Connection().mongolog
time_key = 'created'
message_key = 'msg'
last_time = list(db.log.find({}, [time_key]).sort(time_key, pymongo.DESCENDING).limit(1))[0][time_key]
while True:
for row in db.log.find({time_key: {'$gt': last_time}}).sort(tim... | Python | 0.000001 | @@ -1,12 +1,23 @@
+import sys%0A
import time%0A
@@ -141,16 +141,104 @@
'msg'%0A%0A
+if len(sys.argv) %3E 1:%0A filter_query = eval(sys.argv%5B1%5D)%0Aelse:%0A filter_query = %7B%7D%0A%0A
last_tim
@@ -258,18 +258,28 @@
og.find(
-%7B%7D
+filter_query
, %5Btime_
@@ -363,31 +363,16 @@
-for row in db.log.f... |
54260b46113233f6b44884799577da09382cb623 | Remove blank line | troposphere/opsworks.py | troposphere/opsworks.py | # Copyright (c) 2014, Yuta Okamoto <okapies@gmail.com>
# All rights reserved.
#
# See LICENSE file for full license.
from . import AWSObject, AWSProperty, Ref
from .validators import boolean, integer
class Source(AWSProperty):
props = {
'Password': (basestring, False),
'Revision': (basestring, Fa... | Python | 0.999999 | @@ -4401,17 +4401,16 @@
False),%0A
-%0A
%7D%0A%0A%0A
|
dd4bf23d400ce3c46b19a8cd5844d4695fdeaa94 | Fix 'exception if not move action' bug ... | ts3observer/features.py | ts3observer/features.py | '''
Created on Nov 10, 2014
@author: fechnert
'''
import copy
import re
import time
from models import ClientAction
class Feature(object):
''' Represents a abstract Feature '''
def __init__(self, config, base_rules, queue, mb_queue, clients, channels):
''' Initialize the Object, set rules, apply ru... | Python | 0 | @@ -3320,16 +3320,17 @@
j.clid)%0A
+%0A
@@ -3336,35 +3336,78 @@
if
-int(client_obj.
+self.config%5B'execute'%5D%5B'action'%5D == 'move':%0A move_to_
cid
-)
=
-= int(
+
self
@@ -3430,17 +3430,96 @@
'%5D%5B'to'%5D
-)
+%0A else: move_to_cid = None%0A%0A if int(client_obj.cid) =... |
d5dc16ce9f7f6373ebef6563ba25e14133d51cf7 | Fix test/helpers.py linter warnings. | test/helpers.py | test/helpers.py | from contextlib import contextmanager
from pathlib import Path
import os
import subprocess
@contextmanager
def _modified_path():
current_dir = Path(__file__).resolve().parent
bin_dir = (current_dir / '..' / 'bin').resolve()
original_path = os.environ['PATH']
try:
os.environ['PATH'] = f'{bin_di... | Python | 0 | @@ -1,12 +1,68 @@
+%22%22%22%0AHelper functions for the Boreutils test suite.%0A%22%22%22%0A%0A
from context
@@ -141,16 +141,17 @@
rocess%0A%0A
+%0A
@context
@@ -474,24 +474,155 @@
check(cmd):%0A
+ %22%22%22Run a command, capture the output as text, check it had a 0 returncode,%0A and return the +Completed... |
5c17662e3acac6f4daab116cde23a4cca71c3372 | Initialize threadpool as late as possible to let the process fork before spawning threads. | src/rpclib/aux/thread.py | src/rpclib/aux/thread.py |
#
# rpclib - Copyright (C) Rpclib contributors.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This lib... | Python | 0 | @@ -1011,16 +1011,17 @@
_(self)%0A
+%0A
@@ -1029,30 +1029,18 @@
elf.
-__
pool
-_size = pool_siz
+ = Non
e%0A
@@ -1054,26 +1054,22 @@
elf.
+__
pool
- = ThreadPool(
+_size =
pool
@@ -1073,17 +1073,16 @@
ool_size
-)
%0A%0A @p
@@ -1309,12 +1309,96 @@
a, kwargs)%0A
+%0A def initialize(self, ser... |
b297ad6b4d52b688a1c50ffc2a5574d8061c5ce0 | Check for errors parsing the CSV as we go. | csvdiff/records.py | csvdiff/records.py | # -*- coding: utf-8 -*-
#
# records.py
# csvdiff
#
import csv
class InvalidKeyError(Exception):
pass
def load(file_or_stream):
istream = (open(file_or_stream)
if not hasattr(file_or_stream, 'read')
else file_or_stream)
return csv.DictReader(istream)
def index(record_s... | Python | 0 | @@ -59,16 +59,37 @@
rt csv%0A%0A
+from . import error%0A%0A
%0Aclass I
@@ -290,16 +290,31 @@
return
+_safe_iterator(
csv.Dict
@@ -328,16 +328,214 @@
istream)
+)%0A%0A%0Adef _safe_iterator(reader):%0A for lineno, r in enumerate(reader, 2):%0A if any(k is None for k in r):%0A error.abort('CSV ... |
408f470085e481a687ddea012920feca26f4d2fe | set fixedWidth to func_list_widget | uitester/ui/case_manager/completer_widget.py | uitester/ui/case_manager/completer_widget.py | # -*- encoding: UTF-8 -*-
import os
from PyQt5 import uic
from PyQt5.QtCore import Qt, pyqtSignal
from PyQt5.QtWidgets import QWidget, QListWidget, QTextBrowser
class CompleterWidget(QWidget):
select_signal = pyqtSignal(str, name="select_signal")
selected_func_name_signal = pyqtSignal(str, str, name="selecte... | Python | 0.000055 | @@ -696,16 +696,65 @@
idget()%0A
+ self.func_list_widget.setFixedWidth(200)%0A
|
c935080b4ca2e3838e72ad43c35271f89f66033a | fix interfaces | dace/interfaces.py | dace/interfaces.py | # Copyright (c) 2014 by Ecreall under licence AGPL terms
# avalaible on http://www.gnu.org/licenses/agpl.html
# licence: AGPL
# author: Amen Souissi
from zope.interface import Interface, Attribute
from substanced.interfaces import IPrincipal, IFolder, IRoot
class IObject(IFolder):
pass
class IEntity(IObject... | Python | 0.000005 | @@ -193,16 +193,35 @@
ttribute
+ as SourceAttribute
%0Afrom su
@@ -276,16 +276,250 @@
IRoot%0A%0A%0A
+%0Aclass Attribute(SourceAttribute):%0A%0A def __init__(self, __name__, __doc__='', **kwargs):%0A super(Attribute, self).__init__(__name__, __doc__='')%0A for name in kwargs:%0A setattr(s... |
5e20af623aef6e82e7a547e8ea3ce99bcaa52599 | comment (and slightly refactor) primes program | gatesym/main.py | gatesym/main.py | from gatesym.gates import Switch
from gatesym import core
from gatesym.test_utils import BinaryOut
from gatesym.computer import computer, symbols
def basic_add():
return assemble(symbols, [], [
123, "ADD_A",
5, "ADD_B",
"ADD_R", "ADD_A",
67, "ADD_B",
"ADD_R", "PRINT",
]... | Python | 0 | @@ -823,19 +823,164 @@
%22j%22
+%5D
,
-%22tmp%22%5D, %5B
+%5B%0A # i = 3%0A # start:%0A # j = 3%0A # loop_start:%0A # if i == j: goto loop_else # ran out of numbers to check so i is prime
%0A
@@ -1170,62 +1170,93 @@
-%22i%22, %22tmp%22,%0A %22j%22, %22SUB_B%22,%0... |
a3c07205ce286cceb84437996cc316e70355700b | Fix buggy performance optimization | gdb_net_host.py | gdb_net_host.py | # sudo python -m pip install python-pytun
import gdb, select, binascii, pytun, struct, os
import RPi.GPIO as GPIO
VERBOSE = True
TRIGGER_HIGH = 'MSGCLICK'
TRIGGER_LOW = 'UAMLOGIN'
trigger_pin = 21
GPIO.setmode(GPIO.BCM)
GPIO.setup(trigger_pin, GPIO.OUT)
# Parse and eval infrequently, since gdb seems to leak memory ... | Python | 0 | @@ -1373,32 +1373,49 @@
ll_tx(tap):%0A
+ continue%0A
while po
@@ -1418,36 +1418,32 @@
e poll_rx(tap):%0A
-
cont
@@ -4100,16 +4100,63 @@
ch_low:%0A
+ if VERBOSE:%0A print '-' * 60%0A
@@ -4666,16 +4666,63 @@
O.HIGH)%0A
+ if VERBOSE:%0A ... |
204f7e2b544eb1767e50bbee0171d631914298a8 | Make test runnable. | testing/test_stopwatch.py | testing/test_stopwatch.py | import time
import unittest
from helpers import Stopwatch
class TestStopwatch(unittest.TestCase):
def test_basic(self):
s = Stopwatch()
s2 = Stopwatch()
s3 = Stopwatch(elapsed_time=13.0)
s2.start()
s3.start()
time.sleep(0.1)
self.assertTrue(s.elapsed_time ... | Python | 0.000003 | @@ -1,12 +1,23 @@
+import sys%0A
import time%0A
@@ -36,14 +36,45 @@
est%0A
-%0Afrom
+sys.path.append('..')%0Afrom opt_tools.
help
|
e1eb3c608f975c6672a47d3e4bcb7c29e8a7b965 | update version | grizli/version.py | grizli/version.py | # git describe --tags
__version__ = "0.6.0-67-g098087f"
| Python | 0 | @@ -40,17 +40,17 @@
6.0-
-67-g098087f
+79-g3c65f39
%22%0A
|
fab0b57e0c28336ed1ae771e5b3c94a95dd8b093 | Use only deterministic names in da.wrap | dask/array/wrap.py | dask/array/wrap.py | from __future__ import absolute_import, division, print_function
from itertools import count, product
from functools import partial
from toolz import curry
import numpy as np
from .core import Array, normalize_chunks
from .numpy_compat import full
names = ('wrapped_%d' % i for i in count(1))
def dims_from_size(si... | Python | 0.000002 | @@ -84,15 +84,8 @@
port
- count,
pro
@@ -89,16 +89,16 @@
product%0A
+
from fun
@@ -164,16 +164,44 @@
as np%0A%0A
+from ..base import tokenize%0A
from .co
@@ -270,54 +270,8 @@
ll%0A%0A
-names = ('wrapped_%25d' %25 i for i in count(1))%0A%0A
%0Adef
@@ -598,15 +598,17 @@
m np
-.random
+ creation
fun
@@ -1087,... |
ee917a60e62e358e522b82fdf81c493c5498fc9b | Use .get() to pull dict values for consistency | gem/backends.py | gem/backends.py | """
This package contains customisations specific to the Girl Effect project.
The technical background can be found here:
https://mozilla-django-oidc.readthedocs.io/en/stable/installation.html#additional-optional-configuration
"""
import logging
from mozilla_django_oidc.auth import OIDCAuthenticationBackend
from djang... | Python | 0 | @@ -1691,39 +1691,43 @@
ce_uuid = claims
-%5B
+.get(
%22sub%22
-%5D
+)
%0A user.pr
|
c70b02cbe7b57548dec9efd6da2d511470bb0ecc | Update tests | tests/cli/test_coarsen.py | tests/cli/test_coarsen.py | # -*- coding: utf-8 -*-
from functools import partial
import os.path as op
import subprocess
import tempfile
import filecmp
import sys
import os
import cooler
import logging
import numpy as np
import h5py
import nose
from nose.tools import with_setup, set_trace
from click.testing import CliRunner
from cooler.cli.clo... | Python | 0.000001 | @@ -1279,16 +1279,33 @@
'data',
+%0A
'dec2_20
@@ -1447,16 +1447,17 @@
)%0A%0A
+#
sys.stdo
@@ -1479,16 +1479,50 @@
.output)
+%0A assert(result.exit_code == 0)
%0A%0A #
@@ -1542,16 +1542,23 @@
uld have
+ base +
6 zoom
@@ -1568,266 +1568,415 @@
els%0A
-%0A
-#c = cooler.Cooler(... |
b718983da524ae48fe16c03da248b68f37f73652 | Revert "git_cl_hooks: get cl fields vi git_cl accessors instead of using backquote" | git_cl_hooks.py | git_cl_hooks.py | # Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import re
import subprocess
import sys
import breakpad
from git_cl_repo import git_cl
from git_cl_repo import upload
import presubmit_suppor... | Python | 0.00003 | @@ -231,184 +231,61 @@
ad%0A%0A
-from git_cl_repo import git_cl%0Afrom git_cl_repo import upload%0A%0Aimport presubmit_support%0Aimport scm%0Aimport watchlists%0A%0A# Really ugly hack to quiet upload.py%0Aupload.verbosity = 0
+import presubmit_support%0Aimport scm%0Aimport watchlists
%0A%0Ade
@@ -1243,143 +1243,233 @... |
aac0f263f1a588d065019ee4d5e6d91c50c664ba | Implement basic cache system for views | gitfs/router.py | gitfs/router.py | import re
import os
import inspect
import shutil
from pwd import getpwnam
from errno import EFAULT
from fuse import Operations, FUSE, FuseOSError
from gitfs.utils import Repository
from gitfs.log import log
class Router(object):
def __init__(self, remote_url, repos_path, mount_path, branch=None,
... | Python | 0.000001 | @@ -142,17 +142,16 @@
OSError%0A
-%0A
from git
@@ -341,16 +341,26 @@
p=%22root%22
+, **kwargs
):%0A
@@ -995,16 +995,48 @@
es = %5B%5D%0A
+ self.cached_views = %7B%7D%0A%0A
@@ -1751,24 +1751,171 @@
up).pw_gid%0A%0A
+ self.author = (kwargs%5B'author_name'%5D, kwargs%5B'author_email'%5D)... |
c94177f671ee06d4922f323090fa6653c6b97b3f | fix issue | github/tests.py | github/tests.py | from django.core.urlresolvers import resolve
from django.test import TestCase
from django.http import HttpRequest
from django.test import LiveServerTestCase
from django.contrib.auth.models import User
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from sele... | Python | 0.000002 | @@ -1367,23 +1367,16 @@
s.com:80
-/wd/hub
%22 %25 (use
|
d472beade2135cf98f04c81914ac91f9896a9f2e | Update het.py | bin/het.py | bin/het.py | import sys
from evolib.NGSFormats import VariantCallFormat
vcf = VariantCallFormat(sys.stdin)
args = sys.argv[1:]
names = args[0].split(",")
for row in vcf:
chrom, pos = row['CHROM'], row['POS']
try:
GTs = list((smp['GT'] for smp in row.iter_samples() if smp.name in names and smp['GT'] != "./." and ... | Python | 0.000001 | @@ -200,21 +200,8 @@
S'%5D%0A
- try:%0A
@@ -286,16 +286,42 @@
mp%5B'GT'%5D
+ is not None and smp%5B'GT'%5D
!= %22./.
@@ -402,42 +402,8 @@
-except KeyError:%0A GTs = %5B%5D%0A
%0A
|
1de64fe5e7153c68a427805b24f08e8347492ff4 | remove unused import | test/support.py | test/support.py | import inspect
import subprocess
import sys
import os
from contextlib import contextmanager
from typing import List, Tuple, Iterator, TextIO, cast
from io import StringIO
import commitmsg
"""Path of the file containing commitmsg module"""
commitmsg_script_path = inspect.getfile(commitmsg)
def git_command(*git_args:... | Python | 0.000002 | @@ -113,15 +113,8 @@
ist,
- Tuple,
Ite
|
ec8ff1082e617670d354da395f8ac183260006f5 | fixed bug in File.readable_size() — when the size given is None, return None | bl/file.py | bl/file.py |
DEBUG = False
import os, subprocess, time
from bl.dict import Dict
class File(Dict):
def __init__(self, fn=None, log=print, **args):
if type(fn)==str: fn=fn.strip().replace('\\ ', ' ')
Dict.__init__(self, fn=fn, log=log, **args)
def __repr__(self):
return "%s(fn=%r)" % (
... | Python | 0.998756 | @@ -405,24 +405,56 @@
uffix='B'):%0A
+ if size is None: return%0A
size
|
cc0c0f0b8376cb06440b47eb4e6d1c183c8f0a2c | Allow Authorization header | gnocchi/opts.py | gnocchi/opts.py | # -*- encoding: utf-8 -*-
#
# 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, so... | Python | 0.000004 | @@ -6580,16 +6580,58 @@
aders=%5B%0A
+ 'Authorization',%0A
|
d913a085e0f8c16ff8d46820947ca274dc700a5a | Test custom ax | tests/integration_test.py | tests/integration_test.py |
from collections import OrderedDict
import os
from unittest import TestCase
import pylab
from pyproteome import (
analysis, cluster, data_sets, levels, logo, paths, tables, volcano,
plogo, icelogo, weblogo, phosphosite,
)
from . import utils
DATA_URL = "https://github.com/white-lab/pyproteome-data/raw/mas... | Python | 0 | @@ -5468,32 +5468,124 @@
(data, y_pred)%0A%0A
+ f, ax = pylab.subplots()%0A cluster.plot.cluster_corrmap(data, y_pred, ax=ax)%0A%0A
cluster.
|
aa603a96d0b7260ec5b687e1d75404512156de10 | add missing param to test | test/test_db.py | test/test_db.py | """ shrunk - Rutgers University URL Shortener
Unit tests for the database.
"""
from shrunk import ShrunkClient
def get_shrunk_connection():
return ShrunkClient("localhost")
def setup():
pass
def teardown():
"""Cleans up the database after testing."""
shrunk = get_shrunk_connection()
shrunk.d... | Python | 0.000001 | @@ -166,17 +166,10 @@
nt(%22
-localhost
+db
%22)%0A%0A
@@ -1407,16 +1407,31 @@
hort_url
+, %22shrunk_test%22
)%0A as
|
72baa688fc675e980a5f94d4dcee05297d16e3a5 | Add some more info to the integration test | tests/integration_test.py | tests/integration_test.py | import pytest
from patronsdatasrc import (
GeneratorImportOperationHandler, ImportOperation, ImportType,
ImportOperationError, perform_import, ImportRecord, ID
)
from test_perform_import import import_started_receiver
def test_integration():
db = dict()
def record_handler(import_operation, records):... | Python | 0 | @@ -1,12 +1,426 @@
+'''%0AThe test following demonstrates how this module can be used to listen for and%0Aprocess incoming data.%0A%0AThe only significant difference due to this being a test is the need to%0Adisconnect the receiver function from the global import_started signal. This is%0Ato avoid interference with tes... |
3b6aeac94c08a8d961d10bd9d0bf2fbca1e5ea35 | Add CJSON test suite to the test_io.py file | test/test_io.py | test/test_io.py | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""Run writer unit tests for cclib."""
import sys
import unittest
sys.path.append('io')
from testccio import *
from test... | Python | 0.000001 | @@ -391,16 +391,47 @@
mport *%0A
+from testcjsonwriter import *%0A%0A
%0A%0Aif __n
|
e914d33fa17f475142c2e8b267f2e096944150a3 | add roles from keycloak to user profile | gwells/authentication.py | gwells/authentication.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
distri... | Python | 0 | @@ -1030,16 +1030,58 @@
_model()
+%0A%0A # get keycloak ID from JWT token
%0A
@@ -1229,24 +1229,76 @@
ttribute')%0A%0A
+ # get or create a user with the keycloak ID%0A
try:
@@ -1316,16 +1316,21 @@
user,
+user_
created
@@ -1492,16 +1492,21 @@
if
+user_
created:
@@ -1510,41 ... |
378e5383ecaee9f9792dc348629d2fc5f9281e42 | Fix py26 | haas_rest_test/config.py | haas_rest_test/config.py | # -*- coding: utf-8 -*-
# Copyright (c) 2014 Simon Jagoe
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the 3-clause BSD license. See the LICENSE.txt file for details.
from __future__ import absolute_import, unicode_literals
import os
from six import string_types
from ... | Python | 0.000013 | @@ -2457,16 +2457,17 @@
vars: %7B
+0
!r%7D'.for
|
949b242f11da415fd72543a9667357343240d8f6 | Add progress indicators to script. | gtalk_export.py | gtalk_export.py | import mailbox
import re
import time
import sys
import xml.dom.minidom
import HTMLParser
import argparse
import hangouts
from email.utils import parsedate
def extract_date_mbox(email):
date = email.get('Date')
return parsedate(date)
def filename_sanitize(input):
return re.sub("([^a-zA-Z0-9._-])", "_", inp... | Python | 0 | @@ -3885,16 +3885,85 @@
ormat)%0A%0A
+ print %22JSON file first pass completed. Writing to logfiles...%22%0A%0A
for
@@ -5495,18 +5495,16 @@
g to do!
-%5Cn
%22)%0A%0Aif a
@@ -5514,32 +5514,92 @@
.mbox_location:%0A
+ print %22Processing mbox file at %25s%22 %25 args.mbox_location%0A
parse_mbox(a
@@ ... |
799d00465bc6d5e793aecbb0ec70938fbd1440ce | fix question retrieval | test_harness.py | test_harness.py | from __future__ import print_function
import sys
import backtracepython as bt
import numpy as np
import pandas as pd
import logging
from collections import namedtuple
from collections import OrderedDict
#from cachetools import cached, LRUCache
from threading import RLock
import gc
import rpy2
import rpy2.robjects as ro... | Python | 0.999999 | @@ -3171,20 +3171,20 @@
ns(year=
-2015
+None
):%0A d
@@ -3204,20 +3204,20 @@
, v, yr=
-year
+2015
):%0A
@@ -3318,16 +3318,127 @@
urn res%0A
+ combined = True%0A national = True%0A if year and year in range(1993, 2017, 2):%0A combined = False%0A
dset
@@ -3467,21 +3467,16 @@
combined
-=... |
531b21eaecb3512f1e6a2f348401831eff7e2183 | Increase harbor attempts (#12580) | harbor/tests/conftest.py | harbor/tests/conftest.py | # (C) Datadog, Inc. 2019-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import os
import time
import pytest
import requests
from mock import patch
from datadog_checks.dev import LazyFunction, docker_run
from datadog_checks.dev.conditions import CheckDockerLogs
from datadog_c... | Python | 0 | @@ -1554,17 +1554,17 @@
ttempts=
-2
+3
):%0A
|
f2bf3c94e69cabbf651d18a991c3dc42519e0833 | remove coding: | test_minicql.py | test_minicql.py | #!/usr/bin/env python3
# coding:utf-8
###############################################################################
# MIT License
#
# Copyright (c) 2017 Hajime Nakagami
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software... | Python | 0.000052 | @@ -20,23 +20,8 @@
on3%0A
-# coding:utf-8%0A
####
|
5117f2a5a5676144c46f374138a406cf499c03cf | Bump version 2.1.2 | hijack_admin/__init__.py | hijack_admin/__init__.py | # -*- coding: utf-8 -*-
__version__ = '2.1.1' # pragma: no cover
default_app_config = 'hijack_admin.apps.HijackAdminConfig'
| Python | 0.000001 | @@ -36,17 +36,17 @@
= '2.1.
-1
+2
' # pra
|
b789f5f6d97297a1595362fe72fdf466492333ee | Add holonet.js to django-pipeline | holonet/settings/base.py | holonet/settings/base.py | import logging
import os
import djcelery
from django.conf.global_settings import AUTHENTICATION_BACKENDS
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
SECRET_KEY = 'e6c95!2(*@31_)hel5h7-ag**ozwn=s@veoh+n$-y8a-!bn=@$'
DEBUG = True
TEMPLATE_DEBUG = True
ALLOWED_HOSTS = []
INSTALLED_APPS = (
'flat',
... | Python | 0.000001 | @@ -4198,12 +4198,11 @@
'ass
-test
+ets
/js/
|
c5919d438d35ce72256093257d8df7a5fb4936a5 | test fix to #102 | tests/server.py | tests/server.py | from http.server import HTTPServer, SimpleHTTPRequestHandler
try:
from html_json_forms import parse_json_form
except ImportError:
def parse_json_form(data):
return parse_values_array(data)
import json
import time
import random
import string
import cgi
batch_number = 0
class RequestHandler(SimpleHT... | Python | 0 | @@ -1052,108 +1052,8 @@
s()%0A
- # FIXME: This is to avoid a race condition in wq/outbox%0A time.sleep(random.random())%0A
|
59d3c28d1080736b258b0a712fc8a7094791df7b | remove print statement | tests/stream.py | tests/stream.py | import unittest
import tools.log
tools.log.dummy = 0 # for pylint
import logging
from tools.stream import VideoInfo, flashExt
import tempfile
import time
import os
log = logging.getLogger()
class StreamTests(unittest.TestCase):
def getHandler(self, link):
streamHandler = flashExt.getExtensionByRegexStringM... | Python | 0.999999 | @@ -1045,30 +1045,8 @@
fo)%0A
- print(flvUrl)%0A
|
a43598c2c2b5e35c36561889ebdd4c6c318f339a | Remove assert False statement | hoomd/pytest/test_gsd.py | hoomd/pytest/test_gsd.py | from hoomd import *
import hoomd
import numpy as np
import pytest
import os
import tempfile
import gsd.hoomd
def _make_gsd_snapshot(snap):
s = gsd.hoomd.Snapshot()
for attr in dir(snap):
if attr[0] != '_' and attr not in ['exists', 'replicate']:
for prop in dir(getattr(snap, attr)):
... | Python | 0.999999 | @@ -6339,21 +6339,4 @@
t2)%0A
- assert False%0A
|
6148fadfa8bc60b06ee561f5364ea74b5ff30ea6 | shorten 'new tweet' part of message | Commands/TwitterPoll.py | Commands/TwitterPoll.py | # -*- coding: utf-8 -*-
"""
Created on May 18, 2014
@author: Tyranic-Moron
"""
import base64
import json
import re
from urllib2 import Request, urlopen
import datetime
from twisted.internet import task, threads
from twisted.words.protocols.irc import assembleFormattedText, attributes as A
from twitter import Twitter, ... | Python | 0.912147 | @@ -6800,22 +6800,14 @@
al%5B'
-New tweet from
+Tweet!
',
@@ -6818,17 +6818,17 @@
ld%5B'@%7B0%7D
-:
+%3E
'%5D, ' %7B1
|
e3680dfd76c8471e63fd2bd71d8d0754bec75036 | Remove dead code | hs_communities/models.py | hs_communities/models.py | from django.db import models
class Topic(models.Model):
name = models.CharField(editable=True, null=False, max_length=255)
def __str__(self):
return "{}".format(self.name)
class TopicEntry(models.Model):
topic = models.ForeignKey(Topic,
null=False,
... | Python | 0.001497 | @@ -1203,166 +1203,8 @@
()%0A%0A
- # def delete(self, id):%0A # %22%22%22%0A #%0A # :param id:%0A # :return:%0A # %22%22%22%0A # print(%22would delete topic id %7B%7D%22.format(id))%0A%0A
|
adf8562b78496454f822a9cf33f161445a995a2a | move author and version info to __init__ | perceptiond.py | perceptiond.py | #!/usr/bin/env python
from app import db_session
# Perception
#
# Copyright (C) 2017 Avery Rozar
#
# This program is free software; you can redistribute it and/or modify it under the terms of the The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and ... | Python | 0 | @@ -1262,85 +1262,8 @@
E.%0A%0A
-__version__ = '0.2'%0A__author__ = 'Avery Rozar: avery.rozar@insecure-it.com'%0A%0A
from
|
2cdf776c96ef20b503f289e1e88c818f5307c2a9 | Handle empty config | guild/config.py | guild/config.py | # Copyright 2017-2018 TensorHub, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | Python | 0.000311 | @@ -2634,16 +2634,22 @@
.load(f)
+ or %7B%7D
%0A
|
7a6a6446c56d9bb119bf2e534bc90549c93c3a80 | put showLabel function into displayWindow class as a method | guipaperpass.py | guipaperpass.py | from Tkinter import Label
def showLabel():
widget = Label(None, text='Hello!')
widget.pack()
| Python | 0 | @@ -20,16 +20,93 @@
Label%0A%0A
+class displaywWindow:%0A %22 This class display the window of paperpass %22%0A
def show
@@ -114,16 +114,20 @@
abel():%0A
+
widg
@@ -158,16 +158,20 @@
ello!')%0A
+
widg
|
195a74fffebff179ca8a52d685a37bdad34cd8ad | Fix bug where text box get and clear don't work | guizero/Text.py | guizero/Text.py | from tkinter import Label, StringVar
from . import utilities as utils
class Text(Label):
def __init__(self, master, text="", size=12, color="black", font="Helvetica", grid=None, align=None):
# Description of this object (for friendly error messages)
self.description = "[Text] object with tex... | Python | 0 | @@ -1103,23 +1103,43 @@
elf.
-string_var.set(
+text = %22%22%0A self.config(text=
%22%22)%0A
@@ -1213,24 +1213,12 @@
elf.
-string_var.get()
+text
%0A%0A
|
abc43a49323f5b925de9bf506fc9a766721e369f | Add authenticated decorator for profile page | handler/user.py | handler/user.py | #!/usr/bin/python
# -*- coding:utf-8 -*-
# Powered By KK Studio
from BaseHandler import BaseHandler
class LoginHandler(BaseHandler):
def get(self):
if not self.session.isGuest:
return self.redirect('/') # 已登录则跳转到首页
next = self.get_argument("next", "/")
self.render('user/login.... | Python | 0 | @@ -93,16 +93,62 @@
eHandler
+%0Afrom tornado.web import authenticated as Auth
%0A%0Aclass
@@ -1266,32 +1266,42 @@
r(BaseHandler):%0A
+ @Auth%0A
def get(self
|
f48f010391f2f17acaa62470e8ae532cf832dd36 | make script as an importable module | hn-responder.py | hn-responder.py | #!/usr/bin/python
import json
import re
import requests
from Queue import Queue
from requests_oauthlib import OAuth1
from threading import Thread
from firebase import firebase
with open('twitter-secrets.json') as twitter_secrets:
s = json.load(twitter_secrets)
access_token = s['access_token']
acces... | Python | 0.000001 | @@ -10,16 +10,32 @@
n/python
+%0A# coding: utf-8
%0A%0Aimport
@@ -2158,16 +2158,32 @@
rams)%0A%0A%0A
+def main():%0A
t = Thre
@@ -2197,16 +2197,20 @@
et=run)%0A
+
t.daemon
@@ -2217,16 +2217,20 @@
= True%0A
+
t.start(
@@ -2232,16 +2232,20 @@
tart()%0A%0A
+
read_twe
@@ -2250,16 +2250,20 @@
wee... |
d0e30207bdef192e2b8310877e5afdae10b561bd | Mark failing tests due to Issue #37. | tests/test_05_dumpfile.py | tests/test_05_dumpfile.py | """Test module icat.dumpfile.
This test module has a similar structure as test_05_dump.py, but
rather then calling icatdump and icatingest as external scripts, it
uses the internal API icat.dumpfile.
"""
import io
import os.path
import filecmp
from lxml import etree
import pytest
try:
from pytest_dependency impor... | Python | 0 | @@ -199,16 +199,27 @@
e.%0A%22%22%22%0A%0A
+import sys%0A
import i
@@ -5107,24 +5107,139 @@
type = case%0A
+ if sys.version_info %3C (3, 0) and filetype == 'MEMORY' and backend == 'YAML':%0A pytest.xfail(%22Issue #37%22)%0A
refdump
|
e16f5d6b3837027e1b5178568701e1d4ff53287d | fix apikey | python/conf.py | python/conf.py | # -*- coding: utf-8 -*-
import base64
appid = 'example'
apikey = 'c5dd7e7dkjp27377l903c42c032b413b'
appid = 'test01'
apikey = '213d7e220f5c11e487a7040113e09101'
address = 'api.bluehouselab.com'
sender = '01000000000' # FIXME - MUST BE CHANGED AS REAL PHONE NUMBER
receivers = ['01000000000', ] # FIXME - MUST BE... | Python | 0.000002 | @@ -98,69 +98,8 @@
3b'%0A
-appid = 'test01'%0Aapikey = '213d7e220f5c11e487a7040113e09101'%0A
addr
|
b4ba08c007d1484c62b8747ee8e389f95f6eb13f | modify energy range | tests/test_arsenic_fit.py | tests/test_arsenic_fit.py | """
pytest-catchlog is required by this test
"""
from glob import glob
import logging
import os
import tempfile
from sklearn.linear_model import LinearRegression
from mrfitty.base import AdaptiveEnergyRangeBuilder, FixedEnergyRangeBuilder, ReferenceSpectrum, Spectrum
from mrfitty.combination_fit import AllCombination... | Python | 0 | @@ -3989,12 +3989,12 @@
=118
-34.5
+50.0
, en
@@ -4007,17 +4007,17 @@
top=1209
-6
+0
.0),%0A
|
12842bf16b24f5f7b85f5a81c02e0ee650a01b0d | test name | python/plot.py | python/plot.py | #!/usr/bin/env python3
# coding: utf8
from vapory import *
from moviepy.editor import VideoClip
import json
import tweepy
import numpy as np
import math, os
from math import pi
from credentials import *
from convertBytes import convert_bytes
def backend(len, dep):
os.chdir('../HcPlot-hs')
os.system('stack bui... | Python | 0.000838 | @@ -749,16 +749,17 @@
xit(1)%0A%0A
+#
data = b
@@ -771,16 +771,56 @@
d(5, 2)%0A
+data = nameToJSON(%221,2-dimethyl-hexan%22)%0A
print(%22D
|
03a7fbe198ce8ed723d92af976fe03c7986098c8 | update imported path of utils module | tests/test_constructor.py | tests/test_constructor.py | import sys
import pytest
from .faker import *
from tpl.path import TempFile
from tpl.constructor import construct_context_from_py
def test_construct_context_from_py():
with TempFile(random_lower_string(), 'py') as f:
f.fd.write('def construct():return {"key":"value"}')
f.fd.flush()
contex... | Python | 0 | @@ -23,29 +23,8 @@
st%0A%0A
-from .faker import *%0A
from
@@ -103,16 +103,48 @@
from_py%0A
+from candy.utils.faker import *%0A
%0A%0Adef te
|
0f7227709b8c4942ff6cf55285fb40c6beea42f2 | fix - app routes for model add | versus/src/web/views.py | versus/src/web/views.py | """
Module implementing the view portion of the MVC pattern.
"""
import os
import datetime
from versus.config import log
from versus.config.settings import AUTHORS, LICENSE, HDFS_BUFFER_FILE, \
__version__, HDFS_STAGE, MAX_BUFFER_SIZE
from versus.src.web import app
from versus.tools.dataIO import DataIOHDFS, Data... | Python | 0 | @@ -5225,21 +5225,25 @@
route('/
-train
+add_model
'),%0A
@@ -5274,37 +5274,49 @@
__: app.route('/
-train
+add_model_process
', methods=%5B'POS
|
9b6cd0cd7b86f63b365d2c1968fd19495b707758 | Exit with `1` if no fixed command selected | thefuck/main.py | thefuck/main.py | # Initialize output before importing any module, that can use colorama.
from .system import init_output
init_output()
from argparse import ArgumentParser
from warnings import warn
from pprint import pformat
import sys
from . import logs, types
from .shells import shell
from .conf import settings
from .corrector impor... | Python | 0 | @@ -1064,16 +1064,54 @@
ommand)%0A
+ else:%0A sys.exit(1)%0A
%0A%0Adef pr
|
1cbbe33b3c8a19b95b8491f57d7d1640a520e260 | Revert "Mark distributed test as flaky. (#1958)" (#1960) | tests/test_distributed.py | tests/test_distributed.py | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import unittest
import torch.distributed as dist
import parlai.core.testing_utils as testing_utils
import parla... | Python | 0 | @@ -1811,38 +1811,209 @@
-@testing_utils.retry(ntries=3)
+def tearDown(self):%0A # we need to de-initialize the distributed world, otherwise other%0A # tests will they're we're distributed when we're really not.%0A dist.destroy_process_group()%0A
%0A
@@ -3129,190 +3129,8 @@
)%0A%0A
- ... |
84e39a416a69c7974e36cf32af1d4e40e376bf03 | Add an 'init' helper for scripts/tests to initialize everything needed... | src/yunohost/__init__.py | src/yunohost/__init__.py | #! /usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys
import glob
import moulinette
from moulinette import m18n
from moulinette.utils.log import configure_logging
from moulinette.interfaces.cli import colorize, get_locale
def is_installed():
return os.path.isfile('/etc/yunohost/installed')
def cli(de... | Python | 0 | @@ -2027,24 +2027,480 @@
s.exit(1)%0A%0A%0A
+def init(interface=%22cli%22, debug=False, quiet=False, logdir=%22/var/log/yunohost%22):%0A %22%22%22%0A This is a small util function ONLY meant to be used to initialize a Yunohost%0A context when ran from tests or from scripts.%0A %22%22%22%0A init_logging(... |
9b439e486e4a4932f0e76bfb51a43db7e2de8ea8 | fix id resolver tests | tests/test_id_resolver.py | tests/test_id_resolver.py | import unittest
from biothings_explorer.id_resolver import IDResolver
class TestIDResolver(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.idr = IDResolver()
def test_input_genes(self):
inputs = [(['CXCR4', 'CXCR3', 'CXCR2'], 'symbol', 'Gene')]
res = self.idr.resolve_ids... | Python | 0 | @@ -197,19 +197,22 @@
est_
-input_genes
+genes_as_input
(sel
@@ -260,30 +260,30 @@
'CXCR2'%5D, '
-symbol
+SYMBOL
', 'Gene')%5D%0A
@@ -348,22 +348,22 @@
sertIn('
-symbol
+SYMBOL
:CXCR4',
@@ -390,38 +390,38 @@
ssertEqual(res%5B'
-symbol
+SYMBOL
:CXCR4'%5D%5B'ensemb
@@ -418,15 +418,15 @@
'%5D%5B'
-ensembl
+ENSEM... |
f7fba2ee58bafbf0373ef968856cf1f3d10147c1 | allow 10 seconds for daemon actions | iceprod/server/daemon.py | iceprod/server/daemon.py | """
Daemonize a process.
Based on: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
"""
import sys
import os
import time
import atexit
import signal
class Daemon(object):
"""
A generic daemon class.
Usage:
d=Daemon(pidfile - filename for pidfile (required)
... | Python | 0 | @@ -3055,16 +3055,16 @@
in
-x
range(
-5
+10
):%0A
@@ -3704,17 +3704,18 @@
n range(
-5
+10
):%0A
|
7bfdf61276067a4ea96fa91c3f1bf9b6b3c19887 | add func comments | tickets/core.py | tickets/core.py | # coding: utf-8
"""Train tickets query via the command line.
Usage:
tickets [options] <from> <to> <date>
Arguments:
from 出发站
to 到达站
date 查询日期
Options:
-h, --help 显示该帮助菜单.
-d 动车
-g 高铁
-k 快速
-t ... | Python | 0 | @@ -5014,24 +5014,250 @@
ion, date):%0A
+ %22%22%22Have no idea why wrong params order can't get data.%0A So, use %60OrderedDict%60 here.%0A%0A :param from_station: the %60from%60 station telecode%0A :param to_station: %60to%60 station telecode%0A :param date: query date%0A %22%22%22%0A
d = Orde... |
146ace127d6550d2950d9cb1c9aeda5821d84f7f | test for invalid booleans too | tests/test_interactive.py | tests/test_interactive.py | #
# -*- coding: utf-8 -*-
#
# Copyright (c) 2007 Jared Crapo
#
# 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, mod... | Python | 0.000005 | @@ -4696,17 +4696,16 @@
ef test_
-_
convert_
@@ -4714,16 +4714,22 @@
_boolean
+_valid
(itm, pa
@@ -4792,16 +4792,243 @@
value%0A%0A
+NOT_BOOLEANS = %5B%0A None,%0A '',%0A 10,%0A 'ace',%0A%5D%0A@pytest.mark.parametrize('param', BOOLEANS)%0Adef test_convert_to_boolean_invalid(itm, param):%0A with pyt... |
9a021c0cece225435ed650063210af4e815c9b2d | Make sure we shutdown the listener in the api service on SIGINT (CTRL+C). | st2api/st2api/cmd/api.py | st2api/st2api/cmd/api.py | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | Python | 0 | @@ -1054,16 +1054,64 @@
NF_PATH%0A
+from st2api.listener import get_listener_if_set%0A
from st2
@@ -2473,16 +2473,141 @@
t_code)%0A
+ except KeyboardInterrupt:%0A listener = get_listener_if_set()%0A%0A if listener:%0A listener.shutdown()%0A
exce
|
375d762dcb92aa80f6d1b8d51f919c22a70e943f | Update huffman_code.py | huffman_code.py | huffman_code.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Created on Jul 22, 2015
@author: shenzb
'''
from Node import Node
import Utils
if __name__ == '__main__':
char_list = Utils.stringToPriorityQueue("hello, world!")
#print(char_list);
''' Initialize PriorityQueue '''
nodeList = []
for ch, cnt in c... | Python | 0 | @@ -558,16 +558,27 @@
anCode =
+ dict()%0A
Utils.g
@@ -608,16 +608,33 @@
fmanTree
+, %22%22, huffmanCode
)%0A%0A '
@@ -679,16 +679,21 @@
for ch
+, cnt
in char
@@ -691,32 +691,46 @@
t in char_list:%0A
+ #pass%0A
print(ch
|
3c287abe48588917b115df92927647b33670a431 | Use textarea widget when editing note text | immercv/cvgraph/forms.py | immercv/cvgraph/forms.py | from django import forms
from neomodel import DateProperty, IntegerProperty, StringProperty
PROPERTY_TYPE_FIELDS = {
# property-type: form-field-type,
DateProperty: forms.DateField,
IntegerProperty: forms.IntegerField,
StringProperty: forms.CharField,
}
def field_for_node_property(node_or_class, pro... | Python | 0.000001 | @@ -86,16 +86,57 @@
operty%0A%0A
+from immercv.cvgraph.models import Note%0A%0A
%0APROPERT
@@ -308,16 +308,115 @@
ld,%0A%7D%0A%0A%0A
+NODE_CLASS_FIELD_WIDGETS = %7B%0A # node-property: field-widget,%0A Note.text: forms.Textarea,%0A%7D%0A%0A%0A
def fiel
@@ -463,26 +463,16 @@
rty_name
-, **kwargs
):%0A i
@... |
ae5d46af448fc33ef74eee99c5a3d686c8d26e72 | Fix tests with latest pymongo/mongoengine. | tests/test_mongoengine.py | tests/test_mongoengine.py | # -*- coding: utf-8 -*-
# Copyright (c) 2013 Romain Command&
#
# 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, mod... | Python | 0.000003 | @@ -2257,16 +2257,44 @@
27017'))
+%0A MONGOD_TIMEOUT_MS = 100
%0A%0A @c
@@ -2341,49 +2341,134 @@
-cls.db = mongoengine.connect(cls.db_name,
+from pymongo import read_preferences as mongo_rp%0A cls.db = mongoengine.connect(%0A db=cls.db_name,%0A
hos
@@ -2481,16 +2481,28 @@
d... |
be653be175224c5770a4150062ad9a156cf9ff4f | Fix test | tests/test_run_manager.py | tests/test_run_manager.py | import datetime
import io
import os
import time
import json
import pytest
import threading
import wandb.run_manager
from wandb.apis import internal
import wandb
from wandb import wandb_socket
from wandb.wandb_run import Run, RESUME_FNAME
from wandb.run_manager import FileEventHandlerThrottledOverwriteMinWait, FileEven... | Python | 0.000004 | @@ -3233,24 +3233,90 @@
n_manager):%0A
+ run_manager._block_file_observer()%0A run_manager.init_run()%0A
for i in
|
0183e637fd49bcf95512f6842471415c5e8c5897 | Update test_submissions.py | tests/test_submissions.py | tests/test_submissions.py | import os
import pytest
import bugcrowd
class TestSubmissions(object):
def test_get_submission_passes(self):
uname = os.environ.get('BCUSER')
pw = os.environ.get('BCPW')
test = bugcrowd.Client(uname, pw)
s = test.get_submission("b337bee1-1643-4ef8-af33-fde80cb4d987")
ass... | Python | 0.000001 | @@ -2603,27 +2603,35 @@
== %22
-Ongoing Test Bug #1
+Assigned_Zach, State_Triage
%22%0A%0A
|
427b87aab2229b5381c7dfeab5c17474c561a3f1 | fix test to use new setup | tests/test_sw_triangle.py | tests/test_sw_triangle.py | from gusto import *
from firedrake import IcosahedralSphereMesh, Expression, SpatialCoordinate, \
Constant, as_vector
from math import pi
import json
def setup_sw(dirname):
refinements = 3 # number of horizontal cells = 20*(4^refinements)
R = 6371220.
H = 5960.
day = 24.*60.*60.
u_0 = 2*pi*... | Python | 0 | @@ -1908,163 +1908,282 @@
-advection_dict = %7B%7D%0A advection_dict%5B%22u%22%5D = EulerPoincareForm(state, state.V%5B0%5D)%0A advection_dict%5B%22D%22%5D = DGAdvection(state, state.V%5B1%5D, continuity=True
+ueqn = MomentumEquation(state, state.V%5B0%5D, vector_invariant=%22EulerPoincare%22)%0A Deqn = ... |
cb86a91f4ab4c873f10e4574f7c4e6604b3e6d5d | Fix minor bug in bash command quoting | tooler/shell.py | tooler/shell.py | import asyncio
import asyncssh
import getpass
import sys
from asyncio import (
shield,
sleep,
subprocess,
wait_for,
)
from io import BytesIO
from shlex import quote
from .colors import (
green,
grey,
red,
)
from .hosts import (
LocalHost,
SshHost,
localhost,
)
from .output import write_error
from .... | Python | 0.000001 | @@ -538,17 +538,16 @@
=None):%0A
-%0A
@@ -568,14 +568,23 @@
d) i
-s
+n (
list
+, tuple)
:%0A
|
a9af20426d7f30008d7cda863ba855679734c8a8 | Add a temporary fix for Django ticket 29917 | tests/testapp/settings.py | tests/testapp/settings.py | from __future__ import absolute_import, unicode_literals
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:"}}
INSTALLED_APPS = [
"django.contrib.auth",
"django.contrib.admin",
"django.contrib.contenttypes",... | Python | 0 | @@ -1522,8 +1522,96 @@
p.urls%22%0A
+%0ASILENCED_SYSTEM_CHECKS = %5B%22admin.E130%22%5D # https://code.djangoproject.com/ticket/29917%0A
|
7751ad1adb43a1a79f3d1d05b88011d539dae0fd | Make the cache backend explicit so that we have a known backend | tests/testapp/settings.py | tests/testapp/settings.py | import os
import warnings
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:"}}
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
INSTALLED_APPS = [
"django.contrib.auth",
"django.contrib.admin",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.cont... | Python | 0.000001 | @@ -157,16 +157,99 @@
oField%22%0A
+CACHES = %7B%22default%22: %7B%22BACKEND%22: %22django.core.cache.backends.locmem.LocMemCache%22%7D%7D%0A
INSTALLE
|
75e65f6144820ba216166eee4417912394f8cdca | Stop using os.path.join, because Visual Studio can actually handle forward slash style paths, and the os.path method was creating mixed \\ and / style paths, b0rking everything. | tools/bundle.py | tools/bundle.py | #!/usr/bin/env python
import os
import sys
import glob
import getopt
def file_list(path):
files = []
if os.path.isfile(path):
return [path]
for f in os.listdir(path):
new_dir = os.path.join(path, f)
if os.path.isdir(new_dir) and not os.path.islink(new_dir):
files.extend(file_list(new_dir))
... | Python | 0 | @@ -192,29 +192,22 @@
r =
-os.
path
-.join(path,
+ + '/' +
f
-)
%0A
|
d1dd5242d3139b964f7a5485afd5a8ed672c4600 | Add tests for paragraph transform | tests/transforms_tests.py | tests/transforms_tests.py | import cobble
from nose.tools import assert_equal, istest
from mammoth import documents
from mammoth.transforms import get_descendants, get_descendants_of_type, _each_element
@istest
class EachElementTests(object):
@istest
def all_descendants_are_transformed(self):
@cobble.data
class Count(do... | Python | 0.00001 | @@ -81,16 +81,28 @@
ocuments
+, transforms
%0Afrom ma
@@ -183,16 +183,530 @@
ement%0A%0A%0A
+@istest%0Aclass ParagraphTests(object):%0A @istest%0A def paragraph_is_transformed(self):%0A paragraph = documents.paragraph(children=%5B%5D)%0A result = transforms.paragraph(lambda _: documents.tab())(pa... |
b09d08d1117a2b66ad0782135565a4184539cebd | Test ServiceConfig | tests/unit/config_test.py | tests/unit/config_test.py | import unittest
import yaml
import os
from config import Config, ServiceConfig, NoServiceException, NoArtifactException
from plan import CharacteristicSpecification
def setUpModule():
global artifacts
global services
global config_fixtures_dir
config_fixtures_dir = os.path.join('tests', 'fixtures', '... | Python | 0.000033 | @@ -2618,28 +2618,1455 @@
cteristics(characteristics)%0A
+%0Aclass ServiceConfigTest(unittest.TestCase):%0A @classmethod%0A def setUpClass(cls):%0A cls.service = ServiceConfig(**services%5B0%5D)%0A%0A def test_fields(self):%0A self.assertEqual(self.service.name, 'mongodb')%0A self.assertE... |
7aef001c8ecff2b750106346a7b387b17b17b2aa | Clean up docstrings in hxl.__init__ per #118 | hxl/__init__.py | hxl/__init__.py | """Support library for the Humanitarian Exchange Language (HXL), version 1.0.
This library provides support for parsing, validating, cleaning, and
transforming humanitarian datasets that follow the HXL standard. Its
use will be familiar to developers who have worked with libraries like
U{JQuery<https://jquery.com>}. ... | Python | 0.000227 | @@ -1628,16 +1628,23 @@
@see: U%7B
+http://
hxlstand
@@ -1686,16 +1686,24 @@
@see: U%7B
+https://
proxy.hx
@@ -1758,17 +1758,16 @@
library%0A
-%0A
%22%22%22%0A%0Aimp
|
eaa619ecdb7bc91c7c174c8cfa12ba48a74acac0 | make IPythonTrials picklable | hyperopt/ipy.py | hyperopt/ipy.py | """Utilities for Parallel Model Selection with IPython
Author: James Bergstra <james.bergstra@gmail.com>
Licensed: MIT
"""
from time import sleep
from IPython.parallel import interactive
from IPython.parallel import TaskAborted
from IPython.display import clear_output
from .base import Trials
from .base import Ctrl
... | Python | 0.013742 | @@ -2411,24 +2411,43 @@
verbose=0,%0A
+ wait=True,%0A
):%0A
@@ -2617,16 +2617,25 @@
en(self.
+_dynamic_
trials)
@@ -2717,33 +2717,33 @@
sleep(1e-
-3
+1
)%0A
@@ -4079,16 +4079,85 @@
%5D = task
+%0A if wait:%0A self.wait()%0A%0A return self.argmin
%0... |
4c38cd3955470300ecf8ebf1c01e8a595735e61f | deal with None badge_nums | uber/reports.py | uber/reports.py | from uber.common import *
class ReportBase:
def write_row(self, row, out):
"""This method exists for plugins to monkeypatch and/or override."""
out.writerow(row)
class PersonalizedBadgeReport(ReportBase):
"""
Generate a CSV file which contains personalized badges with custom printed_name... | Python | 0.000001 | @@ -1158,16 +1158,48 @@
badges%0A
+ if a.badge_num:%0A
@@ -1237,16 +1237,20 @@
s_seen:%0A
+
@@ -1327,16 +1327,20 @@
ge_num)%0A
+
|
ed3b783ba3531ef2c8a022406a95a683f90a7d73 | Fix unicode encoding when sending text for parsing in REACH API | indra/reach/reach_api.py | indra/reach/reach_api.py | import os
import json
import tempfile
import urllib, urllib2
import requests
from indra.java_vm import autoclass, JavaException
import indra.databases.pmc_client as pmc_client
import indra.databases.pubmed_client as pubmed_client
from processor import ReachProcessor
reach_text_url = 'http://agathon.sista.arizona.edu:8... | Python | 0.000047 | @@ -1361,24 +1361,37 @@
h_text_url,
+%0A
data=urllib.
@@ -1408,24 +1408,39 @@
%7B'text': txt
+.encode('utf8')
%7D))%0A
@@ -2244,16 +2244,29 @@
ml_url,
+%0A
data=url
@@ -2291,16 +2291,31 @@
ml': txt
+.encode('utf8')
%7D))%0A
|
b35d72da72a76060b67592e50441d3c2fcd32ee3 | fix for groups reverse url and for queryset filter | students/views/groups.py | students/views/groups.py | from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from django.views.generic import ListView, UpdateView, DeleteView, CreateView
from ..models import Group
from ..forms import GroupEditForm
from ..util import get_current_group
G... | Python | 0 | @@ -680,21 +680,13 @@
ter(
-student_group
+title
=cur
@@ -695,16 +695,22 @@
nt_group
+.title
)%0A
@@ -1252,36 +1252,38 @@
format(reverse('
-home
+groups
'), _('Group sav
@@ -1452,36 +1452,38 @@
format(reverse('
-home
+groups
'), _('Canceled'
@@ -1787,36 +1787,38 @@
format(reverse('
-home
+groups
'), _('... |
71aa46a8dc0d82a12cd6041d090f3f9a9b1bbe75 | add arg for specifying webcam name | wallpaper_downloader.py | wallpaper_downloader.py | from lxml import html
from lxml import etree
import json
import requests
import urllib
import os
import argparse
###
### Downloads images from traunstein webcam. Skips download of existing files. Ignores images in blacklist file.
###
parser = argparse.ArgumentParser(description="Downloads bestof images from Traunste... | Python | 0.000001 | @@ -105,16 +105,27 @@
argparse
+%0Aimport sys
%0A%0A###%0A##
@@ -336,16 +336,74 @@
ebcam%22)%0A
+parser.add_argument('webcam', help='the fotowebcam name')%0A
parser.a
@@ -454,17 +454,97 @@
e images
-'
+, default is cwdir')%0A%0Aif len(sys.argv)==1:%0A parser.print_help()%0A sys.exit(1
)%0A%0Aargs
@@ -648,2... |
efeb090ce5327b90fd6683718d5cf2b281da9069 | Add documentation to dirsnapshot.py | watchdog/dirsnapshot.py | watchdog/dirsnapshot.py | # -*- coding: utf-8 -*-
from os import walk, stat
from os.path import join as path_join, realpath, abspath
class DirectorySnapshotDiff(object):
"""Difference between two directory snapshots."""
def __init__(self, ref_dirsnap, dirsnap):
self._files_deleted = set()
self._files_modified = set()
... | Python | 0 | @@ -18,16 +18,177 @@
-8 -*-%0A%0A
+%22%22%22%0ADirectory snapshotting classes and functionality.%0A%0ANotes:%0A- Does not currently take into consideration stat information beyond%0A partition boundaries.%0A%0A%22%22%22%0A%0A
from os
@@ -1670,32 +1670,78 @@
_created(self):%0A
+ %22%22%22Set of files that we... |
40b2e5202e8c6a1e3bd64e75557a6d8b5bbbb554 | make DEBUG, STATIC_ROOT DB_NAME configurable through environment | info_display/settings.py | info_display/settings.py | """
Django settings for info_display project.
Generated by 'django-admin startproject' using Django 1.8.
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 p... | Python | 0 | @@ -804,20 +804,59 @@
DEBUG =
-True
+os.environ.get('INFO_DISPLAY_DEBUG', False)
%0A%0AALLOWE
@@ -2663,16 +2663,86 @@
abases%0A%0A
+DATABASE_NAME = os.environ.get('INFO_DISPLAY_DB', 'data/db.sqlite3')%0A%0A
DATABASE
@@ -2832,58 +2832,90 @@
E':
-os.path.join(BASE_DIR, 'data/db.sqlite3'),%0A %7D%0A%7D
+DATABASE... |
ffc5d0abbc03d67ebd320cb2af7d855e5124a20b | Update mails.py | web/opensubmit/mails.py | web/opensubmit/mails.py | from django.core.mail import EmailMessage
from django.core.urlresolvers import reverse
from opensubmit import settings
STUDENT_FAILED_SUB = 'Warning - Validation failed'
STUDENT_FAILED_MSG = '''
Hi,
this is a short notice that your submission for "%s" in "%s"
failed in the automated validation test.
Further infor... | Python | 0 | @@ -1064,16 +1064,12 @@
ngs.
-MAIN_URL
+HOST
+ r
|
72ab2ead8079c0d224d18d45ab35434564e32d5a | Fix indentation | sunpy/map/sources/sdo.py | sunpy/map/sources/sdo.py | """SDO Map subclass definitions"""
#pylint: disable=W0221,W0222,E1101,E1121
__author__ = "Keith Hughitt"
__email__ = "keith.hughitt@nasa.gov"
import matplotlib.pyplot as plt
from astropy.coordinates import CartesianRepresentation, SkyCoord
# Versions of Astropy that do not have HeliocentricMeanEcliptic have the same... | Python | 0.017244 | @@ -376,20 +376,16 @@
ic%0Atry:%0A
-
from
@@ -457,20 +457,16 @@
tError:%0A
-
from
|
a86789998e3267ac9c7fd9ee916eedd5670f65f7 | Add a way to pretty-print JSON | sweettooth/decorators.py | sweettooth/decorators.py |
from django.shortcuts import get_object_or_404
from django.http import HttpResponse
from django.utils.safestring import mark_safe
import functools
import json
def model_view(model):
def inner(view):
@functools.wraps(view)
def new_view(request, pk, **kw):
obj = get_object_or_404(model,... | Python | 0.000001 | @@ -407,16 +407,179 @@
inner%0A%0A
+def dump_json(response, pretty=False):%0A if pretty:%0A return json.dumps(response, indent=2, sort_keys=True)%0A else:%0A return json.dumps(response)%0A%0A
def ajax
@@ -587,24 +587,24 @@
view(view):%0A
-
@functoo
@@ -643,32 +643,83 @@
request, **kw):%0A
... |
bddc1d9fff2ab749b5946f44d52ed0670c1ce801 | use @wraps to set the __name__ __module__ and __doc__ correctly for logged functions | synapse/util/logutils.py | synapse/util/logutils.py | # -*- coding: utf-8 -*-
# Copyright 2014 matrix.org
#
# 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.000051 | @@ -624,16 +624,44 @@
callargs
+%0Afrom functools import wraps
%0A%0Aimport
@@ -873,16 +873,30 @@
lename%0A%0A
+ @wraps(f)%0A
def
|
fe710bbb0358f1c4e031b98edbb48b36fdbbabe2 | debug start | syncro_partner/syncro.py | syncro_partner/syncro.py | # -*- coding: utf-8 -*-
###############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2001-2015 Micronaet S.r.l. (<http://www.micronaet.it>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | Python | 0.000001 | @@ -5939,28 +5939,24 @@
%0A
-
import pdb;
@@ -5975,28 +5975,24 @@
e()%0A
-
-
for contact
@@ -6012,36 +6012,32 @@
de:%0A
-
sock.execute(%0A
@@ -6042,36 +6042,32 @@
-
-
odoo.name, uid_8
@@ -6076,36 +6076,32 @@
odoo.password, %0A
-
... |
8413d42f0396e631cdd5a4d4daacb4d8e164bdb5 | Debug info database is now installed with libavg on windows. | win/testplugin/setup.py | win/testplugin/setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# libavg - Media Playback Engine.
# Copyright (C) 2003-2011 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# versi... | Python | 0.000001 | @@ -2551,16 +2551,50 @@
vg.pyd')
+%0Adlls.append('../Release/avg.pdb')
%0A%0Atest_f
|
dafef02f46d9413b0ff125e1f8e701b009ed66c9 | Disable logging for irco-explorer. | irco/scripts/explorer.py | irco/scripts/explorer.py | import argparse
from irco.explorer import app, database, filters
from irco.logging import sentry
def main():
argparser = argparse.ArgumentParser('irco-explorer')
argparser.add_argument('-p', '--port', default=8000, type=int)
argparser.add_argument('-i', '--interface', default='127.0.0.1')
argparser.a... | Python | 0 | @@ -59,16 +59,17 @@
filters%0A
+#
from irc
@@ -443,16 +443,17 @@
()%0A%0A
+#
sentry.c
@@ -467,24 +467,25 @@
merge(%7B%0A
+#
'tags':
@@ -514,24 +514,25 @@
orer'%7D,%0A
+#
'extra':
@@ -572,16 +572,17 @@
__%7D%0A
+#
%7D)%0A%0A
|
89478bed86dfe4b522b2c38679410b4fb4b33979 | update to pythonwikibot changes | trunk/toolserver/fungi.py | trunk/toolserver/fungi.py | #!usr/bin/python
__version__ = '$Id$'
import re, time, sys, os
sys.path.append(os.environ['HOME'] + '/pywiki')
from pywikibot import wiki, pagegen, timedate
wiki.setUser('Legobot')
def main():
gen = pagegen.transclude(wiki.Page('Template:WikiProject Fungi'))
table = ''
for page in gen:
table += do_page(page)
put... | Python | 0.000001 | @@ -10,16 +10,38 @@
/python%0A
+#-*- coding:utf-8 -*-%0A
__versio
@@ -201,21 +201,40 @@
')%0A%0Adef
-main(
+do_project(page, putpage
):%0A%09gen
@@ -277,27 +277,16 @@
late
-:WikiProject Fungi'
+' + page
))%0A%09
@@ -347,16 +347,17 @@
%09putpage
+1
= wiki.
@@ -365,26 +365,15 @@
age(
-'User:Legoktm/Bot'
+putp... |
990c4dec9549908013616ed3daad2e8d9beaf33f | fix admin | isi_mip/contrib/admin.py | isi_mip/contrib/admin.py | from django.contrib import admin
from django.contrib.auth.models import User
from django.core import urlresolvers
from isi_mip.climatemodels.models import BaseImpactModel
class UserAdmin(admin.ModelAdmin):
list_display = ('username', 'email', 'first_name', 'last_name', 'get_model')
list_filter = ('is_staff',... | Python | 0 | @@ -164,17 +164,25 @@
actModel
+, Sector
%0A
-
%0A%0Aclass
@@ -289,16 +289,30 @@
t_model'
+, 'get_sector'
)%0A li
@@ -882,24 +882,24 @@
pact Model'%0A
-
get_mode
@@ -919,16 +919,572 @@
= True%0A%0A
+ def get_sector(self, obj):%0A try:%0A base_models = BaseImpactModel.objects.filter(... |
cda08ae21fcf00c1eeb1d4bf74c0a8bfec5b1353 | remove dead code | tsuru/plugins/__init__.py | tsuru/plugins/__init__.py | # Copyright 2013 tsuru-circus authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
from circus.plugins import CircusPlugin
from circus.client import CircusClient
from zmq.eventloop import ioloop
from honcho.procfile import Procfile
import ... | Python | 0.000001 | @@ -406,77 +406,8 @@
her%22
-%0A envs_to_keep = (%22PATH%22, %22http_proxy%22, %22https_proxy%22, %22no_proxy%22)
%0A%0A
|
e7356e6ca1968d930f4fd348b48dcdd1cb9a02ab | Add ability to search tags by name | taggit/admin.py | taggit/admin.py | from django.contrib import admin
from taggit.models import Tag, TaggedItem
class TaggedItemInline(admin.StackedInline):
model = TaggedItem
extra = 0
class TagAdmin(admin.ModelAdmin):
inlines = [
TaggedItemInline
]
ordering = ['name']
admin.site.register(Tag, TagAdmin)
| Python | 0 | @@ -258,16 +258,45 @@
%5B'name'%5D
+%0A search_fields = %5B'name'%5D
%0A%0Aadmin.
@@ -323,9 +323,8 @@
agAdmin)
-%0A
|
c7a26e74deec3534525a1752bab5849f6b05566c | Improve readability | meetup/meetup.py | meetup/meetup.py | from datetime import date
class MeetupDayException(Exception):
pass
WEEKDAYS = {"Monday": 0, "Tuesday": 1, "Wednesday": 2, "Thursday": 3,
"Friday": 4, "Saturday": 5, "Sunday": 6}
TEENTH = {1:15, 2:16, 3:17, 4:18, 5:19, 6:13, 7:14}
ORDINAL = {"1st": 0, "2nd": 7, "3rd": 14, "4th": 21, "5th": 28}
d... | Python | 0.000673 | @@ -353,16 +353,20 @@
start
+_dow
= date(
@@ -373,16 +373,26 @@
y, m, 1)
+.weekday()
%0A fir
@@ -422,26 +422,20 @@
- start
-.weekday()
+_dow
) %25 7 +
|
3eab2585bfd973615de16f311c4c14d71e2351bb | use topic_id and characteristic_id as columns | tasks/ca/statcan/util.py | tasks/ca/statcan/util.py | from __future__ import print_function
import csv
import itertools
import os
from collections import OrderedDict
from tasks.util import underscore_slugify
class StatCanParser(object):
# Geography id column
GEO_COLUMN = 'Geo_Code'
# Column used to split for defining
# output file.
PARSE_COLUMN = ... | Python | 0.000002 | @@ -1435,32 +1435,34 @@
'''%0A
+ #
char_val = row%5B
@@ -1491,16 +1491,120 @@
PREFIX%5D%0A
+ char_val = 't%7B:03d%7Dc%7B:03d%7D'.format(self._topic_idx, self._char_idx)%0A self._char_idx += 1%0A
@@ -1751,32 +1751,34 @@
())) / 2%0A
+ #
char_val = self
@@ -2003,16 +2003,2... |
436c474c165490170e7173859d2828d7ce8757de | test for new line | openquake/hazardlib/gsim/munson_thurber_1997.py | openquake/hazardlib/gsim/munson_thurber_1997.py | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2017 GEM Foundation
#
# OpenQuake 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, o... | Python | 0.000156 | @@ -4302,28 +4302,29 @@
return mean, stddevs
+%0A
|
51c708c8f7ff39c9f9cb197f48897a00fba2ab54 | Change WELT2000 import path to point to skylines' fork | skylines/lib/waypoints/welt2000.py | skylines/lib/waypoints/welt2000.py | import os
import subprocess
from flask import current_app
from .welt2000_reader import parse_welt2000_waypoints
def __get_database_file(dir_data):
path = os.path.join(dir_data, 'WELT2000.TXT')
# Create Welt2000 data folder if necessary
if not os.path.exists(os.path.dirname(path)):
os.makedirs(o... | Python | 0 | @@ -440,35 +440,54 @@
http
+s
://
-www.segelflug.de/vereine
+raw.githubusercontent.com/skylines-project
/wel
@@ -492,24 +492,22 @@
elt2000/
-download
+master
/WELT200
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.