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 |
|---|---|---|---|---|---|---|---|
121595a21d0eda92789de28d2a187dff4f14a8c3 | Remove unused import, remove Windows reference | tests/unit/beacons/test_watchdog.py | tests/unit/beacons/test_watchdog.py | # coding: utf-8
# Python libs
from __future__ import absolute_import, print_function, unicode_literals
import os
import shutil
import tempfile
import time
# Salt libs
import salt.utils.files
import salt.utils.platform
from salt.beacons import watchdog
from salt.ext.six.moves import range
# Salt testing libs
from tes... | Python | 0 | @@ -190,35 +190,8 @@
les%0A
-import salt.utils.platform%0A
from
@@ -983,19 +983,8 @@
hdog
- on Windows
%0A
|
46fd008640bd80dc9e22127262e47b2519779d5f | Make current ticket (if specified) available to template | byceps/blueprints/seating/views.py | byceps/blueprints/seating/views.py | """
byceps.blueprints.seating.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g
from ...config import get_seat_management_enabled, get_ticket_management_enabled
from ...services.seating import area_service ... | Python | 0 | @@ -159,16 +159,45 @@
s.%0A%22%22%22%0A%0A
+from typing import Optional%0A%0A
from fla
@@ -214,16 +214,25 @@
abort, g
+, request
%0A%0Afrom .
@@ -683,16 +683,29 @@
h import
+ flash_error,
flash_s
@@ -1367,24 +1367,75 @@
_enabled()%0A%0A
+ current_ticket_id = _find_current_ticket_id()%0A%0A
return %7B
@@... |
4063397a50c7171acb038132b4c8e59030b382c9 | Replace exceptions.ValidationError with serializers.ValidationError | kpi/serializers/v2/asset_export_settings.py | kpi/serializers/v2/asset_export_settings.py | # coding: utf-8
from django.utils.translation import ugettext as _
from rest_framework import serializers, exceptions
from rest_framework.reverse import reverse
from kpi.models import AssetExportSettings
from kpi.fields import WritableJSONField
OPTIONAL_EXPORT_SETTINGS = ('fields',)
REQUIRED_EXPORT_SETTINGS = (
'... | Python | 0.000437 | @@ -102,21 +102,9 @@
zers
-, exceptions
%0A
+
from
@@ -1716,33 +1716,34 @@
raise
-exception
+serializer
s.Validation
@@ -2181,33 +2181,34 @@
raise
-exception
+serializer
s.Validation
@@ -2628,33 +2628,34 @@
raise
-exception
+serializer
s.Validation
@@ -2910,33 +2910,34 @@
raise
-ex... |
2ed332ea21c20d8e533ddcbd758755fea9da0ecd | Improve syntax | virtool/labels/api.py | virtool/labels/api.py | import virtool.http.routes
import virtool.utils
import virtool.validators
import virtool.labels.checks
import virtool.db.utils
from virtool.api.response import bad_request, json_response, no_content, not_found
routes = virtool.http.routes.Routes()
@routes.get("/api/labels")
async def find(req):
"""
Get a... | Python | 0.978611 | @@ -396,24 +396,22 @@
%22%5D%0A%0A
-document
+cursor
= db.la
@@ -496,24 +496,22 @@
or d in
-document
+cursor
%5D)%0A%0A%0A@ro
@@ -712,20 +712,16 @@
if
-not
document
:%0A
@@ -716,16 +716,24 @@
document
+ is None
:%0A
@@ -1508,36 +1508,26 @@
olor%22)%0A%0A
-name_exist =
+if
await db.la
@@... |
ae9a17a5cde92efc471e46d900e52a29068083da | Move authenticate to UrlAuthBackendMixin. | sesame/backends.py | sesame/backends.py | from __future__ import unicode_literals
import hashlib
import logging
from django.conf import settings
from django.contrib.auth import backends as auth_backends
from django.contrib.auth import get_user_model
from django.core import signing
from django.core.exceptions import ImproperlyConfigured
from django.utils impo... | Python | 0 | @@ -4857,158 +4857,8 @@
er%0A%0A
-%0Aclass ModelBackend(UrlAuthBackendMixin, auth_backends.ModelBackend):%0A %22%22%22%0A Authenticates against a token containing a signed user id.%0A%0A %22%22%22%0A
@@ -5317,8 +5317,159 @@
raise%0A
+%0A%0Aclass ModelBackend(UrlAuthBackendMixin, auth_backends.ModelBa... |
b18de413007b5587b6ae4023df4de0a0f4791e79 | load obj with decisions | larVolumeToObj/computation/visualization.py | larVolumeToObj/computation/visualization.py | #! /usr/bin/python
# -*- coding: utf-8 -*-
import logging
logger = logging.getLogger(__name__)
import argparse
import sys
# """ import modules from lar-cc/lib """
import import_library as il
lib_path = il.find_library_path("larcc", "larcc.py")
sys.path.append(lib_path)
from larcc import * # noqa
from... | Python | 0 | @@ -1534,24 +1534,221 @@
de=False):%0D%0A
+ if explode:%0D%0A visualize_lar(V, FV, explode)%0D%0A else:%0D%0A # if you dont need explode, this is faster%0D%0A visualize_plasm(V, FV)%0D%0A%0D%0A%0D%0Adef visualize_lar(V, FV, explode=False):%0D%0A
import t
@@ -2546,48 +2546,528 @@
-... |
b6371a582ca944094b1c7955f2c9e908535ccc5d | clean import | virtuoso/textindex.py | virtuoso/textindex.py | from sqlalchemy import Column
from sqlalchemy.orm.attributes import InstrumentedAttribute
from sqlalchemy.schema import _CreateDropBase, Table, Index
from sqlalchemy.sql.expression import (
TextClause, func, literal_column, ColumnCollection, ClauseElement)
from sqlalchemy.sql import ddl
from sqlalchemy.sql.base imp... | Python | 0.000001 | @@ -186,25 +186,8 @@
rt (
-%0A TextClause,
func
@@ -206,41 +206,8 @@
lumn
-, ColumnCollection, ClauseElement
)%0Afr
|
df5b98422b1198f353cf3b0df20429b29334bd06 | Add separator kwarg to `StringCommand` init. | pyinfra/api/command.py | pyinfra/api/command.py | from six.moves import shlex_quote
from .operation_kwargs import get_executor_kwarg_keys
class MaskString(str):
pass
class QuoteString(object):
def __init__(self, obj):
self.object = obj
class PyinfraCommand(object):
def __init__(self, *args, **kwargs):
self.executor_kwargs = {
... | Python | 0 | @@ -642,16 +642,31 @@
, *bits,
+ separator=' ',
**kwarg
@@ -743,24 +743,59 @@
.bits = bits
+%0A self.separator = separator
%0A%0A def __
@@ -1419,27 +1419,38 @@
return
-' '
+self.separator
.join(self._
@@ -1454,32 +1454,45 @@
f._get_all_bits(
+%0A
lambda bit: bit.
@@ -1506,16 +1506,... |
771daafda877050c8fe23b034a0c51ec97502715 | update code which generates list of possible article names | pages/controllers/blog_article.py | pages/controllers/blog_article.py | from core import database as database
from core.exceptions import NotFoundError, ServerError
from core.markdown import MarkdownParser
from core.article_helpers import get_article
import core.functions
import yaml
def get_page_data(path, get, post, variables):
article = get_article(get.get('name', ''))
if not arti... | Python | 0.00004 | @@ -171,16 +171,34 @@
_article
+, get_all_articles
%0Aimport
@@ -738,40 +738,24 @@
s =
-database.Table('article').filter
+get_all_articles
()%0A
|
7060f48df582dcfae1768cc37d00a25e0e2e1f6f | Comment post endpoint return a ksopn, fix issue saving comments add post id and convert it to int | app/views/comment_view.py | app/views/comment_view.py | from flask import jsonify
from flask_classy import FlaskView
from flask_user import current_user, login_required
from ..models import CommentModel, PostModel
from ..forms import CommentForm
class Comment(FlaskView):
def get(self):
pass
def all(self, post_id):
comment = CommentModel()
... | Python | 0.000025 | @@ -669,16 +669,108 @@
sername,
+%0A post_id=int(post_id),%0A
**form.
@@ -775,16 +775,16 @@
m.data)%0A
-
@@ -865,17 +865,29 @@
urn
-%22ALEYUYA%22
+jsonify(comment.data)
%0A
|
c1044e25e18afd78b3fda8fd9b00a4f67cfbbc65 | allow markdownlint to be disabled for specific lines (#4) | pymarkdownlint/lint.py | pymarkdownlint/lint.py | from __future__ import print_function
from pymarkdownlint import rules
class MarkdownLinter(object):
def __init__(self, config):
self.config = config
@property
def line_rules(self):
return [rule for rule in self.config.rules if isinstance(rule, rules.LineRule)]
def _apply_line_rules(... | Python | 0.000002 | @@ -581,24 +581,49 @@
line_nr = 1%0A
+ ignoring = False%0A
for
@@ -633,24 +633,309 @@
e in lines:%0A
+ if ignoring:%0A if line.strip() == '%3C!-- markdownlint:enable --%3E':%0A ignoring = False%0A else:%0A if line.strip() == '%3C!... |
e4ecc0f8049f1388188f0a64b373a7e90b2dc1e9 | Update at 2017-07-22 15-01-48 | plot.py | plot.py | from sys import argv
import matplotlib as mpl
mpl.use('Agg')
import seaborn as sns
sns.set_style("darkgrid")
import matplotlib.pyplot as plt
import pandas as pd
# from keras.utils import plot_model
# plot_model(model, to_file='model.png', show_shapes=True, show_layer_names=False)
def plot_svg(log, name):
df = p... | Python | 0 | @@ -14,16 +14,41 @@
rt argv%0A
+from pathlib import Path%0A
import m
|
d783efe4d5e81a1049ff0cb02c96d32ce371a434 | Add handling for MozillaCookieJar for persistence | simplemediawiki.py | simplemediawiki.py | # python-simplemediawiki - Extremely low-level wrapper to the MediaWiki API
# Copyright (C) 2010 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the ... | Python | 0 | @@ -1846,40 +1846,8 @@
%22%22%22%0A
- _cj = cookielib.CookieJar()%0A
@@ -1950,16 +1950,34 @@
api_url
+, cookie_file=None
):%0A
@@ -2002,16 +2002,386 @@
api_url
+%0A if cookie_file:%0A self._cj = cookielib.MozillaCookieJar(cookie_file)%0A try:%0A self._cj.l... |
dc3d5ae5b6b4bed40218a6dd6beb33525c8aaa51 | Comment out some lines in test, MPICH2 generates misterious warning | test/test_file.py | test/test_file.py | from mpi4py import MPI
import mpiunittest as unittest
import os, tempfile
class TestFileBase(object):
COMM = MPI.COMM_NULL
FILE = MPI.FILE_NULL
prefix = 'mpi4py'
def setUp(self):
self.fd, self.fname = tempfile.mkstemp(prefix=self.prefix)
self.amode = MPI.MODE_RDWR | MPI.MODE_CREATE
... | Python | 0 | @@ -938,32 +938,126 @@
(self):%0A
+## XXX MPICH2 emits a nesting level warning%0A ## when preallocating zero size.%0A #
self.FILE.Preall
@@ -1065,32 +1065,33 @@
cate(0)%0A
+#
size = self.FILE
@@ -1102,32 +1102,33 @@
_size()%0A
+#
self.assertEqual
|
d426ce1a4c00abe08444efcf330f12ebc2571271 | Fix #36, Import print_function to support python3 print syntax | resin/settings.py | resin/settings.py | import ConfigParser
import os.path as Path
import os
import shutil
import sys
from . import exceptions
from .resources import Message
class Settings(object):
"""
This class handles settings for Resin Python SDK.
Attributes:
HOME_DIRECTORY (str): home directory path.
CONFIG_SECTION (str):... | Python | 0 | @@ -1,12 +1,51 @@
+from __future__ import print_function%0A%0A
import Confi
|
6e7dfe97cdce58f892f88560e4b4709e6625e6bd | Clean up package level imports | metatlas/__init__.py | metatlas/__init__.py | __version__ = '0.2'
from .mzml_loader import mzml_to_hdf
from .h5_query import plot_heatmap, plot_spectrogram, plot_xic
from .h5_query import get_data, get_XIC, get_HeatMapRTMZ, get_spectrogram
| Python | 0 | @@ -113,11 +113,11 @@
lot_
-xic
+XIC
%0Afro
@@ -162,19 +162,15 @@
get_
-HeatM
+heatm
ap
-RTMZ
, ge
|
db6a6da8fe1bdd73fbd971153a4fda6975fc7b4e | update version | methylpy/__init__.py | methylpy/__init__.py | __version__ = '1.2.8'
| Python | 0 | @@ -16,7 +16,7 @@
1.2.
-8
+9
'%0A
|
8234a22ca090c38b80ffd650b490d1dd8cbe766d | test for fix/18 | test/test_ipv4.py | test/test_ipv4.py | from csirtg_indicator import Indicator
from csirtg_indicator.exceptions import InvalidIndicator
def _not(data):
for d in data:
d = Indicator(d)
assert d.itype is not 'ipv4'
def test_ipv4_ipv6():
data = ['2001:1608:10:147::21', '2001:4860:4860::8888']
_not(data)
def test_ipv4_fqdn():
... | Python | 0 | @@ -1285,26 +1285,27 @@
cator('1
-9
+7
2.16
-8.1.1
+.30.32
').is_pr
|
a8090276b86e12a798be56000dc9831b07544ead | disable review test for now | test/test_main.py | test/test_main.py | import os
import sys
import unittest
from mock import patch
import json
import shutil
import satsearch.main as main
import satsearch.config as config
from nose.tools import raises
testpath = os.path.dirname(__file__)
config.DATADIR = testpath
class Test(unittest.TestCase):
""" Test main module """
args = '... | Python | 0 | @@ -1030,32 +1030,33 @@
eError)%0A def
+_
test_main_review
@@ -1119,24 +1119,58 @@
var set %22%22%22%0A
+ os.setenv('IMGCAT', None)%0A
scen
|
aa3e36cc37b2ddcc5d166965f8abeff560e6b0f1 | Use test database on alembic when necessary | migrations/config.py | migrations/config.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import logging
from logging.handlers import SysLogHandler
from dotenv import load_dotenv
load_dotenv('.env')
# Storage
DATABASE_URL =... | Python | 0 | @@ -299,16 +299,54 @@
torage%0A%0A
+if not os.environ.get('TESTING'):%0A
DATABASE
@@ -379,16 +379,74 @@
E_URL'%5D%0A
+else:%0A DATABASE_URL = os.environ%5B'TEST_DATABASE_URL'%5D%0A%0A
%0A# Loggi
|
0d8766849bedea43cf2eab006327cb942f61c3af | add testing function | test/test_yaml.py | test/test_yaml.py | from __future__ import division, absolute_import, print_function
import confuse
import yaml
import unittest
from . import TempDir
def load(s):
return yaml.load(s, Loader=confuse.Loader)
class ParseTest(unittest.TestCase):
def test_dict_parsed_as_ordereddict(self):
v = load("a: b\nc: d")
sel... | Python | 0.000004 | @@ -1119,24 +1119,537 @@
t raised')%0A%0A
+ def test_reload_conf(self):%0A with TempDir() as temp:%0A path = temp.sub('test_config.yaml', b'foo: bar')%0A config = confuse.Configuration('test', __name__)%0A config.set_file(filename=path)%0A self.assertEqual(config%5... |
8faa77e8c7a93620f116d4394788d1f2b560aa2f | comment fix | models/core/types.py | models/core/types.py | # No shebang line, this module is meant to be imported
#
# Copyright 2013 Oliver Palmer
#
# 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
#
# U... | Python | 0 | @@ -1124,16 +1124,17 @@
pe(None)
+
# from
|
421f32947fc2035d7578899a51be779f72983a74 | Document `replace` parameter | girder/utility/setting_utilities.py | girder/utility/setting_utilities.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... | Python | 0.000003 | @@ -2670,32 +2670,280 @@
iterable of str%0A
+ :param replace: If a validator already exists for this key, set this to True to replace the%0A existing validator. The default is to add the new validator in addition to running the%0A old validation function.%0A :type replace: bool%0A
%22%22%22%0A... |
fdd2283761e5eefc5db1ea51642b670f6f187faa | tweak validator constructor for old versions of PyQt | glue/qt/widgets/histogram_widget.py | glue/qt/widgets/histogram_widget.py | from functools import partial
import numpy as np
from PyQt4 import QtGui
from ...core import message as msg
from ...clients.histogram_client import HistogramClient
from ..ui.histogramwidget import Ui_HistogramWidget
from ..glue_toolbar import GlueToolbar
from ..mouse_mode import RectangleMode
from .data_viewer impor... | Python | 0 | @@ -1084,33 +1084,17 @@
-self.ui.xmin.setV
+v
alidator
(QtG
@@ -1081,33 +1081,35 @@
validator
-(
+ =
QtGui.QDoubleVal
@@ -1107,33 +1107,69 @@
DoubleValidator(
-)
+None)%0A validator.setDecimals(7
)%0A self.u
@@ -1168,26 +1168,26 @@
self.ui.xm
-ax
+in
.setValidato
@@ -1188,29 +1188,... |
c08e25172d362176c8abed3d2bf54c2cf13da303 | Fix test for settings_helpers | glue/tests/test_settings_helpers.py | glue/tests/test_settings_helpers.py | from mock import patch
import os
from glue.config import SettingRegistry
from glue._settings_helpers import load_settings, save_settings
def test_roundtrip(tmpdir):
settings = SettingRegistry()
settings.add('STRING', 'green', str)
settings.add('INT', 3, int)
settings.add('FLOAT', 5.5, float)
se... | Python | 0.000001 | @@ -879,32 +879,42 @@
load_settings(
+force=True
)%0A%0A a
|
01917a077681949d29eb48173e031b5dfd441e0d | update angle.py | test/function/angle/angle.py | test/function/angle/angle.py | import numpy as np
def angle2D(vec1,vec2):
length1 = np.linalg.norm(vec1)
length2 = np.linalg.norm(vec2)
print("length ", length1, length2)
return np.arccos(np.dot(vec1,vec2)/(length1*length2))
def angle3D(vec1, vec2):
# return the angle
v1 = vec1[[0,1]]
v2 = vec2[[0,1]]
a3 = angle2D(v... | Python | 0.000001 | @@ -146,16 +146,100 @@
ength2)%0A
+ if length1 %3C 1e-16:%0A return 0.%0A if length2 %3C 1e-16:%0A return 0.%0A
retu
@@ -728,16 +728,106 @@
7,-8.0%5D)
+%0A%0Av1 = np.array(%5B0., 0., 1.%5D)%0Av_ref = np.array(%5B-6.758097397797128,6.190970809322855,4.0%5D)
%0Aprint(a
|
77593739e13f472d844076d38f31b4a767332840 | Improve list of locations in admin | dthm4kaiako/events/admin.py | dthm4kaiako/events/admin.py | """Module for admin configuration for the events application."""
import logging
from django.contrib import admin
from django.utils.timezone import now
from django.contrib.gis.db import models as geomodels
from django.utils.translation import gettext_lazy as _
from events.models import (
Event,
Session,
Loca... | Python | 0 | @@ -633,24 +633,192 @@
dget%7D%0A %7D%0A
+ list_display = (%0A 'name',%0A 'room',%0A 'street_address',%0A 'suburb',%0A 'city',%0A 'region',%0A )%0A list_filter = ('region', )%0A
%0A%0Aclass Sess
|
c59e03b7e87544eb1b954c96275bc6e8546e8a0b | Remove time code | cactusbot/services/beam/handler.py | cactusbot/services/beam/handler.py | """Handle data from Beam."""
from logging import getLogger
import json
import asyncio
import time
from ...packets import MessagePacket, EventPacket
from .api import BeamAPI
from .chat import BeamChat
from .constellation import BeamConstellation
from .parser import BeamParser
class BeamHandler:
"""Handle data ... | Python | 0.023487 | @@ -84,20 +84,8 @@
ncio
-%0Aimport time
%0A%0Afr
@@ -1776,56 +1776,8 @@
%22%22%0A%0A
- start = int(round(time.time() * 1000))%0A%0A
@@ -2352,96 +2352,8 @@
HACK
-%0A end = int(round(time.time() * 1000))%0A print(end - start)
%0A%0A
|
dc1b26de1f4fd027f6662ac99b6a11cb53360db6 | Use dict instead of iterable of sets for single values | grapheme/grapheme_property_group.py | grapheme/grapheme_property_group.py | import json
import os
from enum import Enum
class GraphemePropertyGroup(Enum):
PREPEND = "Prepend"
CR = "CR"
LF = "LF"
CONTROL = "Control"
EXTEND = "Extend"
REGIONAL_INDICATOR = "Regional_Indicator"
SPACING_MARK = "SpacingMark"
L = "L"
V = "V"
T = "T"
LV = "LV"
LVT = "L... | Python | 0 | @@ -567,31 +567,16 @@
%0A
- for char_set,
group
-in
+=
SIN
@@ -596,43 +596,39 @@
INGS
-:%0A if char in char_set:%0A
+.get(char, None)%0A if group:%0A
@@ -2720,85 +2720,47 @@
S =
-%5B%0A (%0A set(int(char, 16) for char in value%5B%22single_chars%22%5D),
+%7B%7D%0A%0A ... |
2b3281863f11fa577dd6504e58f6faec8ada2259 | Change order of API call | qiime_studio/api/v1.py | qiime_studio/api/v1.py | from flask import Blueprint, jsonify
from .security import validate_request_authentication
from qiime.sdk import PluginManager
PLUGIN_MANAGER = PluginManager()
v1 = Blueprint('v1', __name__)
v1.before_request(validate_request_authentication)
@v1.route('/', methods=['GET', 'POST'])
def root():
return jsonify(con... | Python | 0.000001 | @@ -498,18 +498,8 @@
e('/
-workflows/
%3Cplu
@@ -507,16 +507,26 @@
in_name%3E
+/workflows
', metho
|
896482b83ad75c445e72dbb0eb6bc7246662f699 | access token is adjusted | skybotapp/views.py | skybotapp/views.py | import json
import requests
from pprint import pprint
from django.shortcuts import render
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
# yomamabot/fb_yomamabot/views.py
from django.views import generic
from django.http.response import HttpResponse
from djang... | Python | 0.000003 | @@ -533,25 +533,185 @@
en=%3C
-page-access-token
+EAASfh0TDd8cBAHBMfkWQGAexatTOup01lZCXtUJ5CF5Imr5b7MeQu30v6TnEzQmvoJF9MZBzkoZBdhLaVcCSY2BtPivUNJh7pic5vfEA13qDr3TRQLuHn8aKpKZAip4X2QHqhBTa7XQNGPnII1cqNMP46gAaRYMzHHSnZA4NZCAwZDZD
%3E' %0A
|
06fa3a4625576a0d7d4897dabcc2979c36d62ce1 | Remove unused code | dwarf/image/api_response.py | dwarf/image/api_response.py | #!/usr/bin/env python
#
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2013 OpenStack Foundation
#
# 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://... | Python | 0 | @@ -1309,99 +1309,8 @@
%7D%0A%0A%0A
-def images_show(data):%0A return %7B%22image%22: template(IMAGE, data, add=IMAGE_PROPERTIES)%7D%0A%0A%0A
def
|
1334c8fa989981e3c917cdc16869b04ad1c2f6e0 | add --g-fatal-warnings gtk option | snaked/core/run.py | snaked/core/run.py | from optparse import OptionParser
import os
def get_manager():
parser = OptionParser()
parser.add_option('-s', '--session', dest='session',
help="Open snaked with specified session", default='default')
parser.add_option('', '--select-session', action="store_true", dest='select_session',
hel... | Python | 0.000001 | @@ -503,16 +503,85 @@
t=False)
+%0A parser.add_option('', '--g-fatal-warnings', action=%22store_true%22)
%0A%0A op
|
6670fe1d081e27417a3d340e2c12c061078582af | Bump version (pre-release) | django_xhtml2pdf/__init__.py | django_xhtml2pdf/__init__.py | # -*- coding: utf-8 -*-
"""
See PEP 386 (http://www.python.org/dev/peps/pep-0386/)
Release logic:
1. Remove "dev" from current.
2. git commit
3. git tag <version>
4. push to pypi + push to github
5. bump the version, append '.dev0'
6. git commit
7. push to github (to avoid confusion)
"""
__version__ = '0.0.3.dev0'
| Python | 0 | @@ -303,16 +303,11 @@
= '0.0.3
-.dev0
'%0A%0A
|
94d18ba6ede9dc58a558c68fd3af9bbcadc7f189 | Update urls.py For Django 1.6 | djangobb_forum/tests/urls.py | djangobb_forum/tests/urls.py | from django.conf.urls.defaults import patterns, include
urlpatterns = patterns('',
(r'^forum/', include('djangobb_forum.urls', namespace='djangobb')),
)
| Python | 0.000001 | @@ -18,17 +18,8 @@
urls
-.defaults
imp
|
0956a28da1a19be4551b73c913098721ae719e04 | rename method | account_bank_statement_import_coda/wizard/account_bank_statement_import_coda.py | account_bank_statement_import_coda/wizard/account_bank_statement_import_coda.py | # -*- coding: utf-8 -*-
##############################################################################
#
# This file is part of account_bank_statement_import_coda,
# an Odoo module.
#
# Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>)
#
# account_bank_statement_import_coda is free software:
# yo... | Python | 0.000004 | @@ -5419,20 +5419,16 @@
ine_note
-_msg
(self, l
@@ -8253,12 +8253,8 @@
note
-_msg
(lin
|
bdceb4c7bc0b71755d9f63974a5597e29fd94e75 | comment test code | tester.py | tester.py | import urllib2
from socket import p
import settings
import random
import threading
import Queue
import json
import requests
from settings import USER_AGENTS
def makeRequest(proxy, target):
i_headers = {'User-Agent': random.choice(USER_AGENTS)}
print("\n")
try:
r = requests.get(target, proxies=proxy, headers=i_he... | Python | 0 | @@ -2144,16 +2144,18 @@
com/')%0A%0A
+#
jsonFile
@@ -2170,16 +2170,18 @@
y.json%22%0A
+#
f = open
@@ -2191,16 +2191,18 @@
onFile)%0A
+#
fileData
@@ -2213,16 +2213,18 @@
.read()%0A
+#
f.close(
@@ -2225,16 +2225,18 @@
close()%0A
+#
proxys =
@@ -2257,18 +2257,22 @@
leData)%0A
-%0A%0A
+#%0A#%0A#
workQueu
... |
3fb934d505f22987f39e28d35bb17ea157770913 | fix check for tcp port mapping on remove service link | rancher/servicelink.py | rancher/servicelink.py | import json
import re
from rancher import exit, util
import requests
class ServiceLink:
rancherApiVersion = '/v1/'
request_headers = {'Content-Type': 'application/json', 'Accept': 'application/json'}
def __init__(self, configuration):
self.config = configuration
def __get_load_balancer_tar... | Python | 0 | @@ -4126,27 +4126,29 @@
or (port.
-end
+start
swith(str(de
|
8aee0469073e7aa7afb9a97000fe4f0cc1746d76 | add last-modified headers to deepzoom views | readux/dyndzi/views.py | readux/dyndzi/views.py | import logging
from django.http import HttpResponse, HttpResponseBadRequest, Http404
from django.views.decorators.http import condition, last_modified
from deepzoom import DeepZoomImageDescriptor
from eulfedora.server import TypeInferringRepository
from eulfedora.views import datastream_etag
from readux.books.models... | Python | 0 | @@ -132,24 +132,9 @@
tion
-, last_modified
%0A
+
%0Afro
@@ -228,16 +228,28 @@
pository
+, Repository
%0Afrom eu
@@ -1156,39 +1156,561 @@
s)%0A%0A
-@condition(etag_func=image_etag
+%0Adef image_lastmodified(request, img_id , **kwargs):%0A '''Last-modified for Fedora Image datastream, to allow browser caching%0A... |
c6cde6a72204a9e688ea0d6dfe9550f2cb39a0fc | resolve incorrect merge conflict resolution | common/lib/xmodule/xmodule/modulestore/tests/test_xml.py | common/lib/xmodule/xmodule/modulestore/tests/test_xml.py | import os.path
from nose.tools import assert_raises, assert_equals
from xmodule.course_module import CourseDescriptor
from xmodule.modulestore.xml import XMLModuleStore
from xmodule.modulestore import XML_MODULESTORE_TYPE
from .test_modulestore import check_path_to_location
from . import DATA_DIR
class TestXMLModu... | Python | 0.000005 | @@ -276,17 +276,29 @@
on%0Afrom
-.
+xmodule.tests
import
|
7eff792fd654335e423c17cf1fa8dd70d2187090 | Fixed double quoting of the ">>" string in search.py. | channelguide/guide/views/search.py | channelguide/guide/views/search.py | from cgi import escape
import urllib
import re
from django.utils.translation import gettext as _
from django.http import Http404
from channelguide import util, cache
from channelguide.guide import search as search_mod
from channelguide.guide.templateutil import Pager
from channelguide.guide.models import (Channel, Ca... | Python | 0.999671 | @@ -1,27 +1,4 @@
-from cgi import escape%0A
impo
@@ -1197,38 +1197,30 @@
_link(href,
-escape(
label)
-)
%0A%0Adef more_r
@@ -1468,22 +1468,14 @@
ef,
-escape(
label)
-)
%0A%0Ade
|
c79ccb44edbca1ccc5d5b1bddb4fa8dc19e6df66 | update middleware for django 1.10 issue | chapter6/growth_studio/settings.py | chapter6/growth_studio/settings.py | """
Django settings for growth_studio project.
Generated by 'django-admin startproject' using Django 1.10.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
imp... | Python | 0 | @@ -1119,61 +1119,8 @@
= %5B%0A
- 'django.middleware.security.SecurityMiddleware',%0A
@@ -1328,32 +1328,102 @@
ionMiddleware',%0A
+ 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',%0A
'django.cont
@@ -1528,16 +1528,69 @@
eware',%0A
+ 'django.middleware.security.SecurityMiddleware... |
2b3667dfc4fbd6571da288146d4e8f8f8f2d51a1 | Fix broken sorted set unit test. | test/unit/test_sorted_set.py | test/unit/test_sorted_set.py | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
import pytest
from clique.sorted_set import SortedSet
@pytest.fixture
def standard_set(request):
'''Return sorted set.'''
return SortedSet([4, 5, 6, 7, 2, 1, 1])
@pytest.mark.parametrize(('item', 'expec... | Python | 0 | @@ -731,17 +731,17 @@
3, 3%5D),
-4
+3
)%0A%5D, ids
|
656e41ef504d42d2fcf0155aaedccc45c9d72c33 | Add the null handler to the root logger to prevent Tornado from doing logging.basicConfig | rejected/controller.py | rejected/controller.py | """
OS Level controlling class invokes startup, shutdown and handles signals.
"""
import clihelper
import logging
import signal
import sys
from rejected import mcp
from rejected import __version__
LOGGER = logging.getLogger(__name__)
class Controller(clihelper.Controller):
"""Rejected Controller application th... | Python | 0.000001 | @@ -134,16 +134,44 @@
rt sys%0A%0A
+from rejected import common%0A
from rej
@@ -1298,16 +1298,50 @@
so now%0A
+ common.add_null_handler()%0A
|
db0e6265892231ecf10244eb7ddcddc62a12b82b | Fix bug where cached items in subfolders would be re-read. | configmanager.py | configmanager.py | import json
import os
import os.path
class ConfigManager():
_cache = {}
def __init__(self, configPath = "configs/"):
if os.path.isdir(configPath):
self.configPath = configPath
else:
raise IOError("Config Path does not eixst")
self._configs = {}
self._syncCache()
self.getConfigs()
def __getitem__(se... | Python | 0 | @@ -829,20 +829,20 @@
%09%09%09final
-Path
+Name
= os.pa
@@ -1111,16 +1111,40 @@
e cache,
+ or added in previously,
skip it
@@ -1170,17 +1170,22 @@
ache or
-n
+finalN
ame not
@@ -1424,20 +1424,20 @@
ig(final
-Path
+Name
, parsed
@@ -1438,17 +1438,16 @@
parsed)%0A
-%0A
%09#Return
|
109a07b8344df9c2420c2cea7f9bd6419284c920 | Fix get_employees_with_number query | erpnext/communication/doctype/call_log/call_log.py | erpnext/communication/doctype/call_log/call_log.py | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.document import Document
from erpnext.crm.doctype.utils import get_scheduled_employ... | Python | 0.000003 | @@ -2094,32 +2094,33 @@
': %5B'like', '%25%7B%7D
+%25
'.format(number)
|
e98e7313c5a7c3ef6c25a81d873f10a727f9523c | Change remaining tf.mul -> tf.multiply, tf.neg -> tf.negative, and tf.sub -> tf.subtract | tensorflow/python/saved_model/example/saved_model_half_plus_two.py | tensorflow/python/saved_model/example/saved_model_half_plus_two.py | ## Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | Python | 0.999141 | @@ -3763,24 +3763,29 @@
f.add(tf.mul
+tiply
(a, x), b, n
@@ -3858,16 +3858,21 @@
d(tf.mul
+tiply
(a, x2),
|
e8d73688bd08921f62fad232938613051c3f32b5 | Fix typo in has_url docstring. | wafer/talks/models.py | wafer/talks/models.py | from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse
from django.conf import settings
from django.db import models
from markitup.fields import MarkupField
# constants to make things clearer elsewhere
ACCEPTED = 'A'
PENDING = 'P'
REJECTED = 'R'
class TalkType(models.M... | Python | 0.000017 | @@ -3046,17 +3046,17 @@
%22%22Test i
-n
+f
the tal
|
17af071faa70d3dc4a884f62fb50f34e8621ac6d | Update watchman/constants.py | watchman/constants.py | watchman/constants.py | DEFAULT_CHECKS = (
'watchman.checks.caches',
'watchman.checks.databases',
'watchman.checks.storage',
)
PAID_CHECKS = (
'watchman.checks.email',
)
| Python | 0 | @@ -108,16 +108,17 @@
age',%0A)%0A
+%0A
PAID_CHE
|
6fedc3e826220f69ffd503b7c73e02962cfc1752 | use cp.testing.assert_array_equal | examples/gemm/sgemm.py | examples/gemm/sgemm.py | from __future__ import division
import argparse
import math
import cupy as cp
import numpy as np
from utils import benchmark
from utils import load_kernel
from utils import read_code
sgemm_file = 'sgemm.cu'
def sgemm(A, B,
dim_x=16, dim_y=16, blk_m=64, blk_n=64, blk_k=4,
dim_xa=64, dim_ya=4, ... | Python | 0.000337 | @@ -2012,17 +2012,17 @@
ess%0A
-n
+c
p.testin
@@ -2030,16 +2030,22 @@
.assert_
+array_
equal(sg
@@ -2053,22 +2053,16 @@
mm(A, B)
-.get()
, cp.dot
@@ -2071,14 +2071,8 @@
, B)
-.get()
)%0A%0A
|
e1a7e4535e64c005fb508ba6d3fed021bbd40a62 | Update only tables in visible schemas | oedb_datamodels/versions/1a73867b1e79_add_meta_search.py | oedb_datamodels/versions/1a73867b1e79_add_meta_search.py | """Add meta_search table
Revision ID: 1a73867b1e79
Revises: 1c6e2fb3d3b6
Create Date: 2019-04-29 11:47:04.783168
"""
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql
from sqlalchemy.orm.session import sessionmaker
from api.actions import update_meta_search
# revision identif... | Python | 0 | @@ -293,16 +293,60 @@
a_search
+%0Afrom dataedit.views import schema_whitelist
%0A%0A# revi
@@ -1003,24 +1003,73 @@
s.values():%0A
+ if table.schema in schema_whitelist:%0A
upda
|
f1fec3790fee11ff3d83c272e3a2aa7bb548ddfa | Remove print | open_spiel/python/algorithms/expected_game_score_test.py | open_spiel/python/algorithms/expected_game_score_test.py | # Copyright 2019 DeepMind Technologies Ltd. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | Python | 0.000016 | @@ -1712,41 +1712,8 @@
cy)%0A
- print(uniform_policy_values)%0A
|
0971a1216ccd88f7822148a83765b2b5346198ee | Fix infobar test by actually waiting for infobar before checking for it. | chrome/test/functional/infobars.py | chrome/test/functional/infobars.py | #!/usr/bin/python
# Copyright (c) 2010 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 re
import pyauto_functional # Must be imported before pyauto
import pyauto
class InfobarTest(pyauto... | Python | 0.000003 | @@ -3202,24 +3202,56 @@
eToURL(url)%0A
+ self.WaitForInfobarCount(1)%0A
self._Ve
@@ -3315,24 +3315,24 @@
match_text)%0A
-
# Accept
@@ -3821,16 +3821,81 @@
L(url))%0A
+ self.WaitForInfobarCount(1, windex=0, tab_index=tab_index)%0A
se
@@ -4106,24 +4106,79 @@
(url, 1, 0)%0A
+ self.WaitForIn... |
fa52bbde01f62bb0816e71970ac50761947afa72 | Improve comment | retaining_wall.py | retaining_wall.py | class RetainingWallSolver(object):
def retaining_wall(self, wood_lengths, required_lengths):
self.required_lengths = required_lengths
return self.retaining_wall_recursive(wood_lengths, len(required_lengths) - 1)
def retaining_wall_recursive(self, wood_lengths, required_length_idx):
if r... | Python | 0 | @@ -768,21 +768,24 @@
cut
-this
+current_
required
len
@@ -780,17 +780,17 @@
required
-
+_
length o
|
b4a9380c73dd367c2cf6249cdf4cdbbdfdbc7907 | fix example | examples/pythonnews.py | examples/pythonnews.py | """
Extract python news from python.org
"""
import re
import logging
from pomp.core.base import BaseCrawler, BasePipeline
from pomp.core.item import Item, Field
from pomp.contrib import SimpleDownloader
logging.basicConfig(level=logging.DEBUG)
news_re = re.compile(r'<h2 class="news">(.*?)</h2>([\s\S]*?)<div class="pu... | Python | 0.0001 | @@ -958,16 +958,25 @@
ss(self,
+ crawler,
item):%0A
|
e3c42442f090b8b6982f7ff8c93632c43cfa80b3 | use insights landing for offseason | tba_config.py | tba_config.py | import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
MAX_YEAR = 2015
# For choosing what the main landing page displays
KICKOFF = 1
BUILDSEASON = 2
COMPETITIONSEASON = 3
OFFSEASON = 4
INSIGHTS = 5
CHAMPS = 6
# The CONFIG variables should have exactly the same structure between environments
# Ev... | Python | 0 | @@ -797,25 +797,24 @@
ler'%5D =
-OFFSEASON
+INSIGHTS
%0ACONFIG%5B
|
b860d7cb81488f5ebbe7e9e356a6d4f140c33df5 | update to follow python 2to3 changes | tests/__init__.py | tests/__init__.py | from test_home import *
from test_feed import *
from test_shownote import *
from test_agenda import *
from test_episode import *
| Python | 0 | @@ -1,17 +1,18 @@
from
+.
test_home im
@@ -19,24 +19,25 @@
port *%0Afrom
+.
test_feed im
@@ -44,24 +44,25 @@
port *%0Afrom
+.
test_shownot
@@ -73,24 +73,25 @@
port *%0Afrom
+.
test_agenda
@@ -104,16 +104,17 @@
*%0Afrom
+.
test_epi
|
d77256d1964354eb7dd178f383dd3254c3b4d975 | Fix source docs page | docs/_helpers/source_page.py | docs/_helpers/source_page.py | """Generate a restructured text document that describes built-in sources
and save it to this module's docstring for the purpose of including in
sphinx documentation via the automodule directive."""
import string
from sncosmo.models import _SOURCES
lines = [
'',
' '.join([20*'=', 7*'=', 10*'=', 27*'=', 30*'... | Python | 0.000001 | @@ -278,17 +278,17 @@
'.join(%5B
-2
+3
0*'=', 7
@@ -342,17 +342,17 @@
'%7B0:
-2
+3
0%7D %7B1:7
@@ -1310,17 +1310,17 @@
d(%22%7B0!r:
-2
+3
0%7D %7B1!r
|
7377dfaa9877e49b41c8a6c8462b425729599728 | Fix metadata version. | lib/ansible/modules/windows/win_pagefile.py | lib/ansible/modules/windows/win_pagefile.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2017, Liran Nisanov <lirannis@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# this is a windows documentation stub. actual code lives in the .ps1
# file of the same name
ANSIBLE_METADATA = {'metadata_vers... | Python | 0 | @@ -322,17 +322,17 @@
on': '1.
-0
+1
',%0A
|
5f5a7ec9460d60a964663ace670529813a41a9d9 | Update bluetooth_ping_test.py | tests/bluetooth_ping_test.py | tests/bluetooth_ping_test.py | #!/usr/bin/env python
import os
import subprocess as subp
from subprocess import *
from avocado import Test
class WifiScanAP(Test):
def test():
targetDeviceMac = '8C:1A:BF:0D:31:A9'
bluetoothChannel = '2'
port = 1
print("Bluetooth ping test: testing " + targetDeviceMac)
p = subp.Pope... | Python | 0.000002 | @@ -102,16 +102,73 @@
t Test%0A%0A
+#I have used my Samsung Galaxy S7 Edge as target device%0A%0A
class Wi
|
3f8f4adec965be69a17a2577b8fd5dd94aa66015 | Add test to guard against command arg help message regression (#8561) | tests/cli/test_cli_parser.py | tests/cli/test_cli_parser.py | #!/usr/bin/env python
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "... | Python | 0 | @@ -6462,20 +6462,692 @@
n(%22Groups%22, stdout)%0A
+%0A def test_should_display_helps(self):%0A parser = cli_parser.get_parser()%0A%0A all_command_as_args = %5B%0A command_as_args%0A for top_commaand in cli_parser.airflow_commands%0A for command_as_args in (%0A ... |
9cc45f750c0860715e66c085895611984531c48c | update standalone disclosure url | paying_for_college/config/urls.py | paying_for_college/config/urls.py | from django.conf.urls import url, include
from django.conf import settings
from paying_for_college.views import LandingView, StandAloneView
from django.contrib import admin
from django.conf import settings
try:
STANDALONE = settings.STANDALONE
except AttributeError: # pragma: no cover
STANDALONE = False
urlp... | Python | 0 | @@ -1185,15 +1185,21 @@
ege/
-compare
+understanding
-fin
@@ -1213,24 +1213,14 @@
aid-
-and-college-cost
+offers
/',%0A
|
d9fc68431c2ff8be94d2e2b13a5c8c80e67dacb2 | Update folder name. | openrcv_setup/utils.py | openrcv_setup/utils.py |
import glob
import logging
import os
from pathlib import Path
from subprocess import check_output
import webbrowser
from setuptools import Command
DOCS_PATH = "docs"
DOCS_BUILD_PATH = os.path.join(DOCS_PATH, "build")
ENCODING = 'utf-8'
LONG_DESCRIPTION_PATH = "setup_long_description.rst"
README_PATH = "README.md"
# ... | Python | 0 | @@ -390,24 +390,25 @@
IR = %22pandoc
+_
filters%22%0APAN
|
43b4910e004e7096addb3d50e8a0a6c307a669c6 | Remove dead get_body_parameter_name_override | lepo/apidef/operation/openapi.py | lepo/apidef/operation/openapi.py | from lepo.apidef.operation.base import Operation
from lepo.apidef.parameter.openapi import OpenAPI3BodyParameter, OpenAPI3Parameter
from lepo.utils import maybe_resolve
class OpenAPI3Operation(Operation):
parameter_class = OpenAPI3Parameter
body_parameter_class = OpenAPI3BodyParameter
def _get_body_param... | Python | 0.000064 | @@ -838,72 +838,8 @@
er%0A%0A
- def get_body_parameter_name_override(self):%0A return%0A%0A
|
b5a6d540f5fdef37b1d58fc45921737e3c77ae96 | fix user autocomplete | let_me_app/views/autocomplete.py | let_me_app/views/autocomplete.py | from dal import autocomplete
from slugify import slugify
from let_me_auth.models import User
from let_me_app.models import Equipment, StaffRole
class UserAutocomplete(autocomplete.Select2QuerySetView):
def get_queryset(self):
# Don't forget to filter out results depending on the visitor !
if not ... | Python | 0.000066 | @@ -142,67 +142,1046 @@
ole%0A
-%0A%0Aclass UserAutocomplete(autocomplete.Select2QuerySetView):
+from let_me_auth.social.pipeline import ABSENT_MAIL_HOST%0Aimport re%0A%0A%0Aclass UserAutocomplete(autocomplete.Select2QuerySetView):%0A create_field = 'username'%0A%0A def create_object(self, text):%0A cell_... |
060576768e02c0499282770dd22e35048d62b12e | Improve clarity of session finish function | tests/conftest.py | tests/conftest.py | from __future__ import print_function
import os
import boto
import pytest
from boto.s3.key import Key as S3Key
from boto.exception import NoAuthHandlerFound
from os.path import join, isfile
s3_bucket = "bokeh-travis"
s3 = "https://s3.amazonaws.com/%s" % s3_bucket
build_id = os.environ.get("TRAVIS_BUILD_ID")
# Can we ... | Python | 0 | @@ -179,16 +179,8 @@
join
-, isfile
%0A%0As3
@@ -469,24 +469,15 @@
s):%0A
+%0A
-try_upload =
+if
os.
@@ -523,17 +523,17 @@
e%22)
-=
+!
= %22True%22
%0A
@@ -532,83 +532,140 @@
rue%22
-%0A report_ready = isfile(report_file)%0A if try_upload and report_
+:%0A return%0A%0A if hasattr(sess... |
e7ddc72505057326c94f608551a08583836f1043 | fix typo. | rio/utils/http.py | rio/utils/http.py | # -*- coding: utf-8 -*-
"""
rio.utils.http
~~~~~~~~~~~~~~
"""
import warnings
from urllib import urlencode
import six
import requests
from requests.exceptions import SSLError
from flask import current_app
from rio.core import celery
from rio.signals import webhook_ran
# In case SSL is unavailable (light builds) we c... | Python | 0.00016 | @@ -496,14 +496,11 @@
rn '
-sentry
+rio
/%25s'
|
705ff08853542140b8f3e2a575cb73ee3a5db017 | support put and delete in task. | rio/utils/http.py | rio/utils/http.py | # -*- coding: utf-8 -*-
"""
rio.utils.http
~~~~~~~~~~~~~~
"""
import warnings
from urllib import urlencode
import six
import requests
from requests.exceptions import SSLError
from flask import current_app
from rio.core import celery
from rio.signals import webhook_ran
# In case SSL is unavailable (light builds) we c... | Python | 0 | @@ -4863,17 +4863,36 @@
hod
-==
+in (
'POST'
+, 'DELETE', 'PUT')
:%0A
|
36a00bd6ece27b89843a856cd2b99d25a1d0e4d3 | Modify conftest.py to support Python 3.5 only | tests/conftest.py | tests/conftest.py | # -*- coding: utf-8 -*-
"""Used by pytest to do some preparation work before running tests."""
#
# (C) Pywikibot team, 2016-2018
#
# Distributed under the terms of the MIT license.
#
from __future__ import absolute_import, division, unicode_literals
import sys
def pytest_configure(config):
"""Set the sys._test_r... | Python | 0.000002 | @@ -123,10 +123,10 @@
6-20
-18
+20
%0A#%0A#
@@ -180,76 +180,8 @@
.%0A#%0A
-from __future__ import absolute_import, division, unicode_literals%0A%0A
impo
|
d3fbe9934329df1b1c5f752e4a43981b4fc8beae | Use pathlib.Path | tests/conftest.py | tests/conftest.py | import pytest
from _pytest.compat import LEGACY_PATH
from libvcs.shortcuts import create_repo_from_pip_url
from libvcs.util import run
@pytest.fixture(scope="function")
def tmpdir_repoparent(tmpdir_factory):
"""Return temporary directory for repository checkout guaranteed unique."""
fn = tmpdir_factory.mkte... | Python | 0.000003 | @@ -1,12 +1,28 @@
+import pathlib%0A%0A
import pytes
@@ -207,27 +207,35 @@
rent(tmp
-dir_factory
+_path: pathlib.Path
):%0A %22
@@ -325,34 +325,13 @@
tmp
-dir_factory.mktemp(%22repo%22)
+_path
%0A
@@ -396,16 +396,30 @@
poparent
+: pathlib.Path
, git_du
@@ -1049,22 +1049,19 @@
poparent
-.join(
+ /
repo_... |
08537185e2bbc7790dc0b7cd45b03b9ce0392bc6 | fix bug | tds/parser.py | tds/parser.py | import struct
from StringIO import StringIO
from io import BytesIO
from .encrypt import decrypt
class PreLoginPacket(object):
def __init__(self, buff):
pass
class LoginPacket(object):
FIELDS = ('client_name', 'username', 'password', 'app_name', 'server_name',
'unknown1',... | Python | 0 | @@ -3876,10 +3876,8 @@
tream)%0D%0A
-%0D%0A
|
0c712dddf2d0906c5b9444ebcbaa131f6bce1c62 | Simplify the datasets example. | examples/mayavi/advanced_visualization/datasets.py | examples/mayavi/advanced_visualization/datasets.py | """
A Mayavi example to show the different data sets. See
:ref:`data-structures-used-by-mayavi` for a discussion.
The following images are created:
.. hlist::
* **ImageData**
.. image:: ../image_data.jpg
:scale: 50
* **RectilinearGrid**
.. image:: ../rectilinear_grid.jpg
... | Python | 0.000001 | @@ -4908,39 +4908,8 @@
%22%22%22%0A
- engine = mlab.get_engine()%0A
@@ -5027,72 +5027,13 @@
s
-rc = VTKDataSource(data=dataset)%0A engine.add_source(src) %0A
+urf =
mla
@@ -5051,19 +5051,23 @@
surface(
-src
+dataset
, opacit
@@ -5128,18 +5128,19 @@
_edges(s
-rc
+urf
),%0A
|
8913f5d6a06e0f25d1c8c1a45e0f5b4da8cbf421 | bump version | rodeo/__init__.py | rodeo/__init__.py |
__version__ = "0.0.2"
| Python | 0 | @@ -1,6 +1,4 @@
-%0A%0A
__ve
@@ -14,9 +14,9 @@
%220.
-0.2
+1.0
%22%0A
|
56b1ef461cfce11ad5e08a031abf175ed73c2081 | Add radius2fov and imagexy_to_pixelXY functions. Clean import. | coordinate_transformations.py | coordinate_transformations.py | # -*- coding: utf-8 -*-
"""
Created on Sat Oct 21 22:35:50 2017
@author: lauri.kangas
"""
import numpy as np
from numpy import sin,cos,arccos,arctan2,mod,pi
from projections import stereographic
def rotate_RADEC(RAs, DECs, center_RA, center_DEC, output='xyz'):
# rotate RA,DEC coordinates to turn center_RA,center... | Python | 0 | @@ -152,20 +152,22 @@
,mod,pi%0A
-from
+import
project
@@ -174,29 +174,8 @@
ions
- import stereographic
%0A%0Ade
@@ -1546,32 +1546,44 @@
fov, projection=
+projections.
stereographic):%0A
@@ -2026,16 +2026,740 @@
radians)
+%0A%0Adef radius2fov(radius, aspect_ratio, projection=projections.stereographic):%0A # ... |
7eb10376b585e56faad4672959f6654f2500a38d | Add `one` as shortcut to `dimensionless_unscaled` | astropy/units/__init__.py | astropy/units/__init__.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This subpackage contains classes and functions for defining and converting
between different physical units.
This code is adapted from the `pynbody
<http://code.google.com/p/pynbody/>`_ units module written by Andrew
Pontzen, who has granted the Astr... | Python | 0.999976 | @@ -694,16 +694,47 @@
bases%0A%0A
+%0Aone = dimensionless_unscaled%0A%0A
# Enable
|
865940bd126c7c45b7c615f751244a46176aca4d | Update version to 2.3b2-dev | openslides/__init__.py | openslides/__init__.py | __author__ = 'OpenSlides Team <support@openslides.org>'
__description__ = 'Presentation and assembly system'
__version__ = '2.3b1'
__license__ = 'MIT'
__url__ = 'https://openslides.org'
args = None
| Python | 0 | @@ -125,9 +125,13 @@
2.3b
-1
+2-dev
'%0A__
|
d2eb134115eb0b35a96f8d494dd2a397eb06e4a6 | Add channel_name on filter ArticleBoxAdmin | opps/articles/admin.py | opps/articles/admin.py | # -*- coding: utf-8 -*-
from django.contrib import admin
from django import forms
from django.utils.translation import ugettext_lazy as _
from .models import Post, Album, Article, Link, ArticleSource, ArticleImage
from .models import ArticleBox, ArticleBoxArticles, ArticleConfig
from opps.core.admin import Publishable... | Python | 0 | @@ -3874,16 +3874,32 @@
, 'slug'
+, 'channel_name'
%5D%0A%0A f
|
8a9fa06c36a89e3fde93059cfbe827506d5b8b62 | Disable exception logging of status code 500 during testing. | orchard/errors/e500.py | orchard/errors/e500.py | # -*- coding: utf-8 -*-
"""
This module sets up the view for handling ``500 Internal Server Error`` errors.
"""
import datetime
import flask
import flask_classful
from orchard.errors import blueprint
class Error500View(flask_classful.FlaskView):
"""
View for ``500 Internal Server Error`` errors.
... | Python | 0 | @@ -1390,16 +1390,83 @@
tring)%0A%0A
+ if not flask.current_app.testing: # pragma: no cover.%0A
@@ -1509,16 +1509,17 @@
essage)%0A
+%0A
|
b8d693a8fd2e0fb9fa8592b9672bc71e874547d3 | Bump version to 0.1.1 | fancypages/__init__.py | fancypages/__init__.py | import os
__version__ = (0, 1, 0, 'alpha', 1)
def get_fancypages_paths(path):
""" Get absolute paths for *path* relative to the project root """
return [os.path.join(os.path.dirname(os.path.abspath(__file__)), path)]
def get_apps():
return (
'django_extensions',
# used for image thumbna... | Python | 0.000002 | @@ -25,17 +25,17 @@
(0, 1,
-0
+1
, 'alpha
|
667f1861c31dc878bc194143dfa52a998afbe1b1 | Simplify form class init parameters | organizations/forms.py | organizations/forms.py | from django import forms
from django.contrib.auth.models import User
from django.contrib.sites.models import get_current_site
from django.utils.translation import ugettext_lazy as _
from organizations.models import Organization, OrganizationUser
from organizations.utils import create_organization
from organizations.ba... | Python | 0.000002 | @@ -541,491 +541,119 @@
st,
-data=None, files=None, auto_id='id_%25s',%0A prefix=None, initial=None, error_class=forms.util.ErrorList,%0A label_suffix=':', empty_permitted=False, instance=None):%0A self.request = request%0A super(OrganizationForm, self).__init__(data=data, files=fi... |
b72f3ce27034ba3f810f205d133445267847f667 | fix CSRF get request | mpweb_core/rester.py | mpweb_core/rester.py | # coding: utf-8
# https://github.com/materialsproject/pymatgen/blob/1eb2f2f/pymatgen/matproj/rest.py
from __future__ import division, unicode_literals
import os, requests, json, warnings, urlparse
class MPResterBase(object):
"""
A base class to conveniently interface with a REST interface in the style of
t... | Python | 0 | @@ -2459,17 +2459,16 @@
.netloc%7D
-/
'.format
@@ -2493,24 +2493,25 @@
-domain +
+site_url
= uri.pa
@@ -2560,16 +2560,23 @@
-domain +
+browserid_csrf
= re
@@ -2599,16 +2599,158 @@
.csrf')%0A
+ if site_url%5B:-1%5D not in browserid_csrf:%0A domain += '/' + site_ur... |
4ec73ee0272d904700c7ae126f6d3ef0d8a5e762 | Work around moz url's busted URL joining | nanospider/spider.py | nanospider/spider.py | from gevent import monkey, queue, pool, spawn
monkey.patch_all()
import requests, traceback, sqlite3, itertools
import url as moz_url
from lxml import etree
from scrapelib import Scraper
from scrapelib.cache import SQLiteCache
def is_html(response):
return 'html' in response.headers.get('content-type', 'text/htm... | Python | 0 | @@ -105,16 +105,26 @@
tertools
+, urlparse
%0Aimport
@@ -2657,21 +2657,51 @@
k =
-url.relative(
+moz_url.parse(urlparse.urljoin(url.utf8(),
link
@@ -2716,16 +2716,17 @@
'href'%5D)
+)
%0A
@@ -2756,24 +2756,66 @@
ment = None%0A
+ new_link._userinfo = None%0A
@@ -4005,16 +4005... |
1506dda66814b8f51ec2dcbf2e632bdafa98bf75 | add root node info to form | arches/app/views/graph.py | arches/app/views/graph.py | '''
ARCHES - a program developed to inventory and manage immovable cultural heritage.
Copyright (C) 2013 J. Paul Getty Trust and World Monuments Fund
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software ... | Python | 0 | @@ -1592,40 +1592,19 @@
-branch%5B'graph'%5D = ResourceGraph(
+rootnode =
bran
@@ -1661,17 +1661,108 @@
ataid'%5D)
-)
+%0D%0A branch%5B'rootnode'%5D = rootnode%0D%0A branch%5B'graph'%5D = ResourceGraph(rootnode)%0D%0A
%0D%0A da
@@ -3754,28 +3754,754 @@
eturn HttpResponseNotFound%0D%0A
+%0D%0... |
b699f950eebbe10c400e9867ce8bead02d2f651c | Remove another thing. | src/txacme/interfaces.py | src/txacme/interfaces.py | # -*- coding: utf-8 -*-
"""
Interface definitions for txacme.
"""
from zope.interface import Interface
class ITLSSNI01Responder(Interface):
"""
Configuration for a tls-sni-01 challenge responder.
The actual responder may exist somewhere else, this interface is merely for
an object that knows how to c... | Python | 0.000001 | @@ -1220,1225 +1220,8 @@
%22%0A%0A%0A
-class ICertificateStore(Interface):%0A %22%22%22%0A A store of certificate/keys/chains.%0A %22%22%22%0A def get(self, server_name):%0A %22%22%22%0A Retrieve the current PEM objects for the given server name.%0A%0A :param str server_name: The serve... |
358729ade26e9a8a101bd77d574d9f5e1f065b0d | Delete single question | relier/api/question.py | relier/api/question.py | from flask import abort, request, make_response
from relier.models import Event, Question, Answer
from relier.api import AuthenticatedResource
from datetime import datetime
from flask import g
class QuestionResource(AuthenticatedResource):
def post(self, event_id):
if not g.user.can_ask:
abort... | Python | 0.999999 | @@ -1421,24 +1421,25 @@
on_id):%0A
+%0A
pass%0A%0A
@@ -1430,20 +1430,450 @@
-pass
+if not g.user.is_admin: %0A abort(403)%0A%0A question = None%0A try:%0A question = Question.get(Question.id == question_id)%0A except Question.DoesNotExist:%0A ... |
8112440223e2e8e4f5d8cb93b28fd846dd59418b | Add logout view. | repocracy/repo/urls.py | repocracy/repo/urls.py | from django.conf.urls.defaults import *
from django.conf import settings
import os
urlpatterns = patterns('repocracy.repo.views',
url(r'^$', 'home', name='home'),
url(r'^claim/(?P<pk>\d+)/(?P<claim_hash>[a-fA-F\d]{40})/$', 'repo_claim', name='repo_claim'),
url(r'^users/(?P<name>[\-_\d\w\\\.]+)/$', 'repo_ow... | Python | 0 | @@ -901,10 +901,102 @@
hg')%7D),%0A
+ url(r'%5Elogout/$', 'django.contrib.auth.views.logout', %7B'redirect_field_name': 'next'%7D),%0A
)%0A
|
4fba4af394f657918efe7bdd3c091f06d13892a6 | Fix failures induced by MyCapytain 0.1.0 | nautilus/response.py | nautilus/response.py | # -*- coding: utf-8 -*-
"""
Response generator for the queries
"""
from __future__ import unicode_literals
from six import text_type as str
import json
from collections import OrderedDict
from copy import copy
from MyCapytain.resources.inventory import TextInventory
from lxml import etree
JSON = "application/tex... | Python | 0.000001 | @@ -138,17 +138,16 @@
as str%0A%0A
-%0A
import j
@@ -265,16 +265,60 @@
ventory%0A
+from MyCapytain.common.reference import URN%0A
from lxm
@@ -3558,32 +3558,261 @@
n, format=XML):%0A
+ _prev = None%0A _next = None%0A%0A if passage.prev:%0A _prev = URN(%22%7B%7D:%7B%7D%22.format(passage.urn%5B%22tex... |
8b008968e92cabf1022dff6edb37f38c3aaa5214 | Update merge_filter.py | uf_examples/courses/merge_filter.py | uf_examples/courses/merge_filter.py | #!/usr/bin/env/python
"""
merge_filter.py -- find the courses in VIVO, and match them to the courses in the source. They
must match on ccn
There are two inputs:
1. Courses in VIVO. Keyed by ccn
2. UF courses in the source. Keyed the same.
There are three cases
1. Course in VIVO and in ... | Python | 0.000001 | @@ -559,9 +559,9 @@
201
-5
+6
(c)
|
672876c172d9bba9e2f29707f9fdd95e0ff10f9f | put data early in Redis at hourly recache | hortiradar/website/refresh_cache.py | hortiradar/website/refresh_cache.py | import argparse
from datetime import datetime
import flask
import ujson as json
from app import app, get_period
from hortiradar import time_format
from processing import get_cache_key, get_process_top_params, process_details, process_top, redis
def main():
parser = argparse.ArgumentParser(description="Refresh t... | Python | 0 | @@ -1059,16 +1059,72 @@
, data))
+%0A redis.set(key, json.dumps(data), ex=cache_time)
%0A%0A wi
@@ -1320,30 +1320,8 @@
t)%7D%0A
- keyword_data = %5B%5D%0A
@@ -1666,173 +1666,8 @@
- keyword_data.append((key, data))%0A end_time = get_time()%0A%0A # Now populate the cache with the ... |
e77243ebd39eea6033b14d53ddeea870893548ae | Create tomato.py | tomato.py | tomato.py | #!/bin/python2.7
import argparse
import re
import random
import struct
from itertools import chain
#################
### ARGUMENTS ###
#################
parser = argparse.ArgumentParser(add_help=True)
parser.add_argument("file", help="input file")
parser.add_argument("-o", "--output", help="output file")
parser.add_... | Python | 0.999536 | @@ -391,17 +391,16 @@
mode')%0A
-#
parser.a
@@ -415,131 +415,270 @@
ent(
-%22-m%22, %22--mode%22, type=string, choices=%5B%22ikill%22,%22iswap%22,%22bloom%22,%22pulse%22,%22shuffle%22%5D,help=%22defines script mode%22, default=False)
+'-c', action='store', dest='countframes',help='var1', default=1)%0Aparser.add_arg... |
2e39edbfab0d1d70ca527a024210a15d357842b7 | Fix non-existent import | elaboratecharts/__init__.py | elaboratecharts/__init__.py | from os import path
from shutil import copytree, rmtree
from flask.ext.assets import Environment, Bundle
from . import assets
from .views import elaboratecharts
def rel(p):
return path.join(path.dirname(__file__), p)
class ElaborateCharts(object):
def __init__(self, app=None, url_prefix=None):
if ... | Python | 0.999866 | @@ -104,29 +104,8 @@
le%0A%0A
-from . import assets%0A
from
|
cba7a02effc41e212bcefa22d918d8c4728b3fe8 | fix example formatting in docstrings | src/uptime_report/cli.py | src/uptime_report/cli.py | # -*- coding: utf-8 -*-
"""Uptime report CLI.
This module contains all CLI entrypoints. Command line argument parsing and
execution is implemented via `clize`_.
Examples::
$ python -m uptime_report.cli --version
.. _clize:
https://github.com/epsy/clize
"""
from __future__ import print_function, unicode_lite... | Python | 0.000009 | @@ -1759,18 +1759,17 @@
upported
-::
+.
%0A%0A Ex
@@ -2256,20 +2256,16 @@
%60%60now%60%60
-%0A
argumen
@@ -2265,18 +2265,17 @@
argument
-::
+.
%0A%0A Ex
@@ -3587,18 +3587,17 @@
package
-::
+.
%0A%0A Ex
|
b6098d5b4578547fea192fe96998dbc43ef9dcb0 | upgrade values check | http_lazy_headers/fields/upgrade.py | http_lazy_headers/fields/upgrade.py | # -*- coding: utf-8 -*-
from ..shared.utils import constraints
from ..shared import bases
def upgrade(name, version=None):
return name, version
class ProtocolName:
# http://www.iana.org/assignments/http-upgrade-tokens/http-upgrade-tokens.xml
http = 'HTTP'
tls = 'TLS'
web_socket = 'WebSocket'
... | Python | 0.000001 | @@ -57,16 +57,54 @@
traints%0A
+from ..shared.utils import assertions%0A
from ..s
@@ -1431,16 +1431,235 @@
grade'%0A%0A
+ def check_value(self, value):%0A assertions.must_be_tuple_of(value, 2)%0A protocol, version = value%0A assertions.must_be_token(protocol)%0A version is None or asse... |
471e0f4e91eb4513315193ce2b2b0f13e2c9724c | remove stray " | corehq/util/datadog/gauges.py | corehq/util/datadog/gauges.py | from functools import wraps
from celery.task import periodic_task
from corehq.util.datadog import statsd
from corehq.util.soft_assert import soft_assert
def datadog_gauge_task(name, fn, run_every, enforce_prefix='commcare'):
""""
helper for easily registering datadog gauges to run periodically
To update ... | Python | 0.000042 | @@ -227,17 +227,16 @@
%0A %22%22%22
-%22
%0A hel
|
213ddc9ffbb171c17c051c6394baa0499abfc820 | fix UnboundLocalError | corehq/util/tests/test_log.py | corehq/util/tests/test_log.py | from __future__ import absolute_import
from __future__ import unicode_literals
import six
from django.test import SimpleTestCase
from ..log import clean_exception
class TestLogging(SimpleTestCase):
def test_bad_traceback(self):
result = "JJackson's SSN: 555-55-5555"
try:
# copied fro... | Python | 0.000002 | @@ -276,16 +276,41 @@
5-5555%22%0A
+ exception = None%0A
@@ -556,12 +556,21 @@
-pass
+exception = e
%0A
@@ -611,16 +611,24 @@
t_type(e
+xception
))%0A
@@ -686,16 +686,24 @@
eption(e
+xception
)))%0A%0A
|
24b85059dcc5c17d21011bc7d1975f519e09837d | Improve formatting | netsecus/__init__.py | netsecus/__init__.py | #!/usr/bin/env python
from __future__ import unicode_literals
import imaplib
import logging
import time
import helper
import rules
# useful for debugging: $ openssl s_client -crlf -connect imap.gmail.com:993
#
# core functions
#
def main():
# patching imaplib
imaplib.Commands["MOVE"] = ("SELECTED",)
... | Python | 0.99985 | @@ -469,16 +469,25 @@
ginIMAP(
+%0A
helper.g
@@ -528,16 +528,24 @@
erver%22),
+%0A
helper.
@@ -559,25 +559,16 @@
igValue(
-%0A
%22login%22,
@@ -584,16 +584,24 @@
dress%22),
+%0A
helper.
|
10f3daa2a32b238e67a3ed380aaeec7f3c61cfb7 | Fix for issue 84: po files not found when there's a two-letters named directory in the project's path. | rosetta/poutil.py | rosetta/poutil.py | import re, os, django
from django.conf import settings
from rosetta.conf import settings as rosetta_settings
from django.core.cache import cache
try:
set
except NameError:
from sets import Set as set # Python 2.3 fallback
def find_pos(lang, project_apps = True, django_apps = False, third_party_apps = Fa... | Python | 0 | @@ -3,12 +3,8 @@
port
- re,
os,
@@ -2517,42 +2517,8 @@
t()%0A
- rx=re.compile(r'(%5Cw+)/../%5C1')%0A
@@ -2833,24 +2833,65 @@
)%0A %0A
+ paths = map(os.path.normpath, paths)%0A
for path
@@ -2955,56 +2955,47 @@
e =
-rx.sub(r'%5C1', '%25s/%25s/LC_MESSAGES/' %25(path,lang_)
+os.path.join(pat... |
c492c42639f7a487dc27a95a5a785dd9c62ecdb7 | Change project status formatting | clowder/utility/print_utilities.py | clowder/utility/print_utilities.py | """Print utilities"""
import os
from termcolor import colored
from clowder.utility.git_utilities import (
git_current_sha,
git_current_branch,
git_is_detached,
git_is_dirty
)
def print_project_status(root_directory, path, name):
"""Print repo status"""
repo_path = os.path.join(root_directory, p... | Python | 0 | @@ -973,30 +973,8 @@
tput
- + ' @ ' + path_output
)%0A
@@ -995,14 +995,34 @@
t_ref_output
+ + ' ' + path_output
)%0A
|
b82cc5adba91610093621fefc5121393d7a8bd35 | Split ignored_paths | coalib/parsing/DefaultArgParser.py | coalib/parsing/DefaultArgParser.py | """
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ... | Python | 0 | @@ -1799,16 +1799,22 @@
-ignored
+-files
', nargs
@@ -1853,12 +1853,12 @@
red_
-path
+file
s',%0A
@@ -1907,12 +1907,179 @@
les
-or d
+that should be ignored'))%0Adefault_arg_parser.add_argument('-p', '--ignored-dirs', nargs='+', metavar='PATH', dest='ignored_dirs',%0A help=_('D
ire... |
d4f86c8b9ced020f842a4321b4108c9372d7b4ec | Add the staticfiles app. | coda/coda_project/settings/base.py | coda/coda_project/settings/base.py | # Base settings for coda_project
import os
import json
from datetime import timedelta
from django.core.exceptions import ImproperlyConfigured
# Absolute path to the settings module
SETTINGS_ROOT = os.path.dirname(__file__)
# Absolute path to the project
PROJECT_ROOT = os.path.dirname(SETTINGS_ROOT)
# Absolute path ... | Python | 0 | @@ -248,17 +248,16 @@
project
-
%0APROJECT
@@ -1153,100 +1153,93 @@
ue%0A%0A
-MEDIA_ROOT = site_path('media')%0A%0AMEDIA_URL = '/media/'%0A%0AADMIN_MEDIA_PREFIX = '/media/admin/'
+STATIC_URL = '/static/'%0A%0ASTATICFILES_DIRS = %5B%0A os.path.join(SITE_ROOT, 'static')%5D%0A
%0A%0ASE
@@ -2523,24 +2523,58 @@
.s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.