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 |
|---|---|---|---|---|---|---|---|
a86d4ad2fd9afa5b2111fd2ce24b550b7da1f260 | Version bump for 1.1 final. Closes #40 | impersonate/__init__.py | impersonate/__init__.py | # -*- coding: utf-8 -*-
VERSION = (1, 1, 0, 'alpha', 0)
# taken from django-registration
def get_version():
"Returns a PEP 386-compliant version number from VERSION."
assert len(VERSION) == 5
assert VERSION[3] in ('alpha', 'beta', 'rc', 'final')
# Now build the two parts of the version number:
#... | Python | 0 | @@ -38,21 +38,21 @@
1, 0, '
-alpha
+final
', 0)%0A%0A%0A
|
62f663f77d1b13a01f0270b4d88ae5720427c91f | add licence disclaimer to error.py | paystack/error.py | paystack/error.py | # -*- coding: utf-8 -*-
class Error(Exception):
"""Base Error class."""
pass
class APIError(Error):
pass
class APIConnectionError(Error):
pass
class ValidationError(Error):
pass
class AuthorizationError(Error):
pass
class InvalidRequestError(Error):
pass
| Python | 0 | @@ -21,61 +21,1591 @@
-*-%0A
-%0A%0Aclass Error(Exception):%0A %22%22%22Base Error class.%22%22%22
+%22%22%22%0APaystack API wrapper.%0A%0A@author Bernard Ojengwa.%0A%0ACopyright (c) 2015, Bernard Ojengwa%0AAll rights reserved.%0A%0ARedistribution and use in source and binary forms, with or without%0Amodification, ... |
8c71bc2408f79ee6187bf6238d910d37b5cee4dd | Extend BackupFactory with metadata | nodeconductor/backup/tests/factories.py | nodeconductor/backup/tests/factories.py | import factory
from django.core.urlresolvers import reverse
from nodeconductor.backup import models
from nodeconductor.iaas.tests import factories as iaas_factories
class BackupScheduleFactory(factory.DjangoModelFactory):
class Meta(object):
model = models.BackupSchedule
backup_source = factory.Sub... | Python | 0 | @@ -122,39 +122,167 @@
iaas
-.tests import factories as iaas
+ import models as iaas_models%0Afrom nodeconductor.iaas.tests import factories as iaas_factories%0Afrom nodeconductor.structure.tests import factories as structure
_fac
@@ -755,24 +755,24 @@
uleFactory)%0A
-
backup_s
@@ -845,16 +845,1424 @@
ource)%0... |
dbcbd0b8fa95ef3271ae181375aa4069ab5f8ef0 | Fix typo | nodeconductor/cost_tracking/handlers.py | nodeconductor/cost_tracking/handlers.py | import datetime
import logging
from dateutil.relativedelta import relativedelta
from django.contrib.contenttypes.models import ContentType
from django.utils import timezone
from nodeconductor.core.tasks import send_task
from nodeconductor.core.utils import serialize_instance
from nodeconductor.cost_tracking import ex... | Python | 0.998368 | @@ -7068,33 +7068,33 @@
resource_consump
-r
+t
ion_details(reso
@@ -7253,33 +7253,33 @@
resource_consump
-r
+t
ion_details(reso
@@ -7314,17 +7314,17 @@
_consump
-r
+t
ion_deta
|
94ece9631f05cf5a845ea1a09e87370ab195582e | Fix some new bugs | checker.py | checker.py | # Copyright 2017 Insanity Framework (IF)
# Written by: * Alisson Moretto - 4w4k3
# https://github.com/4w4k3/Insanity-Framework
# Licensed under the BSD-3-Clause
import os
def banner(text, char="*"):
print(char * len(text) + "****")
print(char + " " + text + " " + char)
print(char * len(text) + "****")
def... | Python | 0.000013 | @@ -764,16 +764,64 @@
stall')%0A
+ os.system('sudo apt-get install wine32 -y')%0A
os.s
@@ -1546,32 +1546,87 @@
n32-py2.7.exe')%0A
+ os.system('sudo wine pywin32-220.win32-py2.7.exe')%0A
os.system('s
|
0707d920f37edb82d16ccabe1e8413ec16c47c0b | Change directory where data is written to. | backend/mcapi/mcdir.py | backend/mcapi/mcdir.py | import utils
from os import environ
import os.path
MCDIR = environ.get("MCDIR") or '/mcfs/data'
def for_uid(uidstr):
pieces = uidstr.split('-')
path = os.path.join(MCDIR, pieces[1][0:2], pieces[1][2:4])
utils.mkdirp(path)
return path
| Python | 0 | @@ -89,16 +89,33 @@
cfs/data
+/materialscommons
'%0A%0A%0Adef
|
ef89343016d270209e12dce84270dbad90251e73 | Add failing tests for echoed params | openfisca_web_api/tests/test_formula.py | openfisca_web_api/tests/test_formula.py | # -*- coding: utf-8 -*-
# OpenFisca -- A versatile microsimulation software
# By: OpenFisca Team <contact@openfisca.fr>
#
# Copyright (C) 2011, 2012, 2013, 2014, 2015 OpenFisca Team
# https://github.com/openfisca
#
# This file is part of OpenFisca.
#
# OpenFisca is free software; you can redistribute it and/or modify... | Python | 0 | @@ -2379,24 +2379,182 @@
ayload'%5D)%0A%0A%0A
+def test_invalid_formula_params():%0A assert_equal(%0A %7B'salaire_de_base': 1300%7D,%0A send(formula = 'inexistent')%5B'payload'%5D%5B'params'%5D%0A )%0A%0A%0A
def test_for
@@ -3025,68 +3025,8 @@
():%0A
- raise SkipTest('Params are always ech... |
8e57436ea4bfc97009d48dad8bdc740c5c33b91c | add qha plot tool (function version) | workflows/launcher/launch_phonon_vasp_mp.py | workflows/launcher/launch_phonon_vasp_mp.py | from aiida import load_dbenv
load_dbenv()
from aiida.orm import Code, DataFactory
StructureData = DataFactory('structure')
ParameterData = DataFactory('parameter')
import numpy as np
import os
import pymatgen
##########################
structure_id = 'mp-12668'
##########################
def get_supercell_size(stru... | Python | 0 | @@ -537,16 +537,45 @@
True:%0A%0A
+ print supercell_size%0A
@@ -597,16 +597,18 @@
dot(cell
+.T
, np.dia
@@ -625,16 +625,18 @@
l_size))
+.T
%0A
@@ -1280,37 +1280,8 @@
st%0A%0A
- print supercell_size%0A
|
429a9375dd56bcb4f7cba5cb533f53acaf35f439 | remove print statement | workflows/p1b1_mlrMBO/python/p1b1_runner.py | workflows/p1b1_mlrMBO/python/p1b1_runner.py | # tensoflow.__init__ calls _os.path.basename(_sys.argv[0])
# so we need to create a synthetic argv.
import sys
if not hasattr(sys, 'argv'):
sys.argv = ['p1b1']
import json
import os
import numpy as np
import importlib
import runner_utils
import socket
import time
import math
node_pid = "%s,%i" % (socket.gethostn... | Python | 0.999999 | @@ -2685,27 +2685,8 @@
))%0A%0A
- print last_val%0A
|
4a01a76db81ad41df1bdc1ceabf867ee025568f0 | revert last commit | representatives/views.py | representatives/views.py | import re
import urllib2, urllib
from django.http import HttpResponseBadRequest
from django.utils import simplejson as json
from boundaries.base_views import ModelListView, ModelDetailView
from boundaries.models import Boundary
from representatives.models import Representative, RepresentativeSet, app_settings
from r... | Python | 0 | @@ -31,55 +31,8 @@
ib%0A%0A
-from django.http import HttpResponseBadRequest%0A
from
@@ -1383,173 +1383,8 @@
ET:%0A
- lat, lon = re.sub(r'%5B%5E%5Cd.,-%5D', '', request.GET%5B'point'%5D).split(',')%0A if not lat and not lon:%0A return HttpResponseBadRequest()%0A%0A
@@ -1859,... |
95770bf4d71666b5e589061f5c76979bfcebb000 | Make imports conform to PEP8. | hooks/post_gen_project.py | hooks/post_gen_project.py | from cookiecutter.main import cookiecutter
from getpass import getpass
import os
import sys
from shutil import rmtree
current_path = os.path.abspath('.')
sys.path.append(current_path)
import github, google, mandrill # NOQA
import opbeat # NOQA
# opbeat, mandrill, google
# Ensure we have all of the environment va... | Python | 0 | @@ -197,17 +197,45 @@
thub
-, google,
+ # NOQA%0Aimport google # NOQA%0Aimport
man
|
52ad2dd25c0bbddc412a09593f84e31f6ed65fe2 | Remove add | batchflow/components.py | batchflow/components.py | """ Contains classes to handle batch data components """
import copy as cp
import numpy as np
try:
import pandas as pd
except ImportError:
import _fake as pd
from .utils import is_iterable
class AdvancedDict(dict):
""" dict that supports advanced indexing """
def __getitem__(self, item):
if i... | Python | 0 | @@ -3182,203 +3182,8 @@
a)%0A%0A
- # def __add__(self, other):%0A # if not isinstance(other, tuple):%0A # raise TypeError(%22Tuple is expected, while got %25s%22 %25 type(other))%0A # self.data = self.data + other%0A%0A
|
39863d445a50e82dd0d98fb587aa6898ed90ed51 | Rename Fuzzy plugin class name. remove useless conversion of an iterator to a list | beetsplug/fuzzy_list.py | beetsplug/fuzzy_list.py | # This file is part of beets.
# Copyright 2011, Philippe Mongeau.
#
# 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... | Python | 0 | @@ -1712,29 +1712,24 @@
objs =
-list(
lib.albums()
@@ -1728,17 +1728,16 @@
albums()
-)
%0A els
@@ -1754,21 +1754,16 @@
objs =
-list(
lib.item
@@ -1765,17 +1765,16 @@
.items()
-)
%0A%0A #
@@ -3045,20 +3045,21 @@
st%0A%0A
+%0A%0A
class
-Random
+Fuzzy
(Bee
|
eaef07e155542a62480aa622a07fa77888b094b1 | Implement simple ProgressReporter class | whip/util.py | whip/util.py |
import heapq
import itertools
import operator
import socket
import struct
import subprocess
__all__ = [
'ipv4_int_to_str',
'ipv4_str_to_int',
'ipv4_int_to_bytes',
'ipv4_bytes_to_int',
'merge_ranges',
'open_file',
]
EVENT_TYPE_BEGIN = 0
EVENT_TYPE_END = 1
IPV4_STRUCT = struct.Struct('>L')
... | Python | 0.000001 | @@ -86,16 +86,29 @@
process%0A
+import time%0A%0A
%0A__all__
@@ -245,18 +245,41 @@
_file',%0A
+ 'ProgressReporter',%0A
%5D
-%0A
%0A%0AEVENT_
@@ -348,16 +348,47 @@
('%3EL')%0A%0A
+PROGRESS_REPORT_INTERVAL = 10%0A%0A
%0Adef ipv
@@ -5042,8 +5042,416 @@
ld item%0A
+%0A%0Aclass ProgressReporter(object):%0A def... |
5efd6a83136c1724c5787f6d5ca7d02355ff7a96 | Add cache print import | salt/utils/cache.py | salt/utils/cache.py | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
import os
import time
# Import salt libs
import salt.config
import salt.payload
# Import third party libs
try:
import zmq
HAS_ZMQ = True
except ImportError:
HAS_ZMQ = False
class CacheDict(dict):
'''
Subclass of... | Python | 0 | @@ -38,16 +38,53 @@
on libs%0A
+from __future__ import print_function
%0Afrom __
|
a67ace1ec7e568ce3e86d31e2170233c2f8142cf | fix source trimming when uploading to s3 | piprepo/models.py | piprepo/models.py | import abc
import boto3
import errno
import filecmp
import logging
import os
from shutil import copyfile
from piprepo.utils import get_project_name_from_file
from piprepo.exceptions import InvalidFileName
try:
# python3
from urllib.parse import urlparse
except ImportError:
# python2
from urlparse import... | Python | 0 | @@ -5532,119 +5532,27 @@
-if self.prefix:%0A key = self.prefix + filename.split(self.source)%5B1%5D%0A else:%0A key =
+key = os.path.join(
self
@@ -5558,18 +5558,17 @@
f.prefix
- +
+,
filenam
@@ -5572,14 +5572,12 @@
name
-.split
+%5Blen
(sel
@@ -5589,10 +5589,9 @@
rce)
-%5B1
+... |
39f02725badba7ad8512737c6721061489ab3ee6 | Add node model | node/node.py | node/node.py | from configparser import ConfigParser
from driver import BTRFSDriver
class Node:
"""
# Dummy config example
[bk1-z3.presslabs.net]
ssd = True
"""
def __init__(self, context):
self._conf_path = context['node']['conf_path']
self._driver = BTRFSDriver(context['volume_path'])
... | Python | 0.000001 | @@ -233,16 +233,8 @@
xt%5B'
-node'%5D%5B'
conf
|
daf39631ec50a6815169b572caff92e2bd093877 | remove the lfs country model | lfs/core/models.py | lfs/core/models.py | # python imports
import re
# django imports
from django.db import models
from django.utils.translation import ugettext_lazy as _
# lfs imports
from lfs.checkout.settings import CHECKOUT_TYPES
from lfs.checkout.settings import CHECKOUT_TYPE_SELECT
from lfs.core.fields.thumbs import ImageWithThumbsField
from lfs.core.s... | Python | 0.998752 | @@ -445,353 +445,64 @@
ck%0A%0A
-class Country(models.Model):%0A %22%22%22Holds country relevant data for the shop.%0A %22%22%22%0A code = models.CharField(_(u%22Country code%22), max_length=2)%0A name = models.CharField(_(u%22Name%22), max_length=100)%0A%0A def __unicode__(self):%0A return self.... |
6b07ffa43ecfd1d34f39fc1d6e37f9f3069d48cf | fix bug | bam2vcf_GATK_wolves.py | bam2vcf_GATK_wolves.py | #!/usr/bin/env python
#import argparse
#from glob import glob
#-s test_samples.txt
#-b /mnt/lfs2/hend6746/devils/reference/sarHar1.fa
from os.path import join as jp
from os.path import abspath
import os
import sys
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-s', "--samples", help=" sample... | Python | 0.000001 | @@ -922,17 +922,16 @@
bspath('
-_
GATK_PBS
@@ -1344,24 +1344,25 @@
, sample), '
+_
GATK.log'%5D)%0A
@@ -1419,16 +1419,17 @@
mple), '
+_
GATK_com
|
9d8cd275bdd6227e759c78d74ad5fc2ed0c4e2cb | add the new lib directories | lg_common/setup.py | lg_common/setup.py | #!/usr/bin/env python
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
packages=['lg_common'],
package_dir={'': 'src'},
package_data={
'lg_common': [
'extensions/ros_window_ready/*',
'extensions/moni... | Python | 0 | @@ -369,16 +369,153 @@
t_url/*'
+,%0A 'extensions/ros_window_ready/*/*',%0A 'extensions/monitor_page_urls/*/*',%0A 'extensions/current_url/*/*'
%0A
|
5239a76202fd8d587d01eb9877a13ade71e7412c | Fix expected error in V2.1 add network API | nova/api/openstack/compute/plugins/v3/networks.py | nova/api/openstack/compute/plugins/v3/networks.py | # 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 at
#
# http://www.apache.org/licenses... | Python | 0.00002 | @@ -6877,37 +6877,32 @@
ted_errors((400,
- 409,
501))%0A def a
|
8b099795779ddb87feaa72e48656c2522b3f6ad4 | Change max pages preview by 500 | insight_reloaded/api.py | insight_reloaded/api.py | import json
import os
import tornadoredis
import tornado.web
import tornado.ioloop
import tornado.gen
import tornado.httpserver
from insight_reloaded.insight_settings import (
REDIS_HOST, REDIS_PORT, REDIS_DB, SENTRY_DSN, REDIS_QUEUE_KEYS,
DEFAULT_REDIS_QUEUE_KEY, CROP_SIZE)
try:
from raven import Clien... | Python | 0 | @@ -636,16 +636,40 @@
'N/A'%0A%0A
+MAX_PAGES_PREVIEW = 500%0A
%0Ac = tor
@@ -2099,18 +2099,33 @@
pages',
-20
+MAX_PAGES_PREVIEW
))%0A
@@ -2176,10 +2176,25 @@
%5D =
-20
+MAX_PAGES_PREVIEW
%0A%0A
|
eff44d791722a422dc2f7b845d0d0a3c819753a5 | Fix another path | test/core/http/test_server.py | test/core/http/test_server.py | #!/usr/bin/env python2.7
# Copyright 2015-2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, thi... | Python | 0.029689 | @@ -1734,32 +1734,36 @@
/..', 'src/core/
+lib/
tsi/test_creds/s
@@ -1864,24 +1864,28 @@
rc/core/tsi/
+lib/
test_creds/s
|
dfce4c7da007df48a8ffc66f68b17d721649887c | learn gamma | barchybrid/src/elmo.py | barchybrid/src/elmo.py | import json
import dynet as dy
import h5py
import numpy as np
class ELMo(object):
def __init__(self, elmo_file, gamma=1.0):
print "Reading ELMo embeddings from '%s'" % elmo_file
self.sentence_data = h5py.File(elmo_file, 'r')
self.weights = []
self.gamma = gamma
self.sent... | Python | 0.998962 | @@ -289,21 +289,20 @@
gamma =
-gamma
+None
%0A%0A
@@ -1159,16 +1159,80 @@
eights%22)
+%0A self.gamma = model.add_parameters(1, name=%22elmo-gamma%22)
%0A%0A cl
|
2f19cf58b09f7eb9d4b8497ecb23371feb156e54 | extended max number of images to 999 | src/MangaBase.py | src/MangaBase.py | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
import os
import glob
import zipfile
import urllib2
import logging
from string import Template
import MangaZipper
# -------------------------------------------------------------------------------------------------
# logging
# ---------------------------------------------... | Python | 0.999503 | @@ -3624,16 +3624,17 @@
ge(1,100
+0
):%0A%09%09%09im
|
783537df7b4f9f9727abdbb1e2e30aa17f6d66ee | fix path representation in ConfigPy. | bento/commands/build.py | bento/commands/build.py | from bento.core.utils \
import \
subst_vars
from bento.installed_package_description \
import \
InstalledPkgDescription, ipkg_meta_from_pkg
from bento._config \
import \
IPKG_PATH
from bento.commands.core \
import \
Option
from bento.commands.core \
import \
... | Python | 0 | @@ -1960,13 +1960,10 @@
s =
+%25
r
-%22%25s%22
' %25
|
01ceea162410fd626bcc3a98572167bc71e68f17 | rename functions for extension | src/PTTparser.py | src/PTTparser.py | import requests
import json
import re
from bs4 import BeautifulSoup
class PTTparser:
def __init__(self):
self.PTTaddress = 'https://www.ptt.cc/bbs/'
def parseBoard(self, boardName):
pass
def parsePage(self, boardName, pageNum):
pageIndex = '/index' + str(pageNum) + '.html'
... | Python | 0.000001 | @@ -61,16 +61,45 @@
fulSoup%0A
+from os.path import basename%0A
%0A%0Aclass
@@ -421,31 +421,8 @@
URL)
-%0A print('=====')
%0A%0A
@@ -724,28 +724,11 @@
p
-rint('deleted page')
+ass
%0A
@@ -870,16 +870,25 @@
cleID =
+basename(
articleL
@@ -894,22 +894,9 @@
Link
-.split('/')%5B3%5D
+)
.rep
@@ -1... |
2a3c5e08378a6646bc11a47518394cd8ef3e9547 | Fix lint | opentreemap/treemap/management/commands/uitest.py | opentreemap/treemap/management/commands/uitest.py | from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import unittest
import sys
import importlib
from optparse import make_option
from django.core.management.base import BaseCommand
from django.conf import settings
from pyvirtualdisplay import Display
class ... | Python | 0.000032 | @@ -307,16 +307,17 @@
isplay%0A%0A
+%0A
class Co
|
458ccdae43a8208166bddbe7516d7a7a2b476750 | Add a kwarg for filtering activities | bdd_tester/__init__.py | bdd_tester/__init__.py | import csv
from datetime import datetime
from importlib.machinery import SourceFileLoader
from os.path import join
from lxml import etree
from . import utils
def bdd_tester(step_definitions_path, features, **kwargs):
default_output_path = 'output'
if kwargs.get('output_path'):
output_path = kwargs.g... | Python | 0 | @@ -382,16 +382,56 @@
put_path
+%0A filters = kwargs.get('filters', %5B%5D)
%0A%0A #
@@ -1077,16 +1077,82 @@
_kwargs)
+%0A filters = utils.load_features(filters, **test_related_kwargs)
%0A%0A #
@@ -1527,16 +1527,16 @@
etree')%0A
-
acti
@@ -1574,16 +1574,321 @@
vity')%0A%0A
+ for test_name, t... |
d8f912e96342b8fe2627576266cc3b2dbabff445 | Fix "iwgetid: not found" error message | unicornclient/spy.py | unicornclient/spy.py | import os
import socket
import subprocess
import logging
from . import config
def _read_file(file_path):
if not os.path.exists(file_path):
return None
with open(file_path, 'r') as info_file:
return info_file.read().strip()
def get_machine_id():
return _read_file('/etc/machine-id')
def ge... | Python | 0.000161 | @@ -49,16 +49,30 @@
logging
+%0Aimport shutil
%0A%0Afrom .
@@ -1334,24 +1334,84 @@
get_ssid():%0A
+ if shutil.which('iwgetid') is None:%0A return None%0A
try:%0A
|
599fb12f69134b0558ae136c1080376fe95be97f | fix slow copy for ndarrays | ndd/counts.py | ndd/counts.py | # -*- coding: utf-8 -*-
"""CountsDistribution class."""
import json
import logging
from collections.abc import Mapping, MappingView, Sequence
import numpy
import ndd.fnsb
from ndd.exceptions import NddError
logger = logging.getLogger(__name__)
def unique(nk, sort=True):
"""Return nk, zk"""
counter = ndd.fn... | Python | 0 | @@ -124,26 +124,16 @@
pingView
-, Sequence
%0A%0Aimport
@@ -762,79 +762,8 @@
())%0A
- if not isinstance(counts, Sequence):%0A counts = list(counts)%0A
|
9254712758ed33959662194dcd2ec8fae6349743 | Fix AttributeError: 'UnitTestingCurrentPackageCommand' object has no attribute 'window' (#101) | unittesting/mixin.py | unittesting/mixin.py | import os
import sys
import re
from glob import glob
from .utils import UTSetting
from .utils import OutputPanel
from .utils import JsonFile
from .utils import reload_package
from .utils import ProgressBar
import sublime
platform = sublime.platform()
def casedpath(path):
# path on Windows may not be properly c... | Python | 0.000068 | @@ -1087,21 +1087,16 @@
lders =
-self.
window.f
|
a8536438830123566ed30f04b45b42f6a54dbb37 | Factor out bot-like behavior tests | analytics.py | analytics.py | #!/usr/bin/env python
import csv
import re
import os
import time
from collections import Counter, defaultdict
import http.client
import json
ipre = re.compile('(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})')
# IP ranges to exclude that aren't caught automatically for bot-like
# behavior
ignore_prefix = [tuple(p.split('... | Python | 0.999056 | @@ -394,16 +394,413 @@
233'%5D%5D%0A%0A
+# Tests for bot-like behavior%0Adef suspicious_key(key):%0A return (key == 'robots.txt' or 'googled' in key)%0Adef suspicious_referrer(referrer):%0A return ('semalt' in referrer or 'buttons' in referrer)%0Adef suspicious_agent(agent):%0A return ('bot' in agent or 'Bot'... |
8c8faa689f0fa2abdb133e7d9b18c742f1af75ec | Change version api to accept only GET | src/api/views.py | src/api/views.py | """(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017"""
import django.http
from django.views.decorators.csrf import csrf_exempt
from rest_framework.parsers import JSONParser
from rest_framework.renderers import JSONRenderer
from api import utils
from config.settings import bas... | Python | 0 | @@ -3789,16 +3789,56 @@
ber %22%22%22%0A
+ if request.method == 'GET':%0A
@@ -3881,20 +3881,85 @@
ERSION, status=200)%0A
+ return self.generate_response(%22Bad request%22, status=400)%0A
|
6ad1664fb2e1b7eb7a54570b70e4dd53fb1cef5e | move abbreviation expansion into a function | instmatcher/__init__.py | instmatcher/__init__.py | # Copyright 2016 Matthias Gazzari
#
# 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.000005 | @@ -1311,235 +1311,56 @@
ery(
-searchString):%0A%09with open('data/abbreviations.csv') as csvfile:%0A%09%09reader = csv.DictReader(csvfile)%0A%09%09for row in reader:%0A%09%09%09searchString = re.sub(%0A%09%09%09%09r%22%5Cb(?i)%7B%7D%5Cb%22.format(row%5B'short'%5D),%0A%09%09%09%09row%5B'long'%5D,%0A%09%09%09%09searchS... |
5f0d976f2f7ad361a01fa4f9008bbbbeb298c517 | Bump version for bugfix | invocations/_version.py | invocations/_version.py | __version_info__ = (0, 4, 3)
__version__ = '.'.join(map(str, __version_info__))
| Python | 0 | @@ -23,9 +23,9 @@
4,
-3
+4
)%0A__
|
f38e3473f58221a3511ae0f24cb06b6fd01ece4b | use student.name() instead of student.user.name | app/soc/modules/gsoc/views/projects_list.py | app/soc/modules/gsoc/views/projects_list.py | #!/usr/bin/env python2.5
#
# Copyright 2011 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | Python | 0.000229 | @@ -1485,25 +1485,22 @@
student.
-user.
name
+()
)%0A li
@@ -1771,17 +1771,14 @@
tor.
-user.
name
+()
)%0A
|
f75a151b33635cad5604cb9d7f66fc043c4f972a | Fix except handler raises immediately | saleor/core/utils/json_serializer.py | saleor/core/utils/json_serializer.py | import json
from django.core.serializers.base import DeserializationError
from django.core.serializers.json import (
DjangoJSONEncoder, PythonDeserializer, Serializer as JsonSerializer)
from prices import Money
MONEY_TYPE = 'Money'
class Serializer(JsonSerializer):
def _init_options(self):
super()._... | Python | 0 | @@ -904,16 +904,38 @@
is is a
+slightly modified%0A
copy of
@@ -940,20 +940,16 @@
f Django
-%0A
impleme
@@ -997,16 +997,20 @@
hook%3E in
+%0A
json.lo
@@ -1369,17 +1369,168 @@
except
-(
+Exception as exc:%0A # ugly construction to overcome pylint's warning%0A # %22The except handler ... |
7b9033db5a8abfb5c71850e776a3f4a5db718d26 | Remove debugging statement. | trunk/certmgr/StoreHandler/__init__.py | trunk/certmgr/StoreHandler/__init__.py | """Module to handle different store types."""
__all__ = ['git', 'svn', 'web']
import abc
class StoreBase(object):
"""Abstract base class for StoreHandler 'plugins'."""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def setup(self):
"""Setup this specific store object."""
return
... | Python | 0.000003 | @@ -1343,26 +1343,9 @@
ror)
-, e:%0A raise
+:
%0A
|
2f5a08cdc317e0cd8e8e822eccea1c61fdc0430e | Add missing import | replay_buffer.py | replay_buffer.py | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import dict
from future import standard_library
standard_library.install_aliases()
from collections import deque
import random
import six.moves.cPickle as p... | Python | 0.000466 | @@ -284,16 +284,35 @@
random%0A%0A
+import numpy as np%0A
import s
|
b5050df1b8e23434a59f53c4a509e6932feb03d9 | update rules_proto digest to ea52a32 (#1245) | repositories.bzl | repositories.bzl | load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
def gapic_generator_typescript_repositories():
maybe(
http_archive,
name = "build_bazel_rules_nodejs",
sha256 = "c911b5bd8aee8b0498cc387cacdb5f917098ce477fb4182db07b0ef8a9e0... | Python | 0 | @@ -511,149 +511,149 @@
= %22
-aa72701f243b13628d052119274174640567455cf60f8de7b0973367c0676d3f%22,%0A strip_prefix = %22rules_proto-757c3a975a557f21a5edbcea780354c9ebd93159
+f0827d1bbb4abd97f5ce73baed0bd774a86c6103aff2104caf70ba3b2218ec0a%22,%0A strip_prefix = %22rules_proto-ea52a32ecd862c5317572cadecaa525... |
3a9d9f22791dfe8947d9b08ff83c80a5ed49bd95 | Fix hangs on streaming uploads with HTTPDigestAuth | requests/auth.py | requests/auth.py | # -*- coding: utf-8 -*-
"""
requests.auth
~~~~~~~~~~~~~
This module contains the authentication handlers for Requests.
"""
import os
import re
import time
import hashlib
import logging
from base64 import b64encode
from .compat import urlparse, str
from .utils import parse_dict_header
log = logging.getLogger(__nam... | Python | 0.000002 | @@ -1695,16 +1695,40 @@
hal = %7B%7D
+%0A self.pos = None
%0A%0A de
@@ -4564,24 +4564,213 @@
needed.%22%22%22%0A%0A
+ if self.pos is not None:%0A # Rewind the file position indicator of the body to where%0A # it was to resend the request.%0A r.request.body.seek(self.... |
e249e20866ca0b42dc2cb3de68f08e85fe0176e3 | Fix chinese character in story_content | wonderful_bing/wonderful_bing.py | wonderful_bing/wonderful_bing.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
wonderful_bing
~~~~~~~~~~~~~~
Wonderful_bing is a small and simple program that helps you download
pictures from Bing and set as wallpaper. My first python program :)
:copyright: (c) 2014 by lord63.
:license: MIT, see LICENSE for more details.
... | Python | 0.999996 | @@ -1180,16 +1180,29 @@
e.match(
+%0A
%22.+(?=%5C(
@@ -1228,16 +1228,32 @@
.group()
+.encode('utf-8')
%0A
|
8be5ffa9b9c69785fc01253a1a5aa2263db8d6e6 | Bump version to 14.0.0a2 | resolwe_bio/__about__.py | resolwe_bio/__about__.py | """Central place for package metadata."""
# NOTE: We use __title__ instead of simply __name__ since the latter would
# interfere with a global variable __name__ denoting object's name.
__title__ = 'resolwe-bio'
__summary__ = 'Bioinformatics pipelines for the Resolwe platform'
__url__ = 'https://github.com/genial... | Python | 0 | @@ -494,17 +494,17 @@
'14.0.0a
-1
+2
'%0A%0A__aut
|
8ab7a9bde85bdec508a1061b4b10b75c3f8323d4 | Update version number | plaid/__init__.py | plaid/__init__.py | __version__ = '0.2.1'
from client import Client, require_access_token
| Python | 0.000002 | @@ -13,16 +13,26 @@
= '0.2.1
+8.affirm.2
'%0A%0Afrom
|
1bf70da78ce5f9934ae2389cd5a0d9930bfa333c | shell=false | install.py | install.py | #!/usr/bin/env python
import argparse
import os
import subprocess
import time
# These are the dotfiles that will be symlinked
DOTS = [
'.vimrc',
'.zshrc',
'.bashrc',
'bin',
]
parser = argparse.ArgumentParser('dotfile installer')
parser.add_argument('-i', '--interactive', action='store_true',
... | Python | 0.999747 | @@ -1317,16 +1317,22 @@
.vim
-/
+', '
bundle
-/
+', '
Vund
@@ -1475,19 +1475,26 @@
all(
+%5B
'git
-
+', '
clone
-
+', '
http
@@ -1536,31 +1536,18 @@
.git
- ' +
+',
vundle
-, shell=True
+%5D
)%0A
@@ -1568,13 +1568,17 @@
all(
+%5B
'vim
-
+', '
+Plu
@@ -1591,27 +1591,19 @@
tall
-
+', '
+qall'
-, shel... |
dca5af5bb7408a861bdd2a9ed53d4bdb4d29bbe1 | fix py3.5 not being able to handle path objects in symlink command | install.py | install.py | #!/usr/bin/env python3
# coding: utf-8
from __future__ import absolute_import
import filecmp
import getopt
import subprocess
import sys
from os import symlink
from pathlib import Path
def short_help():
"""Print the help message and exits."""
print('install.py [-h] [--dry-run]')
sys.exit(2)
def long_hel... | Python | 0 | @@ -374,27 +374,41 @@
ry_run=False
+, backup=False
):%0A
-
%22%22%22Creat
@@ -711,417 +711,78 @@
-link.symlink_to(target, target_is_directory=target.is_dir())%0A%0A%0Adef replace_file(link, target, dry_run=False):%0A %22%22%22Replace file at link with a symlink to target.%0A%0A :param link: the na... |
d9214dace4a227648fff7ef0f2a2f1bc2fb7e20f | Use console alert for restart message | install.py | install.py | #!python3
import requests
import os
import sys
import console
import zipfile
import shutil
import json
_OWNER = 'zrzka'
_REPOSITORY = 'blackmamba'
_TMP_DIR = os.environ.get('TMPDIR', os.environ.get('TMP'))
_TMP_TARGET_DIR = os.path.expanduser('~/Documents/site-packages-3/.blackmamba-install')
_TARGET_DIR = os.path.e... | Python | 0 | @@ -6111,72 +6111,257 @@
%5D))%0A
+%0A
-_info('Pythonista RESTART needed for updates to take effect'
+tag_name = release%5B'tag_name'%5D%0A console.alert('Black Mamba Installer',%0A 'Black Mamba %7B%7D installed. Pythonista RESTART needed for updates to take effect.'.format(tag_name),%0A ... |
220d7640d94a78b10a4d4f35fc8bf4c50b7e5208 | update conf.py | _doc/sphinxdoc/source/conf_base.py | _doc/sphinxdoc/source/conf_base.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# documentation build configuration file, created by
# sphinx-quickstart on Fri May 10 18:35:14 2013.
#
import sys
import os
import datetime
import re
sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0])))
sys.path.insert(
0,
os.path.abs... | Python | 0.000001 | @@ -385,150 +385,8 @@
0%5D,%0A
- %22ensae_teaching_cs%22)))%0Asys.path.insert(%0A 0,%0A os.path.abspath(%0A os.path.join(%0A os.path.split(__file__)%5B0%5D,%0A
|
a36d112d201f63ff2b946fe278b146875df8b6cd | Make record_wpr more useful. | telemetry/telemetry/page/record_wpr.py | telemetry/telemetry/page/record_wpr.py | #!/usr/bin/env python
# Copyright (c) 2012 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 logging
import os
import sys
import tempfile
import time
from telemetry.core import browser_options
from telemetry.core impo... | Python | 0.000275 | @@ -246,16 +246,43 @@
t time%0A%0A
+from telemetry import test%0A
from tel
@@ -1031,17 +1031,16 @@
return
-(
page.url
@@ -1062,66 +1062,8 @@
tp')
- and%0A bool(self._CompoundActionsForPage(page)))
%0A%0A
@@ -2237,16 +2237,143 @@
rement)%0A
+ tests = discover.DiscoverClasses(base_dir, base_dir, te... |
ad4c9ddf3fbab1adda68830f5910d629179ae0e5 | Remove unnecessary line of code | tempest/lib/common/utils/data_utils.py | tempest/lib/common/utils/data_utils.py | # Copyright 2012 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | Python | 0.999988 | @@ -1506,36 +1506,37 @@
%22%22%22%0A rand
-bits
+_name
= str(random.ra
@@ -1561,33 +1561,8 @@
f))%0A
- rand_name = randbits%0A
|
85c1f5d2b6f369ef5790851e93065ea268dc9835 | fix to format_props for string variables | pyxley/react_template.py | pyxley/react_template.py | from react import jsx
from jinja2 import Template
import json
class ReactTemplate(object):
"""
"""
def __init__(self, template, template_args, path):
self.transformer = jsx.JSXTransformer()
self.template = template
self.args = template_args
self.path = path
def write_to... | Python | 0.000092 | @@ -728,337 +728,78 @@
-if isinstance(v, bool):%0A vars_.append(Template(%22var %7B%7Bk%7D%7D = %7B%7Bv%7Clower%7D%7D;%22).render(k=k,v=v))%0A elif isinstance(v, list) or isinstance(v, dict):%0A vars_.append(Template(%22var %7B%7Bk%7D%7D = %7B%7Bv%7D%7D;%22).render(k=k,v=json.dumps(v)... |
cf29064687464353c3e79508a2431fe89245d8ce | Delete src/oldmem. | util/make_release.py | util/make_release.py | #!/usr/bin/env python
# Copyright (c) 2006 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 copyrigh... | Python | 0 | @@ -4107,42 +4107,8 @@
h')%0A
-rmtree(release_dir, 'src/oldmem')%0A
rmtr
|
ca2828e3d2df5216944ebd8a4bb1d18300581014 | Update comment (#2036) | tensorflow/python/training/adadelta.py | tensorflow/python/training/adadelta.py | # Copyright 2015 Google 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.0
#
# Unless required by applicable law or a... | Python | 0 | @@ -1199,16 +1199,17 @@
1212.570
+1
.pdf))%0A
|
04ca6e47a2f1d2d60501f74018a28781469e1987 | update script | bin/task_count_redis.py | bin/task_count_redis.py | #!/usr/bin/python
import sys
import os
import time
import datetime
import redis
sys.path.insert(0, '../sparkvent')
from sparkvent.config import Config
from sparkvent.resp_parse import *
ROOT_DIR = os.path.dirname(os.path.abspath(__file__ + "/../"))
def main():
config = Config(os.path.abspath(ROOT_DIR + "/conf/c... | Python | 0.000001 | @@ -704,24 +704,68 @@
etime.now()%0A
+ print base_key, timestamp, data%0A
|
8e9d50136a836a23cc07b1398a35d64745f128a7 | add scipy.stats.norm.pdf | jax/scipy/stats/norm.py | jax/scipy/stats/norm.py | # Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | Python | 0.000224 | @@ -1236,12 +1236,109 @@
tic)), two)%0A
+%0A@_wraps(osp_stats.norm.pdf)%0Adef pdf(x, loc=0, scale=1):%0A return lax.exp(logpdf(x, loc, scale))%0A
|
9d09cf598f7340b0f03b9b769c67c841cf8b2fdf | Use luigi.cmdline in bin_test.py | test/bin_test.py | test/bin_test.py | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... | Python | 0 | @@ -601,19 +601,8 @@
%0A#%0A%0A
-import imp%0A
impo
@@ -609,16 +609,16 @@
rt mock%0A
+
import s
@@ -628,16 +628,37 @@
er_test%0A
+import luigi.cmdline%0A
from hel
@@ -852,71 +852,23 @@
uigi
-d = imp.load_source('luigid', 'bin/luigid')%0A
+.cmdline.
luigid
-.main
(%5B'-
@@ -1130,71 +1130,23 @@
uigi
-d ... |
100cdc7ecd88ee88b082d6b84b06325f49e2e23b | Fix some tests | test/grab_api.py | test/grab_api.py | # coding: utf-8
from grab import GrabMisuseError, GrabError
from grab.error import GrabTooManyRedirectsError
from grab.base import reset_request_counter
from test.util import build_grab
from test.util import BaseGrabTestCase
import six
import tempfile
import os
class GrabApiTestCase(BaseGrabTestCase):
def setUp(s... | Python | 0.021858 | @@ -4982,32 +4982,37 @@
'%5D, 0)%0A%0A def
+test_
setup_document(s
@@ -5036,12 +5036,12 @@
a =
+b
'''
-b
%0A
@@ -5156,16 +5156,21 @@
def
+test_
setup_do
@@ -5243,32 +5243,32 @@
h1%3E%0A '''%0A
-
self.ass
@@ -5308,12 +5308,127 @@
grab, data)%0A
+%0A def test_tree_attribute_if_no_... |
f07b7ca415e6067f7dd38ebf5f5490ff626893e6 | Disable cleanup on failure | lib/mrtrix3/fsl.py | lib/mrtrix3/fsl.py | # Copyright (c) 2008-2019 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Covered Software is provided under this License on an "as is"
#... | Python | 0 | @@ -1679,24 +1679,53 @@
)%0A else:%0A
+ app.DO_CLEANUP = False%0A
raise
|
40efaa1965c7b2d3a0ddc3f6827e02fb41ed873f | Revert "need to research this more" | lib/proxy/views.py | lib/proxy/views.py | import json
import logging
import urlparse
from django import http
from django.conf import settings
from django_statsd.clients import statsd
from lxml import etree
import requests
from lib.bango.client import get_client as bango_client, response_to_dict
from lib.bango.constants import HEADERS_SERVICE_GET
from lib.ba... | Python | 0 | @@ -3818,46 +3818,8 @@
ta)%0A
- user, password = False, False%0A
@@ -3854,81 +3854,8 @@
():%0A
- # I can do namespace aware lookup right? Go read up on this.%0A
@@ -3888,17 +3888,43 @@
m: '
+%7B%25s
%7D%25s' %25
-nm
+(el.nsmap.get('ns0'), nm)
%0A
@@ -3942,34 +3942,28 @@
element.... |
443f570744c6f28b028e5fc1bb77156cf2c96c2e | Add docstrings to tests | test/test_BEI.py | test/test_BEI.py | # -*- coding: utf-8 -*-
import astropy.units
import ibei
import pytest
from contextlib import nullcontext as does_not_raise
class TestBEIConstructorHappyPath():
def test_params_without_default_values(self, valid_constructor_args):
valid_constructor_args.pop("chemical_potential")
with does_not_ra... | Python | 0.000001 | @@ -165,77 +165,253 @@
-def test_params_without_default_values(self, valid_constructor_args):
+%22%22%22%0A Circumstances under which BEI instance can be instantiated%0A %22%22%22%0A def test_params_without_default_values(self, valid_constructor_args):%0A %22%22%22%0A BEI can be instantiate... |
b165598899a4315d4d1a6c675ab14ee1046c3a09 | add DST specific tests to job runner | test/test_job.py | test/test_job.py | import pytz
import unittest
from datetime import datetime, timedelta
from mani.job import Job
from mani import util
redis = util.redis_conn("redis://localhost:6379/")
jobs_ran = []
def run_job():
jobs_ran.append(1)
class TestJob(unittest.TestCase):
config = {
"timeout": 60,
"heartbeat_key": "ma... | Python | 0 | @@ -61,16 +61,50 @@
imedelta
+%0Afrom freezegun import freeze_time
%0A%0Afrom m
@@ -1314,38 +1314,2004 @@
-redis.delete(%22mani:job:test%22)%0A
+global jobs_ran%0A jobs_ran = %5B%5D%0A redis.delete(%22mani:job:test%22)%0A%0A%0Aclass TestJobWithDSTIn(TestJob):%0A%0A def test_run_dst_in(self):%0A... |
18e90bd413978f5140aa8977b032ae6db4a59105 | Refactor test/variable names to be more generally applicable. | test_dotfiles.py | test_dotfiles.py | #!/usr/bin/python
import unittest
import mock
import dotfilesinstaller
import platform
import sys
import os
import io
class DotfilesTest(unittest.TestCase):
def setUp(self):
dotfilesinstaller.init()
dotfilesinstaller.cleanUp()
@mock.patch('platform.system', mock.MagicMock(return_value='Darwin'))
def te... | Python | 0 | @@ -1842,26 +1842,24 @@
%5Cn%22)%0A%0A
-bashPrivat
+inputFil
eMock =
@@ -1912,36 +1912,21 @@
test
-WhenBashPrivateFileExistsIts
+BashInputFile
Cont
@@ -1991,34 +1991,32 @@
ection(self.
-bashPrivat
+inputFil
eMock, False
@@ -2069,18 +2069,16 @@
elf.
-bashPrivat
+inputFil
eMoc
|
bca06eb56d0e1ad51271220ec3448d681a91983a | Test fallback on libscrypt loading failures | test_fallback.py | test_fallback.py | #!/usr/bin/env python
# Copyright (c) 2014-2015, Jan Varho
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND T... | Python | 0 | @@ -894,16 +894,99 @@
'PyPy'%0A%0A
+def raises(e):%0A def raising(*arg, **kwarg):%0A raise e%0A return raising%0A%0A
def unim
@@ -990,16 +990,24 @@
nimport(
+mod=None
):%0A d
@@ -1184,16 +1184,75 @@
', None)
+%0A if mod is not None:%0A sys.modules.pop(mod, None)
%0A%0Atmp1 =
@@ -1308,16 ... |
09bc4c1f8cf0e598b495820950dab70d3b53a9e7 | set matplotlib backend to 'Agg' for testing | test_plotting.py | test_plotting.py | # Released under The MIT License (MIT)
# http://opensource.org/licenses/MIT
# Copyright (c) 2013 SCoT Development Team
import unittest
from eegtopo.topoplot import Topoplot
import numpy as np
from scot import plotting as sp
from scot.var import VARBase
import matplotlib.pyplot as plt
from matplotlib.image import Ax... | Python | 0 | @@ -130,16 +130,99 @@
ittest%0A%0A
+import matplotlib%0Amatplotlib.use('Agg') # make sure we don't access the display%0A%0A
from eeg
|
50838e2d377409c02757af5d4686957a754c641f | add travis ci | test/test.py | test/test.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# __author__ = 'kute'
# __mtime__ = '2016/12/25 17:47'
"""
"""
# from __future__ import absolute_import
import unittest
from eventor.core import Eventor
from eventor.util import EventorUtil
import os
class SimpleTest(unittest.TestCase):
def test_run_with_tasklis... | Python | 0.001532 | @@ -809,48 +809,22 @@
e =
-os.path.join(e.get_dir(relative=%22..%22), %22
+%22../resources/
data
@@ -828,17 +828,16 @@
ata.txt%22
-)
%0A%0A
|
65c3263e437995ff076543e7eedc64ac1c4b383d | Switch ftp to http | test/test.py | test/test.py | #!/usr/bin/env python
from subprocess import Popen, PIPE, check_call
from os import remove
# N.B., this MUST be run from within the source directory!
# local test
p1 = Popen(["./test/testLocal", "test/test.bw"], stdout=PIPE)
try:
p2 = Popen(["md5sum"], stdin=p1.stdout, stdout=PIPE)
except:
p2 = Popen(["md5"],... | Python | 0 | @@ -1950,17 +1950,16 @@
f nodes%0A
-#
# The UC
@@ -1993,17 +1993,16 @@
or OSX!%0A
-#
p1 = Pop
@@ -2038,17 +2038,18 @@
tigs%22, %22
-f
+ht
tp://hgd
@@ -2123,15 +2123,13 @@
PE)%0A
-#
try:%0A
-#
@@ -2185,17 +2185,16 @@
PE)%0A
-#
except:%0A
#
@@ -2189,17 +2189,16 @@
except:%0A
-#
p2 =
@@ -2243,17 ... |
26d39d089c324f3cecddfb074a5b0b743f652bce | delete too many blank lines. | test/test.py | test/test.py | """
test.py
-------
Unit testing for MarkdownPP.
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import unittest
import os
import re
from MarkdownPP import MarkdownPP
from MarkdownPP import modules as Modules
try:
from StringIO import Str... | Python | 0.000013 | @@ -369,17 +369,16 @@
ingIO%0A%0A%0A
-%0A
class Ma
|
4c6d24f2dc9bc341663d29333be2781f277401b8 | Add tests for optional/invalid escapes | test_main.py | test_main.py | #!/usr/bin/env python
import sys
from io import StringIO
from jproperties import Properties
def _test_deserialize(*data):
for s, items in data:
props = Properties()
props.load(StringIO(s))
assert list(props.items()) == items
def test_eq_separator():
_test_deserialize(
("a=b", [("a", "b")]),
("a= b", [("... | Python | 0.000001 | @@ -815,16 +815,375 @@
),%0A%09)%0A%0A%0A
+def test_dropped_escapes():%0A%09_test_deserialize(%0A%09%09(r%22a : http://example.org/?foo=bar%22, %5B(%22a%22, %22http://example.org/?foo=bar%22)%5D),%0A%09%09(r%22a = http%5C://example.org/?foo%5C=bar%22, %5B(%22a%22, %22http://example.org/?foo=bar%22)%5D),%0A%09%09(r%22%... |
38eb653b870aacc23737dff8b4cbd4ff22a5d29d | Fix incorrect model attributes | tests/app.py | tests/app.py | import sys
import getopt
from textmagic.rest import TextmagicRestClient
# 2.x-3.x-agnostic raw_input
try:
input = raw_input
except NameError:
pass
def usage():
print(
"""
Usage:
python app.py [options] [arguments]
Options:
--help (-h) Display this help message
--version (-V) Dis... | Python | 0.015399 | @@ -2450,18 +2450,17 @@
, %22first
-_n
+N
ame%22, %22l
@@ -2462,18 +2462,17 @@
%22, %22last
-_n
+N
ame%22, %22p
@@ -2707,10 +2707,9 @@
bers
-_c
+C
ount
@@ -3540,18 +3540,17 @@
er.first
-_n
+N
ame)%0A
@@ -3589,18 +3589,17 @@
ser.last
-_n
+N
ame)%0A
@@ -4377,16 +4377,16 @@
ain__%22:%0A
-
main
@@ -43... |
4d5b4c74598b6cc057f2d3c376bc253f0369d1c1 | add file transfer check | tests/run.py | tests/run.py | #!/usr/bin/env python3
import subprocess
import sys
import os
# usage: python3.5 run.py [test-set] [prefix]
prefix = ""
workdir = "../examples/"
timeout = 60
# Test syntax ([expected return value], [test status: 0-not executed yet / 1-passed / 2-failed])
# General tests
tests_general = []
tests_general... | Python | 0.000001 | @@ -774,32 +774,124 @@
bot.nplab.de'%5D)%0A
+tests_general.append(%5B1, 0, workdir + 'client_http_get -n 2 -u /files/16M bsd15.nplab.de'%5D)%0A
#tests_general.a
|
eb53eeeffb1c2d6bae44b7cd884f01ffd8cb64cd | add note regarding version of pandocfilters | textohtml.py | textohtml.py | #!/usr/bin/env python
"""
Pandoc filter to replace certain LaTeX macros with matching HTML tags.
In my beamer slides I use certain macros like `\blueArrow` which produces an
arrow in deep blue color. This filter translates this TeX macros into the
corresponding HTML markup.
Note, that the `html.css` must also be ... | Python | 0 | @@ -1793,16 +1793,56 @@
(1),%22%22%5D)
+ # works only for pandocfilters %3C 1.3.0
%0A%0Aif __n
|
008663dedf2d0f123a76a0f55e1297fb8c466346 | Remove imports | thinc/api.py | thinc/api.py | from .config import Config, registry
from .initializers import normal_init, uniform_init, glorot_uniform_init, zero_init
from .loss import CategoricalCrossentropy, L1Distance, CosineDistance
from .loss import SequenceCategoricalCrossentropy
from .model import Model, serialize_attr, deserialize_attr
from .model import s... | Python | 0.000001 | @@ -757,84 +757,8 @@
gpu%0A
-from .util import get_shuffled_batches, minibatch, evaluate_model_on_arrays%0A
from
|
cbc92423e964a8213db4be6753b5c3d9453deb63 | Make ticketbot stricter about 'r123' patterns to avoid username highlights | ticketbot.py | ticketbot.py | """
The #django-dev ticket bot.
"""
from twisted.words.protocols import irc
from twisted.internet import reactor, protocol
from twisted.python import log
import os
import sys
import re
ticket_re = re.compile(r'(?<!build)(?:^|\s)#(\d+)')
ticket_url = "https://code.djangoproject.com/ticket/%s"
changeset_re = re.compi... | Python | 0.000005 | @@ -322,22 +322,18 @@
e(r'
-(?:%5E%7C%5Cs)
+%5Cb
r(%5Cd+)
+%5Cb
')%0Ac
|
e17beeb171c5716465404984581b4e74ceccacf6 | Work around pyflakes error introduced in r624 | libravatar/urls.py | libravatar/urls.py | # Copyright (C) 2010, 2011 Francois Marier <francois@libravatar.org>
#
# This file is part of Libravatar
#
# Libravatar 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, ... | Python | 0 | @@ -862,16 +862,131 @@
ler500%0A%0A
+handler404 # make pyflakes happy, pylint: disable=W0104%0Ahandler500 # make pyflakes happy, pylint: disable=W0104%0A%0A
urlpatte
|
309b3d25330616ab9bb675f3432d4a50d80e28ba | copy « help » from README to timetable.py | timetable.py | timetable.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# License: GNU LGPL v3
"""
Get efrei timetables
Usage: timetable [-h] [-j] [-m] [-s] [-f FILE] [PERIOD]
Arguments:
PERIOD Prints timetable for a given period
Default is to print all available informations
Options:
-h, --help Print thi... | Python | 0 | @@ -269,16 +269,74 @@
rmations
+%0A See the examples below for more precisions
%0A%0AOption
@@ -772,20 +772,33 @@
print t
-oday
+he current course
%0A tim
@@ -809,9 +809,9 @@
le
-2
+n
@@ -826,41 +826,240 @@
int
-today, tomorrow and the day after
+n next courses%0A timetable today ... |
336a5af29f2b8134a7858447b2f71c589f94f218 | Remove no longer necessary pylint pragmas | bencode/encoder.py | bencode/encoder.py | """This module lets encode data according to the Bencoding specification."""
import functools
def encode(value, *, strict=False):
"""Return the encoded value or raise an error on unsupported types."""
return b''.join(iterencode(value, strict=strict))
def iterencode(value, *, strict=False): # noqa: C90... | Python | 0.000016 | @@ -474,47 +474,9 @@
ue):
- # pylint:disable=missing-docstring
%0A
+
@@ -819,45 +819,8 @@
ue):
- # pylint:disable=unused-variable
%0A
@@ -940,48 +940,8 @@
ue):
- # pylint:disable=unused-variable
%0A
@@ -1072,47 +1072,8 @@
es):
- # pylint:disable=unused-variable
%0A
@@ -1277,16... |
649ecef168b8cde25ede286805c7590a14565e40 | Update Homework_Week1_2.py | Week1-Basics-of-Python-3/Homework_Week1_2.py | Week1-Basics-of-Python-3/Homework_Week1_2.py | # -*- coding: utf-8 -*-
"""
Created on Fri Dec 09 14:12:45 2016
@author: Lama Hamadeh
"""
#The ratio of the areas of a circle and the square inscribing it is pi / 4.
#In this six-part exercise, we will find a way to approximate this value.
#-------------------------------------------------
#2a
#Using ... | Python | 0.000002 | @@ -2865,12 +2865,660 @@
%0D%0A %0D%0A
-%0D%0A
+R = 10000%0D%0Ax = %5B (rand(), rand()) for i in range(R) %5D%0D%0Ainside = %5B in_circle(p) for p in x %5D%0D%0Aprint(sum(inside) / R)%0D%0A%0D%0A#------%0D%0A'''%0D%0AR = 10000%0D%0Ax = %5B%5D%0D%0Ainside = %5B%5D%0D%0Afor i in range(R):%0D%0A point = %5Brand(), ... |
da62efae267cc31f4580e9c05c719b2abd84be5a | Version bump | bespin/__init__.py | bespin/__init__.py | VERSION="0.5.3.1"
| Python | 0.000001 | @@ -12,7 +12,7 @@
5.3.
-1
+2
%22%0A
|
03d248fead7de9ef040e5a054be5d9217d7ced11 | fix import error in bitcoind service module | coinkit/services/bitcoind.py | coinkit/services/bitcoind.py | # -*- coding: utf-8 -*-
"""
Coinkit
~~~~~
:copyright: (c) 2014 by Halfmoon Labs
:license: MIT, see LICENSE for more details.
"""
import json, requests, traceback
from ..hash import reverse_hash
from bitcoinrpc.authproxy import AuthServiceProxy
from ..constants import SATOSHIS_PER_COIN
from binascii... | Python | 0 | @@ -421,23 +421,33 @@
%0A%0Afrom .
-service
+blockchain_client
import
|
ef896dfbdf71faa9f597caacf1ba44fe64024588 | Version bump | bespin/__init__.py | bespin/__init__.py | VERSION="0.5.7.3"
| Python | 0.000001 | @@ -12,7 +12,7 @@
5.7.
-3
+4
%22%0A
|
56c8da227ff5717f05a6eb3f8db6e6ab13385ef6 | Version bump | bespin/__init__.py | bespin/__init__.py | VERSION="0.4.9.9"
| Python | 0.000001 | @@ -8,11 +8,9 @@
=%220.
-4.9.9
+5.0
%22%0A
|
11ca2db4595af871d3dd3a6e1cdde44f91b2be60 | Remove camelcasing from signup date | yolapy/resources/user.py | yolapy/resources/user.py | class UserResourceMixin(object):
"""Methods for managing User resources."""
def create_user(self, **attributes):
"""Create a user.
```
user = yola.create_user(
name='John',
surname='Smith',
email='johnsmith@example.com',
partner_id='WL_PA... | Python | 0 | @@ -452,28 +452,32 @@
%22%0A re
-turn
+sponse =
self.post(s
@@ -509,32 +509,117 @@
tributes).json()
+%0A response%5B'signup_date'%5D = response.pop('signupDate')%0A return response
%0A%0A def update
|
eb9957aa35a2442ec58d4f8a175951dc455f35df | Fix realm=None case for is_static_or_current_realm_url. | zerver/lib/subdomains.py | zerver/lib/subdomains.py | import re
import urllib
from django.conf import settings
from django.http import HttpRequest
from zerver.lib.upload import get_public_upload_root_url
from zerver.models import Realm, UserProfile
def get_subdomain(request: HttpRequest) -> str:
# The HTTP spec allows, but doesn't require, a client to omit the
... | Python | 0 | @@ -16,16 +16,44 @@
t urllib
+%0Afrom typing import Optional
%0A%0Afrom d
@@ -2039,21 +2039,31 @@
realm:
+Optional%5B
Realm
+%5D
) -%3E boo
@@ -2602,32 +2602,72 @@
itself.%0A if
+(%0A realm is not None%0A and
split_url.netloc
@@ -2680,16 +2680,24 @@
alm.host
+%0A
and f%22%7B
@@ -2... |
11381500eed6418151ba23990c0810582e625704 | fix logic in JError.custom | aiohttp_jrpc/errors.py | aiohttp_jrpc/errors.py | """ Error responses """
from aiohttp.web import Response
import json
class JResponse(Response):
""" Modified Reponse from aohttp """
def __init__(self, *, status=200, reason=None,
headers=None, jsonrpc=None):
if jsonrpc is not None:
jsonrpc.update({'jsonrpc': '2.0'})
... | Python | 0 | @@ -1986,18 +1986,19 @@
%3C code
-or
+and
-32099
|
c13396cf987c9b430fb1e63479ab194fc8fc56b4 | Fixed Python 2to3 issue reguarding zip() creates list object in Python 2 and zip object in Python 3. | aldryn_client/utils.py | aldryn_client/utils.py | import subprocess
import tarfile
import tempfile
import os
import sys
from contextlib import contextmanager
from distutils.version import StrictVersion
from math import log
import click
import requests
from tabulate import tabulate
from six.moves.urllib_parse import urljoin
def hr(char='-', width=None, **kwargs):
... | Python | 0.999501 | @@ -4186,16 +4186,21 @@
_list =
+list(
zip(%0A
@@ -4274,16 +4274,17 @@
2, 2%5D,%0A)
+)
%0A%0A%0Adef p
|
4510c56142c38e3f96c94bbd678754c49f85610e | Use TALib abstract function names value when creating transforms. | zipline/transforms/ta.py | zipline/transforms/ta.py | #
# Copyright 2013 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | Python | 0 | @@ -6857,13 +6857,22 @@
t.__
-all__
+FUNCTION_NAMES
:%0A
@@ -6912,39 +6912,8 @@
me)%0A
- if name != 'Function':%0A
|
48d9e4b3359c46116df2edd02345dc970449d351 | enable context aware commits (#126) | java-recommender/synth.py | java-recommender/synth.py | # Copyright 2018 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 in writing, s... | Python | 0 | @@ -683,16 +683,51 @@
s java%0A%0A
+AUTOSYNTH_MULTIPLE_COMMITS = True%0A%0A
service
|
fb5c6d5288b6d69d16f917976ae068e9c52a6c7d | Update to Python 2.3, getting rid of backward compatiblity crud. We don't need the _compat21 or _compat22 modules either. | Lib/email/Iterators.py | Lib/email/Iterators.py | # Copyright (C) 2001,2002 Python Software Foundation
# Author: barry@zope.com (Barry Warsaw)
"""Various types of useful iterators and generators.
"""
import sys
try:
from email._compat22 import body_line_iterator, typed_subpart_iterator
except SyntaxError:
# Python 2.1 doesn't have generators
from email.... | Python | 0 | @@ -17,13 +17,13 @@
2001
-,2002
+-2004
Pyt
@@ -60,37 +60,39 @@
or:
-barry@zope.com (Barry Warsaw)
+Barry Warsaw %3Cbarry@python.org%3E
%0A%0A%22%22
@@ -162,224 +162,1476 @@
sys%0A
-%0Atry:%0A from email._compat22 import body_line_iterator, typed_subpart_iterator%0Aexcept SyntaxError:%0A # Python 2.1 doesn'... |
b4a57231b1b3d1209d8d7accaf26b58ec4278cd1 | Enable fixed plugins again. | plugin_handler.py | plugin_handler.py | # -*- coding: utf-8 -*-
# Execute this file to see what plugins will be loaded.
# Implementation leans to Lex Toumbourou's example:
# https://lextoumbourou.com/blog/posts/dynamically-loading-modules-and-classes-in-python/
import os
import pkgutil
import sys
from typing import List
from venues.abstract_venue import ... | Python | 0 | @@ -554,129 +554,8 @@
tti%22
-,%0A %22plugin_yotalo%22,%0A %22plugin_glivelabtampere%22,%0A %22plugin_glivelabhelsinki%22
%5D%0A
|
b3bbf416707cf8c71861b0fd6e966a557acef412 | Remove `allow_empty` | rest_framework/mixins.py | rest_framework/mixins.py | """
Basic building blocks for generic class based views.
We don't bind behaviour to http method handlers yet,
which allows mixin classes to be composed in interesting ways.
"""
from __future__ import unicode_literals
from django.core.exceptions import ValidationError
from django.http import Http404
from rest_framewor... | Python | 0.003672 | @@ -2183,83 +2183,8 @@
%22%22%22%0A
- empty_error = %22Empty list and '%25(class_name)s.allow_empty' is False.%22%0A%0A
@@ -2299,679 +2299,8 @@
))%0A%0A
- # Default is to allow empty querysets. This can be altered by setting%0A # %60.allow_empty = False%60, to raise 404 errors on empty queryse... |
20f8a45c1c7369787a823012040342782b9596be | Add projection module to __init__.py | amii_tf_nn/__init__.py | amii_tf_nn/__init__.py | from .criterion import *
from .classifier import *
from .data_set import *
from .data import *
from .debug import *
from .estimator import *
from .experiment import *
from .layer import *
from .monitored_estimator import *
from .network_model import *
from .tf_extra import *
from .trainer import *
| Python | 0.000077 | @@ -280,20 +280,46 @@
m .trainer import *%0A
+from .projection import *%0A
|
67ea59230b2cf26b0e40f67ea229492d1100d8da | Add hidden form field _method automatically when rendering edit form. | respite/views.py | respite/views.py | import re
from django.shortcuts import render
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from utils import generate_form, get_content_type, get_format, parse_http_accept_header
from inflector import pluralize
class Views(object):
model = None
template_path = ''
supp... | Python | 0 | @@ -121,16 +121,64 @@
reverse
+%0Afrom django.forms import CharField, HiddenInput
%0A%0Afrom u
@@ -2741,16 +2741,247 @@
=object)
+%0A # Add _method to the forms field list, this is needed%0A # to do updating with PUT in html forms%0A form.fields%5B'_method'%5D = CharField(label=%22m... |
fd5a7d6d6993aee7a33a69d7bbded914790cfa76 | Fix delete friend key error | rest_friendship/views.py | rest_friendship/views.py |
from django.conf import settings
from django.contrib.auth import get_user_model
from django.shortcuts import get_object_or_404
from django.utils.module_loading import import_string
from rest_framework import status, viewsets
from rest_framework.decorators import action
from rest_framework.response import Response
from... | Python | 0.000001 | @@ -3836,17 +3836,21 @@
est.data
-%5B
+.get(
'usernam
@@ -3851,17 +3851,21 @@
sername'
-%5D
+, '')
)%0A%0A
|
47cba07e38391a30dda0f4692c7d539b24bc69b8 | Remove bad -- character. | networkx/utils/rcm.py | networkx/utils/rcm.py | """
Cuthill-McKee ordering of graph nodes to produce sparse matrices
"""
# Copyright (C) 2011 by
# Aric Hagberg <hagberg@lanl.gov>
# All rights reserved.
# BSD license.
from operator import itemgetter
import networkx as nx
__author__ = """\n""".join(['Aric Hagberg <aric.hagberg@gmail.com>'])
__all__ = ['cu... | Python | 0.000008 | @@ -1443,33 +1443,33 @@
. ACM, pages 157
-%E2%80%93
+-
172, 1969.%0A
@@ -2885,10 +2885,9 @@
157
-%E2%80%931
+-
72,
|
7503fd07e73734a189dacd7eecc6b2a7857efda3 | added "boxes_space" argument | neuropsydia/choice.py | neuropsydia/choice.py | # -*- coding: utf-8 -*-
from .path import *
from .core import *
from .write import *
from .core import background_color as core_background_color #avoid conflict with arg name
#==============================================================================
#============================================================... | Python | 0.998449 | @@ -1050,16 +1050,33 @@
ight=-5,
+ boxes_space=0.5,
boxes_b
@@ -1927,19 +1927,27 @@
sep =
-0.5
+boxes_space
%0A lis
|
456925084f5879f4bdc5ef89bce13044332d8fe7 | fix typo in pyformance usecase script | examples/pyformance_usecase.py | examples/pyformance_usecase.py | #!/usr/bin/env python
# Copyright (C) 2016 SignalFx, Inc. All rights reserved.
import argparse
import os
import logging
import sys
import time
sys.path.insert(0, os.path.join(
os.path.dirname(os.path.abspath(__file__)), '..'))
# import the signalfx pyformance library
import signalfx.pyformance as pyf # noqa
... | Python | 0.00001 | @@ -296,17 +296,16 @@
ormance
-
as pyf #
|
0f19c43f6cad7377f9864adba2347bb78b6e5115 | Remove unused import. | tests/unit/frameworks/vernon/track_representation_sparsity_test.py | tests/unit/frameworks/vernon/track_representation_sparsity_test.py | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2020, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | Python | 0 | @@ -994,43 +994,8 @@
est%0A
-from contextlib import nullcontext%0A
from
|
edc644869daaf788bc4785446d76a322440c5714 | Update test. | test/test_analysis.py | test/test_analysis.py | import os
import matplotlib
if 'DISPLAY' not in os.environ:
matplotlib.use('Agg')
import matplotlib.pyplot
import pandas
import unittest
import inspect
from px4tools.analysis import *
from px4tools.mapping import *
TEST_PATH = os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))
cl... | Python | 0 | @@ -7,113 +7,8 @@
os%0A
-import matplotlib%0Aif 'DISPLAY' not in os.environ:%0A matplotlib.use('Agg')%0A import matplotlib.pyplot%0A
impo
@@ -566,92 +566,8 @@
ta)%0A
- alt_analysis(data)%0A statistics(data, %5B'LPOS_VX'%5D, plot=True)%0A
@@ -610,37 +610,8 @@
ta)%0A
- pl... |
298c62ab1f9d13164629793480707e46c68a4071 | add test once | test/test_cos_auth.py | test/test_cos_auth.py | from QcloudCos import cos_auth
import unittest
class cos_auth_TestCase(unittest.TestCase):
def setUp(self):
self.multi = cos_auth.Auth(appid='200001',
SecretID='AKIDUfLUEUigQiXqm7CVSspKJnuaiIKtxqAv',
SecretKey='bLcPnl88WU30VY57ipRhSePfPdOfSruK'... | Python | 0 | @@ -563,16 +563,516 @@
1660421)
+%0A self.once = cos_auth.Auth(appid='200001',%0A SecretID='AKIDUfLUEUigQiXqm7CVSspKJnuaiIKtxqAv',%0A SecretKey='bLcPnl88WU30VY57ipRhSePfPdOfSruK',%0A bucket='newbucket',%0A ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.