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 |
|---|---|---|---|---|---|---|---|
e7c3c5f91be44d10502e5f6260d40ce89391cc14 | write only to dict if splitting possible and split on ': ' instead of just : | sauron/metrics/HttpdServerStatus.py | sauron/metrics/HttpdServerStatus.py | #! /usr/bin/env python
#
# Copyright (c) 2014 johnny-die-tulpe
#
# 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.000006 | @@ -4519,16 +4519,17 @@
split(':
+
') for l
@@ -4555,16 +4555,32 @@
tlines()
+ if ': ' in line
%5D)%0A
|
56151ad549e82206c3894e8c945c00d4bac24ab5 | Complete error message. | source/memex/rest.py | source/memex/rest.py | from rest_framework import routers, serializers, viewsets, parsers, filters
from django.core.exceptions import ValidationError
from django.core.files.uploadedfile import SimpleUploadedFile, InMemoryUploadedFile
from base.models import Project
from apps.crawl_space.models import Crawl, CrawlModel
class SlugModelSeri... | Python | 0 | @@ -3052,57 +3052,179 @@
-raise serializers.ValidationError(%22Cannot delete%22
+message = %22The Crawl Model is being used by the following Crawls and cannot be deleted: %22%0A raise serializers.ValidationError(%7Bmessage: %5Bx.name for x in crawls%5D%7D
)%0A
|
74e64f740769363b05b2987baa776ab783af8f40 | add is_published if blogpost is already published in update form | homepage/blogs/views.py | homepage/blogs/views.py | import logging
from django.views.generic import (
ListView,
DetailView,
CreateView,
UpdateView,
)
from django.contrib.syndication.views import Feed
from django.contrib.auth.mixins import LoginRequiredMixin
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404
f... | Python | 0 | @@ -3692,32 +3692,182 @@
ntry updated!%22%0A%0A
+ def get_initial(self):%0A initial = super().get_initial()%0A initial%5B'is_published'%5D = self.object.is_published%0A return initial%0A%0A
def form_val
|
25c242ed3352bcf52683454e12c3e9ae7e51622b | Check line endings for all modified files with 'binary' attr not set. | hooks.d/line_endings.py | hooks.d/line_endings.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:expandtab
#
# ==================================================================
#
# Copyright (c) 2016, Parallels IP Holdings GmbH
# Released under the terms of MIT license (see LICENSE for details)
#
# ======================================================... | Python | 0 | @@ -1911,20 +1911,22 @@
-text
+binary
_attr =
@@ -2006,20 +2006,22 @@
ath'%5D, '
-text
+binary
')%0A%0A
@@ -2036,164 +2036,33 @@
-# Attr 'text' enables eol normalization, so%0A # the file won't have crlf when the attr is set%0A if text
+if binary
_attr
-== 'unspec... |
19d81520a7fe9dd8098bd1603b455f08e465c5f7 | add getspire to init | hsadownload/__init__.py | hsadownload/__init__.py |
__all__ = ['access', 'getpacs']
from hsadownload import access, getpacs
| Python | 0 | @@ -24,16 +24,28 @@
getpacs'
+, 'getspire'
%5D%0Afrom h
@@ -77,9 +77,19 @@
getpacs
+, getspire
%0A
|
278215d3afb04e37b1e5ad3072038d359309000a | Remove humanfriendly.compat.unittest (#53) | humanfriendly/compat.py | humanfriendly/compat.py | # Human friendly input/output in Python.
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: December 10, 2020
# URL: https://humanfriendly.readthedocs.io
"""
Compatibility with Python 2 and 3.
This module exposes aliases and functions that make it easier to write Python
code that is compatible with Pytho... | Python | 0 | @@ -102,25 +102,26 @@
ge:
-Dec
+Sept
ember 1
-0
+7
, 202
-0
+1
%0A# U
@@ -1521,261 +1521,8 @@
e',%0A
- # This export remains here so as not to break my dozen or so other Python%0A # projects using 'from humanfriendly.compat import unittest' from good old%0A # times (when Python 2.6 was still a thing). It... |
0d05cc9f76b97b8c4e39c96b2126854080ce9963 | Make the config update slightly safer | ssdeploy.py | ssdeploy.py | #!/usr/bin/env python3
#SuPeRMiNoR2, 2015
#MIT License
import sys, os, requests, hashlib, json, shutil, zipfile, argparse, platform
print("Running on python version {0}".format(platform.python_version()))
major = platform.python_version_tuple()[0]
if not major == "3":
print("Only python 3.x is supported.")
sys... | Python | 0.000001 | @@ -4742,17 +4742,16 @@
tedir))%0A
-%0A
@@ -4757,31 +4757,65 @@
if
+not config
update
-mode
+dir
== %22
-overwrit
+/%22 or configupdatedir == %22changem
e%22:%0A
@@ -4833,33 +4833,32 @@
if
-not config
update
-dir
+mode
== %22
-/
+overwrite
%22:%0A
@@ -4997,32 +4997,32 @@
config files%22)%0A
... |
54b40488a7b0baefba3ada33cf9b792af1c2ca4d | fix bug with api v1 | people/api.py | people/api.py | # -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from tastypie import fields
from tastypie.resources import ModelResource, ALL, ALL_WITH_RELATIONS
from common.api import WebsiteResource
from .models import Artist, Staff, Organization
class UserResource(ModelResource):
class Meta:
querys... | Python | 0 | @@ -632,24 +632,71 @@
f, bundle):%0A
+ if hasattr(bundle.obj, 'profile'):%0A
bund
@@ -739,32 +739,36 @@
e.photo%0A
+
+
bundle.data%5B'bir
@@ -807,16 +807,20 @@
rthdate%0A
+
@@ -877,32 +877,36 @@
thplace%0A
+
bundle.data%5B'cur
@@ -939,32 +939,36 @@
.cursu... |
94716665743e80f789644938769abdfb09654d0f | use itervalues | salt/states/ansiblegate.py | salt/states/ansiblegate.py | # -*- coding: utf-8 -*-
#
# Author: Bo Maryniuk <bo@suse.de>
#
# Copyright 2017 SUSE 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
#
# Unles... | Python | 0.000003 | @@ -5192,27 +5192,24 @@
hanged'%5D for
- _,
check in si
@@ -5206,36 +5206,37 @@
heck in six.iter
-item
+value
s(checks%5B'stats'
@@ -5808,11 +5808,8 @@
for
- _,
che
@@ -5822,20 +5822,21 @@
six.iter
-item
+value
s(checks
|
59b2d0418c787066c37904816925dad15b0b45cf | Use author display name in document list_filter | scanblog/scanning/admin.py | scanblog/scanning/admin.py | from django.contrib import admin
from scanning.models import PendingScan, Document, DocumentPage, Scan, ScanPage, Transcription
class ScanPageInline(admin.TabularInline):
model = ScanPage
class ScanAdmin(admin.ModelAdmin):
model = Scan
inlines = [ScanPageInline]
admin.site.register(Scan, ScanAdmin)
class... | Python | 0.000001 | @@ -828,18 +828,55 @@
'author
-',
+__profile__managed',%0A
'author
@@ -886,23 +886,28 @@
rofile__
-managed
+display_name
'%5D%0Aadmin
|
3bc11eea2d629b316eb9a8bdf4d9c2a2c801ddf5 | Remove unused imports | whylog/tests/tests_front/tests_whylog_factory.py | whylog/tests/tests_front/tests_whylog_factory.py | from whylog.config.investigation_plan import LineSource
from whylog.front.whylog_factory import whylog_factory
from whylog.front.utils import FrontInput
from whylog.log_reader import LogReader
from whylog.teacher import Teacher
from whylog.tests.utils import TestRemovingSettings
class TestWhylogFactory(TestRemovingSe... | Python | 0.000001 | @@ -150,83 +150,8 @@
put%0A
-from whylog.log_reader import LogReader%0Afrom whylog.teacher import Teacher%0A
from
|
e098c13a4c94abe00aa6c8ce2ea67900ea14f239 | revert array license author info | mne/io/array/array.py | mne/io/array/array.py |
"""Tools for creating MNE objects from numpy arrays"""
# Authors: Eric Larson <larson.eric.d@gmail.com>
# Denis Engemann <denis.engemann@gmail.com>
#
# License: BSD (3-clause)
import numpy as np
from ...constants import FIFF
from ..meas_info import Info
from ..base import _BaseRaw
from ...utils import verb... | Python | 0 | @@ -20,11 +20,11 @@
ing
-MNE
+Raw
obj
@@ -103,61 +103,8 @@
om%3E%0A
-# Denis Engemann %3Cdenis.engemann@gmail.com%3E%0A
#%0A#
|
67fd00b47278dbc1bb8958cbe00f9aa0f29910b8 | Fix test after solr_token_to_entity -> plural | src/adhocracy/tests/lib/test_pager.py | src/adhocracy/tests/lib/test_pager.py | from unittest import TestCase
class TestVisiblePages(TestCase):
'''
Test the functionality of :func:`adhocracy.lib.pager.visible_pages`
'''
def test_few_pages(self):
from adhocracy.lib.pager import visible_pages
visible, seperators = visible_pages(1, 3)
self.assertEqual(visib... | Python | 0.000004 | @@ -3714,32 +3714,33 @@
mport solr_token
+s
_to_entity%0A
@@ -3724,33 +3724,35 @@
_tokens_to_entit
-y
+ies
%0A badge =
@@ -3884,32 +3884,33 @@
Equal(solr_token
+s
_to_entity(token
@@ -3894,39 +3894,43 @@
_tokens_to_entit
-y(
+ies(%5B
token
+%5D
, CategoryBadge)
@@ -3931,21 +3931,23 @@
Badge),
+%5... |
b875084e74ee03c6b251a79f04f0db340bb356b8 | Fix #604 | scout/constants/indexes.py | scout/constants/indexes.py | from pymongo import (IndexModel, ASCENDING, DESCENDING)
INDEXES = {
'hgnc_collection': [IndexModel(
[('build', ASCENDING), ('chromosome', ASCENDING)], name="build_chromosome"),
],
'variant_collection': [
IndexModel([('case_id', ASCENDING),('rank_score', DESCENDING)], name="caseid_rankscore"... | Python | 0.000001 | @@ -86,16 +86,25 @@
tion': %5B
+%0A
IndexMod
@@ -106,25 +106,29 @@
exModel(
-%0A
+%5B%0A
%5B('build
@@ -119,17 +119,17 @@
-%5B
+
('build'
@@ -142,16 +142,29 @@
NDING),
+%0A
('chromo
@@ -179,24 +179,37 @@
SCENDING)%5D,
+%0A
name=%22build_
@@ -269,32 +269... |
87371774ad332a3adbe927e2609d73710f4a7678 | change method name | tests/graph/test_dag.py | tests/graph/test_dag.py | from pybbn.graph.edge import Edge, EdgeType
from pybbn.graph.node import Node
from pybbn.graph.dag import Dag
from nose import with_setup
def setup():
pass
def teardown():
pass
@with_setup(setup, teardown)
def test_graph_creation():
n0 = Node(0)
n1 = Node(1)
n2 = Node(2)
e0 = Edge(n0, n1, ... | Python | 0.000021 | @@ -222,21 +222,19 @@
ef test_
-graph
+dag
_creatio
|
a3dea467c373e9f4a8a5dcf61693696d98a51800 | Add a default timeout of 90 (#1912) | iap/make_iap_request.py | iap/make_iap_request.py | # Copyright 2016 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 ... | Python | 0 | @@ -1652,16 +1652,87 @@
s/api.py
+%0A If no timeout is provided, it is set to 90 by default.
%0A%0A Re
@@ -1825,16 +1825,130 @@
%22%22%22%0A
+ # Set the default timeout, if missing%0A if 'timeout' not in kwargs:%0A kwargs%5B'timeout'%5D = 90%0A %0A
# Fi
|
40972c542e7018f925167fa79ccbc2c7b241b1b3 | revert unneded change on testBuildWarningTokens | tests/lib/srxlo_test.py | tests/lib/srxlo_test.py | # Copyright 2014 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 | @@ -5501,17 +5501,17 @@
OD_TERM_
-3
+1
, self.n
|
99784ea1c0f24787ff9c4e6ffc1cf6c5b5e0e04c | Add binding_required to Campo | importasol/db/fields.py | importasol/db/fields.py | import types
from decimal import Decimal
from datetime import date
from ..exceptions import ValidationError, ProgrammingError
class Campo(object):
field_name = None
size = None
required = None
base_type = None
default = None
def __init__(self, nombre, size, default=None, required=False):
... | Python | 0 | @@ -235,24 +235,123 @@
fault = None
+%0A binding_required = None # indica si get_valor y from_valor requieren estar vinculado a entorno
%0A%0A def __
@@ -391,16 +391,40 @@
t=None,
+required=False, binding_
required
@@ -549,16 +549,65 @@
default
+%0A self.binding_required = binding_required
%0A%0A ... |
2cb3f20bfd6482b0418ee75556417b7229d765aa | Fix scene editor referencing graphics indefinitely | src/opencmiss/neon/ui/editors/sceneeditorwidget.py | src/opencmiss/neon/ui/editors/sceneeditorwidget.py | '''
Copyright 2015 University of Auckland
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 agre... | Python | 0 | @@ -1405,24 +1405,59 @@
torWidget()%0A
+ self._graphicsItems = None%0A
self
@@ -3699,32 +3699,165 @@
ene%0A '''%0A
+ if self._graphicsItems is not None:%0A self._graphicsItems.clear() # Must clear or holds on to graphics references%0A
self._gr
|
0230de965fbc4247bf1f087f8454d09f30a6b0f3 | Fix naming convention of array references | angr/engines/soot/expressions/newArray.py | angr/engines/soot/expressions/newArray.py |
from .base import SimSootExpr
from ..values import SimSootValue_ArrayRef
import logging
l = logging.getLogger('angr.engines.soot.expressions.newarray')
class SimSootExpr_NewArray(SimSootExpr):
def __init__(self, expr, state):
super(SimSootExpr_NewArray, self).__init__(expr, state)
def _execute(self... | Python | 0.000289 | @@ -897,16 +897,28 @@
_id = %22%7B
+uuid%7D.%7Bbase_
type%7D_ar
@@ -924,15 +924,8 @@
rray
-_%7Buuid%7D
%22.fo
@@ -929,16 +929,21 @@
.format(
+base_
type=bas
@@ -950,16 +950,21 @@
e_type,%0A
+
|
063acbeb5c95bf8e02aff7cf7f238606d814567a | change billet | totvserprm/financial.py | totvserprm/financial.py | # -*- coding: utf-8 -*-
from datetime import datetime
from baseapi import BaseApi
class Client(BaseApi):
dataservername = 'FinCFODataBR'
def create(self,**kwargs):
return super(Client, self).create({
'NewDataSet': {
'FCFO': {
'ATIVO': kwargs.get('ativo')... | Python | 0.000001 | @@ -75,16 +75,28 @@
BaseApi%0A
+import uuid%0A
%0A%0Aclass
@@ -1752,34 +1752,30 @@
'
-NewDataSet
+FinLAN
': %7B%0A
@@ -1888,37 +1888,11 @@
N':
-kwargs.get('id_lancamento'),
+-1,
%0A
@@ -1923,26 +1923,41 @@
DOCUMENTO':
--1
+str(uuid.uuid4())
,%0A
@@ -2395,33 +2395,9 @@
O':
-k... |
e4e10ee0ae5a18cfec0e15b7b85986b7f4fc4f9d | Fix prefetched fields in Institutions in API | feder/institutions/viewsets.py | feder/institutions/viewsets.py | import django_filters
from rest_framework import filters, viewsets
from teryt_tree.rest_framework_ext.viewsets import custom_area_filter
from .models import Institution, Tag
from .serializers import InstitutionSerializer, TagSerializer
class InstitutionFilter(filters.FilterSet):
jst = django_filters.CharFilter(m... | Python | 0.000007 | @@ -762,16 +762,26 @@
d('tags'
+,'parents'
).%0A
|
9bdaf963843a9f0b44487ea3b258b50b328153d8 | Remove redis connection logic from each view, make it global, keep it threadsafe | firetower/web/firetower_web.py | firetower/web/firetower_web.py | from calendar import timegm
import datetime
import time
from flask import Flask, render_template
from firetower import redis_util
REDIS_HOST = "localhost"
REDIS_PORT = 6379
app = Flask(__name__)
def timestamp(dttm):
return timegm(dttm.utctimetuple())
@app.route("/")
def root():
lines = []
redis ... | Python | 0 | @@ -170,16 +170,65 @@
T = 6379
+%0AREDIS = redis_util.Redis(REDIS_HOST, REDIS_PORT)
%0A%0Aapp =
@@ -356,61 +356,8 @@
%5B%5D%0A
- redis = redis_util.Redis(REDIS_HOST, REDIS_PORT)%0A
@@ -365,29 +365,29 @@
ategories =
-redis
+REDIS
.get_categor
@@ -550,61 +550,8 @@
():%0A
- redis = redis_util.Redis(RE... |
447a8bd2ba1dc448d19ca1cafa27f917b4aae18e | version dev | toughradius/__init__.py | toughradius/__init__.py | #!/usr/bin/env python
__version__ = '1.1.2'
__license__ = 'AGPL'
__auther__ = 'support@toughstruct.com'
| Python | 0.000001 | @@ -39,9 +39,12 @@
1.1.
-2
+3dev
'%0A__
|
2b45ccfa122e9b197de1ff8a30d4b6bf9e0abe52 | Save figure as results/analyze_graphs.png and rotate z-axis label | scripts/analyze_results.py | scripts/analyze_results.py | """Tools for viewing and analyzing prediction results
.. moduleauthor:: Jan Van Bruggen <jancvanbruggen@gmail.com>
.. moduleauthor:: Quinn Osha <qosha@caltech.edu>
"""
from fnmatch import fnmatch
from matplotlib import cm
from matplotlib.ticker import MaxNLocator
import matplotlib.pyplot as plt
from mpl_toolkits.mplot... | Python | 0 | @@ -257,16 +257,33 @@
NLocator
+, MultipleLocator
%0Aimport
@@ -3501,16 +3501,17 @@
el('RMSE
+
')%0A%0A
@@ -4345,16 +4345,79 @@
sition)%0A
+ plt.savefig(join(RESULTS_DIR_PATH, 'analyze_results.png'))%0A
plt.
|
1c48f9ad2c2a66d7c15c9216665b7f802d3498b4 | Set deprecation_summary_result so we can summarize deprecations and they get written to the report plist if specified. | SharedProcessors/DeprecationWarning.py | SharedProcessors/DeprecationWarning.py | #!/usr/bin/python
#
# Copyright 2019 Greg Neagle
#
# 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 ag... | Python | 0 | @@ -701,16 +701,27 @@
pe.%22%22%22%0A%0A
+import os%0A%0A
from aut
@@ -1078,24 +1078,139 @@
riables = %7B%0A
+ %22deprecation_summary_result%22: %7B%0A %22description%22: %22Description of interesting results.%22%0A %7D%0A
%7D%0A de
@@ -1450,26 +1450,483 @@
sage
-, verbose_level=0)
... |
1e139567767a98914df90ec152d543bb8bfde38c | add test | basic_zappa_project/public/views_tests.py | basic_zappa_project/public/views_tests.py | from basic_zappa_project.test_utils import BaseTestCase
class TestViews(BaseTestCase):
def test_status(self):
expected = {'status': 'ok'}
response = self.client.get('/status')
self.assert200(response)
self.assertEqual(response.json, expected)
def test_about(self):
res... | Python | 0.000002 | @@ -463,28 +463,144 @@
self.assert200(response)%0A
+%0A def test_register_get(self):%0A response = self.client.get('/register')%0A self.assert200(response)%0A%0A
|
a82fc92938a647de620cf8a96fd5907c08060c32 | fix mistake | scripts/install/install.py | scripts/install/install.py | import os
import subprocess
import os.path
def apt_get_install(what):
with open(fname, 'r') as f:
items = f.readlines()
for item in items:
os.system('sudo apt-get install -y %s' % (item))
def npm_global_install(what):
with open(fname, 'r') as f:
items = f.readlines()
for item i... | Python | 0.999908 | @@ -49,36 +49,37 @@
apt_get_install(
-what
+fname
):%0A with open
@@ -223,36 +223,37 @@
_global_install(
-what
+fname
):%0A with open
@@ -398,12 +398,13 @@
all(
-what
+fname
):%0A
|
5179172b4a6d61ea60fec9cd7624725031017482 | Make use of the sqlite3 package | dump.py | dump.py | #!/usr/bin/env python
import glob, os, subprocess, sys
sys.path.append(os.path.abspath("csv2sqlite"))
import csv2sqlite
setup_sql = {
"job_events": """
DROP TABLE IF EXISTS `job_events`;
CREATE TABLE `job_events` (
`time` INTEGER NOT NULL,
`missing info` INTEGER,
... | Python | 0.000001 | @@ -34,25 +34,22 @@
b, os, s
-ubprocess
+qlite3
, sys%0A%0As
@@ -2201,73 +2201,94 @@
-if not table in setup_sql: fail('the table is unknown'
+connection = sqlite3.connect(filename)%0A cursor = connection.cursor(
)%0A
+for
sql
-=
+in
set
@@ -2304,188 +2304,94 @@
ble%5D
-%0A p = subprocess.Popen(... |
72169058552ffd783c2ab309e5a77ff817928186 | make sub dirs for fastq_screen | ehive/runnable/process/RunFastqscreen.py | ehive/runnable/process/RunFastqscreen.py | import os, subprocess,fnmatch
from shutil import copytree
from ehive.runnable.IGFBaseProcess import IGFBaseProcess
from igf_data.utils.fileutils import get_temp_dir,remove_dir
class RunFastqscreen(IGFBaseProcess):
def param_defaults(self):
params_dict=super(IGFBaseProcess,self).param_defaults()
params_dict.u... | Python | 0 | @@ -2450,36 +2450,39 @@
r):%0A os.m
-k
+ake
dir
+s
(fastqscreen_res
@@ -2484,39 +2484,36 @@
n_result_dir
-)
+,mode=0o775)
|
7f22812917846dbc420eee8c80cf3a4ee7d2fc1c | fix typo in tag (#618) | scripts/publish_release.py | scripts/publish_release.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Insert a TOML header into the latest release note."""
from __future__ import absolute_import, print_function
import sys
from datetime import date
from glob import glob
from builtins import open
from os.path import join, basename
from shutil import copy
def insert_br... | Python | 0.000048 | @@ -363,22 +363,20 @@
t a %3C!--
-
more
-
--%3E tag
@@ -1144,14 +1144,12 @@
%3C!--
-
more
-
--%3E%5C
|
19c0e8d856049677bc7de2bc293a87a0aac306f8 | Fix wsgi config file access for HTTPD | httpd/keystone.py | httpd/keystone.py | import os
from paste import deploy
from keystone import config
from keystone.common import logging
LOG = logging.getLogger(__name__)
CONF = config.CONF
config_files = ['/etc/keystone.conf']
CONF(config_files=config_files)
conf = CONF.config_file[0]
name = os.path.basename(__file__)
if CONF.debug:
CONF.log_opt_... | Python | 0.000001 | @@ -178,16 +178,25 @@
keystone
+/keystone
.conf'%5D%0A
@@ -200,16 +200,45 @@
'%5D%0ACONF(
+project='keystone', default_
config_f
|
c26c944b349aaaedae2e848946b00b4b2f5f3e13 | Fix bug in Podoc | podoc/core.py | podoc/core.py | # -*- coding: utf-8 -*-
"""Core functionality."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import logging
import os.path as op
from .plugin import get_plugin
logger = logging.getLogger(... | Python | 0 | @@ -1018,25 +1018,20 @@
pener =
-open_text
+None
%0A pre
@@ -1141,25 +1141,20 @@
saver =
-save_text
+None
%0A%0A de
@@ -1171,16 +1171,150 @@
(self):%0A
+ if self.opener is None:%0A self.opener = open_text%0A if self.saver is None:%0A self.saver = save_text%0A
|
6a1aa8e6b640e0c6504cdbb9635f88ec9929cd7d | Update to latest config format. | CheckSTARTTLS.py | CheckSTARTTLS.py | #!/usr/bin/python
import sys
import os
import errno
import smtplib
import socket
import subprocess
import re
import json
import dns.resolver
from M2Crypto import X509
from publicsuffix import PublicSuffixList
public_suffix_list = PublicSuffixList()
def mkdirp(path):
try:
os.makedirs(path)
except OSEr... | Python | 0 | @@ -113,16 +113,35 @@
ort json
+%0Aimport collections
%0A%0Aimport
@@ -5288,71 +5288,38 @@
g =
-%7B%0A %22address-domains%22: %7B%0A %7D,%0A %22mx-domains%22: %7B%0A %7D%0A %7D
+collections.defaultdict(dict)%0A
%0A f
@@ -5648,21 +5648,20 @@
g%5B%22a
-ddress-domain
+cceptable-mx
s%22%5D%5B
@@ -5738,... |
b7e3901411059bbfa8ab83ec1f6fbf135aa50172 | Update UserTime.py | Cogs/UserTime.py | Cogs/UserTime.py | import datetime
import pytz
from Cogs import FuzzySearch
def setup(bot):
# This module isn't actually a cog
return
def getUserTime(member, settings, time = None, strft = "%Y-%m-%d %I:%M %p"):
# Returns a dict representing the time from the passed member's perspective
offset = settings.getGlobalUser... | Python | 0.000001 | @@ -121,24 +121,444 @@
return%0D%0A%0D%0A
+def getClockForTime(time_string):%0D%0A%09# Assumes a HH:MM PP format%0D%0A%09try:%0D%0A%09%09time = time_string.split()%0D%0A%09%09time = time%5B0%5D.split(%22:%22)%0D%0A%09%09hour = int(time%5B0%5D)%0D%0A%09%09minute = int(time%5B1%5D)%0D%0A%09except:%0D%0A%09%09return %2... |
878d690cad9bac7009deab554fe070c1dfc3a1d8 | Update UserTime.py | Cogs/UserTime.py | Cogs/UserTime.py | import datetime
import pytz
from Cogs import FuzzySearch
def setup(bot):
# This module isn't actually a cog
return
def getClockForTime(time_string):
# Assumes a HH:MM PP format
print("Clock called: " + time_string)
try:
time = time_string.split(" ")
if len(time) == 2:
time = time[0].spl... | Python | 0.000001 | @@ -240,19 +240,16 @@
ry:%0D%0A%09%09t
-ime
= time_
@@ -273,27 +273,24 @@
%0D%0A%09%09if len(t
-ime
) == 2:%0D%0A%09%09%09
@@ -290,26 +290,20 @@
2:%0D%0A%09%09%09t
-ime
= t
-ime
%5B0%5D.spli
@@ -322,19 +322,16 @@
if len(t
-ime
) == 3:%0D
@@ -339,18 +339,12 @@
%09%09%09t
-ime
= t
-ime
%5B1%5D.
@@ -401,19 ... |
8eea594e684053a7fbfe1f2f946343cf809be058 | Rename server tests | treecat/serving_test.py | treecat/serving_test.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import itertools
import numpy as np
import pytest
from treecat.serving import TreeCatServer
from treecat.testutil import TINY_CONFIG
from treecat.testutil import TINY_DATA
from treecat.testutil import TINY_MA... | Python | 0.000001 | @@ -619,16 +619,22 @@
r_sample
+_shape
(model):
@@ -626,32 +626,32 @@
e_shape(model):%0A
-
N, V = TINY_
@@ -1138,16 +1138,22 @@
_logprob
+_shape
(model):
@@ -1669,21 +1669,29 @@
logprob_
-total
+is_normalized
(model):
@@ -1756,16 +1756,16 @@
ories'%5D%0A
-
serv
@@ -1826,24 +1826,87 @@
TINY_CONFIG)
+%... |
1ba8cadf93e80107902e142c4644d03668592c5f | add global and directive specific compat options | cautodoc.py | cautodoc.py | # coding=utf-8
"""Hawkmoth - Sphinx C Domain autodoc directive extension"""
__author__ = "Jani Nikula <jani@nikula.org>"
__copyright__ = "Copyright (c) 2016-2017, Jani Nikula <jani@nikula.org>"
__version__ = '0.1'
__license__ = "BSD 2-Clause, see LICENSE for details"
import glob
import os
import re
import stat
impor... | Python | 0 | @@ -1102,84 +1102,8 @@
= %7B%0A
- # FIXME: figure out passing to parser, have a global default option%0A
@@ -1136,16 +1136,25 @@
nchanged
+_required
,%0A %7D%0A
@@ -1216,16 +1216,24 @@
filename
+, compat
):%0A
@@ -1252,32 +1252,47 @@
= parse(filename
+, compat=compat
)%0A%0A for (
@@ ... |
fa21acc470d9c32619b3c67dcce54c7b0a69a07a | Fix inadvertent requirement of hg, svn, git, etc. | lib/spack/spack/test/__init__.py | lib/spack/spack/test/__init__.py | ##############################################################################
# Copyright (c) 2013, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
... | Python | 0.000001 | @@ -1327,36 +1327,8 @@
ck%0A%0A
-import spack.test.install%0A%0A%0A
%22%22%22N
|
671ca30892e3ebeb0a9140f95690853b4b92dc02 | Fix reverse since we deprecated post_object_list | post/views.py | post/views.py | from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from post.models import Post
from jmbo.generic.views import GenericObjectDetail, GenericObjectList
from jmbo.view_modifiers import DefaultViewModifier
class ObjectList(GenericObjectList):
def get_extra_context(self, *... | Python | 0.000014 | @@ -1025,13 +1025,8 @@
se(%22
-post_
obje
@@ -1033,16 +1033,39 @@
ct_list%22
+, args=%5B'post', 'post'%5D
),%0A
|
a03c61430abac8cac5e522a3bf391175cd261cec | fix tests | gammafit/tests/test_onezone.py | gammafit/tests/test_onezone.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from astropy import units as u
import numpy as np
from numpy.testing import assert_approx_equal
electronozmpars={
'seedspec':'CMB',
'index':2.0,
'cutoff':1e13,
'beta':1.0,
'ngamd':100,
'gmin':1e4,
'g... | Python | 0.000001 | @@ -744,16 +744,17 @@
21327)%0A%0A
+#
def test
@@ -772,32 +772,33 @@
m_evolve():%0A
+#
from ..onezone i
@@ -812,32 +812,33 @@
lectronOZM%0A%0A
+#
ozm = ElectronOZ
@@ -901,32 +901,33 @@
ronozmpars)%0A
+#
ozm.calc_outspec
@@ -926,32 +926,33 @@
_outspec()%0A%0A
+#
lsy=np.trapz(ozm
@@ -1004,32 +10... |
a5878b1f1ff016a2337557a7d55502b9046a2894 | add russia url | scripts/import/prepare_countries.py | scripts/import/prepare_countries.py | # This script generates Makefile that can be used to import countries
# into libosmscout and generate geocoder-nlp database
import pycountry, os
postal_countries_file = "../postal/countries_languages.txt"
postal_countries = []
for i in open(postal_countries_file, "r"): postal_countries.append(i.split(":")[0])
# prin... | Python | 0.000025 | @@ -529,16 +529,101 @@
RU%22,%0A%7D%0A%0A
+SpecialURL = %7B%0A %22russia%22: %22http://download.geofabrik.de/russia-latest.osm.pbf%22%0A%7D%0A%0A
Countrie
@@ -2565,32 +2565,89 @@
nent, country):%0A
+ if country in SpecialURL: return SpecialURL%5Bcountry%5D%0A
return %22http
|
424be3c0fda49c1111410d6eff719a36219640b6 | Replace --include-sequence with --include_sequence for consistency. | genbank/convert_gff3_to_gbk.py | genbank/convert_gff3_to_gbk.py | #!/usr/bin/env python3
"""
Converts GFF3 representing gene models to Genbank flat-file format.
GFF3 specification:
http://www.sequenceontology.org/gff3.shtml
Genbank flat file specification:
https://www.ncbi.nlm.nih.gov/Sitemap/samplerecord.html
--molecule_type:
http://www.ncbi.nlm.nih.gov/Sequin/sequin.hlp.htm... | Python | 0.000276 | @@ -2673,17 +2673,17 @@
-include
--
+_
sequence
|
3eeeb844b3936063f4f0192d46577e3f9397c107 | Fix ordering in cursor test | search/tests/test_query.py | search/tests/test_query.py | import datetime
import unittest
from google.appengine.api import search as search_api
from ..indexes import DocumentModel, Index
from ..fields import TZDateTimeField, TextField
from ..query import SearchQuery
from ..ql import Q
from .. import timezone
from .base import AppengineTestCase
class FakeDocument(Document... | Python | 0.000002 | @@ -1903,16 +1903,32 @@
cursor()
+.order_by('foo')
%5B:1%5D%0A
@@ -2039,16 +2039,32 @@
_cursor)
+.order_by('foo')
%0A
|
74e4e5e507d908950d4458dff5ba4aa5c712866f | Allow localization of "Self Informations" | searx/plugins/self_info.py | searx/plugins/self_info.py | '''
searx is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
searx is distributed in the hope that it will be useful,
but WITHOUT ANY WA... | Python | 0 | @@ -710,17 +710,25 @@
%0Aname =
-%22
+gettext('
Self Inf
@@ -736,17 +736,18 @@
rmations
-%22
+')
%0Adescrip
|
93bdcc16101852c6390fba1eff879d13fcdc063e | Remove leftover comparison functions | primitives.py | primitives.py | import numbers
import errors
import lang
import tokens
import util
# used to get generate guaranteed-unique symbol names
GENSYM_COUNTER = util.ThreadSafeCounter()
def add(a, b, *rest):
'''Adds the all the given numbers together.'''
util.ensure_type(numbers.Number, a, b)
# add all the arguments together... | Python | 0.000001 | @@ -3372,422 +3372,8 @@
b)%0A%0A
-def gte(a, b):%0A '''Compare two numbers using '%3E='.'''%0A util.ensure_type(numbers.Number, a, b)%0A return lang.Boolean.build(a %3E= b)%0A%0Adef lt(a, b):%0A '''Compare two numbers using '%3C'.'''%0A util.ensure_type(numbers.Number, a, b)%0A return lang.Boolean.bu... |
98dcb50560266fdc3b475f7e0d48627e7cf9abc0 | simplify provider decorator | allib/di.py | allib/di.py | import functools
import inspect
import typing
def provider(func=None, *, singleton=False):
"""
Decorator to mark a function as a provider.
Args:
singleton (bool): The returned value should be a singleton or shared
instance. If False (the default) the provider function will be
invoked again for every time ... | Python | 0.000003 | @@ -41,16 +41,233 @@
yping%0A%0A%0A
+def _wrap_provider_func(func, di_props):%0A%09hints = typing.get_type_hints(func)%0A%09di_props%5B'provides'%5D = hints%5B'return'%5D%0A%0A%09if not hasattr(func, '__di__'):%0A%09%09func.__di__ = %7B%7D%0A%09func.__di__.update(di_props)%0A%0A%09return func%0A%0A%0A
def prov
@@ -64... |
34b2c332b8d1209985b37f4e440954a15d4004d3 | create directly tar.gz into final directory | datadownloader/views.py | datadownloader/views.py | import os
import tarfile
import subprocess
from datetime import datetime
from sendfile import sendfile
from django.views.generic import View, TemplateView
from django.conf import settings
from django.shortcuts import redirect
def get_base_path():
if hasattr(settings, 'DATA_DOWNLOADER_PATH'):
base_path = s... | Python | 0 | @@ -2033,24 +2033,20 @@
le.open(
-tar_name
+path
, %22w:gz%22
@@ -2118,38 +2118,8 @@
er)%0A
- os.rename(tar_name, path)%0A
%0A%0Ade
|
79ffd869214e5232d907e46c077faf653a33c114 | add serialize to LogReport | chainer/training/extensions/log_report.py | chainer/training/extensions/log_report.py | import json
import os
import shutil
import tempfile
import six
from chainer import reporter
from chainer import serializer as serializer_module
from chainer.training import extension
from chainer.training import trigger as trigger_module
class LogReport(extension.Extension):
"""Trainer extension to output the ... | Python | 0.000001 | @@ -4557,16 +4557,125 @@
ger'%5D)%0A%0A
+ if hasattr(self._summary, 'serialize'):%0A self._summary.serialize(serializer%5B'_summary'%5D)%0A%0A
|
634305c2366991badc0c54a797e4294b86166879 | make fname_rules address family dependent | ifupdown-multi.py | ifupdown-multi.py | #!/usr/bin/env python
# Copyright (c) 2013 by Farsight Security, 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... | Python | 0.0002 | @@ -1113,16 +1113,28 @@
)s.rules
+.%25(ADDRFAM)s
'%0A%0Aglob_
|
7477f969cd8efd624e7f378f7838270c53c2755e | Allow make_reverb_dataset's caller to set max_in_flight_samples_per_worker. Default behavior is unchanged. | acme/datasets/reverb.py | acme/datasets/reverb.py | # python3
# Copyright 2018 DeepMind Technologies Limited. 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 re... | Python | 0.000012 | @@ -1068,16 +1068,76 @@
t = 12,%0A
+ max_in_flight_samples_per_worker: Optional%5Bint%5D = None,%0A
# De
@@ -2225,16 +2225,19 @@
et().%0A
+if
max_in_f
@@ -2265,13 +2265,19 @@
ker
-= 2 *
+is None and
bat
@@ -2289,29 +2289,161 @@
ze i
-f batch_size else 100
+s None:%0A max_in_flight_samples_per_work... |
532935a92c576f4737dd1631c38e0ac32dd1f984 | Remove hash comments from blacklist --autopull | blacklists.py | blacklists.py | from typing import Union
import regex
from globalvars import GlobalVars
from helpers import log
def load_blacklists():
GlobalVars.bad_keywords = Blacklist(Blacklist.KEYWORDS).parse()
GlobalVars.blacklisted_websites = Blacklist(Blacklist.WEBSITES).parse()
GlobalVars.blacklisted_usernames = Blacklist(Black... | Python | 0 | @@ -874,16 +874,35 @@
p()) %3E 0
+ and line%5B0%5D != '#'
%5D%0A%0A d
|
24b3a085471d0ccf048d23ee4f2cef1d5cdf97ec | Fix error message for unexpected operand | tt/expressions/bexpr.py | tt/expressions/bexpr.py | """Tools for interacting with Boolean expressions."""
import re
from ..operators import (CONSTANT_VALUES, DELIMITERS, OPERATOR_MAPPING,
TT_NOT_OP)
from ..trees import BooleanExpressionTree
from .errors import (BadParenPositionError, ExpressionOrderError,
UnbalancedParenEr... | Python | 0.00002 | @@ -1652,16 +1652,98 @@
eline.%0A%0A
+ Raises:%0A GrammarError: If a malformed expression is received.%0A%0A
@@ -5247,19 +5247,18 @@
ed opera
-tor
+nd
',%0A
|
fc353499d00d9c9c3454de82b3ac2a4d724c485b | Add flatpages contrib to installed apps for tests | conftest.py | conftest.py | import os
import logging
from django.conf import settings
from oscar import OSCAR_MAIN_TEMPLATE_DIR, get_core_apps
location = lambda x: os.path.join(
os.path.dirname(os.path.realpath(__file__)), x
)
sandbox = lambda x: location("sandbox/%s" % x)
logging.basicConfig(level=logging.INFO)
def pytest_configure():
... | Python | 0 | @@ -2629,24 +2629,64 @@
aticfiles',%0A
+ 'django.contrib.flatpages',%0A
|
d04ded85e01c4a9e0960d57a37ecd83fc92fa5cd | Add a fallback to mini_installer_tests' quit_chrome.py exit logic. | chrome/test/mini_installer/quit_chrome.py | chrome/test/mini_installer/quit_chrome.py | # Copyright 2013 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.
"""Quits Chrome.
This script sends a WM_CLOSE message to each window of Chrome and waits until
the process terminates.
"""
import optparse
import pywintype... | Python | 0.003252 | @@ -297,16 +297,26 @@
ptparse%0A
+import os%0A
import p
@@ -501,16 +501,20 @@
s whose
+exe
path is
@@ -572,23 +572,81 @@
to the
-process
+executable whose processes will have their%0A windows closed
.%0A%0A Ret
@@ -720,16 +720,17 @@
erminate
+d
within%0A
@@ -733,18 +733,18 @@
hin%0A
-30
+25
... |
eba39b722d6d025ec351beeb35e7dadd55ef82f5 | correctly treat hashes as little endian | blockchain.py | blockchain.py | #!/usr/bin/env python3
import binascii
import datetime
class BlockChain:
def __init__(self, data, handler=None):
self.data = data
self.handler = handler
self.index = 0
self.block_count = 0
while self.index < len(self.data):
self.parse_block()
self.... | Python | 0.998601 | @@ -569,32 +569,38 @@
return data
+%5B::-1%5D
%0A%0A def get_ui
|
202d0a199a59a0e8ca5651785aa4497b1e0047e7 | Add default implementation of Language.validate_code | importkit/meta.py | importkit/meta.py | ##
# Copyright (c) 2008-2012 Sprymix Inc.
# All rights reserved.
#
# See LICENSE for details.
##
import functools
import os
from semantix import exceptions as sx_errors
from .loader import LanguageSourceFileLoader
from .import_ import finder
class LanguageMeta(type):
languages = []
def __new__(cls, name, ... | Python | 0 | @@ -2345,16 +2345,81 @@
dError%0A%0A
+ @classmethod%0A def validate_code(cls, code):%0A pass%0A%0A
%0Aclass O
|
417c46221fbcecf22ffa7c27d6e1ade76dea74df | disable caching for replacement frontend. a) the underlying frontend will cache and b) this cache is going to be very unreliable | claripy/frontends/replacement_frontend.py | claripy/frontends/replacement_frontend.py | #!/usr/bin/env python
import weakref
import logging
l = logging.getLogger("claripy.frontends.full_frontend")
from .constrained_frontend import ConstrainedFrontend
class ReplacementFrontend(ConstrainedFrontend):
def __init__(self, actual_frontend, allow_symbolic=None, replacements=None, replacement_cache=None, au... | Python | 0.00006 | @@ -333,32 +333,85 @@
one, **kwargs):%0A
+ kwargs%5B'cache'%5D = kwargs.get('cache', False)%0A
Constrai
|
bde5f87e92227734d86d8caf5fcafcbf81b3a272 | Add rename table | tvnamer/gui/__init__.py | tvnamer/gui/__init__.py | import sys
from PySide import QtCore, QtGui
from ..renamer import Renamer
class VideoFileFolderDropTarget(QtGui.QLabel, QtCore.QObject):
dropped = QtCore.Signal(str)
def __init__(self, parent=None):
super().__init__(parent)
self.setAcceptDrops(True)
self.setStyleSheet("background: w... | Python | 0.000001 | @@ -3191,16 +3191,119 @@
%7D%0A%0A
+ # remove empty values%0A default_params = %7Bk: v for k, v in default_params.items() if v%7D%0A%0A
@@ -3412,24 +3412,321 @@
t_params)%0A%0A%0A
+class RenameTable(QtGui.QListWidget):%0A def __init__(self, parent=None):%0A super().__init__(pare... |
2d55d95c623bef4848131878061887854ff8a971 | Update utils.py | deeplab_resnet/utils.py | deeplab_resnet/utils.py | from PIL import Image
import numpy as np
# colour map
label_colours = [(0,0,0)
# 0=background
,(128,0,0),(0,128,0),(128,128,0),(0,0,128),(128,0,128)
# 1=aeroplane, 2=bicycle, 3=bird, 4=boat, 5=bottle
,(0,128,128),(128,128,128),(64,0,0),(192,0,0),(64,128,0... | Python | 0.000001 | @@ -34,16 +34,55 @@
y as np%0A
+import tensorflow as tf%0A%0An_classes = 21
%0A# colou
@@ -1099,18 +1099,25 @@
if k %3C
-21
+n_classes
:%0A
|
a62b5955d9801f25736c42545191ff5a76a2e5b1 | Refactor UserFactory and add CommentFactory | blog/tests.py | blog/tests.py | from django.test import TestCase
from .models import BlogPost
from django.contrib.auth.models import User
class UserFactory(object):
def create(self):
user = User.objects.create_user(username = "user001", email = "email@domain.com", password = "password123456")
return user
class BlogPostFactory(ob... | Python | 0 | @@ -54,17 +54,26 @@
BlogPost
+, Comment
%0A
-
from dja
@@ -147,32 +147,105 @@
def create(self
+, username=%22user001%22, email=%22email@domain.com%22, password=%22password123456%22
):%0A user
@@ -282,25 +282,24 @@
rname =
-%22
user
-001%22
+name
, email
@@ -300,34 +300,21 @@
email =
-%22
email
-@d... |
420d104d9e674b96363db5c986ea9eea4d411c92 | Add updated template settings to conftests | conftest.py | conftest.py | """
Configuration file for py.test
"""
import django
def pytest_configure():
from django.conf import settings
settings.configure(
DEBUG=True,
USE_TZ=True,
DATABASES={
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": "test.sqlite3... | Python | 0 | @@ -1042,24 +1042,197 @@
ests.urls%22,%0A
+ TEMPLATES = %5B%0A %7B%0A 'BACKEND': 'django.template.backends.django.DjangoTemplates',%0A 'APP_DIRS': True,%0A %7D,%0A %5D%0A
)%0A dj
|
8d6287397b47fcaf98cadc59349f1db68c7b2d93 | Update 1.4_replace_whitespace.py | CrackingCodingInterview/1.4_replace_whitespace.py | CrackingCodingInterview/1.4_replace_whitespace.py | """
Replace all whitespace in a string with '%20'
"""
| Python | 0.000001 | @@ -48,8 +48,100 @@
0'%0A%22%22%22%0A%0A
+def replace(string):%0A for i in string:%0A string.replace(%22%22, %2520)%0A return string%0A
|
8a1b902b729597f5c8536b235d7add887f097fdd | Drop box should be off by default. SSL should be on by default, HTTP should be off. | twistedcaldav/config.py | twistedcaldav/config.py | ##
# Copyright (c) 2005-2006 Apple Computer, 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 ap... | Python | 0.000025 | @@ -1037,19 +1037,20 @@
abled':
-Tru
+Fals
e,%0A '
@@ -1373,36 +1373,35 @@
'SSLEnable':
-Fals
+Tru
e,%0A 'SSLOnly'
@@ -1402,20 +1402,19 @@
LOnly':
-Fals
+Tru
e,%0A '
|
3e8d6e31f576fb857a1415c85a227f56225b8f06 | fix database path | blogconfig.py | blogconfig.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 博客名和简介
blogname = "I'm SErHo"
blogdesc = "SErHo's Blog, Please Call me Serho Liu."
blogcover = "//dn-serho.qbox.me/blogbg.jpg"
# Picky 目录和数据库
picky = "/home/serho/website/picky"
database = "//home/serho/website/newblog.db"
# 其他设置
# disqus = "serho"
# secret = "use r... | Python | 0.000002 | @@ -236,17 +236,16 @@
ase = %22/
-/
home/ser
|
1630bb891bf57052984301b9dd191826ca7ba18e | Update test_biobambam.py | tests/test_biobambam.py | tests/test_biobambam.py | """
.. Copyright 2017 EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applic... | Python | 0.000002 | @@ -1185,16 +1185,151 @@
is True%0A
+ testFile = open(resource_path + %22macs2.Human.DRR000150.22.filtered.bam%22)%0A print (%22read line: %22)%0A print (testFile.readline())%0A
asse
|
6ab7f0144ab7115da967d00db098d06db018780f | version bump 0.1.20beta | tx_highered/__init__.py | tx_highered/__init__.py | __version__ = "0.1.19beta"
| Python | 0 | @@ -16,10 +16,10 @@
0.1.
-19
+20
beta
|
1e3e6ea6c24e275a5a08f096968ae14aab2dfd22 | Support custom schema classes. | muffin_rest/peewee.py | muffin_rest/peewee.py | """Support Muffin-Peewee."""
from muffin_rest import RESTHandler, RESTNotFound, Filter, Filters, RESTOptions
try:
from marshmallow_peewee import ModelSchema
except ImportError:
import logging
logging.error('Marshmallow-Peewee should be installed to use the integration.')
raise
class PWFilter(Filter):... | Python | 0 | @@ -2008,22 +2008,42 @@
', (
-ModelSchema,),
+self.schema_cls,),%0A
dic
@@ -2494,16 +2494,49 @@
ema = %7B%7D
+%0A schema_cls = ModelSchema
%0A%0A de
|
331057ecf72a6f0945c0dd5b2af49eb6b3ec299f | update consume function to not use TODAY constant | consumer.py | consumer.py | # Consumer for Texas State University
from __future__ import unicode_literals
import os
import time
from dateutil.parser import parse
from datetime import date, timedelta, datetime
import requests
from lxml import etree
from nameparser import HumanName
from scrapi.linter import lint
from scrapi.linter.document imp... | Python | 0 | @@ -374,29 +374,8 @@
te'%0A
-TODAY = date.today()%0A
NAME
@@ -1045,54 +1045,8 @@
k))%0A
- start_date = TODAY - timedelta(days_back)%0A
@@ -1128,20 +1128,16 @@
rom=' +
-str(
start_da
@@ -1138,17 +1138,16 @@
art_date
-)
+ ' 00:
|
8fa0dca5cd5187126a10197883348fc6b16544b5 | Test get campaigns by email | tests/test_campaigns.py | tests/test_campaigns.py | import os
import vcr
import unittest
from hatchbuck.api import HatchbuckAPI
from hatchbuck.objects import Contact
class TestCampaigns(unittest.TestCase):
def setUp(self):
# Fake key can be used with existing cassettes
self.test_api_key = os.environ.get("HATCHBUCK_API_KEY", "ABC123")
@vcr.use... | Python | 0 | @@ -861,16 +861,654 @@
lowup%22)%0A
+ self.assertEqual(campaigns%5B0%5D.step, 0)%0A self.assertEqual(campaigns%5B0%5D.id, %22b1BFUnM1Unh0MDVVOVJEWUc1d0pTM0pUSVY4QS0xOW5GRHRsS05DXzNXazE1%22)%0A%0A @vcr.use_cassette(%0A 'tests/fixtures/cassettes/test_get_contact_campaigns_by_email.yml',%0A ... |
e9b270028d12ad7836b5b3b5775c08df06788f42 | Allow more flexibility when calling module metadata and summary functions | livvkit/components/validation.py | livvkit/components/validation.py | # Copyright (c) 2015,2016, UT-BATTELLE, LLC
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions ... | Python | 0 | @@ -4051,32 +4051,49 @@
mary):%0A try:%0A
+ try:%0A
module.p
@@ -4120,16 +4120,96 @@
%5Bcase%5D)%0A
+ except TypeError:%0A module.print_summary(case, summary%5Bcase%5D)%0A
exce
@@ -4522,20 +4522,16 @@
Error%22:%0A
-
@@ -4553,16 +4553,16 @@
ailure%22%0A
+
... |
bdb700d896985eb62c98e3b668e15a3d29008921 | Allow setting either side of symmetrical relations | share/normalize/parsers.py | share/normalize/parsers.py | import re
import uuid
from functools import reduce
from django.apps import apps
from django.core.exceptions import FieldDoesNotExist
from share.normalize.links import Context
from share.normalize.links import AbstractLink
# NOTE: Context is a thread local singleton
# It is asigned to ctx here just to keep a family ... | Python | 0.000004 | @@ -15,16 +15,31 @@
rt uuid%0A
+import logging%0A
from fun
@@ -354,16 +354,53 @@
ntext()%0A
+logger = logging.getLogger(__name__)%0A
%0A%0Aclass
@@ -2925,16 +2925,135 @@
= prev%0A
+ logger.debug('Values (%25s, %25s) found in cache as %25s', self.context, schema, ctx.pool%5Bself.context, schema%5D)%0A
... |
eb58615d0fa7f4469be01f9e8dcb1cf44b8ce85e | correct context problem | close_residual_order_unlink/unlink_mrp.py | close_residual_order_unlink/unlink_mrp.py | # -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | Python | 0.999969 | @@ -2963,24 +2963,84 @@
nlink line:%0A
+ context%5B'production_order_id'%5D = line.mrp_id.id%0A
@@ -3551,32 +3551,129 @@
)%0A
+if 'production_order_id' in context:%0A del(context%5B'production_order_id'%5D)%0A
%0A # -----
|
d8a83ea3433948447c307a894b16c2b8a12247e8 | Kill defaulting to json for now. | api/base.py | api/base.py | from django.contrib.auth.models import User
from django.conf.urls.defaults import url
from django.core.urlresolvers import reverse
from tastypie.bundle import Bundle
from tastypie.resources import ModelResource
from tastypie import fields
from tastypie.authentication import BasicAuthentication
from tastypie.authorizati... | Python | 0 | @@ -488,127 +488,8 @@
t%0A%0A%0A
-class BaseResource(ModelResource):%0A def determine_format(self, *args, **kwargs):%0A return %22application/json%22%0A%0A
clas
@@ -504,36 +504,37 @@
edModelResource(
-Base
+Model
Resource):%0A d
@@ -1200,36 +1200,37 @@
ss UserResource(
-Base
+Model
Resource):%0A c... |
69f46596f189786fce0e2a087e6870e5d3059331 | Fix figshare harvester date range (#764) | share/harvesters/com_figshare_v2.py | share/harvesters/com_figshare_v2.py | import pendulum
from furl import furl
from share.harvest import BaseHarvester
class FigshareHarvester(BaseHarvester):
VERSION = 1
page_size = 50
def do_harvest(self, start_date, end_date):
return self.fetch_records(furl(self.config.base_url).set(query_params={
'order_direction': 'a... | Python | 0.000003 | @@ -164,18 +164,17 @@
def
+_
do_
-harvest
+fetch
(sel
@@ -211,34 +211,14 @@
-return self.fetch_records(
+url =
furl
@@ -394,27 +394,28 @@
'modified_
-dat
+sinc
e': start_da
@@ -447,17 +447,51 @@
%7D)
-.
+%0A return self.fetch_records(
url, end
@@ -564,21 +564,36 @@
page
-, detail = 0,
+ ... |
83f54f57170115cda98e7d1aa68972c60b865647 | Fix test_upgrades_to_html.py test | cnxupgrade/tests/test_upgrades_to_html.py | cnxupgrade/tests/test_upgrades_to_html.py | # -*- coding: utf-8 -*-
# ###
# Copyright (c) 2013, Rice University
# This software is subject to the provisions of the GNU Affero General
# Public License version 3 (AGPLv3).
# See LICENCE.txt for details.
# ###
"""Tests for to_html command-line interface.
"""
import sys
import unittest
from . import DB_CONNECTION_... | Python | 0.000021 | @@ -1534,62 +1534,39 @@
elf.
+kw
args
-%5B2%5D, False)%0A self.assertEqu
+, %7B'overwrite_html': F
al
-(
se
-lf.kwargs, %7B
%7D)%0A
|
e20f0d3ada72cb21185ca0c3c1d22a77ee254de0 | fix rogue tab | tests/test_get_paths.py | tests/test_get_paths.py | import sys
import os
from goatools.obo_parser import GODag
ROOT = os.path.dirname(os.path.abspath(__file__)) + "/data/"
def print_paths(paths, PRT=sys.stdout):
for path in paths:
PRT.write('\n')
for GO in path:
PRT.write('{}\n'.format(GO))
def chk_results(actual_paths, expected_... | Python | 0.000001 | @@ -1,12 +1,8 @@
-
import s
|
e42690a6f225952ddb6417edc90e27892c18d2a2 | Move api to root. | api/main.py | api/main.py | from bottle import route, request, response, run, view
from collections import OrderedDict
from parser import parse_response
from server import query_server
import bottle
import json
import os
@route('/api/')
@view('api/views/index')
def index():
site = "%s://%s" % (request.urlparts.scheme, request.urlparts.netloc... | Python | 0 | @@ -196,20 +196,16 @@
route('/
-api/
')%0A@view
@@ -347,20 +347,16 @@
route('/
-api/
tag', me
|
ee3b712611ed531843134ef4ce94cb45c726c127 | Fix filename creation in csv export action | nap/extras/actions.py | nap/extras/actions.py |
from django.http import StreamingHttpResponse
from django.utils.encoding import force_text
from .models import modelserialiser_factory
from .simplecsv import CSV
class ExportCsv(object):
def __init__(self, serialiser=None, label=None, **opts):
self.serialiser = serialiser
self.opts = opts
... | Python | 0.000024 | @@ -1139,18 +1139,357 @@
e =
-admin.csv_
+self.opts.get('filename', 'export_%7Bclassname%7D.csv')%0A if callable(filename):%0A filename = filename(admin)%0A else:%0A filename = filename.format(%0A classname=admin.__class__.__name__,%0A model=admin.mode... |
b1cc545775cb3de4899e75232d7225ac35ce5bad | More terse zuul output | ircbot/commands/zuul.py | ircbot/commands/zuul.py | #!/usr/bin/python2.4
# A simple zuul watcher bot
import json
import sqlite3
import subprocess
import time
import urllib2
import utils
EVENTS = {'check': 'did some work!',
'gate': 'tricked them into approving the commit'}
class ZuulWatcher(object):
def __init__(self, log, conf):
self.log = l... | Python | 0.998458 | @@ -156,22 +156,13 @@
': '
-did some work!
+check
',%0A
@@ -183,46 +183,13 @@
': '
-tricked them into approving the commit
+merge
'%7D%0A%0A
@@ -4198,25 +4198,16 @@
('
-Woohoo!,
%25s %25s %25s
'%0A
@@ -4202,16 +4202,21 @@
%25s %25s %25s
+ (%25s)
'%0A
@@ -4478,183 +4478,9 @@
rl'%5D
-)))%0A ... |
52c375b28d2f106712236f9b15906d48030bebfc | fix deal with buttons | api/urls.py | api/urls.py | from django.conf.urls import url
from django.contrib.auth.models import User
from rest_framework.permissions import IsAuthenticated
from api import serializers as s
from api import views as v
from api import drf_permissions as p
from apostello import forms as f
from apostello import models as m
from elvanto.models imp... | Python | 0 | @@ -3883,24 +3883,25 @@
field='deal
+t
_with',%0A
|
85a6030ddebaaef2644640b1d3e8e9447a730a78 | send utcnow instead of just now | uiharu/bin/collector.py | uiharu/bin/collector.py | from __future__ import print_function
import argparse
import datetime
import logging.config
import socket
import sys
import sqlalchemy as sa
from uiharu.collector import TemperatureCollector
from uiharu.config import ConfigAction
from uiharu.periodic_sleeper import PeriodicSleeper
from uiharu.models import Temperatu... | Python | 0 | @@ -2974,16 +2974,19 @@
atetime.
+utc
now(),%0A
|
1e03772e601fb6ed0eb6aa59555af61c29b2650f | remove fungible in parent class constructor call | amaascore/assets/cfd.py | amaascore/assets/cfd.py | from __future__ import absolute_import, division, print_function, unicode_literals
from datetime import datetime, date
from dateutil import parser
from amaascore.assets.derivative import Derivative
class ContractForDifference(Derivative):
def __init__(self, asset_manager_id, asset_id, asset_issuer_id=None, ass... | Python | 0.000001 | @@ -689,24 +689,8 @@
- fungible=False,
ass
|
63eaf0faf56a70fadbd37f0acac6f5e61c7b19eb | Change sleep function to the end to do repeat everytime | checkdns.py | checkdns.py | # coding=utf8
# 31.220.16.242
# 216.58.222.46
import socket
import time
import webbrowser
def checkdns():
print time.ctime()
retorno = True
try:
ip = socket.gethostbyname('google.com')
print ("O IP do host verificado é: " + ip)
if ip == "216.58.222.46":
... | Python | 0 | @@ -308,15 +308,14 @@
8.22
-2
.46%22:%0A
+
@@ -525,41 +525,8 @@
s.%22%0A
- time.sleep( 30 )%0A
@@ -630,37 +630,8 @@
s.%22%0A
- time.sleep( 30 )%0A
@@ -682,16 +682,16 @@
ndicao:%0A
-
cond
@@ -699,16 +699,37 @@
cao = checkdns()
+%0A time.sleep( 30 )
|
4c819629552a31748e4bb266c1c13726276d7944 | Use cross version compatible iteration | tests/test_renderers.py | tests/test_renderers.py | import unittest
from asciimatics.renderers import StaticRenderer
from asciimatics.screen import Screen
class TestRenderers(unittest.TestCase):
def test_static_renderer(self):
"""
Check that the base static renderer class works.
"""
# Check basic API for a renderer...
render... | Python | 0 | @@ -711,32 +711,27 @@
rtEqual(
+next(
images
-.__next__(
), %5B%22A%22,
@@ -766,24 +766,19 @@
ual(
+next(
images
-.__next__(
), %5B
|
6c5f350b84fa29553265b9ec44a4436f14825221 | Add south. | nest/settings/base.py | nest/settings/base.py | # Django settings for nest project.
import os
from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS as TCP
from django.core.exceptions import ImproperlyConfigured
from unipath import Path
from .gargoyle_switches import *
def get_env_variable(var_name):
""" Get the environment variable or return exce... | Python | 0.000015 | @@ -4640,24 +4640,37 @@
saltpeter',%0A
+ 'south',%0A
)%0A%0AMESSAGE_S
|
90b991c19ef5249a09410b19c33f2c8bfe9b5ca7 | Install pypy for proper architechture. | braid/pypy.py | braid/pypy.py | from os import path
from fabric.api import cd, task, sudo
from braid import fails
pypyURL = 'https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-linux64.tar.bz2'
setuptoolsURL = 'http://peak.telecommunity.com/dist/ez_setup.py'
pipURL = 'https://raw.github.com/pypa/pip/master/contrib/get-pip.py'
pypyDir = '/opt/pypy-2... | Python | 0 | @@ -1,12 +1,22 @@
+import re%0A
from os impo
@@ -60,16 +60,23 @@
sk, sudo
+, abort
%0A%0Afrom b
@@ -87,16 +87,45 @@
import
+info%0Afrom braid.utils import
fails%0A%0Ap
@@ -130,18 +130,35 @@
%0ApypyURL
+s
=
+ %7B%0A 'x86_64':
'https:
@@ -201,16 +201,18 @@
pypy-2.0
+.2
-linux64
@@ -220,16 +220,131 @@
t... |
25030673476f9eb99a4eff980d7bb050fdaa2568 | Print size of result lists in check_files | analysis/check_files.py | analysis/check_files.py | #!/usr/bin/env python
# vim: set sw=2 ts=2 softtabstop=2 expandtab:
import argparse
import os
import logging
import sys
import yaml
try:
# Try to use libyaml which is faster
from yaml import CLoader as Loader, CDumper as Dumper
except ImportError:
# fall back on python implementation
from yaml import Loader, D... | Python | 0 | @@ -1158,27 +1158,151 @@
%0A%0A
-# Create set of all
+print(%22# of results in first %7B%7D%22.format(len(firstResults)))%0A print(%22# of results in second %7B%7D%22.format(len(secondResults)))%0A%0A # Create sets of
use
|
fefdea2a81bec7bdb8678671c0eb2dea8f7dea83 | Disable TOTP token sync | hoover/site/settings/common.py | hoover/site/settings/common.py | from pathlib import Path
base_dir = Path(__file__).absolute().parent.parent.parent.parent
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'hoover.search',
)
... | Python | 0 | @@ -2560,16 +2560,39 @@
= '/'%0A%0A
+OTP_TOTP_SYNC = False%0A%0A
HOOVER_E
|
d115c0ceb08a350f7b367f61627ced5ab03df833 | Remove useless space | sklearn_porter/language/__init__.py | sklearn_porter/language/__init__.py | # -*- coding: utf-8 -*-
import sklearn_porter.language.c
import sklearn_porter.language.go
import sklearn_porter.language.java
import sklearn_porter.language.js
import sklearn_porter.language.php
import sklearn_porter.language.ruby
LANGUAGES = {
c.KEY: c,
go.KEY: go,
java.KEY: java,
js.KEY: js,
... | Python | 0.000001 | @@ -51,18 +51,16 @@
guage.c%0A
-%0A%0A
import s
|
e35b3d947e78cda10ccb635f2696bf6d80882992 | Expression transformation. Simplify commutative | analyze/wavelet/base.py | analyze/wavelet/base.py | from functools import partial
from itertools import chain, tee
import numpy as np
PI2 = 2 * np.pi
def pairwise(iterable):
one, two = tee(iterable)
next(two, None)
return zip(one, two)
def grouper(iterable, n):
return zip(*([iter(iterable)] * n))
def test_split_vertical():
i, j = split_vertic... | Python | 0.999999 | @@ -3121,16 +3121,22 @@
quency =
+ PI2 *
samples
@@ -3146,24 +3146,8 @@
unt
-* (%0A PI2
/ (o
@@ -3179,22 +3179,16 @@
0 ** 2))
-%0A )
%0A%0A sc
|
3bef5697a7f3c0c0972a3cbcce3a4bdac01b7dcb | Update graph_hashes.py | jkutils/graph_hashes.py | jkutils/graph_hashes.py | #!/usr/bin/python
"""
Yet another Control Flow Graph hash using small-primes-product.
An implementation of the Koret-Karamitas (KOKA) CFGs hashing algorithm.
Based on the paper Efficient Features for Function Matching between Binary
Executables by Huku (Chariton Karamitas, CENSUS S.A., huku@census-labs.com).
Copyrig... | Python | 0.000001 | @@ -2865,16 +2865,60 @@
.startEA
+%0A if block.endEA == 0:%0A continue
%0A%0A
|
3fdad9fb89d70b8d81483b646e16d20f076e0ebd | Test urxvt alpha | tests/test_sequences.py | tests/test_sequences.py | """Test sequence functions."""
import unittest
import unittest.mock
import io
from pywal import sequences
from pywal import util
# Import colors.
COLORS = util.read_file_json("tests/test_files/test_file.json")
class Testsequences(unittest.TestCase):
"""Test the sequence functions."""
def test_set_special(... | Python | 0.000019 | @@ -493,32 +493,300 @@
;#1F211E%5C007%22)%0A%0A
+ def test_set_special_alpha(self):%0A %22%22%22%3E Create special escape sequence with alpha.%22%22%22%0A util.Color.alpha_num = 40%0A result = sequences.set_special(11, COLORS%5B%22special%22%5D%5B%22background%22%5D)%0A self.assertEqual(... |
89d68883b636b29dcfbb3c56b2b766a54fc7b37d | remove debugger | tests/test_solr_prep.py | tests/test_solr_prep.py | import pytest
from datetime import datetime
from lametro.search_indexes import LAMetroBillIndex
@pytest.mark.parametrize('session_identifier,prepared_session', [
('2014', '7/1/2014 to 6/30/2015'),
('2015', '7/1/2015 to 6/30/2016'),
('2016', '7/1/2016 to 6/30/2017'),
('2017', '7/1/2017 to 6/30/2018'),
... | Python | 0.000133 | @@ -2939,43 +2939,8 @@
%5D%0A
- import pdb%0A pdb.set_trace()%0A
|
b86348349906c88b6946f757485cf41f909a9a91 | fix subtitle test for newer versions of ffmpeg | tests/test_subtitles.py | tests/test_subtitles.py | import sys
from .common import *
from av.subtitles.subtitle import *
class TestSubtitle(TestCase):
def test_movtext(self):
path = fate_suite('sub/MovText_capability_tester.mp4')
fh = av.open(path)
subs = []
for packet in fh.demux():
try:
subs.extend... | Python | 0 | @@ -503,29 +503,26 @@
self.assert
-Equal
+In
(subs%5B0%5D%5B0%5D.
@@ -526,16 +526,17 @@
0%5D.ass,
+(
'Dialogu
@@ -596,16 +596,135 @@
2.%5Cr%5Cn'
+,%0A 'Dialogue: 0,0:00:00.97,0:00:02.54,Default,,0,0,0,,- Test 1.%5C%5CN- Test 2.%5Cr%5Cn')
)%0A%0A d
|
4a7484bccc9a92353681fb155f15629fa1059cd1 | Format users | slackbot/get_scoreboard.py | slackbot/get_scoreboard.py | import logging
from typing import Dict, List, Tuple
from werkzeug.datastructures import ImmutableMultiDict
from database.main import connect, channel_resp
from database.team import check_all_scores
logger = logging.getLogger(__name__)
def get_scoreboard(form: ImmutableMultiDict) -> Dict[str, str]:
logger.debug... | Python | 0.000001 | @@ -748,16 +748,18 @@
dex+1%7D.
+%3C@
%7Bsubject
@@ -759,16 +759,17 @@
subject%7D
+%3E
%5B%7Bscore
|
29bfc1049352f59fca0b625d0ecbc7177fb565c7 | Change default value for certificate location. | py509/x509.py | py509/x509.py | import socket
import uuid
from OpenSSL import crypto
def make_serial():
"""Make a random serial number."""
return uuid.uuid4().int
def make_pkey(key_type=crypto.TYPE_RSA, key_bits=4096):
"""Make a public/private key pair."""
key = crypto.PKey()
key.generate_key(key_type, key_bits)
return key
def make... | Python | 0.000024 | @@ -564,17 +564,12 @@
', '
-San Diego
+Home
')%0A
|
e05a4f17fcf0ec1bedcc8188d584d31616c4e0af | Update test_toml_file.py | tests/test_toml_file.py | tests/test_toml_file.py | import os
from tomlkit.toml_document import TOMLDocument
from tomlkit.toml_file import TOMLFile
def test_toml_file(example):
original_content = example("example")
toml_file = os.path.join(os.path.dirname(__file__), "examples", "example.toml")
toml = TOMLFile(toml_file)
content = toml.read()
ass... | Python | 0.000002 | @@ -1559,11 +1559,8 @@
ith
-io.
open
|
210bf81fa0c7296c6e48e112dacc29ad2b89af0c | add raw_id_fields for users and topics | pybb/admin.py | pybb/admin.py | # -*- coding: utf-8
from django.utils.translation import ugettext_lazy as _
from django.contrib import admin
from pybb.models import Category, Forum, Topic, Post, Profile, Read
class CategoryAdmin(admin.ModelAdmin):
list_display = ['name', 'position', 'forum_count']
list_per_page = 20
ordering = ['position... | Python | 0 | @@ -464,32 +464,67 @@
t_per_page = 20%0A
+ raw_id_fields = %5B'moderators'%5D%0A
ordering = %5B
@@ -532,24 +532,24 @@
-category'%5D%0A
-
search_f
@@ -1031,32 +1031,85 @@
t_per_page = 20%0A
+ raw_id_fields = %5B'user', 'forum', 'subscribers'%5D%0A
ordering = %5B
@@ -1649,32 +1649,70 @@
t_per_pag... |
b108cb874288ab6d2ee17b2fd807a95509b3e2c5 | properly reverse emails as usernames in urls | api/urls.py | api/urls.py | from django.conf.urls import url, include
from .views import LocationApi, IssueView, IssueCommentView, UserSearch, IssueStatusView, CommentDetailView, \
MentionView, UserInformationApi, UserDetailView
app_name = 'issue_tracker_api'
urlpatterns = [
url(r'^$', LocationApi.as_view()),
url(
r'^issue/(... | Python | 0.999932 | @@ -763,16 +763,17 @@
ame%3E%5B%5Cw@
+.
%5D+)/$',
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.