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 |
|---|---|---|---|---|---|---|---|
6e05b20f070e31948c3cea1b9ec0ab9e2432f1e4 | Fix failing s3 test | s3backup/clients/s3.py | s3backup/clients/s3.py | # -*- coding: utf-8 -*-
import collections
import datetime
import fnmatch
import json
import logging
import os
import zlib
from botocore.exceptions import ClientError
import magic
from s3backup.clients import SyncClient, SyncObject
logger = logging.getLogger(__name__)
S3Uri = collections.namedtuple('S3Uri', ['bu... | Python | 0.000056 | @@ -3927,38 +3927,113 @@
ix)%0A
-if not
+key_parts = key.split('/')%0A%0A for part in key_parts:%0A if
any(fnmatch.fnm
@@ -4029,35 +4029,36 @@
fnmatch.fnmatch(
-key
+part
, pattern) for p
@@ -4107,27 +4107,70 @@
-results.append(key)
+ logger.debug('Ignoring %25s', key... |
a766bfa315f7c91f672f59bdd1b606d50467c332 | Bump version. | src/flask_components/_version.py | src/flask_components/_version.py | # -*- coding: utf-8 -*-
__version_info__ = (0, 1, 0)
__version__ = '.'.join(map(str, __version_info__))
| Python | 0 | @@ -43,17 +43,17 @@
(0, 1,
-0
+1
)%0A__vers
|
780cdf506060ad550355e4b8928743944198ac74 | Test config | tests/test.py | tests/test.py | import json
from unittest import TestCase
import requests
from PIL import Image
from httmock import urlmatch, HTTMock
from redis import Redis
from app import app
import os
@urlmatch(netloc=r'(.*\.)?test.server\.com$')
def get_image_mock(url, request):
return open('tests/test_resources/heman.png', 'r').read()
... | Python | 0.000001 | @@ -2628,12 +2628,765 @@
) == 'pong'%0A
+%0Aimport config%0A%0A%0Aclass TestConfig(TestCase):%0A def setUp(self):%0A self.statsd_config = 'statsd_config'%0A self._create_statsd_config()%0A%0A def tearDown(self):%0A try:%0A os.remove(self.statsd_config)%0A except OSError:%0A... |
9a24e9e99b4060a1e0fc83af22bc2772733eb15d | oopses. fixed decode | cypher/cypher.py | cypher/cypher.py | """Use Caesar shift to encode or decode your messages!"""
import os
import discord
from .utils.dataIO import fileIO, dataIO
from discord.ext import commands
from __main__ import send_cmd_help
from .utils import checks
__author__ = "FwiedWice"
__version__ = "V1.0.0"
class Code:
def __init__(self, chars):
... | Python | 0.999999 | @@ -5651,34 +5651,34 @@
code(how_much, '
+d
e
-n
', message)%0A
|
f84aa449780f2645a89c3fb015a2235389937ec5 | Clean up mongo fixtures a bit | blaze/tests/test_mongo.py | blaze/tests/test_mongo.py | from __future__ import absolute_import, division, print_function
import pytest
pymongo = pytest.importorskip('pymongo')
try:
pymongo.MongoClient()
except pymongo.errors.ConnectionFailure:
pytest.importorskip('fhskjfdskfhsf')
from datashape import discover, dshape
from contextlib import contextmanager
from to... | Python | 0 | @@ -271,76 +271,8 @@
hape
-%0Afrom contextlib import contextmanager%0Afrom toolz.curried import get
%0A%0Afr
@@ -297,16 +297,30 @@
op, into
+, create_index
%0A%0Aconn =
@@ -365,211 +365,250 @@
db%0A%0A
-%0A@contextmanager%0Adef collection(data=None):%0A if data is None:%0A data = %5B%5D%0A coll = db.t... |
36408b92a74b8f9963686d215b26de57b429cd6c | Fix test_table.py record syntax. | blaze/tests/test_table.py | blaze/tests/test_table.py | from blaze import dshape
from blaze import NDTable, Table, NDArray, Array
def test_arrays():
# Assert that the pretty pritner works for all of the
# toplevel structures
expected_ds = dshape('3, int')
a = NDArray([1,2,3])
str(a)
repr(a)
a.datashape._equal(expected_ds)
a = Array([1,2,3... | Python | 0.000002 | @@ -651,17 +651,17 @@
i: int64
-,
+;
f: floa
|
3ffe0a9f5a863c9647279167f94076d878683622 | Add FUZZING_LANGUAGE to build step. (#3835) | infra/gcb/build_lib.py | infra/gcb/build_lib.py | """Utility module for Google Cloud Build scripts."""
import base64
import collections
import os
import requests
import sys
import time
import urllib
import urlparse
from oauth2client.service_account import ServiceAccountCredentials
BUILD_TIMEOUT = 12 * 60 * 60
# Needed for reading public target.list.* files.
GCS_URL... | Python | 0 | @@ -5818,16 +5818,65 @@
+ name,%0A
+ 'env': %5B'FUZZING_LANGUAGE=%25s' %25 language%5D,%0A
%7D, %7B%0A
|
a5c4e829b8e6fba1ab2cda6c8ae27b9292a38af0 | Implement DefinitionContainer::getValue | UM/Settings/DefinitionContainer.py | UM/Settings/DefinitionContainer.py | # Copyright (c) 2016 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
import json
import collections
import copy
from UM.Resources import Resources
from UM.PluginObject import PluginObject
from . import ContainerInterface
from . import SettingDefinition
class InvalidDefinitionError(Exce... | Python | 0 | @@ -2006,18 +2006,152 @@
-return Non
+definitions = self.findDefinitions(%7B%22key%22: key%7D)%0A if not definitions:%0A return None%0A%0A return definitions%5B0%5D.default_valu
e%0A%0A
|
3f90d0ec25491eb64f164180139d4baf9ff238a9 | Sort the context list in alphabetical order | libravatar/context_processors.py | libravatar/context_processors.py | # Copyright (C) 2010 Jonathan Harker <jon@jon.geek.nz>
#
# This file is part of Libravatar
#
# Libravatar is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your... | Python | 1 | @@ -874,41 +874,63 @@
ext%5B
-%22site_name%22%5D = settings.SITE_NAME
+'analytics_propertyid'%5D = settings.ANALYTICS_PROPERTYID
%0A
@@ -942,28 +942,20 @@
ext%5B
-%22libr
+'
avatar_
-version%22
+url'
%5D =
@@ -967,26 +967,18 @@
ngs.
-LIBR
AVATAR_
-VERSION
+URL
%0A
@@ -990,105 +990,115 @@
ext%5B
-%22avat... |
b22c41f7c4047f576420feec7419e6a6141a77a5 | Set is_agency_admin to false when deactivating an agency | app/agency/utils.py | app/agency/utils.py | from datetime import datetime
from flask_login import current_user
from app.lib.utils import eval_request_bool
from app.lib.db_utils import (
update_object,
create_object
)
from app.models import (
Agencies,
Events,
AgencyUsers
)
from app.constants.event_type import (
AGENCY_ACTIVATED,
AGE... | Python | 0.000359 | @@ -2518,32 +2518,81 @@
_agency_active%22:
+ %22False%22,%0A %22is_agency_admin%22:
%22False%22%7D,%0A
@@ -3328,37 +3328,32 @@
-
%22auth_user_type%22
@@ -3402,37 +3402,32 @@
-
%22ein%22: agency_ei
@@ -3421,37 +3421,32 @@
n%22: agency_ein,%0A
-... |
34dc1c775e4808664dcdb5824b8f2ed5f12e94a1 | add jsonp renderer and route for graph build status | app/app/__init__.py | app/app/__init__.py | from pyramid.config import Configurator
from sqlalchemy import engine_from_config
from .models import (
DBSession,
Base,
)
def main(global_config, **settings):
""" This function returns a Pyramid WSGI application.
"""
engine = engine_from_config(settings, 'sqlalchemy.')
DBSession.configur... | Python | 0 | @@ -33,16 +33,52 @@
gurator%0A
+from pyramid.renderers import JSONP%0A
from sql
@@ -441,16 +441,79 @@
ttings)%0A
+ config.add_renderer('jsonp', JSONP(param_name='callback'))%0A
conf
@@ -671,24 +671,66 @@
tity/%7Bid%7D')%0A
+ config.add_route('status', '/status')%0A
config.s
|
06ba84a8d6bd31060d6ea3a6f7991f8a1b438476 | Add the ability to search for *_requires argument of setup() in setup.py | pyp2rpmlib/metadata_extractors.py | pyp2rpmlib/metadata_extractors.py | import functools
import os
from pyp2rpmlib.package_data import PypiData, LocalData
from pyp2rpmlib import settings
def memoize_by_args(func):
memory = {}
@functools.wraps(func)
def memoized(*args):
if not args in memory.keys():
value = func(*args)
memory[args] = value
... | Python | 0 | @@ -19,16 +19,26 @@
mport os
+%0Aimport re
%0A%0Afrom p
@@ -1785,24 +1785,33 @@
find_setup_
+requires_
argument(sel
@@ -1829,29 +1829,686 @@
gument):
-%0A pass
+ # very stupid method to find one of *_requires arguments%0A setup_py = self.get_content_of_file_from_archive('setup.py')%0A if not ... |
afe3534c29a8c2d566324adf7d1e95e5d0395627 | Define websocket resources at module level | app/dermshare-ws.py | app/dermshare-ws.py | #!/usr/bin/env python
#
# DermShare -- WebSocket server for mobile devices
#
# Copyright (c) 2015 Carnegie Mellon University
# All rights reserved.
#
# This software is distributed under the terms of the Eclipse Public
# License, Version 1.0 which can be found in the file named LICENSE.
# ANY USE, REPRODUCTION OR DISTR... | Python | 0 | @@ -5141,16 +5141,143 @@
ate')%0A%0A%0A
+resources = Resource(OrderedDict((%0A ('/ws/client', ImageClientConnection),%0A ('/ws/mobile', ImageMobileConnection),%0A)))%0A%0A%0A
def _mai
@@ -6297,142 +6297,8 @@
))%0A%0A
- resources = OrderedDict()%0A resources%5B'/ws/client'%5D = ImageClientConnection%0A ... |
55cfe1b3ce4c55eaeadbcedeba942cf6ed40f134 | revert changes in message lib | intelmq/lib/message.py | intelmq/lib/message.py | import json
import hashlib
class Event(object):
def __init__(self, event=None):
if event:
self.event = event
else:
self.event = dict()
def add(self, key, value):
if not value or key in self.event:
return False
self.... | Python | 0 | @@ -1628,170 +1628,43 @@
-if type(value) != float and type(value) != int:%0D%0A evhash.update(value.encode(%22utf-8%22))%0D%0A else:%0D%0A evhash.update(%22%25s%22%25value
+evhash.update(value.encode(%22utf-8%22)
)%0D%0A
|
0b45a9191c9acb3947babe564c3c3bbda9b7394f | Return page_id in logs/serializer for wiki. | api/logs/serializers.py | api/logs/serializers.py | from rest_framework import serializers as ser
from api.base.serializers import (
JSONAPISerializer,
RelationshipField,
RestrictedDictSerializer,
LinksField,
)
from website.project.model import Node
class NodeLogIdentifiersSerializer(RestrictedDictSerializer):
doi = ser.CharField(read_only=True)
... | Python | 0 | @@ -1633,24 +1633,68 @@
_only=True)%0A
+ page_id = ser.CharField(read_only=True)%0A
path = s
@@ -2728,34 +2728,36 @@
%0A return
-%7B%7D
+None
%0A%0A def get_pa
|
4eecc8b2de7ad39ce796da8fc7862300ed5db759 | Change HP reference to HPE for ProLiant server | examples/simple-proliant.py | examples/simple-proliant.py | # coding=utf-8
""" Simple example to use python-redfish on HP Proliant servers """
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
from builtins import str
import os
import sys
impo... | Python | 0 | @@ -55,16 +55,17 @@
sh on HP
+E
Prolian
|
17eb885097da7b2b2418f909e2f23058245be72c | Update spotify example (#276) | examples/spotify_example.py | examples/spotify_example.py | """
Example on how to use the Spotify Controller.
NOTE: You need to install the spotipy and spotify-token dependencies.
This can be done by running the following:
pip install spotify-token
pip install git+https://github.com/plamere/spotipy.git
"""
import pychromecast
from pychromecast.controllers.spotify import Spotif... | Python | 0.000001 | @@ -242,16 +242,43 @@
git%0A%22%22%22%0A
+import logging%0Aimport sys%0A%0A
import p
@@ -399,161 +399,324 @@
py%0A%0A
-chromecasts = pychromecast.get_chromecasts()%0Acast = chromecasts%5B0%5D%0Acast.start()%0A%0ACAST_NAME = %22My Chromecast%22%0Adevice_id = None%0A%0Aif cast.name == CAST_NAME:
+CAST_NAME = %22My Chr... |
d609e8895c27d9c862098718140b54bbbdb77f98 | fix yet another typo...... | FBRank/parse/League.py | FBRank/parse/League.py | # -*- coding:utf-8 -*-
"""
parse web content about league,now it includes:premier league,Liga BBVA
"""
import re
from collections import defaultdict
import requests
from bs4 import BeautifulSoup
from prettytable import PrettyTable
from FBRank.utils.exceptions import IllegalArgumentException, NotSupprotedYetException... | Python | 0.000004 | @@ -3829,17 +3829,16 @@
tent cou
-n
ld not b
|
fd460c1b987354b01d306e2e96ab5c74f6b0d06f | add socket close call. | echo_server.py | echo_server.py | #!/usr/bin/env python
from __future__ import print_function
import socket
import email.utils
def server_socket_function():
server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_IP)
server_socket.bind(('127.0.0.1', 50000))
server_socket.listen(1)
try:
while True:
... | Python | 0 | @@ -564,16 +564,46 @@
close()%0A
+ server_socket.close()%0A
%0A%0Adef re
|
2e28fdf8c6413443313e98f6ddf258758f0b6bbf | Fix check for WIN_CUSTOM_TOOLCHAIN (issue #1470). | tools/gclient_hook.py | tools/gclient_hook.py | # Copyright (c) 2011 The Chromium Embedded Framework Authors.
# Portions copyright (c) 2006-2008 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.
from gclient_util import *
import os, sys
# The CEF directory is the parent ... | Python | 0 | @@ -2335,73 +2335,32 @@
%0Aif
-'WIN_CUSTOM_TOOLCHAIN' in os.environ.keys() and %5C%0A os.environ%5B
+bool(int(os.environ.get(
'WIN
@@ -2381,16 +2381,16 @@
AIN'
-%5D == '1'
+, '0')))
:%0A
|
e916658d3bba66b0d8fa28fc3fdd24abed6b5697 | Add l10n-slovenia | tools/oca_projects.py | tools/oca_projects.py | # -*- coding: utf-8 -*-
"""
Data about OCA Projects, with a few helper functions.
OCA_PROJECTS: dictionary of OCA Projects mapped to the list of related
repository names, based on
https://community.odoo.com/page/website.projects_index
OCA_REPOSITORY_NAMES: list of OCA repository names
"""
from github_login import l... | Python | 0.000004 | @@ -3279,24 +3279,64 @@
-romania'%5D,%0A
+ 'l10n-slovenia': %5B'l10n-slovenia'%5D,%0A
'l10n-sp
|
70ccfa544ca590693343ca280ba26a0f528b8336 | make css_class a property, since it's just a getter. | lib/djtables/column.py | lib/djtables/column.py | #!/usr/bin/env python
# vim: et ts=4 sw=4
import datetime
from django.template import defaultfilters
class Column(object):
"""
This class represents a table column. It is responsible for holding
metadata, and rending table cells. Like Django model/fields, columns
are usually created within the tabl... | Python | 0 | @@ -3460,32 +3460,46 @@
ss is not None%0A%0A
+ @property%0A
def css_clas
|
a5c6705313a31cf095fc2771bddbc037eec30cea | Allow numbers in JIRA issue names | lib/google_calendar.py | lib/google_calendar.py | from __future__ import print_function
import httplib2
import re
import os
import sys
import datetime
from functools import total_ordering
import dateutil.parser
import pytz
from jira.exceptions import JIRAError
from apiclient import discovery
from oauth2client import client
from oauth2client import tools
from oauth2... | Python | 0.000001 | @@ -3419,16 +3419,18 @@
le('%5BA-Z
+%5Cd
%5D+-%5Cd+')
|
91e30ce69e6715f2fcd5b0258d6a9e2f6ae87c96 | move redeemed_at field from coupon to couponuser | coupons/models.py | coupons/models.py | import random
from django.conf import settings
from django.db import IntegrityError
from django.db import models
from django.dispatch import Signal
from django.utils.encoding import python_2_unicode_compatible
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from .settings imp... | Python | 0 | @@ -2474,88 +2474,8 @@
ue)%0A
- redeemed_at = models.DateTimeField(_(%22Redeemed at%22), blank=True, null=True)%0A
@@ -4308,20 +4308,100 @@
l=True, blank=True)%0A
+ redeemed_at = models.DateTimeField(_(%22Redeemed at%22), blank=True, null=True)%0A
|
dd80e81732afd5b39f7120c5951a53c218723998 | Fix importing of field "number" | apps/curia_vista/management/commands/update_councillors.py | apps/curia_vista/management/commands/update_councillors.py | from xml.etree import ElementTree
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
import requests
from apps.curia_vista.models import Councillor
class Command(BaseCommand):
help = 'Import councillors from parlament.ch'
@transaction.atomic
def handle(se... | Python | 0.000002 | @@ -1604,24 +1604,40 @@
text if
+councillor.find(
'number'
in coun
@@ -1628,30 +1628,29 @@
'number'
+)
i
-n councillor
+s not None
else No
|
0f6b0592e6f74f99289c4e35f85fc2b600b79492 | Revert SmoothLine in example | examples/canvas/lines.py | examples/canvas/lines.py | '''
Line (SmoothLine) Experiment
============================
This demonstrates the experimental and unfinished SmoothLine feature
for fast line drawing. You should see a multi-segment
path at the top of the screen, and sliders and buttons along the bottom.
You can click to add new points to the segment, change the tr... | Python | 0 | @@ -868,38 +868,32 @@
t.alpha%0A
-Smooth
Line:%0A
@@ -1102,38 +1102,32 @@
rolline%0A
-Smooth
Line:%0A
@@ -1241,22 +1241,16 @@
-Smooth
Line:%0A
|
b42554fcc895da17a5b4f6c3552436462a968a77 | Remove now obsolete environment variable - this has been unified and moved into new ST2_ACTION_AUTH_TOKEN environment variable. | st2actions/st2actions/runners/fabric_runner.py | st2actions/st2actions/runners/fabric_runner.py | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | Python | 0 | @@ -5352,100 +5352,8 @@
%7B%7D%0A%0A
- if self.auth_token:%0A env_vars%5B'st2_auth_token'%5D = self.auth_token.token%0A%0A
|
add0af524dafa241d7bab64093ed45c857c66c0d | Rename cfg to settings | statsSend/teamCity/teamCityStatisticsSender.py | statsSend/teamCity/teamCityStatisticsSender.py | #!/usr/bin/env python3
from dateutil import parser
from statsSend.teamCity.teamCityConnection import TeamCityConnection
from statsSend.teamCity.teamCityUrlBuilder import TeamCityUrlBuilder
from statsSend.teamCity.teamCityProject import TeamCityProject
class TeamCityStatisticsSender:
def __init__(self, cfg, repor... | Python | 0.001188 | @@ -303,19 +303,24 @@
_(self,
-cfg
+settings
, report
@@ -353,19 +353,24 @@
e = int(
-cfg
+settings
%5B'page_s
@@ -416,19 +416,24 @@
nection(
-cfg
+settings
%5B'user'%5D
@@ -434,19 +434,24 @@
user'%5D,
-cfg
+settings
%5B'passwo
@@ -497,19 +497,24 @@
Builder(
-cfg
+settings
%5B'server
@@ -521,19 +521,24 @@
... |
032b208df7a78f731093314d7e8a75cacc447da6 | Update elmo_example | examples/elmo_example.py | examples/elmo_example.py | """
Example from training to saving.
"""
import argparse
import os
import numpy as np
from anago.utils import load_data_and_labels, load_glove, filter_embeddings
from anago.models import ELModel
from anago.preprocessing import ELMoTransformer
from anago.trainer import Trainer
def main(args):
print('Loading data... | Python | 0.000001 | @@ -1634,16 +1634,18 @@
ile)%0A
+ #
p.save(
@@ -2433,24 +2433,100 @@
eter file')%0A
+ parser.add_argument('--preprocessor_file', default='preprocessor.json')%0A
# Traini
|
daba0d7eb4b77e40790624e23938b2ebb6d04fca | fix notify loop | examples/multiworker2.py | examples/multiworker2.py | # -*- coding: utf-8 -
#
# This file is part of pistil released under the MIT license.
# See the NOTICE for more information.
import time
import urllib2
from pistil.arbiter import Arbiter
from pistil.worker import Worker
from pistil.tcp.sync_worker import TcpSyncWorker
from pistil.tcp.arbiter import TcpArbiter
from ... | Python | 0.000001 | @@ -1051,16 +1051,18 @@
f.notify
+()
%0A%0Aclass
|
2af6d265834805f5fa11bf237de124f468220f3e | oopsie missing comma | ircd.gyp | ircd.gyp | {
'variables':
{
'python-includes': 'python -c "from distutils import sysconfig; import ntpath; print sysconfig.get_python_inc().replace(ntpath.sep, \'/\')"',
'python-version': 'python -c "from distutils import sysconfig; print sysconfig.get_config_var(\\"VERSION\\")"',
},
'targets':
[{
'targ... | Python | 0.999098 | @@ -1900,16 +1900,17 @@
wrap.cc'
+,
%0A '
|
aa66df3587453874f64f776dce66606b78520215 | Improve migration string formatting | website/database/migrate.py | website/database/migrate.py | import re
from warnings import warn
from database import db
from helpers.commands import got_permission
def add_column(engine, table_name, definition):
sql = f'ALTER TABLE `{table_name}` ADD {definition}'
engine.execute(sql)
def drop_column(engine, table_name, column_name):
sql = f'ALTER TABLE `{table_... | Python | 0.000164 | @@ -4474,32 +4474,33 @@
+f
'%5CnFollowing col
@@ -4500,34 +4500,44 @@
ing columns in %60
-%25s
+%7Btable.name%7D
%60 table differ i
@@ -4611,25 +4611,32 @@
odels: %7B
-table.nam
+columns_to_updat
e%7D'%0A
@@ -4803,16 +4803,17 @@
+f
'Column:
@@ -4814,18 +4814,24 @@
olumn: %60
-%25s... |
ff8a9eada9ceac6e704c477d341896f247b30ae9 | fix tag limit | website/project/settings.py | website/project/settings.py | import os
import sys
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
PROJECT_ROOT = os.path.realpath(os.path.dirname(__file__))
sys.path.insert(0, os.path.join(BASE_DIR, "apps"))
ALLOWED_HOSTS = ['*',]
SITE_ID = 1
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.co... | Python | 0.000002 | @@ -4111,16 +4111,57 @@
GE = 3%0A%0A
+# taggit tag cloud%0ATAGGIT_LIMIT = 10000%0A%0A
# load l
|
5f5141b169e61a5b6912146a995917f5d862ee9c | version bump | exemelopy/__version__.py | exemelopy/__version__.py | __author__ = 'Phillip B Oldham'
__author_email__ = 'phillip.oldham@gmail.com'
__version__ = '0.0.8'
__licence__ = 'MIT'
| Python | 0.000001 | @@ -94,9 +94,9 @@
0.0.
-8
+9
'%0A__
|
878811a673625f9dbe0f41dd0196887f612ecf2e | Set default file extension to empty string | expand_region_handler.py | expand_region_handler.py | import re
try:
import javascript
import html
except:
from . import javascript
from . import html
def expand(string, start, end, extension=None):
if(re.compile("html|htm|xml").search(extension)):
return html.expand(string, start, end)
return javascript.expand(string, start, end) | Python | 0.000005 | @@ -145,12 +145,10 @@
ion=
-None
+%22%22
):%0A%0A
|
58d3e0712a35052d0016fa3c3b3ffda1ba56b305 | Add some locks | lightcontrol/server.py | lightcontrol/server.py | #!/usr/bin/env python3
import RPi.GPIO as GPIO
import time
import threading
import logging
from tzlocal import get_localzone
from flask import Flask, render_template, url_for, request, make_response
from lightcontrol.config import lights
from os.path import expanduser
import os.path
import json
logging.basicConfig(le... | Python | 0.000018 | @@ -85,16 +85,50 @@
logging%0A
+from threading import RLock, Lock%0A
from tzl
@@ -677,24 +677,80 @@
-def read(self):%0A
+ self.lock = RLock()%0A def read(self):%0A with self.lock:%0A
@@ -803,13 +803,21 @@
+
+
try:%0A
+
@@ -881,24 +881,28 @@
+
return... |
c31a3c5fcbdda0075ac50dbcfb0162dc83a4268e | support for extra_vars | Flansible/flansible/run_ansible_playbook.py | Flansible/flansible/run_ansible_playbook.py | import os
from flask_restful import Resource, Api
from flask_restful_swagger import swagger
from flask_restful import reqparse
from flansible import app
from flansible import api, app, celery, auth, ansible_default_inventory, get_inventory_access, task_timeout
from ModelClasses import AnsibleCommandModel, AnsiblePlaybo... | Python | 0 | @@ -2227,16 +2227,56 @@
ntory'%5D%0A
+ extra_vars = args%5B'extra_vars'%5D%0A
@@ -4108,16 +4108,505 @@
g = ''%0A%0A
+ extra_vars_string = ''%0A if extra_vars:%0A counter = 1%0A extra_vars_string += ' -e%22'%0A for key in extra_vars.keys():%0A ... |
3c5738242e472641eb9029fe8b84c11d2d693047 | fix radar regex | maps2json.py | maps2json.py | #!/usr/bin/env python3
# Description: Loops through a directory of map pk3s and outputs JSON with map information
# Author: Tyler "-z-" Mulligan
import zipfile, os, re, hashlib, json
from datetime import datetime
def main():
packs_maps = []
packs_other = []
packs_corrupt = []
path =... | Python | 0.000788 | @@ -2579,18 +2579,17 @@
rbsp + '
-%5C.
+_
(radar%7Cm
|
d31adbfd0485579c94e92b9c2950230d00fdf309 | update flaskapp.wsgi | FlaskApp/flaskapp.wsgi | FlaskApp/flaskapp.wsgi | #!/usr/bin/python
import sys
import logging
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,"/var/www/FlaskApp/")
from FlaskApp import app as application
application.secret_key = 'secretkeyhere'
| Python | 0.000001 | @@ -104,16 +104,36 @@
var/www/
+RiotAPIChallenge2.0/
FlaskApp
|
2c64c4fd5a81537d891aadafe01a4da96fcb7ab4 | Update ipc_lista1.6.py | lista1/ipc_lista1.6.py | lista1/ipc_lista1.6.py | #ipc_lista1.6
#Professor: Jucimar Junior
#Any Mendes Carvalho -
#
#
#
#
#Faça um programa que peça o raio de um círculo, calcule e mostre sua área
raio = 0
area = 0
raio = input("Entre com o valor do raio: "
| Python | 0 | @@ -205,9 +205,10 @@
raio: %22
+)
%0A
|
1cf097d30d5966456c01e4f2e678213c04f8e334 | Update ipc_lista1.6.py | lista1/ipc_lista1.6.py | lista1/ipc_lista1.6.py | #ipc_lista1.6
#Professor: Jucimar Junior
#Any Mendes Carvalho -
#
#
#
#
#Faça um programa que peça o raio de um círculo, calcule e mostre sua área
raio = 0
area = 0
raio = input("Entre com o valor do raio: ")
area = 3.14 * raio*raio
print "Valor
| Python | 0 | @@ -245,9 +245,11 @@
%22Valor
+da
%0A
|
8804091fb22ef0a7682ea402ff22750261fc38a7 | Update ipc_lista1.6.py | lista1/ipc_lista1.6.py | lista1/ipc_lista1.6.py | #ipc_lista1.6
#Professor: Jucimar Junior
#Any Mendes Carvalho -
#
#
#
#
#Faça um programa que peça o raio de um círculo, calcule e mostre sua área
raio =
| Python | 0 | @@ -151,11 +151,12 @@
%0Araio =
+0
%0A%0A%0A
|
463fa2a169984879aa5904d00f154492cf1c240d | move extension check after the imgur check | Functions/URLFollow.py | Functions/URLFollow.py | from IRCMessage import IRCMessage
from IRCResponse import IRCResponse, ResponseType
from Function import Function
import WebUtils
import re
import HTMLParser
class Instantiate(Function):
Help = 'automatic function that follows urls and grabs information about the resultant webpage'
htmlParser ... | Python | 0 | @@ -602,107 +602,8 @@
%0D%0A
- if re.search('%5C.(jpe?g%7Cgif%7Cpng%7Cbmp)$', match.group('url')):%0D%0A return%0D%0A %0D%0A
@@ -756,24 +756,25 @@
'(i%5C.)?imgur
+%5C
.com/(?P%3Cimg
@@ -1017,34 +1017,94 @@
age)%0D%0A el
-se
+if not re.search('%5C.(jpe?g%7Cgif%7Cpng%7Cbmp)$', ... |
c6abbd5b8176943ec02d0a03852e1992f62950a1 | Update ipc_lista1.9.py | lista1/ipc_lista1.9.py | lista1/ipc_lista1.9.py | #ipc_lista1.9
#Professor: Jucimar Junior
#Any Mendes Carvalho - 1615310044
#
#
#
#
#Faça um programa que peça a temperatura em graus Fahrenheit, transforme e mostre
| Python | 0 | @@ -157,9 +157,23 @@
e mostre
+ a temperatura
%0A
|
89571a6caf877f8ff5ff0b983548b926dec87f8d | Update ipc_lista1.9.py | lista1/ipc_lista1.9.py | lista1/ipc_lista1.9.py | #ipc_lista1.9
#Professor: Jucimar Junior
#Any Mendes Carvalho - 1615310044
#
#
#
#
#Faça um programa que peça a temperatura em graus
| Python | 0 | @@ -125,9 +125,20 @@
em graus
+ Fahrenheit
%0A
|
c5ed4acaeeb03c9935f01e8a1fed84136b5f3e0c | Revert overwritten changes | GEOparse/downloader.py | GEOparse/downloader.py | import os
import requests
from tqdm import tqdm
from ftplib import FTP
try:
from urlparse import urlparse
except ImportError:
from urllib.parse import urlparse
from .logger import geoparse_logger as logger
class Downloader(object):
"""Downloader class."""
def __init__(self, url, outdir, filename=None... | Python | 0.000001 | @@ -392,16 +392,21 @@
+self.
outdir =
@@ -418,16 +418,63 @@
etcwd()%0A
+ else:%0A self.outdir = outdir%0A
@@ -498,32 +498,37 @@
ne:%0A
+self.
filename = self.
@@ -543,16 +543,67 @@
ename()%0A
+ else:%0A self.filename = filename%0A
@@ -62... |
470a3e226619ae08983ba47c11e7a1609a365d85 | Fix potential data loss in upgrade. Closes #2512. | trac/upgrades/db13.py | trac/upgrades/db13.py | sql = [
#-- Add ticket_type to 'ticket', remove the unused 'url' column
"""CREATE TEMP TABLE ticket_old AS SELECT * FROM ticket;""",
"""DROP TABLE ticket;""",
"""CREATE TABLE ticket (
id integer PRIMARY KEY,
type text, -- the nature of the ticket
time ... | Python | 0 | @@ -1383,24 +1383,33 @@
WHERE
+COALESCE(
severity
%3C%3E 'enh
@@ -1400,16 +1400,20 @@
severity
+,'')
%3C%3E 'enh
|
c168529f52927f13f3ff0b3474b0d0c4e5a71ae4 | Make dict comprehension more readable | locust/distribution.py | locust/distribution.py | import math
from itertools import combinations_with_replacement
from operator import attrgetter
from typing import (
Dict,
List,
Type,
)
from locust import User
def weight_users(
user_classes: List[Type[User]],
user_count: int,
) -> Dict[str, int]:
"""
Compute the desired state of users u... | Python | 0.000323 | @@ -1613,24 +1613,93 @@
r_classes))%0A
+ relative_weights = %5Bweight / sum(weights) for weight in weights%5D%0A
user_cla
@@ -1848,53 +1848,25 @@
es,
-(weight / sum(weights) for weight in
+relative_
weights)
)%0A
@@ -1861,17 +1861,16 @@
weights)
-)
%0A %7D%0A%0A
|
ed1ae0c787c89ca9fce46cd9ae8b6e06c14e766e | Update record.py | record.py | record.py | #!/usr/bin/env python
import numpy as np
import os
import shutil
import wx
import matplotlib
matplotlib.use('WXAgg')
from datetime import datetime
from matplotlib.figure import Figure
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigCanvas
from utils import Screenshot, XboxController
IDLE_SAMPLE... | Python | 0.000001 | @@ -3016,35 +3016,35 @@
tmap(Screenshot.
-IMG
+SRC
_W, Screenshot.I
@@ -3042,19 +3042,19 @@
eenshot.
-IMG
+SRC
_H)%0A
@@ -3114,19 +3114,19 @@
eenshot.
-IMG
+SRC
_W, Scre
@@ -3136,11 +3136,11 @@
hot.
-IMG
+SRC
_H,
|
822317912f8fe2de65edeaf311c9ee7c267f1fa0 | Use Attr in module sachsen | modules/sachsen/pages.py | modules/sachsen/pages.py | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2014 Florent Fourcot
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at yo... | Python | 0 | @@ -894,16 +894,22 @@
ate, Map
+, Attr
%0Afrom we
@@ -2115,54 +2115,63 @@
g =
-div.find('.//img').attrib%5B'src'%5D.split('/')%5B1%5D
+Regexp(Attr('.//img', 'src'), %22(.*?)/(.*)%22, %22%5C%5C2%22)(div)
%0A
|
325304d58105b8b40490bee51a1d47bd22213979 | Fix timestring parsing issue | merge_har.py | merge_har.py | #!/usr/bin/env python
#https://wiki.python.org/moin/WorkingWithTime
import json, argparse, logging, sys
import calendar, iso8601
def convert_enddate_to_ms(ts):
"""Takes ISO 8601 format(string) and converts into epoch time."""
dt = iso8601.parse_date(ts)
ms = calendar.timegm(dt.timetuple())*1000 + dt.micros... | Python | 0.000097 | @@ -256,16 +256,71 @@
ate(ts)%0A
+ dtUtc = (dt - dt.utcoffset()).replace(tzinfo=None)%0A
ms =
@@ -338,16 +338,19 @@
imegm(dt
+Utc
.timetup
@@ -364,16 +364,19 @@
000 + dt
+Utc
.microse
|
d6672e2da113e2fdcfec147619ed03d5410ad014 | Fix cleanup at exit in Escalator. Remove socket. | onitu/escalator/server/__main__.py | onitu/escalator/server/__main__.py | import argparse
import zmq
from logbook import Logger
from logbook import StderrHandler
from logbook.queues import ZeroMQHandler
from .databases import Databases
from .worker import Worker
back_uri = 'inproc://workers'
logger = Logger('Escalator')
def main(logger):
proxy = zmq.devices.ThreadDevice(
d... | Python | 0 | @@ -1,12 +1,36 @@
+import os%0Aimport signal%0A
import argpa
@@ -424,25 +424,24 @@
ind_out(
-args.
bind
+_uri
)%0A pr
@@ -533,42 +533,8 @@
d)%0A%0A
- databases = Databases('dbs')%0A%0A
@@ -986,57 +986,489 @@
ak%0A%0A
- logger.info(%22Exiting%22)%0A databases.close()%0A
+%0Adef cleanup(*args, **k... |
7b37d39b4c86317c327f2e057c3ff0e86a4b5ce8 | fix retries and delay | reddit.py | reddit.py | #
#
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
#
import os.path
import urllib
import simplejson
import sys
import time
import re
import HTMLParser
from urlparse import urlparse
import logging
cj = None
ClientCookie = None
cookielib = None
try: ... | Python | 0 | @@ -1637,32 +1637,37 @@
ies'):%0A
+self.
num_retries = co
@@ -1763,27 +1763,36 @@
-num_retries
+self.retry_delay_sec
= confi
@@ -4851,16 +4851,21 @@
e.sleep(
+self.
retry_de
|
af7647f0d20ca850fb7942706bc8fee5985b5ec7 | fix missing imports | mint/jobs.py | mint/jobs.py | #
# Copyright (c) 2005-2006 rPath, Inc.
#
# All rights reserved
#
from mint import database
from mint.mint_error import MintError
class JobMissing(MintError):
def __str__(self):
return "the requested job does not exist"
class FileMissing(MintError):
def __str__(self):
return "the requested fil... | Python | 0.962368 | @@ -85,16 +85,42 @@
atabase%0A
+from mint import urltypes%0A
from min
|
da12486a207e1ade8c7b49379613e4aadec23794 | add check to see if rename is needed | misc/misc.py | misc/misc.py | import discord
from discord.ext import commands
from .utils import checks
from __main__ import send_cmd_help
import asyncio
class misc:
"""Misc commands"""
def __init__(self, bot):
self.bot = bot
@commands.command(hidden=True)
async def summon(self):
await self.bot.say("Who dares summon me?")
async def r... | Python | 0.000001 | @@ -548,17 +548,31 @@
%0A%09%09%09
-nickname
+try:%0A%09%09%09%09if user.nick !
= %22O
@@ -577,23 +577,16 @@
%22Orun%22%0A%09
-%09%09try:%0A
%09%09%09%09awai
@@ -628,24 +628,25 @@
ckname)%0A%09%09%09%09
+%09
print(%22Renam
@@ -655,16 +655,56 @@
Orun%22)%0A
+%09%09%09%09else%0A%09%09%09%09%09print(%22No rename ... |
2711f6a3ab53a654bc5de6234251d8d7714529ca | Add markers to the plot | mlp/mnist.py | mlp/mnist.py | import numpy as np
import matplotlib.pyplot as plt
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation
from keras.optimizers import Adam
from keras.callbacks import EarlyStopping
from keras.utils import np_utils
from keras.utils.visualize_util i... | Python | 0.000001 | @@ -864,24 +864,36 @@
story%5B'acc'%5D
+, marker='.'
)%0A plt.pl
@@ -921,16 +921,28 @@
al_acc'%5D
+, marker='.'
)%0A pl
@@ -1010,32 +1010,47 @@
bel('accuracy')%0A
+ plt.grid()%0A
plt.legend(%5B
@@ -1152,24 +1152,36 @@
tory%5B'loss'%5D
+, marker='.'
)%0A plt.pl
@@ -1210,16 +1210,28 @@
l_loss'%5D... |
c69ad06b785c874685def9e10107f266d685948e | fix #5 Pretty awesome | lokingyql/lokingyql.py | lokingyql/lokingyql.py | import requests
import errors
import pdb
class LokingYQL(object):
'''Yet another Python Yahoo! Query Language Wrapper
'''
default_url = 'https://query.yahooapis.com/v1/public/yql'
def __init__(self, table=None, url=default_url, format='json'):
self.url = url
self.table = table
self.format = ... | Python | 0 | @@ -415,16 +415,91 @@
rt%3E, ...
+%0A self.diagnostics = True # Who knows, someone would like to turn it off
%0A%0A def
@@ -851,14 +851,24 @@
' :
-'true'
+self.diagnostics
, #
@@ -2590,27 +2590,24 @@
a table%0A
-
%3E%3E%3E yql.sele
@@ -2616,16 +2616,87 @@
('table'
+)%0A %3E%3E%3E yql.select('soc... |
2ef9e9229a7497d861438a162986862f7a48062b | Check if host IPv6 resolves (#1421) | modules/sfp_tldsearch.py | modules/sfp_tldsearch.py | # -*- coding: utf-8 -*-
# -------------------------------------------------------------------------------
# Name: sfp_tldsearch
# Purpose: SpiderFoot plug-in for identifying the existence of this target
# on other TLDs.
#
# Author: Steve Micallef <steve@binarypool.com>
#
# Created: 3... | Python | 0 | @@ -2461,101 +2461,79 @@
-# TODO: Support IPv6%0A addrs = self.sf.resolveHost(target)%0A if not addrs
+if not self.sf.resolveHost(target) and not self.sf.resolveHost6(target)
:%0A
|
8141a191f063025cb25bd57b48d57a1a475e3c8d | improve consumer trend summaries | munge/spending_import.py | munge/spending_import.py | import os.path
import config
from csv_util import unicode_csv_reader, import_csv
from sa_util import swap_tables, summary, build_view
f = 'spending/spending_by_nuts1.csv'
fields = [
'ct_code',
'nuts1_code',
'factor:double precision',
]
summary_data = [
{
'name': 's_population_by_nuts1',
... | Python | 0.000039 | @@ -689,16 +689,477 @@
%7D,%0A%0A
+ %7B%0A 'name': 's_consumer_spend_national',%0A 'sql': '''%0A SELECT%0A ct.ct_code,%0A ct.amount nation_spend,%0A (ct.amount / t.population)::numeric(11,2)%0A AS spend_per_capita%0A FROM %22%7Bt1%7D%22 ct%0A LE... |
b637f466f2a49235975e15e46b05a873ad6caa65 | Update anime1_me.py | my-ACG/util/anime1_me.py | my-ACG/util/anime1_me.py | import argparse
import html
import logging
import re
import pywikibot
import requests
from bs4 import BeautifulSoup
class Anime1Me:
def getData(self, url):
data = {
'episodes': 0,
'end': False,
}
text = requests.get(url).text
soup = BeautifulSoup(text, 'htm... | Python | 0 | @@ -964,16 +964,23 @@
%E6%AD%A3%E5%BC%8F%E7%89%88%7CAT-X
+%7CAT-X%E7%84%A1%E4%BF%AE
)?%5C)$',
|
66696feb49da76965b5d413e39e63625358dfe1f | Fix queue import for Python 3 | IPython/nbconvert/preprocessors/execute.py | IPython/nbconvert/preprocessors/execute.py | """Module containing a preprocessor that removes the outputs from code cells"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------... | Python | 0.000223 | @@ -367,16 +367,81 @@
rt sys%0A%0A
+try:%0A from queue import Empty # Py 3%0Aexcept ImportError:%0A
from Que
@@ -455,16 +455,25 @@
rt Empty
+ # Py 2%0A
%0Afrom IP
|
0ccf067330b702a58d55b7fcd80c13a941142c1e | Fix wrong variable name in 'CachedWorld.delete_component' | esper/world.py | esper/world.py | from functools import lru_cache
class World:
def __init__(self):
"""A World object keeps track of all Entities, Components and Processors.
A World contains a database of all Entity/Component assignments. It also
handles calling the process method on any Processors assigned to it.
... | Python | 0.000302 | @@ -7104,23 +7104,19 @@
mponent_
-instanc
+typ
e) is no
|
ecb00947dc7c8d33f3c759d7ff704b970a4e32ce | Support non-PNG output formats in visualization tool - auto-detect format from file name | lusmu/visualization.py | lusmu/visualization.py | """Tools for visualizing a lusmu graph
Copyright 2013 Eniram Ltd. See the LICENSE file at the top-level directory of
this distribution and at https://github.com/akaihola/lusmu/blob/master/LICENSE
"""
# pylint: disable=W0212
# Allow access to protected members of client classes
# pylint: disable=W0142
# ... | Python | 0 | @@ -2513,12 +2513,15 @@
in a
- PNG
+n image
fil
@@ -2533,52 +2533,189 @@
-graphviz = subprocess.Popen(%5B'dot', '-Tpng',
+image_format = filename.split('.')%5B-1%5D.lower()%0A graphviz = subprocess.Popen(%5B'dot',%0A '-T%7B%7D'.format(image_format),%0A ... |
0d32f515b7a7cc31f263c61f8605f730259b8fa9 | Update views.py | pdf/views.py | pdf/views.py | """
RenderPDF helper class
"""
import os
import datetime
import cStringIO as StringIO
import ho.pisa as pisa
from cgi import escape
from django.conf import settings
from django.http import HttpResponse
from django.template.loader import get_template
from django.template import Context
from django.views.generi... | Python | 0 | @@ -133,16 +133,31 @@
t escape
+%0Aimport logging
%0A%0Afrom d
@@ -356,16 +356,54 @@
teView%0A%0A
+logger = logging.getLogger(__name__)%0A%0A
%0Aclass R
@@ -819,16 +819,52 @@
l, %22%22))%0A
+ logger.debug(absolute_path)%0A
|
e2e279e32b8366293d6cb99bfd8744ab47c6d36d | update stringcleaning app for new rapidsms. also replace '.' with ' ' instead of just deleting them. | lib/rapidsms/contrib/stringcleaning/app.py | lib/rapidsms/contrib/stringcleaning/app.py | import rapidsms
import re
class App (rapidsms.App):
def parse (self, message):
''' Cleans up messages by removing punctuation, and replacing intended
numbers with numerals, for example:
original: "hello"., 2lli.o .2.o.i. d.s. 12.1. 'l3oii user4' "o0,oo", o0.oo,"o0. oo", oo0. ooo0"
... | Python | 0.000001 | @@ -5,24 +5,47 @@
rt r
-apidsms%0A
+e%0Afrom rapidsms.apps.base
import
-r
+AppBas
e%0A%0Ac
@@ -58,20 +58,15 @@
pp (
-rapidsms.App
+AppBase
):%0A%0A
@@ -2974,176 +2974,177 @@
se:%0A
- # save the slice up to and the slice beyond this . and move on%0A # (leave out the .)%0A ... |
81ced1c9642fa8c364ce9a840adecde633c96b42 | Remove disable pylint for paginator error and fix syntax | openedx/core/lib/api/paginators.py | openedx/core/lib/api/paginators.py | """ Paginatator methods for edX API implementations."""
from django.http import Http404
from django.utils.translation import ugettext as _
from django.core.paginator import Paginator, InvalidPage
def paginate_search_results(object_class, search_results, page_size, page):
"""
Takes edx-search results and retu... | Python | 0 | @@ -86,59 +86,8 @@
404%0A
-from django.utils.translation import ugettext as _%0A
from
@@ -964,18 +964,16 @@
Http404(
-_(
%22Page is
@@ -1021,17 +1021,16 @@
n int.%22)
-)
%0A%0A tr
@@ -1115,41 +1115,17 @@
as e
-: # pylint: disable=invalid-name
+xception:
%0A
@@ -1147,11 +1147,22 @@
404(
-_('
+%0A ... |
09967b21638b423faa8d7de8c57cc00cdf6aec49 | Update catalytic_potential.py | KaSaAn/scripts/catalytic_potential.py | KaSaAn/scripts/catalytic_potential.py | #!/usr/bin/env python3
import argparse
import sys
from KaSaAn.functions import get_potential_of_folder
def main(args=None):
if args is None:
args = sys.argv[1:]
parser = argparse.ArgumentParser(description='Out of a series of snapshots from a simulation, obtain the catalytic'
... | Python | 0 | @@ -340,16 +340,17 @@
'
+
potentia
@@ -460,16 +460,17 @@
'
+
has a ca
@@ -527,17 +527,16 @@
umber of
-
'%0A
@@ -579,16 +579,17 @@
'
+
bound en
@@ -696,16 +696,17 @@
'
+
times th
@@ -814,16 +814,17 @@
'
+
state is
@@ -936,16 +936,17 @@
'
+
species.
@@ ... |
43b090d70cc6707367af0439d0dfda7c3a531524 | Fix weird applescript escaping issues Conflicts: cactus/browser.py | cactus/browser.py | cactus/browser.py | import subprocess
import platform
s1 = """
tell application "Google Chrome"
set windowsList to windows as list
repeat with currWindow in windowsList
set tabsList to currWindow's tabs as list
repeat with currTab in tabsList
if "%s" is in currTab's URL then execute currTab javascript ... | Python | 0.000246 | @@ -493,36 +493,32 @@
as list%0A
-
repeat with curr
@@ -685,17 +685,16 @@
URL then
-
%0A
@@ -835,34 +835,1538 @@
%22%22%0A%0A
-%0Adef applescript(scrip
+s3 = %22%22%22%0Awindow.location.reload()%0A%22%22%22%0A%0As4 = %22%22%22%0A(function() %7B%0A function updateQueryStringParameter(uri, key... |
c775b159b310afd323945afcb9dba771731a382b | use repr for log serialization if json fails | src/ekklesia_portal/__init__.py | src/ekklesia_portal/__init__.py | import eliot
import logging
import sys
from eliot.stdlib import EliotHandler
logging.getLogger().addHandler(EliotHandler())
logging.getLogger().setLevel(logging.DEBUG)
eliot.to_file(sys.stdout)
logging.captureWarnings(True)
logg = logging.getLogger(__name__)
logging.getLogger("parso").setLevel(logging.WARN)
logg.in... | Python | 0.000001 | @@ -70,16 +70,245 @@
Handler%0A
+from eliot.json import EliotJSONEncoder%0A%0Aclass MyEncoder(EliotJSONEncoder):%0A def default(self, obj):%0A%0A try:%0A return EliotJSONEncoder.default(self, obj)%0A except TypeError:%0A return repr(obj)%0A%0A
%0Alogging
@@ -391,16 +391,17 @@
.... |
a3e05e67b4907f6f97462aa958e4f344f92d1e72 | add a new compare method | library/module_utils/network/f5/compare.py | library/module_utils/network/f5/compare.py | # -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
def cmp_simple_list(want, have):
if want is None:
return None
... | Python | 0.000001 | @@ -538,24 +538,199 @@
rn want%0A return None%0A
+%0A%0Adef cmp_str_with_none(want, have):%0A if want is None:%0A return None%0A if have is None and want == '':%0A return None%0A if want != have:%0A return want%0A
|
795e9734cc802caa8847a9a2b22f3f16297462bc | use combined provider in nsi2 provider setup | opennsa/protocols/nsi2/__init__.py | opennsa/protocols/nsi2/__init__.py | """
Various protocol initialization.
Author: Henrik Thostrup Jensen <htj@nordu.net>
Copyright: NORDUnet (2011-2012)
"""
from twisted.web import resource, server
from opennsa.protocols.shared import resource as soapresource
from opennsa.protocols.nsi2 import providerservice, providerclient, provider, \
... | Python | 0 | @@ -678,24 +678,41 @@
ice_provider
+, provider_client
)%0A%0A provi
@@ -780,24 +780,29 @@
return
+nsi2_
provider
_client%0A
@@ -793,23 +793,16 @@
provider
-_client
%0A%0A%0Adef s
|
5633c08f942b72bdd8ca576e408cf19041c4f94d | Load from the pre processed data | MRJobNetworkXSimulations-Generator.py | MRJobNetworkXSimulations-Generator.py | from __future__ import division
import hdfs
import networkx as nx
import pandas as pd
import random
from mrjob.job import MRJob
from mrjob.protocol import JSONValueProtocol
from mrjob.step import MRStep
import cascade
class MRJobNetworkXSimulations(MRJob):
OUTPUT_PROTOCOL = JSONValueProtocol
def configure... | Python | 0 | @@ -37,34 +37,208 @@
ort
-hdfs%0Aimport networkx as nx
+gzip%0A%0Atry:%0A from BytesIO import BytesIO%0Aexcept ImportError:%0A from io import BytesIO%0A%0Atry:%0A from urlparse import urlparse%0Aexcept ImportError:%0A from urllib.parse import urlparse%0A%0Aimport hdfs
%0Aimp
@@ -258,22 +258,8 @@
pd%0A
... |
6d5f2b27fec4c4224f8143845cd62ead1ddb6d73 | Modify email address verification flag and create user event in the same transaction | byceps/services/user/email_address_verification_service.py | byceps/services/user/email_address_verification_service.py | """
byceps.services.user.email_address_verification_service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from typing import Optional
from ...database import db
from ...events.user import (
UserEmailAd... | Python | 0 | @@ -2513,32 +2513,8 @@
True
-%0A db.session.commit()
%0A%0A
@@ -2590,38 +2590,37 @@
r_event_service.
-create
+build
_event(%0A
@@ -2667,29 +2667,80 @@
event_data%0A
-
)
+%0A db.session.add(event)%0A%0A db.session.commit()
%0A%0A verifi
@@ -3667,32 +3667,8 @@
alse
-%0A db.session.co... |
fa9bc00d09cfd173b99eaba3eb17bdfc49100a5b | Add explicit name export | dasem/__init__.py | dasem/__init__.py | """dasem."""
from __future__ import absolute_import
from .fullmonty import Word2Vec
| Python | 0.000024 | @@ -79,8 +79,33 @@
ord2Vec%0A
+%0A%0A__all__ = %5B'Word2Vec'%5D%0A
|
b1097e8b6050d7404d68643f1a8c7923d803c134 | Update the admin with the latest atribute name changes | filer/admin/fileadmin.py | filer/admin/fileadmin.py | from django.core.urlresolvers import reverse
from django.utils.safestring import mark_safe
from django.contrib.admin.util import unquote, flatten_fieldsets, get_deleted_objects, model_ngettext, model_format_dict
from django.utils.translation import ugettext as _
from django.http import HttpResponseRedirect
from django... | Python | 0 | @@ -1592,17 +1592,16 @@
lds': ('
-_
file',),
|
c1a3d40295a7c4b5f178ae78b49a90c317844371 | Replace double quotes with single quotes for flake8 check | timed/reports/tests/test_notify_reviewers_unverified.py | timed/reports/tests/test_notify_reviewers_unverified.py | from datetime import date
import pytest
from django.core.management import call_command
from timed.employment.factories import UserFactory
from timed.projects.factories import ProjectFactory, TaskFactory
from timed.tracking.factories import ReportFactory
@pytest.mark.freeze_time('2017-8-4')
def test_notify_reviewer... | Python | 0.000001 | @@ -1353,12 +1353,12 @@
lit(
-%22%5Cn%22
+'%5Cn'
):%0A
@@ -1371,14 +1371,14 @@
if
-%22
+'
test
-%22
+'
in
|
32e00001ec29b0fe13f8c9b2c4dbd61232ba348a | Update starting offset | tools/db/copy_nonpartitioned_sentences_to_partitions.py | tools/db/copy_nonpartitioned_sentences_to_partitions.py | #!/usr/bin/env python3
import time
from mediawords.db import connect_to_db
from mediawords.util.log import create_logger
from mediawords.util.process import run_alone
log = create_logger(__name__)
def copy_nonpartitioned_sentences_to_partitions():
"""Gradually copy sentences from "story_sentences_nonpartitione... | Python | 0.000001 | @@ -876,11 +876,11 @@
nge(
-440
+999
0000
|
9337a4debdbe69b522fa74ab8f621655fa2b6783 | add live camera script | car/controller.py | car/controller.py | import time
import car
# valide cmd:
# Car directions : CAR_F, CAR_B, CAR_L, CAR_R
# Car speeds : CAR_U, CAR_D
# Camera control : CM_L, CM_R, CM_U, CM_D
# Car control : STOP
class Controller(object):
_car_direction = ['CAR_F', 'CAR_B', 'CAR_L', 'CAR_R']
_car_speed = ['CAR_U', 'CAR_D']
_camera_control = ['... | Python | 0.000001 | @@ -16,16 +16,42 @@
ort car%0A
+import os%0Aimport threading
%0A# valid
@@ -2206,16 +2206,320 @@
join()%0A%0A
+def EnableCamera():%0A while True:%0A print 'Open camera live'%0A os.system(%22%22%22gst-launch-1.0 -v v4l2src ! 'video/x-raw, width=640, height=480, framerate=30/1' ! queue ! videoconvert ! omxh264e... |
608a0c75cba735e7d4a59fb941cd6e6135f3e7cf | Update reverse URL. | src/epiweb/apps/survey/views.py | src/epiweb/apps/survey/views.py | # -*- coding: utf-8 -*-
from django import forms
from django.template import Context, loader
from django.http import HttpResponse, HttpResponseRedirect
from django.db import transaction
from django.core.urlresolvers import reverse
from django.shortcuts import render_to_response
from django.contrib.auth.decorators impo... | Python | 0 | @@ -1167,23 +1167,16 @@
.survey.
-survey_
views.th
@@ -1972,24 +1972,30 @@
.survey.
+views.
profile_
views.in
@@ -1986,22 +1986,16 @@
profile_
-views.
index'))
|
99e910f58fa54e9bce2518c6f9752ba1e8dbd6af | Stop tracking call size in bm diff | tools/profiling/microbenchmarks/bm_diff/bm_constants.py | tools/profiling/microbenchmarks/bm_diff/bm_constants.py | #!/usr/bin/env python2.7
#
# Copyright 2017 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | Python | 0 | @@ -994,31 +994,26 @@
', '
-call_initial_size-media
+locks_per_iteratio
n',%0A
@@ -1029,20 +1029,21 @@
'
+al
loc
-k
s_per_it
@@ -1053,21 +1053,21 @@
tion', '
-alloc
+write
s_per_it
@@ -1093,21 +1093,22 @@
'
-write
+atm_ca
s_per_it
@@ -1118,27 +1118,27 @@
tion', 'atm_
-cas
+add
_per_iterati
@@ -... |
dcc2821cac0619fc2ca5f486ad30416f3c3cfda9 | Replace parsing with Python's ast | ce/expr/parser.py | ce/expr/parser.py | #!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
from ..semantics import mpq
from .common import OPERATORS, ADD_OP, MULTIPLY_OP
def try_to_number(s):
try:
return mpq(s)
except (ValueError, TypeError):
return s
def _parse_r(s):
s = s.strip()
bracket_level = 0
operator_pos =... | Python | 0.000004 | @@ -49,16 +49,28 @@
F-8 :%0A%0A%0A
+import ast%0A%0A
from ..s
@@ -254,494 +254,490 @@
s%0A%0A%0A
-def _parse_r(s):%0A s = s.strip()%0A bracket_level = 0%0A operator_pos = -1%0A for i, v in enumerate(s):%0A if v == '(':%0A bracket_level += 1%0A if v == ')':%0A bracket_l... |
38fe4ef9df7e09709611bb3aca1aea4f2d42316a | add encode_url_path method to util | pifx/util.py | pifx/util.py | # -*- coding: utf-8 -*-
#
# Copyright © 2015 Chaoyi Zha <me@cydrobolt.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 requir... | Python | 0.000001 | @@ -629,16 +629,30 @@
rt json%0A
+import urllib%0A
from .co
@@ -1758,8 +1758,221 @@
rn True%0A
+def encode_url_path(url):%0A %22%22%22Encodes the path url string replacing special characters with properly escaped sequences. %0A Not intended for use with query string parameters. %22%22%22%0A return urllib.q... |
b8e26d2e5b48a77cfd95513ef7b0235747f33003 | raise MailConnectionError if connection gets interrupted (instead of MailError) | netsecus/mail_handler.py | netsecus/mail_handler.py | from __future__ import unicode_literals
import logging
import time
import traceback
from . import database
from . import helper
from . import commands
from . import submission
def mail_main(config):
try:
mail_run(config)
except BaseException as e:
on_error(config, e)
raise
def mail... | Python | 0 | @@ -2139,24 +2139,34 @@
helper.Mail
+Connection
Error('Conne
|
d3a5e596f32d1139af29fc394f185fe120fa20dd | clean up FIXME | Lib/sandbox/models/cox.py | Lib/sandbox/models/cox.py | import shutil
import tempfile
import numpy as N
from scipy.sandbox.models import survival, model
class discrete:
"""
A simple little class for working with discrete random vectors.
"""
def __init__(self, x, w=None):
self.x = N.squeeze(x)
if self.x.shape == ():
self.x = N.a... | Python | 0.00007 | @@ -5155,249 +5155,33 @@
-# FIXME: score is an int. it has no shape%0A # is it that we shouldn't be using an int above%0A # or that we shouldn't be looking at shape here%0A if score.shape == ():%0A score = N.array(%5Bscore%5D)%0A return score
+return = N.array(%5Bscore%5D)
... |
cc4b1130958c7db5b68c52f018c3a6c41a8a8513 | use new readPlist() and writePlist() functions | Lib/test/test_plistlib.py | Lib/test/test_plistlib.py | # Copyright (C) 2003 Python Software Foundation
import unittest
import plistlib
import os
from test import test_support
class TestPlistlib(unittest.TestCase):
def tearDown(self):
try:
os.unlink(test_support.TESTFN)
except:
pass
def _create(self):
pl = plistlib... | Python | 0 | @@ -314,20 +314,19 @@
listlib.
-Plis
+Dic
t(%0A
@@ -1298,23 +1298,38 @@
pl
-.write(
+istlib.writePlist(pl,
test_sup
@@ -1364,30 +1364,25 @@
listlib.
+read
Plist
-.fromFile
(test_su
@@ -1562,39 +1562,54 @@
ate()%0A pl
-.write(
+istlib.writePlist(pl,
f)%0A pl2 =
@@ -1614,38 +1614,33 @@... |
9a73dcfbc77236d11387909c3f97d3712b56fb2a | clean out commented code from old version | juice.py | juice.py | # replace all functionality of the disgusting mess below
'''
# read and process raw data, store processed data
# using config(?) and io_db, calculate the following and store its end-result data to db:
# - raw profitability ("hypothetical")
# - competitiveness of orders per typeID per hub
# - END-RESULT [DB]: competit... | Python | 0 | @@ -1,2937 +1,40 @@
# re
-place all functionality of the disgusting mess below%0A%0A'''%0A# read and process raw data, store processed data%0A%0A# using config(?) and io_db, calculate the following and store its end-result data to db:%0A# - raw profitability (%22hypothetical%22)%0A# - competitiveness of orders per typ... |
e112a2651357f586bd1b5a6a4378ac46e3407d58 | add v1.1.2 (#22081) | var/spack/repos/builtin/packages/py-awkward1/package.py | var/spack/repos/builtin/packages/py-awkward1/package.py | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyAwkward1(PythonPackage):
"""ROOT I/O in pure Python and NumPy."""
git = "https://gi... | Python | 0 | @@ -499,16 +499,112 @@
olkl'%5D%0A%0A
+ version('1.1.2', sha256='626e3a6a2a92dd67abc8692b1ebfa1b447b9594352d6ce8c86c37d7299dc4602')%0A
vers
|
50411f83942ff033b4b55ef72d595e6d3ab9949f | add version 2.9.1 (#25646) | var/spack/repos/builtin/packages/py-psycopg2/package.py | var/spack/repos/builtin/packages/py-psycopg2/package.py | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyPsycopg2(PythonPackage):
"""Python interface to PostgreSQL databases"""
homepage = ... | Python | 0 | @@ -381,16 +381,112 @@
ar.gz%22%0A%0A
+ version('2.9.1', sha256='de5303a6f1d0a7a34b9d40e4d3bef684ccc44a49bbe3eb85e3c0bffb4a131b7c')%0A
vers
@@ -732,16 +732,94 @@
uisites%0A
+ depends_on('python@3.6:3.9', type=('build', 'link', 'run'), when='@2.9:')%0A
depe
@@ -892,17 +892,16 @@
en='@2.8
-:
')%0A ... |
5d5e6a505bf7282fdef4ca3b3555ecf6f3efa137 | Update __copyright__ | typepy/__version__.py | typepy/__version__.py | # encoding: utf-8
from datetime import datetime
__author__ = "Tsuyoshi Hombashi"
__copyright__ = "Copyright 2017-{}, {}".format(datetime.now().year, __author__)
__license__ = "MIT License"
__version__ = "0.6.5"
__maintainer__ = __author__
__email__ = "tsuyoshi.hombashi@gmail.com"
| Python | 0.000003 | @@ -16,40 +16,8 @@
-8%0A%0A
-from datetime import datetime%0A%0A%0A
__au
@@ -80,11 +80,8 @@
2017
--%7B%7D
, %7B%7D
@@ -93,29 +93,8 @@
mat(
-datetime.now().year,
__au
|
39fbd9fabaa9945fe33475afe23c109711679192 | Make output more compact | Lib/cu2qu/benchmark.py | Lib/cu2qu/benchmark.py | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | Python | 0 | @@ -1492,16 +1492,24 @@
function
+, end=''
)%0A re
@@ -1775,13 +1775,14 @@
nt('
-min:
+%5Ctavg=
%25dus
@@ -1786,18 +1786,33 @@
dus' %25 (
-mi
+sum(results) / le
n(result
@@ -1829,52 +1829,38 @@
00.)
-)
+,
%0A
-print('avg: %25dus' %25 (sum(results) / le
+ '%5Ctmin=%25dus' %25 (mi
n(re
@@ -1879,24 +... |
d3e673069977c392eb292ce8b313f6dba4da4d9f | Fix these to use non-deprecated APIs, i.e. get_content_maintype() and get_content_subtype(). | Lib/email/_compat21.py | Lib/email/_compat21.py | # Copyright (C) 2002 Python Software Foundation
# Author: barry@zope.com
"""Module containing compatibility functions for Python 2.1.
"""
from cStringIO import StringIO
from types import StringType, UnicodeType
False = 0
True = 1
# This function will become a method of the Message class
def walk(self):
"""Wa... | Python | 0.000001 | @@ -1793,24 +1793,25 @@
get_
+content_
main
-_
type(
-'text'
) ==
@@ -1871,16 +1871,24 @@
get_
+content_
subtype(
'pla
@@ -1887,15 +1887,8 @@
ype(
-'plain'
) ==
|
364d0a78725539a58862f672f718e4bf966da2f5 | add stats-per-day route | plogx/app.py | plogx/app.py | from flask import Flask
from flask import render_template
from flask.ext.pymongo import PyMongo
import database
from bson.json_util import dumps
from datetime import datetime
app = Flask("log_db")
mongo = PyMongo(app)
app.debug = True
@app.route('/')
def overview():
return render_template('index.html')
@app.rout... | Python | 0.000005 | @@ -245,11 +245,11 @@
ute(
-'/'
+%22/%22
)%0Ade
@@ -289,17 +289,17 @@
emplate(
-'
+%22
index.ht
@@ -300,17 +300,17 @@
dex.html
-'
+%22
)%0A%0A@app.
@@ -315,17 +315,17 @@
p.route(
-'
+%22
/all_ite
@@ -330,9 +330,9 @@
tems
-'
+%22
)%0Ade
@@ -398,16 +398,242 @@
o.db))%0A%0A
+@app.route(%22/stats_per_day/%3Cint:... |
9bb2b19dc9c99513dad05ac39d22b7981968cb2b | Revert "Added indication when tester form doesn't validate. Also, removed redirects in tester as they are not needed." | routes.py | routes.py | import random
from BinTree import BinTree
import flask
import flask_login
import forms
import db
app = flask.Flask(__name__)
app.config.from_object('config')
login_manager = flask_login.LoginManager()
login_manager.init_app(app)
class User(flask_login.UserMixin):
def __init__(self, username, primary_id, active=T... | Python | 0 | @@ -2372,16 +2372,54 @@
tion)))%0A
+ flask.redirect('/tester')%0A
@@ -2497,30 +2497,24 @@
ment!')%0A
-else:%0A
flas
@@ -2519,37 +2519,25 @@
ask.
-flash('Invalid or empty data.
+redirect('/tester
')%0A
|
602876c2b132664cc1802d467eaf8109a745d613 | Add option for margin and strand selection | kufpybiotools/generate_igr_gff.py | kufpybiotools/generate_igr_gff.py | #!/usr/bin/env python
__description__ = ""
__author__ = "Konrad Foerstner <konrad@foerstner.org>"
__copyright__ = "2013 by Konrad Foerstner <konrad@foerstner.org>"
__license__ = "ISC license"
__email__ = "konrad@foerstner.org"
__version__ = ""
import argparse
import csv
import sys
sys.path.append(".")
from kufpybio.g... | Python | 0 | @@ -606,16 +606,140 @@
e(%22w%22))%0A
+parser.add_argument(%22--margin%22, type=int, default=0)%0Aparser.add_argument(%22--plus_only%22, default=False, action=%22store_true%22)%0A
args = p
@@ -1171,16 +1171,86 @@
n 3%5Cn%22)%0A
+%0Astrands = %5B%22+%22, %22-%22%5D%0Aif args.plus_only is True:%0A strands = %5B%22+... |
4bad79872547f90159e75b34b46e99e54f78b736 | Fix error in big comment header. | l10n_ch_hr_payroll/__openerp__.py | l10n_ch_hr_payroll/__openerp__.py | # -*- coding: utf-8 -*-
#
# File: __init__.py
# Module: l10n_ch_hr_payroll
#
# Created by sge@open-net.ch
#
# Copyright (c) 2014-TODAY Open-Net Ltd. <http://www.open-net.ch>
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright ... | Python | 0 | @@ -34,12 +34,15 @@
: __
-init
+openerp
__.p
|
91e4ab4284490b0a232e2e0bc60df9059a264660 | Revise exercise 1 checking | learntools/computer_vision/ex1.py | learntools/computer_vision/ex1.py | from learntools.core import *
class Q1(CodingProblem):
_var = 'pretrained_base'
_hint = "`True` or `False`?"
_correct_message = """When doing transfer learning, it's generally not a good idea to retrain the entire base -- at least not without some care. The reason is that the random weights in the head wi... | Python | 0 | @@ -1686,106 +1686,49 @@
nse(
-%7B%7D, activation='relu'),%0A layers.Dense(1, activation='sigmoid'),%0A%5D)%0A%60%60%60%0A%22%22%22.format(hidden_units)
+____),%0A layers.Dense(____),%0A%5D)%0A%60%60%60%0A%22%22%22
)%0A%0A
@@ -2756,24 +2756,25 @@
had %7B%7D unit
+s
and %60%7B%7D%60 ac
|
13ff5be510c978715c45ab7387f00551299d5571 | Fix lektor server issue with artifacts | lektor_creative_commons/plugin.py | lektor_creative_commons/plugin.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
try:
# python 3
from urllib.error import URLError
except ImportError:
# legacy python
URLError = IOError
import os
from lektor.context import get_ctx
from lektor.pluginsystem import Plugin
from markupsafe import Markup
from .translatio... | Python | 0 | @@ -3912,20 +3912,70 @@
ath,
- sources=%5B%5D,
+%0A sources=%5Bctx.source.source_filename%5D,%0A
sou
@@ -4067,101 +4067,45 @@
act.
-sources.append(artifact.dst_filename)%0A artifact.replace_with_file(icon_
+replace_with_file(artifact.
source_
-path
+obj
, co
|
bff08843a3084353f1a72e3585f6a85a3114d79e | Print list of replacements when an error occurs | lib/methods/scripts.py | lib/methods/scripts.py | from base import BaseMethod
from fabric.api import *
from fabric.colors import green, red
from lib import configuration
import re
class ScriptMethod(BaseMethod):
@staticmethod
def supports(methodName):
return methodName == 'script'
def runScriptImpl(self, rootFolder, commands, callbacks= {}, environment = ... | Python | 0.000002 | @@ -235,16 +235,177 @@
cript'%0A%0A
+ def printReplacements(self, replacements):%0A for key, value in replacements.iteritems():%0A print %22%7Bkey:%3C40%7D %7C %7Bvalue%7D%22.format(key = key, value=value)%0A%0A
%0A def r
@@ -473,16 +473,35 @@
onment =
+ %7B%7D, replacements =
%7B%7D):%0A%0A
@@ -1004,... |
05890290bf8fa62df61f0cb791abcf6e11a567fe | fix for updater issues after 83765a0dd9445d4f9e9acfc101aae406b003d5db | maraschino/__init__.py | maraschino/__init__.py | # -*- coding: utf-8 -*-
"""Maraschino module"""
import sys
import os
import subprocess
import threading
import wsgiserver
from Maraschino import app
from Logger import maraschinoLogger
from apscheduler.scheduler import Scheduler
FULL_PATH = None
RUNDIR = None
ARGS = None
DAEMON = False
PIDFILE = None
VERBOSE = True
L... | Python | 0.000001 | @@ -4032,16 +4032,67 @@
tVersion
+%0A global USE_GIT, CURRENT_COMMIT, COMMITS_BEHIND
%0A%0A if
|
f7266e7b9c2c719952a4e2c4e736e87a79c57a1b | Use schedule instead of schedule_interval | examples/application.py | examples/application.py | """Demonstrates PyGLy's functionality.
Renders a simple scene graph and controls
a viewport.
Viewport is provided without any high level
wrappers and is entirely managed through events.
"""
from time import time
import pyglet
from pyglet.gl import *
import pygly.window
import pygly.gl
from pygly.projecti... | Python | 0.000014 | @@ -1740,40 +1740,8 @@
ncy%0D
-%0A self.update_delta = -1%0D
%0A%0D%0A
@@ -1825,86 +1825,19 @@
dule
-_interval(%0D%0A self.step,%0D%0A self.update_delta%0D%0A
+( self.step
)%0D%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.