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 |
|---|---|---|---|---|---|---|---|
f11ae28b24af71a817ede5a4081cc6c9d428996c | Increase SSH timeout | cax/tasks/data_mover.py | cax/tasks/data_mover.py | """Handle copying data between sites.
This is one of the key tasks of 'cax' because it's responsible for moving
data between sites. At present, it just does scp.
"""
import datetime
import logging
import os
import scp
from paramiko import SSHClient, util
from cax import config
from cax.task import Task
def copy(... | Python | 0.000001 | @@ -1417,24 +1417,52 @@
ompress=True
+,%0A timeout=60
)%0A%0A # SCP
|
3ec5263e059847aac182ef2edc16e32dd7382cf7 | Make change backwards-compatible | psrecord/main.py | psrecord/main.py | # Copyright (c) 2013, Thomas P. Robitaille
# 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 a... | Python | 0.000728 | @@ -4317,24 +4317,150 @@
ime.time()%0A%0A
+ try:%0A pr_status = pr.status()%0A except TypeError: # psutil %3C 2.0%0A pr_status = pr.status%0A%0A
# Ch
@@ -4519,25 +4519,23 @@
if pr
-.
+_
status
-()
in %5Bpsu
|
6bbfab663700811796f2b47edbb0c5904e59155e | Add __repr__s that make some sense. | parse/tree.py | parse/tree.py | import itertools
import collections
Location = collections.namedtuple('Location', 'start, end, filename, first_line')
class StructMixIn:
infix = False
closed = False
indented = False
traversable = False
### TOKEN AUTOLOCATION
def in_between(self, left, right):
self.loc... | Python | 0.00041 | @@ -1326,16 +1326,116 @@
losed)%0A%0A
+ def __repr__(self):%0A%0A return '((%7B%7D) %7B%7D)'.format(self%5B0%5D, ' '.join(map(repr, self%5B1:%5D)))%0A%0A
%0Aclass L
@@ -1590,16 +1590,62 @@
rn obj%0A%0A
+ def __repr__(self):%0A%0A return self%0A%0A
%0Aclass C
@@ -1727,16 +1727,16 @@
nit__()%0A
-... |
59eac0d8dba2f0aca43cd3df2777897079a2368e | Use 4chan's api | thread-watcher.py | thread-watcher.py | #!/usr/bin/python
from urllib import request
import argparse
import logging
import os
import re
# TODO
# add argument to have something like vg/monster-hunter/ and inside that dir all threads separated by their id
# ./thread-watcher.py -b vg -q mhg -f queue.txt -n "Monster Hunter"
log = logging.getLogger('thread-wa... | Python | 0 | @@ -11,16 +11,44 @@
/python%0A
+from itertools import chain%0A
from url
@@ -82,16 +82,28 @@
rgparse%0A
+import json%0A
import l
@@ -122,18 +122,8 @@
t os
-%0Aimport re
%0A%0A#
@@ -410,134 +410,553 @@
_))%0A
-%0A%0Adef load(url):%0A req = request.Request(url, headers=%7B'User-Agent': '4chan Browser'%7D)%0A ... |
2ce24f423ac1573c6c4b1a7a19672a84620042b5 | Remove old docstring | mopidy_beets/__init__.py | mopidy_beets/__init__.py | from __future__ import unicode_literals
import os
from mopidy import ext, config
from mopidy.exceptions import ExtensionError
__doc__ = """A extension for playing music from Beets.
This extension handles URIs starting with ``beets:`` and enables you,
to play music from Beets web service.
See https://github.com/dz0... | Python | 0.000652 | @@ -44,16 +44,17 @@
port os%0A
+%0A
from mop
@@ -127,360 +127,8 @@
r%0A%0A%0A
-__doc__ = %22%22%22A extension for playing music from Beets.%0A%0AThis extension handles URIs starting with %60%60beets:%60%60 and enables you,%0Ato play music from Beets web service.%0A%0ASee https://github.com/dz0ny/mopidy-beets/ for fu... |
2b8d068a3730372b77963f8de25cb55a5e356ca0 | Fix pep8 | src/keybar/migrations/0004_auto_20151018_1613.py | src/keybar/migrations/0004_auto_20151018_1613.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('keybar', '0003_auto_20150515_0129'),
]
operations = [
migrations.RemoveField(
m... | Python | 0.000001 | @@ -74,18 +74,20 @@
ngo.
-db
+conf
import
mode
@@ -86,25 +86,15 @@
ort
-models, migration
+setting
s%0Afr
@@ -99,36 +99,34 @@
from django.
-conf
+db
import
settings%0A%0A%0Ac
@@ -113,23 +113,33 @@
import
-setting
+migrations, model
s%0A%0A%0Aclas
|
60741728af35185d3adbd047514526bf828af0fa | Allow db_uri to be specified directly | pmxbot/rss.py | pmxbot/rss.py | # -*- coding: utf-8 -*-
# vim:ts=4:sw=4:noexpandtab
# c-basic-indent: 4; tab-width: 4; indent-tabs-mode: true;
from __future__ import absolute_import, print_function
import socket
import re
import datetime
import logging
import feedparser
import pmxbot
from . import core
from . import storage
from . import timing
l... | Python | 0 | @@ -462,26 +462,83 @@
_init__(self
-):
+, db_uri=None):%0A%09%09db_uri = db_uri or pmxbot.config.database
%0A%09%09self.stor
@@ -563,38 +563,22 @@
rom_URI(
-pmxbot.config.database
+db_uri
)%0A%09%09time
|
d27a1e98662b1731def649e936395c9e50979125 | Update crop.py | moviepy/video/fx/crop.py | moviepy/video/fx/crop.py | def crop(clip, x1=None, y1=None, x2=None, y2=None,
width = None, height=None,
x_center= None, y_center=None):
"""
Returns a new clip in which just a rectangular subregion of the
original clip is conserved. x1,y1 indicates the top left corner and
x2,y2 is the lower right corner of the c... | Python | 0.000001 | @@ -1067,16 +1067,55 @@
if width
+ and (x1 is not None or x2 is not None)
:%0A
@@ -1219,16 +1219,55 @@
f height
+ and (y1 is not None or y2 is not None)
:%0A
|
832163eca4b723e8c66b93108de71809a1a944cc | Remove hardcoded start and end dates | visits_detector/scripts/mr_emulator_demo.py | visits_detector/scripts/mr_emulator_demo.py | import argparse
import datetime
import json
import sys
from visits_detector.core import FilterAndMapToIndexMapper, ExtractEventsReducer
from visits_detector.core.components.params import EventExtractionStageParams
from visits_detector.core.helpers.geo_index import build_geo_index_from_point_index
from visits_detector.... | Python | 0.000066 | @@ -1057,21 +1057,12 @@
time
-(2017, 4, 14)
+.min
,%0A
@@ -1095,21 +1095,12 @@
time
-(2017, 4, 15)
+.max
,%0A
@@ -1141,9 +1141,9 @@
, 0.
-5
+1
),%0A
|
fd1fbf42e8804769df6be630a193cf9f6785e107 | Fix intra copy | waterbutler/providers/contrib/cloudfiles.py | waterbutler/providers/contrib/cloudfiles.py | import os
import hmac
import json
import time
import asyncio
import hashlib
import functools
import furl
from waterbutler import streams
from waterbutler import exceptions
from waterbutler.providers import core
TEMP_URL_SECS = 100
def ensure_connection(func):
"""Runs ``_ensure_connection`` before continuing t... | Python | 0.000018 | @@ -1768,33 +1768,34 @@
(%0A 'P
-U
+OS
T', url,%0A
@@ -1830,56 +1830,19 @@
'
-Content-Length': 0,%0A 'X-Copy-From
+Destination
': o
|
636821bfa8191b95601e6d8774fcb5f4c8ad440f | Add pybrasil to external dependencies | sped/__manifest__.py | sped/__manifest__.py | # -*- coding: utf-8 -*-
#
# Copyright 2016 Taŭga Tecnologia
# Aristides Caldeira <aristides.caldeira@tauga.com.br>
# License AGPL-3 or later (http://www.gnu.org/licenses/agpl)
#
{
'name': u'SPED',
'version': '10.0.1.0.0',
'author': u'Odoo Community Association (OCA), Ari Caldeira',
'category': u'Bas... | Python | 0 | @@ -3568,11 +3568,81 @@
',%0A %5D
+,%0A 'external_dependencies': %7B%0A 'python': %5B'pybrasil'%5D,%0A %7D
%0A%7D%0A
|
7c3ac5adc33d2048f28a96d8145e71a4c12518cc | Set base version to 1.6 | udata/__init__.py | udata/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
uData
'''
from __future__ import unicode_literals
__version__ = '1.5.1.dev'
__description__ = 'Open data portal'
| Python | 0.000006 | @@ -115,11 +115,11 @@
'1.
-5.1
+6.0
.dev
|
cd6b9dbd03496f23c93798399c78fedc86e5480a | Write min / max changes as soon as they are found | scheduler.py | scheduler.py | import sys
import glob
from os import path
from subprocess import call
executable = path.join("Release", "P3")
folder = sys.argv[1]
repeats = int(sys.argv[2])
bound_file = path.join(folder, "bounds.txt")
arguments = path.join("config", "default.txt ") + " ".join(sys.argv[3:])
single_run = "-experiment single_run"
try:... | Python | 0 | @@ -480,16 +480,140 @@
1, 0%0A%0A%0A
+def update(least, most, maxed):%0A with open(bound_file, 'w') as f:%0A f.write(%22%25i %25i %25i%5Cn%22 %25 (least, most, maxed))%0A%0A%0A
def exam
@@ -2018,16 +2018,51 @@
st *= 2%0A
+ update(least, most, maxed)%0A
elif
@@ -2098,24 +2098,59 @@
maxed = 1... |
d1ea02be90546a3774a22fc021cb92e8d146e5b6 | Test for spectrum axis unit | spectral_cube/tests/test_projection.py | spectral_cube/tests/test_projection.py | from __future__ import print_function, absolute_import, division
import pytest
import numpy as np
from astropy import units as u
from .helpers import assert_allclose
from ..lower_dimensional_structures import Projection, Slice, OneDSpectrum
# set up for parametrization
LDOs = (Projection, Slice, OneDSpectrum)
LDOs_2... | Python | 0 | @@ -122,16 +122,44 @@
its as u
+%0Afrom astropy.wcs import WCS
%0A%0Afrom .
@@ -3289,8 +3289,212 @@
lue==0)%0A
+%0Adef test_onedspectrum_specaxis_units():%0A%0A test_wcs = WCS(naxis=1)%0A test_wcs.wcs.cunit = %5B%22m/s%22%5D%0A%0A p = OneDSpectrum(twelve_qty_1d, wcs=test_wcs)%0A%0A assert p.spectral_axis... |
0e20f9fe0dd239cb2fd0c55e7b901861a61d18ad | simplify and remove unnecessary code | nix/util/find.py | nix/util/find.py | # Copyright (c) 2014, German Neuroinformatics Node (G-Node)
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted under the terms of the BSD License. See
# LICENSE file in the root of the Project.
from __future__ import absolute_import
import nix... | Python | 0.000034 | @@ -936,70 +936,10 @@
evel
-%0A if level %3E limit:%0A break%0A%0A level
+
-=
1%0A
@@ -1559,70 +1559,10 @@
evel
-%0A if level %3E limit:%0A break%0A%0A level
+
-=
1%0A
|
63ae7eea9820a44cef5ce2919d4e856e5f6683b7 | Fix bug in total contributor (#202) | flask_project/campaign_manager/api.py | flask_project/campaign_manager/api.py | from flask_restful import Resource, Api
from campaign_manager import campaign_manager
from campaign_manager.models.campaign import Campaign
from campaign_manager.insights_functions.mapper_engagement import \
MapperEngagement
api = Api(campaign_manager)
class CampaignList(Resource):
"""Shows a list of all ca... | Python | 0 | @@ -4232,16 +4232,29 @@
in data
+%5B'user_list'%5D
:%0A
|
8a553df5d6e11b346a4cabf9ac137ce5c2910fa7 | install just with `python -m jupyterdrive` | jupyterdrive/__init__.py | jupyterdrive/__init__.py |
import IPython
import IPython.html.nbextensions as nbe
import sys
import os
import os.path
def install(profile='default', symlink=False):
dname = os.path.dirname(__file__)
nbe.install_nbextension(os.path.join(dname,'gdrive'), symlink=symlink)
if __name__ == '__main__':
install()
| Python | 0 | @@ -53,45 +53,190 @@
nbe%0A
-%0A%0Aimport sys%0Aimport os%0Aimport os.path
+from IPython.utils.path import locate_profile%0A%0A%0Aimport sys%0Aimport os%0Aimport os.path%0Aimport json%0Aimport io%0A%0Afrom IPython.config import Config, JSONFileConfigLoader, ConfigFileNotFound
%0A%0A%0Ad
@@ -319,16 +319,85 @@
file__)... |
2c1fe59f793ce6acfcf1cf85901d49739af10534 | fix typo in crashtest security parser | dojo/tools/crashtest_security/parser.py | dojo/tools/crashtest_security/parser.py | __auther__ = "phylu"
from defusedxml import ElementTree as ET
from dojo.models import Finding
class CrashtestSecurityXmlParser(object):
"""
The objective of this class is to parse an xml file generated by the crashtest security suite.
@param xml_output A proper xml generated by the crashtest security su... | Python | 0.001635 | @@ -1,15 +1,15 @@
__auth
-e
+o
r__ = %22p
|
a021f279341eb15c17597200d4bbe97a98034c54 | Remove sensitive information from the example | fate_flow/examples/test_inference.py | fate_flow/examples/test_inference.py | # -*-coding:utf8 -*-
import json
import requests
import time
import uuid
import datetime
import time
ids = ["18576635456", "13512345432"]
url1 = "http://172.16.153.71:8059/federation/1.0/inference"
for i in range(2):
request_data_tmp = {
"head": {
"serviceId": "test_model_service",
... | Python | 0.000001 | @@ -154,19 +154,15 @@
://1
-72.16.153.7
+27.0.0.
1:80
|
1926286443055845bb1556ff954f9fa91770aea1 | ytpaginator, return queryset | spirit/utils/paginator/yt_paginator.py | spirit/utils/paginator/yt_paginator.py | #-*- coding: utf-8 -*-
from math import ceil
from django.core.paginator import InvalidPage
from django.conf import settings
class YTPaginator(object):
"""
Paginator for efficiently paginating large object collections on systems
where using standard Django pagination is impractical because of significant... | Python | 0.999996 | @@ -359,59 +359,47 @@
It'
-s not a drop-in replacement for django's paginator.
+ll limit the page list to a given limit
%0A
@@ -447,16 +447,45 @@
per_page
+, allow_empty_first_page=True
):%0A
@@ -546,24 +546,85 @@
e = per_page
+%0A self.allow_empty_first_page = allow_empty_first_page
%0A%0A def... |
ef38a6a68f784ca431d19059a72d5877db9f69ef | Improve logging for Miracle Grue. | src/main/python/conveyor/toolpath/miraclegrue.py | src/main/python/conveyor/toolpath/miraclegrue.py | # vim:ai:et:ff=unix:fileencoding=utf-8:sw=4:ts=4:
# conveyor/src/main/python/conveyor/toolpath/miraclegrue.py
#
# conveyor - Printing dispatch engine for 3D objects and their friends.
# Copyright © 2012 Matthew W. Samsonoff <matthew.samsonoff@makerbot.com>
#
# This program is free software: you can redistribute it and/... | Python | 0 | @@ -2456,26 +2456,19 @@
- code =
popen.
-wait
+poll
()%0A
@@ -2482,92 +2482,85 @@
-self._log.debug(%0A 'Miracle Grue terminated with status code %25d', code
+while None is popen.returncode:%0A line = popen.stdout.readline(
)%0A
@@ -2573,19 +2573,24 @@
+
+
if
... |
9c5e80a856fd2431ba3b81e70dca702da2cb1ea8 | Rename the task ID to "docker". Should this be a UUID? | docker_launcher.py | docker_launcher.py | #!/usr/bin/env python
# _ _ _ _
# __| | ___ ___| | _____ _ __ | | __ _ _ _ _ __ ___| |__ ___ _ __
# / _` |/ _ \ / __| |/ / _ \ '__|____| |/ _` | | | | '_ \ / __| '_ \ / _ \ '__|
# | (_| | (_) | (__| < __/ | |_____| | (_| | |_| | | | | (__| | | |... | Python | 0.005226 | @@ -2814,20 +2814,22 @@
alue = %22
-main
+docker
%22%0A
|
5b8e2d975962220ce4908a39607ac4d9a51d7545 | update project url in comment | pytest_run.py | pytest_run.py | #!/usr/bin/env python
# coding=utf-8
"""This is a script for running pytest from the command line.
This script exists so that the project directory gets added to sys.path, which
prevents us from accidentally testing the globally installed willie version.
pytest_run.py
Copyright 2013, Ari Koivula, <ari@koivu.la>
Licen... | Python | 0 | @@ -363,23 +363,17 @@
p://
-willie.dfbta.ne
+sopel.cha
t%0A%22%22
|
037105a35b37a505c47d9a6c9d988c57b1efdf99 | Likelihood function into img_emcee | muscle_saxs/img_emcee.py | muscle_saxs/img_emcee.py | #!/usr/bin/env python
# encoding: utf-8
"""
img_emcee.py - snippits of code to test emcee with our x-ray images
Created by Dave Williams on 2015-02-02
"""
# System imports
import emcee
import matplotlib.pyplot as plt
# Local imports
import fake_img as fimg
import xray_background as back
import peak_finder as peakf
im... | Python | 0.999602 | @@ -180,16 +180,35 @@
t emcee%0A
+import numpy as np%0A
import m
@@ -873,533 +873,1094 @@
%0A
- %0A p0 = np.array((%0A 57, # mask center row%0A 251, # mask center col%0A 15, # mask radius
+%0Adef img_prior():%0A %22%22%22Need one%22%22%22%0A return None%0A%0Adef img_likelihood()... |
1ff2b18cb8bc409e12beffafc0c2ea1daffa6799 | Make script executable. | update_plugins.py | update_plugins.py | import zipfile
import shutil
import tempfile
import requests
from os import path
#--- Globals ----------------------------------------------
PLUGINS = """
ack.vim https://github.com/mileszs/ack.vim
ag.vim https://github.com/rking/ag.vim
bufexplorer https://github.com/corntrace/bufexplorer
ctrlp.vim https://github.co... | Python | 0 | @@ -1,12 +1,32 @@
+#! /usr/bin/python%0A%0A
import zipfi
|
9576289308fdf779bb6beed78548d1d47fd6e005 | Remove _consumers + _callbacks from thread local storage. | ghettoq/taproot.py | ghettoq/taproot.py | from carrot.backends.base import BaseBackend, BaseMessage
from anyjson import serialize, deserialize
from ghettoq.backends import Connection
from itertools import count
from ghettoq.messaging import Empty as QueueEmpty
from django.utils.datastructures import SortedDict
from carrot.utils import gen_unique_id
import sys
... | Python | 0 | @@ -2655,37 +2655,8 @@
_
-t = threading.local()%0A _t.
cons
@@ -2671,18 +2671,16 @@
%7B%7D%0A _
-t.
callback
@@ -4032,26 +4032,24 @@
self._
-t.
consumers%5Bco
@@ -4074,34 +4074,32 @@
e%0A self._
-t.
callbacks%5Bqueue%5D
@@ -4196,26 +4196,24 @@
ueSet(self._
-t.
consumers.va
@@ -4306,26 +4... |
b381cc96cbf216e098acd7c54a672d4da18baaff | Update worker.py | gifquick/worker.py | gifquick/worker.py | import os
import tempfile
import subprocess
import shutil
import threading
from datetime import datetime
from .config import _cfg, _cfgi
from .database import r, _k
from .utils import extension
conversions = {
'mp4': lambda path, outputpath: TimeLimitedCommand(["ffmpeg", "-i", path, "-pix_fmt", "yuv420p", "-vf"... | Python | 0.000001 | @@ -2361,13 +2361,11 @@
ded%5B
-'
ext
-'
%5D:%0A
|
2e972fe8fa57e0b4f04226dc867000e58dc885c5 | Remove obsid arg | chandra_suli/add_to_masterlist.py | chandra_suli/add_to_masterlist.py | #!/usr/bin/env python
"""
Take each CCD file, already checked for hot pixels and cross matched for variable sources, and add remaining candidate
transients to master list
"""
import os
import argparse
import sys
import numpy as np
from chandra_suli.run_command import CommandRunner
from chandra_suli import logging_sy... | Python | 0.999618 | @@ -455,111 +455,8 @@
%22)%0A%0A
- parser.add_argument(%22--obsid%22,help=%22Observation ID Numbers%22, type=int, required=True, nargs = %22+%22)%0A
|
305c6f0d038aa0a24e0f1f61edc8f226e62d20f5 | Fix adding wrong URL prefix | urlbot.py | urlbot.py | import os, sys, urllib
import requests
import json
import os
import time
import pickle
from time import sleep
def dateTime():
return time.strftime("%Y/%m/%d %H:%M:%S") + " "
def getChanges():
try:
urlfile = pickle.load(open(urlspath, 'rb'))
except (OSError, IOError) as e:
urlfile = []
... | Python | 0.000053 | @@ -378,16 +378,37 @@
http://'
+ in url or 'https://'
in url:
@@ -4024,28 +4024,16 @@
me, %22%22)%0A
-
%0A
@@ -5098,32 +5098,16 @@
ervice%22%0A
-
%0A
|
e9ce3ed024cd12a89200498aab7bc4920e7100b9 | change Admin model registrations to newer way using decorators | blog/admin.py | blog/admin.py | from django.contrib import admin
from . import models as blog
class TagAdmin(admin.ModelAdmin):
ordering = ('name',)
list_display = ('id', 'name',)
search_fields = ('id', 'name',)
class CategoryAdmin(admin.ModelAdmin):
ordering = ('name',)
list_display = ('id', 'name',)
search_fields = ('id',... | Python | 0 | @@ -30,22 +30,29 @@
min%0A
+%0A
from .
+models
import
mode
@@ -51,24 +51,52 @@
ort
-models as blog %0A
+Tag, Category, Article%0A%0A@admin.register(Tag)
%0Acla
@@ -219,24 +219,50 @@
, 'name',)%0A%0A
+@admin.register(Category)%0A
class Catego
@@ -385,16 +385,41 @@
ame',)%0A%0A
+@admin.register(Article)%0A
c... |
607b6dee7b5aebf9f65639d4d4c311a9b95e26be | fix bugs | status/templatetags/status_filters.py | status/templatetags/status_filters.py | '''
The MIT License (MIT)
Copyright (c) 2014 NTHUOJ team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, ... | Python | 0.000001 | @@ -2350,47 +2350,8 @@
em,%0A
- start_time__lt=datetime.now(),%0A
|
fa29356863f7912cdf84bb884719923155de7d94 | Update descitption of Accuracy | vienna.py | vienna.py | import RNA
def getBPPM(sequence, structure = "", bppm_cutoff = 0.00001):
"""
Requires ViennaRNAtools Python module
Returns the base pair probability matrix using Vienna pf_fold, get_pr and free_pf_arrays functions.
returns upper triangular matrix, whose entries exceed a threshold
"""
... | Python | 0 | @@ -1131,16 +1131,116 @@
struct
+_dict is a dictionary of form struct_dict%5Bi%5D = j indicating the base pair (i,j)%7Ci%3Cj wihtin the bppm
%0A%0A %22
|
fd678ecf1e926d7fb47e7bd2ece29716fdd2d022 | disable unit test on travis (ggplot is not installed) | _unittests/ut_install/test_module_dependencies.py | _unittests/ut_install/test_module_dependencies.py | """
@brief test log(time=1s)
"""
import sys
import os
import unittest
try:
import src
except ImportError:
path = os.path.normpath(
os.path.abspath(
os.path.join(
os.path.split(__file__)[0],
"..",
"..")))
if path not in sys.path:
... | Python | 0 | @@ -2162,32 +2162,79 @@
== %22__main__%22)%0A
+ if %22travis%22 not in sys.executable:%0A
self.com
@@ -2411,32 +2411,79 @@
== %22__main__%22)%0A
+ if %22travis%22 not in sys.executable:%0A
self.com
|
f6ed434c643ed57a78fd9873d941739fbd13ce7b | Disable 'from_many_sources' by default | website/statistics.py | website/statistics.py | from database import db
import models
from sqlalchemy import and_
class Statistics:
def count(self, model):
return model.query.count()
def all_confirmed_mutations(self):
return models.Mutation.query.filter_by(is_confirmed=True).count()
def get_all(self):
return {
'pr... | Python | 0.000002 | @@ -1513,16 +1513,18 @@
+ #
'from_m
|
c127de027e304e5d6900ba8784035cc8614204dc | For the communication field, if self.move_id.ref is False, fallback on self.move_id.name | account_payment_order/models/account_move_line.py | account_payment_order/models/account_move_line.py | # -*- coding: utf-8 -*-
# © 2014-2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api
class AccountMoveLine(models.Model):
_inherit = 'account.... | Python | 0.999968 | @@ -965,11 +965,25 @@
or
-'-'
+self.move_id.name
%0A
|
5b2f09d89420aac0d071522b3fbed9b026af6def | Update simplejson import for Python 2.6 | github2/request.py | github2/request.py | import sys
import httplib
import simplejson
from urlparse import urlparse, urlunparse
try:
from urlparse import parse_qs
except ImportError:
from cgi import parse_qs
from urllib import urlencode
GITHUB_URL = "http://github.com"
URL_PREFIX = "http://github.com/api/v2/json"
class GithubError(Exception):
""... | Python | 0.000002 | @@ -19,16 +19,92 @@
httplib%0A
+try:%0A import json as simplejson # For Python 2.6%0Aexcept ImportError:%0A
import s
|
82ff5d5b26fe7331f500a62b3a39bbb79b25331e | Include authentication data with non-POST methods. | github2/request.py | github2/request.py | import datetime
import sys
import time
import httplib2
try:
import json as simplejson # For Python 2.6
except ImportError:
import simplejson
from urllib import urlencode, quote
#: Hostname for API access
GITHUB_URL = "https://github.com"
class GithubError(Exception):
"""An error occured when making a r... | Python | 0 | @@ -143,16 +143,148 @@
plejson%0A
+from urlparse import (urlsplit, urlunsplit)%0Atry:%0A from urlparse import parse_qs%0Aexcept ImportError:%0A from cgi import parse_qs%0A
from url
@@ -3257,32 +3257,94 @@
method=%22GET%22):%0A
+ scheme, netloc, path, query, fragment = urlsplit(url)%0A
post_dat... |
aefd70ce490d3a0673b6b82c6efb1dd046bcf46a | Add admin interface for StockItemLabel | InvenTree/label/admin.py | InvenTree/label/admin.py | from django.contrib import admin
# Register your models here.
| Python | 0 | @@ -1,63 +1,293 @@
-from django.contrib import admin%0A%0A# Register your models here.
+# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.contrib import admin%0A%0Afrom .models import StockItemLabel%0A%0A%0Aclass StockItemLabelAdmin(admin.ModelAdmin):%0A%0A list_display = ('name', 'd... |
31e5d9874d1376ce7732dc5bd5271433f9160684 | Remove unnecessary comment | gitman/__init__.py | gitman/__init__.py | """Package for GitMan."""
from pkg_resources import DistributionNotFound, get_distribution
from .commands import delete as uninstall # pylint: disable=redefined-builtin
from .commands import display as list
from .commands import init, install, lock, update
try:
__version__ = get_distribution("gitman").version
e... | Python | 0 | @@ -131,45 +131,8 @@
tall
- # pylint: disable=redefined-builtin
%0Afro
|
0416a0af4cc090a04df535f736f8efae8a113144 | remove obsolete default kwarg from migration | custom/ilsgateway/migrations/0005_add_pending_reporting_data_recalculation.py | custom/ilsgateway/migrations/0005_add_pending_reporting_data_recalculation.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
import jsonfield.fields
class Migration(migrations.Migration):
dependencies = [
('locations', '0001_initial'),
('ilsgateway', '0004_merge'),
]
operations = [
... | Python | 0.000001 | @@ -705,22 +705,8 @@
eld(
-default='null'
)),%0A
|
80c23a2580fcc4faa75b971f398d066556421881 | Update settings.py | src/olympia/conf/dev/settings.py | src/olympia/conf/dev/settings.py | import logging
from olympia.lib.settings_base import * # noqa
# Allow addons-dev CDN for CSP.
CSP_BASE_URI += (
# Required for the legacy discovery pane.
'https://addons-dev.allizom.org',
)
CDN_HOST = 'https://addons-dev-cdn.allizom.org'
CSP_CONNECT_SRC += (CDN_HOST,)
CSP_FONT_SRC += (CDN_HOST,)
CSP_IMG_SRC... | Python | 0.000001 | @@ -4263,20 +4263,81 @@
ck-dev.allizom.org'%0A
+%0AMIGRATED_LWT_UPDATES_ENABLED = True # flip on temporarily%0A%0A
|
81ea811b7467a02cfe7fb78bd6f7e74041e45337 | Use new enums in nextbus (#61954) | homeassistant/components/nextbus/sensor.py | homeassistant/components/nextbus/sensor.py | """NextBus sensor."""
from itertools import chain
import logging
from py_nextbus import NextBusClient
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
from homeassistant.const import CONF_NAME, DEVICE_CLASS_TIMESTAMP
import homeassistant.helpers.config_validation as c... | Python | 0 | @@ -166,16 +166,22 @@
import
+(%0A
PLATFORM
@@ -188,16 +188,43 @@
_SCHEMA,
+%0A SensorDeviceClass,%0A
SensorE
@@ -228,16 +228,19 @@
orEntity
+,%0A)
%0Afrom ho
@@ -277,32 +277,8 @@
NAME
-, DEVICE_CLASS_TIMESTAMP
%0Aimp
@@ -3521,21 +3521,26 @@
s =
-DEVICE_CLASS_
+SensorDeviceClass.
TIME
|
914ed1a63bf19ed45dc4c79378d4424b8ace84f6 | Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/2b1dc458cc7cecee7f8b19b178f726a751f62943. | third_party/tf_runtime/workspace.bzl | third_party/tf_runtime/workspace.bzl | """Provides the repository macro to import TFRT."""
load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls")
def repo():
"""Imports TFRT."""
# Attention: tools parse and update these lines.
TFRT_COMMIT = "68930096839ac6c0c53eec900503ff1e572156e9"
TFRT_SHA256 = "d1c7db16fd9fbd89ce6e0e527a52... | Python | 0.000003 | @@ -228,133 +228,133 @@
= %22
-68930096839ac6c0c53eec900503ff1e572156e9%22%0A TFRT_SHA256 = %22d1c7db16fd9fbd89ce6e0e527a521c7c714b301bc54d3e246f74d1b330697a47
+2b1dc458cc7cecee7f8b19b178f726a751f62943%22%0A TFRT_SHA256 = %226355f78c948bb5d55be21003008e7415353147c0de0bb6d88d2d7eead8ac7758
%22%0A%0A
|
f0fa5e30b94ecfef8d5c86946e94587c604e2315 | Fix PEP8 in app_with_config.py | examples/application/app_with_config.py | examples/application/app_with_config.py | from kivy.app import App
from kivy.lang import Builder
from kivy.properties import ConfigParserProperty
KV = '''
FloatLayout:
BoxLayout:
size_hint: .5, .5
pos_hint: {'center': (.5, .5)}
orientation: 'vertical'
TextInput:
text: app.text
on_text: app.text = s... | Python | 0.000005 | @@ -517,16 +517,25 @@
roperty(
+%0A
0, 'gene
@@ -549,16 +549,24 @@
number',
+%0A
'app',
@@ -579,16 +579,21 @@
pe=float
+%0A
)%0A te
@@ -618,16 +618,25 @@
roperty(
+%0A
'', 'gen
@@ -649,16 +649,24 @@
'text',
+%0A
'app',
@@ -677,16 +677,21 @@
type=str
+%0A
)%0A%0A... |
a1581c6f819506b8c2827c8f768bf0bd058d2305 | Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/de022dcbf35e3119c933a5c345b8b582a9a3cb18. | third_party/tf_runtime/workspace.bzl | third_party/tf_runtime/workspace.bzl | """Provides the repository macro to import TFRT."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo():
"""Imports TFRT."""
# Attention: tools parse and update these lines.
TFRT_COMMIT = "a3dc93d984dd761c539304b21ea64324e30ef217"
TFRT_SHA256 = "7ff10fa3a2213d25e5aa46e20b783c6f96d94772b9fd1c... | Python | 0.000002 | @@ -210,133 +210,133 @@
= %22
-a3dc93d984dd761c539304b21ea64324e30ef217%22%0A TFRT_SHA256 = %227ff10fa3a2213d25e5aa46e20b783c6f96d94772b9fd1c1eac1cbc7a86668b53
+de022dcbf35e3119c933a5c345b8b582a9a3cb18%22%0A TFRT_SHA256 = %22dc9efd26b883c026354a071a733a7e002a04dd9ae601b57f388bdf5009d35635
%22%0A%0A
|
19f83e56c6a1e94a034fc51aefb934a7c735010e | Fix test leaking communicator handles | test/test_cco_ngh_buf.py | test/test_cco_ngh_buf.py | from mpi4py import MPI
import mpiunittest as unittest
import arrayimpl
def create_topo_comms(comm):
size = comm.Get_size()
rank = comm.Get_rank()
# Cartesian
n = int(size**1/2.0)
m = int(size**1/3.0)
if m*m*m == size:
dims = [m, m, m]
elif n*n == size:
dims = [n, n]
else... | Python | 0.000001 | @@ -6291,16 +6291,40 @@
ue, v+1)
+%0A comm.Free()
%0A%0Aclass
|
a986d114a1f35e8e85c6b5a5235d6f1bf700f549 | Make the Connected Components operator use the utility function | tomviz/python/ConnectedComponents.py | tomviz/python/ConnectedComponents.py | def transform_scalars(dataset, background_value=0):
"""Converts a label map of connected components of foreground-valued
voxels in the input image to a label map where each connected component
has a unique label. Foreground voxels have any value other than the
background value. Input images are expected... | Python | 0 | @@ -586,83 +586,8 @@
%22%22%0A%0A
- try:%0A import itk%0A import itkTypes%0A import vtk%0A
@@ -605,19 +605,16 @@
import
-itk
utils%0A
@@ -619,2821 +619,58 @@
- from tomviz import utils%0A except Exception as exc:%0A print(%22Could not import necessary module(s... |
fdaa5df7ef2fa6fb9936ce202a8e40f3d201ce59 | Fix test compilation issue | test/test_integration.py | test/test_integration.py | import unittest
import http.client
class TestStringMethods(unittest.TestCase):
def test_404NoConfig(self):
connRouter = http.client.HTTPConnection("localhost", 8666)
connRouter.request("GET", "/google")
response = connRouter.getresponse()
self.assertEqual(response.status, 404)
... | Python | 0 | @@ -254,32 +254,59 @@
r.getresponse()%0A
+ connRouter.close()%0A
self.ass
@@ -339,62 +339,8 @@
404)
-%0A connRouter.close()%0A connConfig.close()
%0A%0A
@@ -674,10 +674,9 @@
dy:%22
- +
+,
res
@@ -703,16 +703,21 @@
%22utf-8%22)
+,%22%5Cn%22
)%0A
|
e524a9bb67ae8ac00ba7127e6fe30da5b292ded6 | Resolve constructors parsed as type variables | numba2/typing.py | numba2/typing.py | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import
import re
import sys
from blaze import datashape as ds
from blaze.datashape import (TypeVar, TypeConstructor, dshape,
coercion_cost as coerce, unify, unify_simple, free)
#===--------------------------... | Python | 0 | @@ -4656,16 +4656,123 @@
g. Int)%0A
+ if hasattr(t, 'impl'):%0A impl = t.impl # already resolved!%0A else:%0A
@@ -4929,17 +4929,17 @@
ructor %25
-s
+r
is not
@@ -4959,16 +4959,26 @@
t scope%22
+ %25 (name,)
)%0A%0A
@@ -5151,16 +5151,385 @@
eters)%0A%0A
+ ... |
9f6168bcd27716588e7dec49b5aae50794ead5e7 | Add --hostname argument. | cloudbio/deploy/main.py | cloudbio/deploy/main.py | from argparse import ArgumentParser
import yaml
from cloudbio.deploy import deploy
DESC = "Creates an on-demand cloud instance, sets up applications, and transfer files to it."
## Properties that may be specified as args or in settings file,
## argument takes precedence.
ARG_PROPERTIES = [
# VM launcher options
... | Python | 0 | @@ -397,16 +397,30 @@
ovider%22,
+%0A %22hostname%22,
%0A%0A # Cl
@@ -1628,16 +1628,155 @@
stack)%22)
+%0A parser.add_argument(%22--hostname%22, dest=%22hostname%22, default=None, help=%22Newly created nodes are created with this specified hostname.%22)
%0A%0A #
|
8338e7629fd5da1f8553ce679f6ebf12aab811d5 | Revert of telemetry: Disabled speedometer. (patchset #1 id:1 of https://codereview.chromium.org/715863006/) | tools/perf/benchmarks/speedometer.py | tools/perf/benchmarks/speedometer.py | # Copyright 2014 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.
"""Apple's Speedometer performance benchmark.
Speedometer measures simulated user interactions in web applications.
The current benchmark uses TodoMVC to s... | Python | 0.000006 | @@ -2883,48 +2883,8 @@
))%0A%0A
-%0A@benchmark.Disabled #crbug.com/406422%0A
clas
|
eb60962da42d0d197d320fdeaba5e8a2058a6454 | debug auto template name | Kraggne/contrib/flatblocks/utils.py | Kraggne/contrib/flatblocks/utils.py | from django.template.loader import select_template
def GetTemplatesPath(modelname,type,template_path=None):
template_paths = []
if template_path:
template_paths.append(template_path)
var = modelname.lower().split(".")
template_paths.append('%s/%s/%s.html' % (var[0],var[1],type))
return temp... | Python | 0.000001 | @@ -66,16 +66,24 @@
tesPath(
+appname,
modelnam
@@ -205,47 +205,8 @@
th)%0A
- var = modelname.lower().split(%22.%22)%0A
@@ -250,21 +250,25 @@
%25 (
-var%5B0%5D,var%5B1%5D
+appname,modelname
,typ
@@ -393,37 +393,57 @@
ath(
-'flatblocks.GenericFlatblock'
+obj.content_type.app_label,obj.content_type.model
... |
ab765adfe9a3872f8d26aaf88251b6fee115735e | Fix flake in session_restore benchmark. | tools/perf/metrics/startup_metric.py | tools/perf/metrics/startup_metric.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.
import json
import logging
from metrics import histogram_util
from metrics import Metric
from telemetry.core import util
class StartupMetric(Metric):
""... | Python | 0.000001 | @@ -1995,48 +1995,193 @@
tab
-.WaitForDocumentReadyStateToBeComplete
+_load_timing_js = 'statsCollectionController.tabLoadTiming
()
+'%0A util.WaitFor(lambda: 'load_duration_ms' in json.loads(%0A tab.EvaluateJavaScript(tab_load_timing_js)), 60)
%0A
@@ -2232,64 +2232,26 @@
ipt(
-%0A ... |
e320a01cb35447906e92cff63d6bbeefe2029e39 | Fix JSON serialisation tests (widget format and file format) | test/test_sankey_data.py | test/test_sankey_data.py | import pytest
from floweaver.sankey_data import SankeyData, SankeyNode, SankeyLink
def test_sankey_data():
nodes = {}
links = {}
groups = {}
data = SankeyData(nodes, links, groups)
assert data.nodes is nodes
assert data.links is links
assert data.groups is groups
def test_sankey_data_js... | Python | 0.000001 | @@ -1730,28 +1730,419 @@
-assert link.to_json(
+# draft JSON Sankey serialisation format%0A assert link.to_json() == %7B%0A 'source': 'a',%0A 'target': 'b',%0A 'type': 'c',%0A 'time': 'd',%0A 'data': %7B%0A 'value': 2,%0A %7D,%0A 'title': 'link',%0A ... |
289e459800b316fe088620773d9e22903ba17340 | Fix join and docstring of user_registered_in_event | indico/modules/events/registration/util.py | indico/modules/events/registration/util.py | # This file is part of Indico.
# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
#
# Indico 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 (a... | Python | 0.000205 | @@ -1483,16 +1483,21 @@
%0A %22%22%22
+%0A
Check wh
@@ -1513,17 +1513,16 @@
re is a
-%60
%60Registr
@@ -1531,22 +1531,14 @@
ion%60
-%60
entry
-%0A
for
@@ -1551,16 +1551,20 @@
r in any
+%0A
form ti
@@ -1591,17 +1591,15 @@
vent
+.
%0A%0A
-
:par
@@ -1615,16 +1615,14 @@
the
-%60
%6... |
c1700d343dd91c1fb2f0d0a4589539feb3a69e71 | fix PackageLifecycle.dist() returning the wrong value, fixes 'ppym publish' | lib/package-lifecycle.py | lib/package-lifecycle.py | # Copyright (c) 2017 Niklas Rosenstein
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, d... | Python | 0 | @@ -2624,20 +2624,16 @@
for
-file
name, re
@@ -2743,20 +2743,16 @@
ive.add(
-file
name, re
@@ -4414,16 +4414,65 @@
.dist()%0A
+ print('Uploading %22%7B%7D%22 ...'.format(filename))%0A
self
|
6ee5d6056ac09bf32e3b1422749ac8bbc563cbef | change copy files task to use rsync over cp | src/escadrille/tasks/copy_files.py | src/escadrille/tasks/copy_files.py | # Copyright 2016-2017 Curtis Sand <curtissand@gmail.com>
#
# 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 l... | Python | 0.006577 | @@ -3256,48 +3256,76 @@
all(
-' '.join(%5B'cp', '-R',%0A
+%0A ' '.join(%5B'rsync', '-Pa', '--ignore-existing',%0A
@@ -3383,46 +3383,8 @@
n%5D),
-%0A
she
|
71dcf2ee99389a15055c8884aef77b71808a1e13 | Clean up metainfo_imdb_url plugin | flexget/plugins/metainfo/imdb_url.py | flexget/plugins/metainfo/imdb_url.py | from __future__ import unicode_literals, division, absolute_import
import re
import logging
from flexget import plugin
from flexget.event import event
log = logging.getLogger('metainfo_imdb_url')
class MetainfoImdbUrl(object):
"""
Scan entry information for imdb url.
"""
schema = {'type': 'bool... | Python | 0.000001 | @@ -144,16 +144,68 @@
rt event
+%0Afrom flexget.utils.imdb import extract_id, make_url
%0A%0Alog =
@@ -610,16 +610,151 @@
ntries:%0A
+ # Don't override already populated imdb_ids%0A if entry.get('imdb_id', eval_lazy=False):%0A continue%0A
@@ -963,98 +963,121 @@
#
-... |
1e4f112f1fc9db6091132308c6aa5e47fb20fc43 | update cei_events dependency | lib/python/cei_events.py | lib/python/cei_events.py | import datetime
import uuid
import simplejson as json
# Anything after this token in a log line is considered a parsable event
CEI_EVENT_SEPARATOR = "CEI_EVENT_JSON:"
KEY_SOURCE = "eventsource"
KEY_NAME = "eventname"
KEY_UNIQUEKEY = "uniquekey"
KEY_EXTRA = "extra"
KEY_STAMP = 'timestamp'
KEY_STAMP_YEAR = 'year'
KEY_S... | Python | 0 | @@ -951,12 +951,14 @@
ger.
-debu
+warnin
g(ev
|
7d0af98aa657c4b8fc05fc6bd5e803151e8443ba | Patch # 1050 by Amaury Forgeot d'Arc. On Windows, debug builds insert stack probes, and recursive functions tend to exhaust the stack faster. This patch reduces the marshal maximum depth from 2000 to 1500 for debug builds only. Optimized builds are not affected. This allows test_marshal to pass with debug builds. | Lib/test/test_marshal.py | Lib/test/test_marshal.py | #!/usr/bin/env python
from test import test_support
import marshal
import sys
import unittest
import os
class HelperMixin:
def helper(self, sample, *extra):
new = marshal.loads(marshal.dumps(sample, *extra))
self.assertEqual(sample, new)
try:
f = open(test_support.TESTFN, "wb")... | Python | 0 | @@ -5344,16 +5344,142 @@
shal.c.%0A
+ if os.name == 'nt' and hasattr(sys, 'gettotalrefcount'):%0A MAX_MARSHAL_STACK_DEPTH = 1500%0A else:%0A
|
8e2930e1582df7270853691db0d6cd9f68f6929f | set default workers=1 | install/storage-service.gunicorn-config.py | install/storage-service.gunicorn-config.py | # Documentation: http://docs.gunicorn.org/en/stable/configure.html
# Example: https://github.com/benoitc/gunicorn/blob/master/examples/example_config.py
import os
# http://docs.gunicorn.org/en/stable/settings.html#user
user = os.environ.get('SS_GUNICORN_USER', 'archivematica')
# http://docs.gunicorn.org/en/stable/se... | Python | 0 | @@ -622,9 +622,9 @@
', '
-4
+1
')%0A%0A
|
3cbf8d5f89cd46eadb47806d605b2d4a5381ccb2 | Update syncthing-discovery build server | syncthing_discovery/update_release.py | syncthing_discovery/update_release.py | #!/usr/bin/env python
"""Updates stdiscosrv Dockerfile with the latest Jenkins linux-amd64 build.
Python 2/3 compatible.
"""
import json
try:
from urllib2 import urlopen
except ImportError:
from urllib.request import urlopen
def get_release():
"""Get stdiscosrv latest linux-amd64 release version from th... | Python | 0 | @@ -65,23 +65,24 @@
latest
-Jenkins
+TeamCity
linux-a
@@ -128,20 +128,44 @@
%0Aimport
-json
+xml.etree.cElementTree as ET
%0Atry:%0A
@@ -181,24 +181,33 @@
llib2 import
+ urljoin,
urlopen%0Aexc
@@ -257,21 +257,72 @@
port url
-open%0A
+join, urlopen%0A%0ABASE_URL = %22https://build2.syncthing.net%22
%0A%0A... |
c9392a6578b0894dff7a5407410e8892e9f3ae6d | Fix bad refactor of is_valid_unc_path | win_unc/validators.py | win_unc/validators.py | from win_unc.sanitizors import sanitize_username, sanitize_unc_path
def is_valid_drive_letter(string):
"""
Drive letters are one character in length and between "A" and "Z". Case does not matter.
"""
return (len(string) == 1
and string[0].isalpha())
def is_valid_unc_path(string):
"""... | Python | 0.999993 | @@ -1,8 +1,54 @@
+from win_unc.internal.utils import take_while%0A
from win
@@ -431,20 +431,40 @@
ith
-%22%5C%5C%22, do not
+exactly two backslashes, not%0A
sta
@@ -473,28 +473,24 @@
or end with
-%0A
whitepsace,
@@ -527,32 +527,36 @@
valid characters
+%0A
(see %60sanitize_
@@ -623,33 +623,57 @@
an... |
ba2574c1b86f1f9b030a9d572149b8f49c4513aa | Update version. | Lib/idlelib/idlever.py | Lib/idlelib/idlever.py | IDLE_VERSION = "0.9b1"
| Python | 0 | @@ -14,10 +14,11 @@
= %220.9b1
++
%22%0A
|
81092dc7a755ce5065f2decc22b7d203b648eac2 | update LOGIN_SIGN_UP_MESSAGE email subject | agir/authentication/tasks.py | agir/authentication/tasks.py | from django.conf import settings
from django.utils import timezone
from django.utils.http import urlencode
from agir.authentication.tokens import subscription_confirmation_token_generator
from agir.lib.celery import emailing_task
from agir.lib.mailing import send_mosaico_email
from agir.lib.utils import front_url
from... | Python | 0.00001 | @@ -1708,19 +1708,23 @@
sur
-la platefom
+Action Populair
e%22,%0A
|
d0a9215cd50a32b70f5692329e7287da8c47a266 | Change test because python 3.6 on Travis has problems | windpowerlib/tools.py | windpowerlib/tools.py | """
The ``tools`` module contains a collection of helper functions used in the
windpowerlib.
"""
__copyright__ = "Copyright oemof developer group"
__license__ = "GPLv3"
import numpy as np
def linear_interpolation_extrapolation(df, target_height):
r"""
Linear inter- or extrapolates between the values of a ... | Python | 0.000017 | @@ -2267,14 +2267,16 @@
%3E%3E%3E
-round(
+value =
line
@@ -2356,12 +2356,41 @@
)%5B0%5D
-, 2)
+%0A %3E%3E%3E round(value * 100) / 100
%0A
|
1d13bd71ff105d540c3af166056cb0b8731a3417 | Add reverse to data migration | wooey/migrations/0037_populate-jsonfield.py | wooey/migrations/0037_populate-jsonfield.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2018-03-04 23:14
from __future__ import unicode_literals
import json
from django.db import migrations
def populate_default(apps, schema_editor):
ScriptParameter = apps.get_model('wooey', 'ScriptParameter')
for obj in ScriptParameter.objects.all():
... | Python | 0.998538 | @@ -458,16 +458,246 @@
ave()%0A%0A%0A
+def reverse_populate_default(apps, schema_editor):%0A ScriptParameter = apps.get_model('wooey', 'ScriptParameter')%0A for obj in ScriptParameter.objects.all():%0A obj._default = json.dumps(obj.default)%0A obj.save()%0A%0A%0A
class Mi
@@ -857,20 +857,46 @@
la... |
112e65e0d8e616fb5cda4c9e6e00aa7166fb9502 | remove unused import | amnesia/modules/content/validation/content.py | amnesia/modules/content/validation/content.py | # -*- coding: utf-8 -*-
# pylint: disable=E1101
import json
from datetime import date
from datetime import datetime
from marshmallow import Schema
from marshmallow import post_dump
from marshmallow import post_load
from marshmallow import pre_load
from marshmallow import pre_dump
from marshmallow.fields import Boo... | Python | 0.000001 | @@ -248,41 +248,8 @@
load
-%0Afrom marshmallow import pre_dump
%0A%0Afr
@@ -480,44 +480,8 @@
ist%0A
-from marshmallow.fields import Dict%0A
from
|
b02fda823a4a4598254d465996ca53361bdfd421 | Load robot in simulator | simulator.py | simulator.py | # -*- coding: utf-8 -*-
from world import World
from PythonQt import QtGui
from director import applogic
from director import objectmodel as om
from director import visualization as vis
from director.consoleapp import ConsoleApp
class Simulator(object):
"""Simulator."""
def __init__(self, world):
"... | Python | 0 | @@ -18,16 +18,40 @@
-8 -*-%0A%0A
+from robot import Robot%0A
from wor
@@ -66,16 +66,16 @@
t World%0A
-
from Pyt
@@ -319,16 +319,23 @@
__(self,
+ robot,
world):
@@ -387,16 +387,42 @@
Args:%0A
+ robot: Robot.%0A
@@ -447,24 +447,52 @@
%22%22%22%0A
+ self._robot = robot%0A
... |
13a0ad8e65929d2b477891c4d1c37e93862ea156 | update to 2.58.2 | packages/dependencies/glib2.py | packages/dependencies/glib2.py | {
'repo_type' : 'archive',
'download_locations' : [
{ 'url' : 'https://download.gnome.org/sources/glib/2.58/glib-2.58.1.tar.xz', 'hashes' : [ { 'type' : 'sha256', 'sum' : '97d6a9d926b6aa3dfaadad3077cfb43eec74432ab455dff14250c769d526d7d6' }, ], },
{ 'url' : 'https://fossies.org/linux/misc/glib-2.58.1.tar.xz/', 'ha... | Python | 0 | @@ -111,25 +111,25 @@
8/glib-2.58.
-1
+2
.tar.xz', 'h
@@ -173,72 +173,72 @@
: '
-97d6a9d926b6aa3dfaadad3077cfb43eec74432ab455dff14250c769d526d7d6
+c7b24ed6536f1a10fc9bce7994e55c427b727602e78342821f1f07fb48753d4b
' %7D,
@@ -298,17 +298,17 @@
ib-2.58.
-1
+2
.tar.xz/
@@ -357,72 +357,72 @@
: '
-97d6a9d926b6aa3dfaa... |
fea2c0bc02a8323ad6c759ca63663499a538186e | Undo BC-breaking change, restore 'import onnx' providing submodules. | onnx/__init__.py | onnx/__init__.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from .onnx_ml_pb2 import * # noqa
from .version import version as __version__ # noqa
import sys
def load(obj):
'''
Loads a binary protobuf that stores onnx gr... | Python | 0 | @@ -231,16 +231,169 @@
# noqa%0A%0A
+# Import common subpackages so they're available when you 'import onnx'%0Aimport onnx.helper # noqa%0Aimport onnx.checker # noqa%0Aimport onnx.defs # noqa%0A%0A
import s
|
3ed405f22ff105b75910e4ff6a249b843df5d117 | Add docstring for worker_id | xdist/plugin.py | xdist/plugin.py | import py
import pytest
def parse_numprocesses(s):
if s == 'auto':
try:
from os import cpu_count
except ImportError:
from multiprocessing import cpu_count
try:
n = cpu_count()
except NotImplementedError:
return 1
return n if n... | Python | 0 | @@ -4806,16 +4806,134 @@
quest):%0A
+ %22%22%22Return the id of the current worker ('gw0', 'gw1', etc) or 'master'%0A if running on the master node.%0A %22%22%22%0A
if h
|
17685a78457a996a0ebdf6b69b2b9f2761bfafb3 | Delete GenerateCover() | PythonScript/GenerateBook.py | PythonScript/GenerateBook.py | import subprocess
import os
def GenerateCover():
#Cover = "Cover"
#BookName = "BookName"
#BookCover = BookName + Cover
#BookCoverHTML = BookCover + ".html"
#CSS = "CSS_"
#CSSExt = "CSSExt"
#pandocCommand = "pandoc ..\\source\\" + BookCover + ".txt -o "
#+ BookCoverHTML + " -standalone " + CSS_ + Cover + ".css... | Python | 0 | @@ -26,495 +26,8 @@
os%0A%0A
-def GenerateCover():%0A%09#Cover = %22Cover%22%0A%09#BookName = %22BookName%22%0A%09#BookCover = BookName + Cover%0A%09#BookCoverHTML = BookCover + %22.html%22%0A%09#CSS = %22CSS_%22%0A%09#CSSExt = %22CSSExt%22%0A%0A%09#pandocCommand = %22pandoc ..%5C%5Csource%5C%5C%22 + BookCover + %22.t... |
1c3cd73f235b6438aeec4ba5ccd208d4e6a3703a | Remove unnecessary `type` for --dist | xdist/plugin.py | xdist/plugin.py | import py
import pytest
def parse_numprocesses(s):
if s == 'auto':
try:
from os import cpu_count
except ImportError:
from multiprocessing import cpu_count
try:
n = cpu_count()
except NotImplementedError:
return 1
return n if n... | Python | 0 | @@ -1116,18 +1116,8 @@
- type=str,
des
|
46f19060f08fdb4b31ee785b699e232f75ca2fd7 | simplify output | workflowcmd/config.py | workflowcmd/config.py | import importlib
import sys
import os
import shutil
import json as _json
import yaml
import argh
from path import path
from cloudify import logs
from cloudify_cli import utils as cli_utils
from cloudify.workflows import local
from dsl_parser import functions as dsl_functions
class Loader(object):
_name = 'local... | Python | 1 | @@ -2227,16 +2227,426 @@
_env()%0A%0A
+ original_message_prefix = logs.create_event_message_prefix%0A%0A def create_message_prefix(event):%0A message = original_message_prefix(event)%0A search = '%3C%7B0%7D%3E'.format(self._name)%0A from_index = messag... |
86c5fdb8a6211de8c8f0dd9a011883f4cf91b80f | optimize to True | workflows/launcher/launch_phonon_vasp_mp.py | workflows/launcher/launch_phonon_vasp_mp.py | from aiida import load_dbenv
load_dbenv()
from aiida.orm import Code, DataFactory
StructureData = DataFactory('structure')
ParameterData = DataFactory('parameter')
import numpy as np
import os
import pymatgen
##########################
structure_id = 'mp-804'
##########################
rester = pymatgen.MPRester(o... | Python | 1 | @@ -255,11 +255,11 @@
'mp-
-804
+406
'%0A##
|
05f37b396dbfafac1ab5ec25a777e5067a00e2c4 | support curl -i param | pxml/__init__.py | pxml/__init__.py | #!/usr/bin/env python
# unicode: utf-8
import sys
from pygments import highlight
from pygments.formatters import TerminalFormatter
from pygments.lexers import XmlLexer
import xml.dom.minidom as xml
import argparse
INDENT=' '*2
def format_code(data):
return xml.parseString(data).toprettyxml(indent=INDENT)
def co... | Python | 0 | @@ -164,22 +164,20 @@
lLexer%0A%0A
-import
+from
xml.dom
@@ -189,30 +189,26 @@
dom
-as xml%0A
import
-arg
parse
+String
%0A%0AIN
@@ -248,383 +248,400 @@
:%0A
-return xml.parseString(data).toprettyxml(indent=INDENT)%0A%0Adef color_code(code):%0A return highlight(code, XmlLexer(), TerminalFormatter())%0A%0Ad... |
2b0dc3f83af77eeaedd71e3dad62109966d277c9 | Remove redundant Python 3.2 code | xdist/remote.py | xdist/remote.py | """
This module is executed in remote subprocesses and helps to
control a remote testing session and relay back information.
It assumes that 'py' is importable and does not have dependencies
on the rest of the xdist code. This means that the xdist-plugin
needs not to be installed in remote environm... | Python | 0.999999 | @@ -5916,246 +5916,8 @@
oqa%0A
- # python3.2 is not concurrent import safe, so let's play it safe%0A # https://bitbucket.org/hpk42/pytest/issue/347/pytest-xdist-and-python-32%0A if sys.version_info%5B:2%5D == (3, 2):%0A os.environ%5B%22PYTHONDONTWRITEBYTECODE%22%5D = %221%22%0A
|
468e34f5f23bf0e9ca1d2af1d3c37b98d32f98cb | allow setup of logging via the root namespace's config file | src/cement/cement/core/log.py | src/cement/cement/core/log.py | """Cement methods to setup and configuring logging."""
import logging
from cement import namespaces
def setup_logging_for_plugin_provider(provider):
"""
Setup the logging handlers for a plugin providers module name space.
Required Arguments:
provider
The name of the applicat... | Python | 0 | @@ -1194,24 +1194,25 @@
%0A %22%22%22%0A
+%0A
config =
@@ -1246,69 +1246,239 @@
-all_levels = %5B'INFO', 'WARN', 'ERROR', 'DEBUG', 'FATAL'%5D%0A
+if clear_loggers:%0A clear_loggers()%0A%0A%0A if config.has_key('loggers'):%0A setup_configed_logging()%0A else:%0A setup_def... |
0cf4f846e4359396362fa9e13d0cca2bf4221aca | change version code | zhihu/__init__.py | zhihu/__init__.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = '7sDream'
__version__ = '0.3.0'
from .client import ZhihuClient
from .question import Question
from .author import Author
from .activity import Activity
from .acttype import ActType
from .answer import Answer
from .collection import Collection
from .column i... | Python | 0.000001 | @@ -83,17 +83,17 @@
= '0.3.
-0
+1
'%0A%0Afrom
|
222e2b6e92c86d31a2ce721398547cd7c6d2c14c | Add read_from_memory function | perception_core/src/perception_core/perception_base.py | perception_core/src/perception_core/perception_base.py | #!/usr/bin/env python
#-*- encoding: utf8 -*-
import os
import yaml
import json
import rospy
from mhri_msgs.msg import ForwardingEvent
from mhri_msgs.srv import WriteData, WriteDataRequest, ReadData, RegisterData, RegisterDataRequest
from std_msgs.msg import Empty
class PerceptionBase(object):
def __init__(self,... | Python | 0.000029 | @@ -4326,21 +4326,476 @@
data):%0A
-pass
+if data == %7B%7D:%0A rospy.logwarn('Empty data requested...')%0A return%0A%0A req = ReadDataRequest()%0A req.perception_name = data%5B'perception_name'%5D%0A req.query = data%5B'query'%5D%0A for item in data%5B'data'%... |
d92dc1244ed8277bf0c204448b49a425b40f55b1 | Change ovsdbapp vlog to INFO | neutron/common/config.py | neutron/common/config.py | # Copyright 2011 VMware, 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 ... | Python | 0.002152 | @@ -1326,16 +1326,57 @@
=INFO',%0A
+ 'ovsdbapp.backend.ovs_idl.vlog=INFO'%0A
%5D%0A%0A# Reg
|
7addf4c3d10a6d936770d3d82c9bf7a93e5577eb | handle series, imperfectly | sites/ao3.py | sites/ao3.py | #!/usr/bin/python
import datetime
import re
from . import register, Site, SiteException, Chapter
@register
class ArchiveOfOurOwn(Site):
"""Archive of Our Own: it has its own epub export, but the formatting is awful"""
@staticmethod
def matches(url):
# e.g. http://archiveofourown.org/works/5683105... | Python | 0.000001 | @@ -530,16 +530,95 @@
roup(1)%0A
+ return self._extract_work(workid)%0A%0A def _extract_work(self, workid):
%0A
@@ -1913,8 +1913,1282 @@
ttify()%0A
+%0A%0A@register%0Aclass ArchiveOfOurOwnSeries(ArchiveOfOurOwn):%0A @staticmethod%0A def matches(url):%0A # e.g. http://archiveofourown.org... |
28cab7063328f02abc5f31c0ef79017c3127ee57 | use atomic modesetting | py/tests/test.py | py/tests/test.py | #!/usr/bin/python3
import pykms
# draw test pattern via dmabuf?
dmabuf = False
# Use omap?
omap = False
if omap:
card = pykms.OmapCard()
else:
card = pykms.Card()
res = pykms.ResourceManager(card)
conn = res.reserve_connector()
crtc = res.reserve_crtc(conn)
mode = conn.get_default_mode()
if omap:
origfb = pykm... | Python | 0 | @@ -13,16 +13,27 @@
ython3%0A%0A
+import sys%0A
import p
@@ -174,16 +174,92 @@
Card()%0A%0A
+if len(sys.argv) %3E 1:%0A conn_name = sys.argv%5B1%5D%0Aelse:%0A conn_name = %22%22%0A%0A
res = py
@@ -313,16 +313,25 @@
nnector(
+conn_name
)%0Acrtc =
@@ -354,16 +354,56 @@
c(conn)%0A
+plane = res.reserve_generic... |
296cb1f198584ea350b7861cfab9b607ed449270 | Rework to POST form. Validation temporarily commented out | api/api.py | api/api.py | #!/usr/bin/env python
from flask import Flask, jsonify, request, abort
from subprocess import Popen, PIPE
import sys
from crossdomain import crossdomain
# Define the web container
api = Flask(__name__)
api.config['SERVER_NAME'] = 'localhost:4242';
# Ensure the API has endpoint discovery
@api.route('/')
@crossdomain(o... | Python | 0 | @@ -229,17 +229,39 @@
= '
-localhost
+cli_explorer.ronaldbradford.com
:424
@@ -553,17 +553,17 @@
h a
-JSON data
+form POST
pay
@@ -571,101 +571,8 @@
oad%0A
- if not request.json:%0A return jsonify(%7B'error': 'Not a valid JSON request'%7D), 200%0A%0A
@@ -655,16 +655,17 @@
' %5D%0A
+#
missi... |
d290b2e1e75b60da6e9b36acf7ef9c62e670ee6e | fix raise class | openhab/types.py | openhab/types.py | from __future__ import absolute_import, division, print_function, unicode_literals
# -*- coding: utf-8 -*-
'''python library for accessing the openHAB REST API'''
#
# Georges Toth (c) 2016 <georges@trypill.org>
#
# python-openhab is free software: you can redistribute it and/or modify
# it under the terms of the GNU G... | Python | 0.000001 | @@ -1139,16 +1139,21 @@
lemented
+Error
()%0A%0A%0Acla
|
81faa7704fb355dd16674d4ed089e0ced34c24c6 | Add router to the behaviors lookup | rflo/start.py | rflo/start.py | import ioflo.app.run
import os
class Manager(object):
'''
Manage the main ioflo process
'''
def __init__(self):
self.behaviors = ['rflo.config', 'rflo.roads']
self.floscript = os.path.join(os.path.dirname(__file__), 'raft.flo')
def start(self):
ioflo.app.run.start(
... | Python | 0 | @@ -176,16 +176,31 @@
o.roads'
+, 'rflo.router'
%5D%0A
|
bfa884aff2b9267c7a773f96ee8f341ab46f1bcd | add hard-coded instance flavor | dwarf/api/compute.py | dwarf/api/compute.py | #!/usr/bin/python
import bottle
import json
import threading
from dwarf import compute
from dwarf import exception
from dwarf.common import config
from dwarf.common import utils
CONF = config.CONFIG
class ComputeApiThread(threading.Thread):
def __init__(self, port):
threading.Thread.__init__(self)
... | Python | 0.000021 | @@ -398,16 +398,42 @@
n(self):
+ # pylint: disable=R0912
%0A
@@ -567,32 +567,33 @@
show %3Cimage_id%3E%0A
+#
@app.get
@@ -2358,24 +2358,62 @@
: nova list%0A
+ # GET: nova show %3Cserver_id%3E%0A#
@app
@@ -2444,32 +2444,89 @@
ervers/detail')%0A
+ @app.get('/v1/%3C_tenant_id%... |
1dce2b9aa1733b5b23a8b3adf4356523d21bd1dc | Add test: profile with first day of month included | spec/coefficients/coefficients_spec.py | spec/coefficients/coefficients_spec.py | from enerdata.profiles.profile import *
from enerdata.datetime.station import *
from enerdata.contracts.tariff import T20A
ONE_MONTH_DATE_SET = ['1/2018']
DATE_SET = ['3/2018', '4/2018', '5/2018']
def get_data_ranges(start, end):
from datetime import datetime
from dateutil.relativedelta import relativedelta
... | Python | 0 | @@ -3297,16 +3297,613 @@
d_date%0A%0A
+ with it(%22Profile with first day of month included%22):%0A start = TIMEZONE.localize(datetime(2018, 1, 1, 1))%0A end = TIMEZONE.localize(datetime(2018, 2, 1, 1))%0A tariff = T20A()%0A accumulated = 0%0A balance = %7B%0A 'P1': 6.8... |
edfe5ef4e3a7fc6d127a63afdac842ead37f29e3 | Check if remote document exists | easywebdav/client.py | easywebdav/client.py | import requests
import shutil
from numbers import Number
from httplib import responses as HTTP_CODES
from urlparse import urlparse
import xml.etree.cElementTree as xml
from collections import namedtuple
from cStringIO import StringIO
class WebdavException(Exception):
pass
class ConnectionFailed(WebdavException):
... | Python | 0.000001 | @@ -4960,8 +4960,173 @@
onse')%5D%0A
+ def exists(self, remote_path):%0A response = self._send('HEAD', remote_path, (200, 201, 404))%0A return True if response.status_code != 404 else False%0A
|
8ace826d00ff716e1bf7e8efe5680ba151d85ca7 | test fix | lib/fastq.py | lib/fastq.py | import sys
import math
# WARNING
# FASTQ formats differ:
# http://en.wikipedia.org/wiki/FASTQ_format
# The constants below must be hard-coded to match the
# format because the format cannot be reliably detected.
ASCII_Offset = 33
Q_Min = 0
Q_Max = 41
def SetSanger():
global ASCII_Offset, Q_Min, Q_Max
ASCII_Offset ... | Python | 0.000001 | @@ -2289,16 +2289,22 @@
FileName
+, 'rU'
)%0A%09Label
|
7b62ddfb486fb947655d756900970e8036b5121a | + don't include ':', or '?' in the filename | newsponder/downloader.py | newsponder/downloader.py | from __future__ import print_function, division
import pprint, os, json, logging, codecs
from datetime import datetime, timedelta
import requests
import newspaper
from lxml import html
pp = pprint.PrettyPrinter(indent=4)
logging.basicConfig(
format="%(levelname) -10s %(asctime)s %(message)s",
level=logging.IN... | Python | 0.999957 | @@ -4159,16 +4159,18 @@
in ',./
+:?
')%0A%0A
|
e379b89ab5f012ac9ad6f6f0a058fbe3098791a6 | Add docstring to pipe.process_images | skan/pipe.py | skan/pipe.py | from . import pre, csr
import imageio
from tqdm import tqdm
import numpy as np
from skimage import morphology
import pandas as pd
def process_images(filenames, image_format, threshold_radius,
smooth_radius, brightness_offset, scale_metadata_path):
image_format = None if image_format == 'auto' e... | Python | 0.000001 | @@ -262,16 +262,1151 @@
_path):%0A
+ %22%22%22Full pipeline from images to skeleton stats with local median threshold.%0A%0A Parameters%0A ----------%0A filenames : list of string%0A The list of input filenames.%0A image_format : string%0A The format of the files. 'auto' is automatically d... |
13df3ddde0bb693c091950441e93aadbd0fc0b33 | add comment | kiwi/ui/gadgets.py | kiwi/ui/gadgets.py | #
# Kiwi: a Framework and Enhanced Widgets for Python
#
# Copyright (C) 2005 Async Open Source
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (a... | Python | 0 | @@ -3347,32 +3347,159 @@
timeout_id = -1%0A
+ %0A # Done is set when animation is already finished.%0A # Then the background is normally in another color.%0A
self._do
|
d7b094416f355407efd10ab19467a0c7bf8caba7 | add 'use dbname;' lines to missiles | Tank/stepper/missile.py | Tank/stepper/missile.py | '''
Missile object and generators
You should update Stepper.status.ammo_count and Stepper.status.loop_count in your custom generators!
'''
from itertools import cycle
from module_exceptions import AmmoFileError
import os.path
import info
import logging
import re
class HttpAmmo(object):
'''
Represents HTTP m... | Python | 0.000005 | @@ -4612,32 +4612,162 @@
.rstrip('%5Cr%5Cn')%0A
+ if line.startswith('use '):%0A request += line%0A else:%0A
@@ -4793,24 +4793,28 @@
swith(';'):%0A
+
@@ -4888,16 +4888,20 @@
+
result =
@@ -4... |
1bb8281a5a13f49ddf92d55dbf5a4944404eb455 | Implement jnbe. | src/arch/x86/isa/insts/control_transfer/jump.py | src/arch/x86/isa/insts/control_transfer/jump.py | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# Redistribution and use of this software in source and binary forms,
# with or without modification, are permitted provided that the
# following conditions are met:
#
# The software must be used only for Non-Commercial Use which mean... | Python | 0.000004 | @@ -3721,32 +3721,217 @@
gs=(CCvZF,)%0A%7D;%0A%0A
+def macroop JNBE_I%0A%7B%0A # Make the default data size of jumps 64 bits in 64 bit mode%0A .adjust_env oszIn64Override%0A%0A rdip t1%0A limm t2, imm%0A wrip t1, t2, flags=(nCCvZF,)%0A%7D;%0A%0A
def macroop JMP_
|
28181d9bcf7aa597b88507871ffb31f4028eb67c | Enable DEBUG when running the test suite | src/pretix/testutils/settings.py | src/pretix/testutils/settings.py | import atexit
import os
import tempfile
tmpdir = tempfile.TemporaryDirectory()
os.environ.setdefault('DATA_DIR', tmpdir.name)
from pretix.settings import * # NOQA
DATA_DIR = tmpdir.name
LOG_DIR = os.path.join(DATA_DIR, 'logs')
MEDIA_ROOT = os.path.join(DATA_DIR, 'media')
atexit.register(tmpdir.cleanup)
EMAIL_BACK... | Python | 0 | @@ -391,16 +391,30 @@
False%0A%0A
+DEBUG = True%0A%0A
PASSWORD
|
28d4ccf7e7fdb65ec422be9d44cab5de7d82a1a1 | Add whitespace | ec2stack/__init__.py | ec2stack/__init__.py | #!/usr/bin/env python
# encoding: utf-8
"""This module creates the flask application.
"""
import os
import sys
import argparse
from flask import Flask
from ConfigParser import SafeConfigParser
from ec2stack.controllers import *
from ec2stack.core import DB
from ec2stack.models import User
def create_app(settings=... | Python | 0.999999 | @@ -3234,16 +3234,17 @@
pe_map%0A%0A
+%0A
def _loa
|
efceebba734228b9def014e98c039b774e0dd572 | Fix path to ckeditor | src/geelweb/django/customflatpages/admin.py | src/geelweb/django/customflatpages/admin.py | from django.contrib import admin
from django import forms
from django.contrib.flatpages.admin import FlatpageForm, FlatPageAdmin
from django.contrib.flatpages.models import FlatPage
from django.db import models
from geelweb.django.customflatpages.models import CustomFlatPage
class CustomFlatPageForm(FlatpageForm):
... | Python | 0.000007 | @@ -775,16 +775,8 @@
= ('
-/static/
cked
|
7f9151bc9c3f191e9e5164cb117f00c2a657ce5e | Update defaults alerts email | backend/unpp_api/settings/base.py | backend/unpp_api/settings/base.py | from __future__ import absolute_import
import os
import sys
####
# Change per project
####
PROJECT_NAME = 'unpp_api'
# project root and add "apps" to the path
PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(os.path.join(PROJECT_ROOT, 'apps/'))
####
# Other settings
####
ADM... | Python | 0.000001 | @@ -372,17 +372,17 @@
'unicef
--
++
unpp@tiv
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.