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 |
|---|---|---|---|---|---|---|---|
eab182efe540f8ace0d2558b8df2ebff1fd0d81a | disable scheduler when download files | DownloadThread.py | DownloadThread.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import threading, urllib, os
from datas import gData
from SUtils import logger
class DownloadThread(threading.Thread):
"""Thread to download files"""
def __init__(self):
self.__name = 'DownloadThread'
threading.Thread.__init__(self, name=self.__nam... | Python | 0 | @@ -1241,35 +1241,19 @@
anduser(
-data.get('savedir')
+'~'
)%0A
@@ -1446,24 +1446,95 @@
, savename)%0A
+ logger.info('download, url: '+data%5B'url'%5D+' saveat: '+st)%0A
@@ -1571,19 +1571,8 @@
, st
-, scheduler
)%0A
|
3b5eb8dc66872e9217e52b72ef9bb39aadfd0197 | Correct name of test for element#getElementRect | py/test/selenium/webdriver/common/rendered_webelement_tests.py | py/test/selenium/webdriver/common/rendered_webelement_tests.py | # Copyright 2008-2009 WebDriver committers
# Copyright 2008-2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | Python | 0.000026 | @@ -2044,16 +2044,12 @@
eThe
-Location
+Rect
OfAn
|
04e24a5e41271b120a4aa7e31f854446093e853e | update container | dune/pymor/core/wrapmodule.py | dune/pymor/core/wrapmodule.py | # This file is part of the dune-pymor project:
# https://github.com/pymor/dune-pymor
# Copyright Holders: Felix Albrecht, Stephan Rave
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
from inspect import isclass
from types import ModuleType
from dune.pymor.core.wrapper import Wrapper
fr... | Python | 0 | @@ -1082,21 +1082,21 @@
od.Dune.
-Pymor
+Stuff
.LA.Vect
|
33c3f5a39821b28c70a08ebe2742375364e70dc1 | fix small bug with timezones | applications/management/commands/expire_applications.py | applications/management/commands/expire_applications.py | from datetime import timedelta
from django.core import mail
from django.core.management.base import BaseCommand
from django.utils.datetime_safe import datetime
from applications import models, emails
class Command(BaseCommand):
help = 'Checks invites that have expired and sends reminders 24 before'
def han... | Python | 0.000001 | @@ -127,38 +127,25 @@
tils
-.datetime_safe import datetime
+ import timezone%0A
%0A%0Afr
@@ -347,38 +347,36 @@
urdaysago =
-datetime.today
+timezone.now
() - timedel
@@ -1074,22 +1074,20 @@
o =
-datetime.today
+timezone.now
() -
|
4f5f073e6aa693117142bc8fff4cd8a71f2da601 | document ipv6 behavior | salt/default/set_ip_in_etc_hosts.py | salt/default/set_ip_in_etc_hosts.py | #!/usr/bin/python
import errno
import os
import re
import socket
import subprocess
import sys
if len(sys.argv) != 3:
print("Usage: set_ip_in_etc_hosts.py <HOSTNAME> <DOMAIN>")
sys.exit(1)
_, hostname, domain = sys.argv
fqdn = hostname + "." + domain
def guess_address(fqdn, hostname, socket_type, invalid_pref... | Python | 0.000006 | @@ -1304,16 +1304,107 @@
0.1.1%22)%0A
+# we explicitly exlcude link-local addresses as we currently can't get the interface names%0A
ipv6 = g
|
2a073d94fcc9c6c9519e74a0c125d4fbb920885b | Add GNG module. | dyfunconn/cluster/__init__.py | dyfunconn/cluster/__init__.py | # -*- coding: utf-8 -*-
"""
"""
# Author: Avraam Marimpis <avraam.marimpis@gmail.com>
from .ng import NeuralGas
from .mng import MergeNeuralGas
from .rng import RelationalNeuralGas
from .som import SOM
from .umatrix import umatrix
__all__ = ['NeuralGas',
'MergeNeuralGas',
'RelationalNeuralGas... | Python | 0 | @@ -173,24 +173,58 @@
alNeuralGas%0A
+from .gng import GrowingNeuralGas%0A
from .som im
@@ -274,17 +274,22 @@
ll__ = %5B
-'
+%0A %22
NeuralGa
@@ -289,31 +289,24 @@
euralGas
-'
+%22
,%0A
- '
+%22
MergeNeu
@@ -311,31 +311,24 @@
euralGas
-'
+%22
,%0A
- '
+%22
Relation
@@ -342,58 +342,59 @@... |
29db07c8892fc066917654aa3553140d92d8449b | remove unused imports | analyzer/darwin/lib/core/filetimes.py | analyzer/darwin/lib/core/filetimes.py | # Copyright (c) 2009, David Buxton <david@gasmark6.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this li... | Python | 0.000001 | @@ -1438,57 +1438,8 @@
%22%22%22%0A
-from datetime import datetime, timedelta, tzinfo%0A
from
|
77badb8cde7d2d9b01e936af0239a8ec34cee08d | fix issue with incorrect option for setting registry credentials to get repo tag list | anchore_engine/auth/skopeo_wrapper.py | anchore_engine/auth/skopeo_wrapper.py | import json
import os
from anchore_engine.subsys import logger
import anchore_engine.services.common
def download_image(fulltag, copydir, user=None, pw=None, verify=True):
try:
proc_env = os.environ.copy()
if user and pw:
proc_env['SKOPUSER'] = user
proc_env['SKOPPASS'] = p... | Python | 0 | @@ -1585,36 +1585,32 @@
credstr = '--
-src-
creds %5C%22$%7BSKOPUS
|
1cc6c0271a70742818662c4c3630084136dd5b14 | Fix redundant second arg | app/data_model/questionnaire_store.py | app/data_model/questionnaire_store.py | import logging
from app.storage.storage_factory import StorageFactory
from flask import g
import jsonpickle
logger = logging.getLogger(__name__)
class QuestionnaireStore:
def __init__(self, user_id, user_ik):
self.data = {}
if user_id and user_ik:
self.user_id = user_id
... | Python | 0.008821 | @@ -1625,14 +1625,8 @@
ore'
-, None
)%0A
|
f84c09a979547a159d39922a75941873f4ecf041 | add display capability | examples/colorSurfaceField.py | examples/colorSurfaceField.py | #!/usr/bin/env python
"""
Color a surface field
"""
import argparse
import time
import os
import re
import sys
from icqsol.shapes.icqShapeManager import ShapeManager
from icqsol import util
# time stamp
tid = re.sub(r'\.', '', str(time.time()))
parser = argparse.ArgumentParser(description='Color surface field')
p... | Python | 0 | @@ -930,24 +930,148 @@
binary)')%0A%0A
+parser.add_argument('--display', dest='display', action='store_true',%0A help='Display colored geometry')%0A%0A
parser.add_a
@@ -2165,16 +2165,77 @@
mponent)
+%0Aif args.display:%0A shape_mgr.showVtkPolyData(pDataColored)
%0A%0Aif arg
|
f849dc9cad93f512554823fe3f26f171b45dfcf9 | add extattrs as an option when using nios lookup (#35371) | lib/ansible/plugins/lookup/nios.py | lib/ansible/plugins/lookup/nios.py | #
# Copyright 2018 Red Hat | Ansible
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ... | Python | 0 | @@ -1533,16 +1533,140 @@
t: null%0A
+ extattrs:%0A descrpition: a dict object that is used to filter on extattrs%0A required: false%0A default: null%0A
%22%22%22%0A%0AEXA
@@ -3317,16 +3317,105 @@
nnector%0A
+from ansible.module_utils.net_tools.nios.api import normalize_extattrs, flatten_extattrs%0A... |
427c6cac25b0b0fd025b59a82cca00825fec3333 | Add increments list to Connect4 | examples/connect4/connect4.py | examples/connect4/connect4.py | from multiprocessing import Process
from os import mkdir
from pickle import dump, load
from random import randint
from ann.ann import NeuralNetwork
class Connect4(object):
def __init__(self, anns=[None, None]):
self.pieces = [[] for i in xrange(7)]
self.anns = anns
self.turn = 0
def... | Python | 0.000001 | @@ -209,16 +209,35 @@
e, None%5D
+, increments=%5B0, 0%5D
):%0A
@@ -302,16 +302,53 @@
= anns%0A
+ self.increments = increments%0A
@@ -1920,16 +1920,54 @@
output()
+, increment=self.increments%5Bself.turn%5D
))%0A
|
482749c384bbbef0bea8fba25b8ac0f94a7e56a5 | Add missing dot and correctly sort imports in soc.logic.helper.notifications module. | app/soc/logic/helper/notifications.py | app/soc/logic/helper/notifications.py | #!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | Python | 0 | @@ -664,18 +664,19 @@
ications
+.
%0D%0A
-
%22%22%22%0D%0A%0D%0A_
@@ -740,24 +740,39 @@
%3E',%0D%0A %5D%0D%0A%0D%0A
+%0D%0Aimport os%0D%0A%0D%0A
from google.
@@ -943,18 +943,16 @@
_logic%0D%0A
-%0D%0A
from soc
@@ -985,29 +985,16 @@
ects%0D%0A%0D%0A
-import os%0D%0A%0D%0A
%0D%0ADEF_IN
@@ -1024,16 +1024,16 @@
... |
9dad1be65ec3d4616990b1027d1b5da21f0a702c | Use EchoDitto verbiage | app/soc/modules/gci/views/homepage.py | app/soc/modules/gci/views/homepage.py | #!/usr/bin/env python2.5
#
# Copyright 2011 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | Python | 0.000001 | @@ -1678,15 +1678,18 @@
= '
-List of
+Search for
tas
|
ba059d6b1227e25511de295d286f5420a52748b1 | trying to tweet fake tweet | turingtweets/turingtweets/scripts/tweet_scheduler.py | turingtweets/turingtweets/scripts/tweet_scheduler.py | import schedule
import tweepy
import time
import os
from turingtweets.models import get_engine
from sqlalchemy.orm import sessionmaker
from turingtweets.models.mymodel import FakeTweet
test_dict = {'sqlalchemy.url': os.environ.get('DATABASE_URL')}
print(os.environ.get('DATABASE_URL'))
engine = get_engine(test_dict)
... | Python | 0.999998 | @@ -532,22 +532,56 @@
ler(
-CONSUMER_KEY,
+os.environ.get('CONSUMER_KEY'), os.environ.get('
CONS
@@ -587,24 +587,26 @@
SUMER_SECRET
+')
)%0A auth.s
@@ -625,22 +625,56 @@
ken(
-ACCESS_TOKEN,
+os.environ.get('ACCESS_TOKEN'), os.environ.get('
ACCE
@@ -688,16 +688,18 @@
N_SECRET
+')
)%0A ap
|
310e82c8636e104a184eafcd471ed751fa533158 | fix hdf5 dependency (#21789) | var/spack/repos/builtin/packages/hdf-eos5/package.py | var/spack/repos/builtin/packages/hdf-eos5/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 *
import sys
class HdfEos5(AutotoolsPackage):
"""HDF-EOS (Hierarchical Data Format - Earth Observi... | Python | 0 | @@ -2051,16 +2051,19 @@
on('hdf5
++hl
')%0A%0A
@@ -3948,138 +3948,8 @@
ix))
-%0A if self.spec%5B'szip'%5D:%0A extra_args.append('--with-szlib=%7B0%7D'.format(%0A self.spec%5B'szip'%5D.prefix))
%0A%0A
|
98a4d0547a9b302e4a52b1957633b11fde9fe56d | Make a real link in signature | weboob/tools/capabilities/messages/GenericBackend.py | weboob/tools/capabilities/messages/GenericBackend.py | # -*- coding: utf-8 -*-
# Copyright(C) 2011 Julien Hebert
#
# 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 your opt... | Python | 0.000008 | @@ -2263,15 +2263,31 @@
re='
-URL: %25s
+%3Ca href=%22%25s%22%3EURL%3C/a%3E %5Cn
' %25
|
d9e4978912c1c0dfd0c0fa667fede94c70634774 | Move logger into get_events so displays with main script | scripts/analytics/node_log_count.py | scripts/analytics/node_log_count.py | import time
import logging
import argparse
from modularodm import Q
from datetime import datetime, timedelta
from dateutil.parser import parse
from website.app import init_app
from website.project.model import NodeLog
from website.settings import KEEN as keen_settings
from keen.client import KeenClient
logger = loggi... | Python | 0 | @@ -987,16 +987,95 @@
event)%0A%0A
+ logger.info('NodeLogs counted. %7B%7D NodeLogs.'.format(len(node_log_events)))%0A
retu
@@ -2291,88 +2291,8 @@
s)%0A%0A
- logger.info('NodeLogs counted. %7B%7D NodeLogs.'.format(len(node_log_events)))%0A%0A
if _
|
2f8ac0d7c22fd316aa30505e0d6732ea81a19a5e | Make possible to set a custom view to the controlcenter | controlcenter/views.py | controlcenter/views.py | from importlib import import_module
from django.conf.urls import url
from django.contrib import admin
from django.contrib.admin.views.decorators import staff_member_required
from django.core.exceptions import ImproperlyConfigured
from django.http import Http404
from django.utils.decorators import method_decorator
from... | Python | 0 | @@ -1,41 +1,4 @@
-from importlib import import_module%0A%0A
from
@@ -272,16 +272,70 @@
corator%0A
+from django.utils.module_loading import import_string%0A
from dja
@@ -448,37 +448,86 @@
def
-get_urls(self):%0A self.
+__init__(self, view_class):%0A self.view_class = view_class%0A%0A def get_
dash... |
2df8dc69fb84bedef2cd258a365761fe2cd67783 | allow individual ids to contain . | xbrowse_server/api/urls.py | xbrowse_server/api/urls.py | from django.conf.urls import patterns, url
from django.contrib import admin
import xbrowse_server.api.views
import xbrowse_server.phenotips.views
import xbrowse_server.reports.views
admin.autodiscover()
urlpatterns = [
#
# lookup methods
#
url(r'^projects$', xbrowse_server.api.views.projects, name=... | Python | 0 | @@ -2949,32 +2949,33 @@
edit/(?P%3Ceid%3E%5B%5Cw
+.
%7C-%5D+)$', xbrowse
@@ -3099,24 +3099,25 @@
/(?P%3Ceid%3E%5B%5Cw
+.
%7C-%5D+)$', xbr
|
bbb2871bfba427654d70592f0f4fa0d1806a3fa0 | Fix PEP8 for generate-keyword-tests | src/etc/generate-keyword-tests.py | src/etc/generate-keyword-tests.py | #!/usr/bin/env python
#
# Copyright 2013 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
#... | Python | 0.000055 | @@ -1946,17 +1946,19 @@
.S_IRUSR
-%7C
+ %7C
stat.S_I
@@ -1961,17 +1961,19 @@
.S_IRGRP
-%7C
+ %7C
stat.S_I
|
ac6c34c13ade272a7b7ae5b587fa97fdd04b161a | Remove unused pipe_client1 from test | test/test_pipe_support.py | test/test_pipe_support.py | import os
import asyncio
import functools
import random
import time
from testing import Client
from testing import default_test_setup
from testing import gen_data
from testing import gen_points
from testing import gen_series
from testing import InsertError
from testing import PoolError
from testing import QueryError
fr... | Python | 0.000001 | @@ -1284,68 +1284,8 @@
AME)
-%0A pipe_client1 = SiriDBAsyncUnixConnection(PIPE_NAME)
%0A%0A
|
fb31c61f05efad54d1a35089c1b5b64e49e012e4 | fix test | test/test_registration.py | test/test_registration.py | #!/usr/bin/python3
from tornado.testing import AsyncHTTPTestCase
import links
import json
from unittest import mock
class RegisterTestCase(AsyncHTTPTestCase):
def get_app(self):
links.settings['debug'] = False
return links.make_app()
def test_invalid_registration_data(self):
response ... | Python | 0.000002 | @@ -1675,25 +1675,19 @@
o.users.
-insert_on
+sav
e.assert
@@ -2021,17 +2021,11 @@
ers.
-insert_on
+sav
e.si
|
8882dc0d96fe589ef7e20bc21a67f77c9bc8e595 | Update dependency versions | var/spack/repos/builtin/packages/chill/package.py | var/spack/repos/builtin/packages/chill/package.py | # Copyright 2013-2020 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 Chill(AutotoolsPackage):
"""A polyheadral compiler for autotuning"""
homepage = "http... | Python | 0 | @@ -733,11 +733,12 @@
.9.1
-0
+3
.0
+:
+cx
@@ -740,39 +740,48 @@
: +cxx11', type=
+(
'build'
+, 'run')
)%0A depends_on
@@ -954,39 +954,48 @@
iegenlib', type=
+(
'build'
+, 'run')
)%0A depends_on
@@ -1005,16 +1005,19 @@
ison@3.4
+.2:
', type=
@@ -1054,32 +1054,76 @@
, type='build')%0A
+ # Does not ... |
ac50044c16e2302e7543923d562cca5ba715e311 | Switch from () to __call__() | web/impact/impact/v1/events/base_history_event.py | web/impact/impact/v1/events/base_history_event.py | from abc import (
ABCMeta,
abstractmethod,
)
from impact.v1.helpers import (
STRING_FIELD,
)
class BaseHistoryEvent(object):
__metaclass__ = ABCMeta
CLASS_FIELDS = {
"event_type": STRING_FIELD,
"datetime": STRING_FIELD,
"latest_datetime": STRING_FIELD,
"description... | Python | 0.000021 | @@ -1400,16 +1400,25 @@
lf, key)
+.__call__
()%0A
|
b0f1a4bae4df8d2e2e85f5985bead3f488c7dadb | remove templar refernces | config/project.py | config/project.py | import datetime
import pyclassifiers.values
import config.general
project_github_username = "veltzer"
project_name = "pytsv"
github_repo_name = project_name
project_website = f"https://{project_github_username}.github.io/{project_name}"
project_website_source = f"https://github.com/{project_github_username}/{project_n... | Python | 0.000059 | @@ -1790,88 +1790,8 @@
= %5B%5D
-%0A# project_data_files.append(templar.utils.hlp_files_under(%22/usr/bin%22, %22src/*%22))
%0A%0Apr
|
30e84d34f7d2e75ca9052f1e702cdcdea738fb5e | add ContactRelationship to admin | crm/admin.py | crm/admin.py | # -*- coding: utf-8 -*-
# ----------------------------------------------------------------------------
# $Id: admin.py 433 2009-07-14 04:10:28Z tobias $
# ----------------------------------------------------------------------------
#
# Copyright (C) 2008 Caktus Consulting Group, LLC
#
# This file is part of minib... | Python | 0 | @@ -2409,16 +2409,369 @@
strationAdmin)%0A%0A
+%0Aclass ContactRelationshipAdmin(admin.ModelAdmin):%0A list_display = ('id', 'from_contact', 'to_contact', 'start_date',%0A 'end_date')%0A raw_id_fields = ('from_contact', 'to_contact')%0A list_filter = ('start_date', 'end_date',)%0A order_... |
6722e16aef43f9cfe03e7e76fc578582139721f6 | Split file collecting algorithm to FileFilter | vint/linting/env.py | vint/linting/env.py | import os
import os.path
import re
import logging
from pathlib import Path
VIM_SCRIPT_FILE_NAME_PATTERNS = r'(?:[\._]g?vimrc|.*\.vim$)'
def build_environment(cmdargs):
return {
'cmdargs': cmdargs,
'home_path': _get_home_path(cmdargs),
'cwd': _get_cwd(cmdargs),
'file_paths': _get_f... | Python | 0 | @@ -22,119 +22,85 @@
ath%0A
-import re%0Aimport logging%0Afrom pathlib import Path%0A%0AVIM_SCRIPT_FILE_NAME_PATTERNS = r'(?:%5B%5C._%5Dg?vimrc%7C.*%5C.vim$)'
+from pathlib import Path%0Afrom vint.linting.file_filter import find_vim_script
%0A%0A%0Ad
@@ -530,651 +530,92 @@
file
-s = _collect_files(%5BPath(path) for ... |
c57e9a57f5dc0869bd058c1e3a5c32ad461223be | Fix algo | alloc_strategy/strategy.py | alloc_strategy/strategy.py | from abc import ABCMeta,abstractmethod
from consul import Consul
from models import Container
from random import randint
class AllocationStrategy(metaclass=ABCMeta):
@classmethod
def from_name(clazz, name):
if name == "random":
return RandomAllocationStrategy()
elif name == "round-r... | Python | 0.999615 | @@ -3557,40 +3557,23 @@
y =
-bins%5B0%5D.get_remaining_capacity()
+%5B100, 100, 100%5D
%0A
@@ -3586,33 +3586,34 @@
est_fit_index =
-0
+-1
%0A for ind
@@ -3640,60 +3640,8 @@
)):%0A
- if index == 0:%0A continue%0A
@@ -4818,36 +4818,96 @@
if
-best_fit_index == -1
+wo... |
76b8d8af84915c9f49e2320c0fb2c8088faa0dff | remove testing line | run-experiment.py | run-experiment.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
===============================================================================
Script 'run-experiment.py'
===============================================================================
This script plays stimuli and records verbal responses.
"""
# @author: drmccloy
... | Python | 0.000003 | @@ -5044,17 +5044,16 @@
-#
wav, fs
@@ -5092,137 +5092,8 @@
m))%0A
- wav, fs = read_wav(op.join('test-stimuli', 'NWF002_03-10.wav'))%0A # TODO: fix previous two lines when done testing%0A
|
6991e8ebd2d0e5d75150ab5fc6827f8b7f76fa92 | Add note about warnings not working with blinker | selfdrive/car/hyundai/hyundaican.py | selfdrive/car/hyundai/hyundaican.py | import crcmod
from selfdrive.car.hyundai.values import CAR, CHECKSUM
hyundai_checksum = crcmod.mkCrcFun(0x11D, initCrc=0xFD, rev=False, xorOut=0xdf)
def create_lkas11(packer, frame, car_fingerprint, apply_steer, steer_req,
lkas11, sys_warning, sys_state, enabled,
left_lane, right_... | Python | 0 | @@ -1254,12 +1254,22 @@
#
-4 is
+SysWarning 4 =
kee
@@ -1295,12 +1295,22 @@
#
-5 is
+SysWarning 5 =
kee
@@ -1341,13 +1341,23 @@
#
+ SysWarning
6
-is
+=
kee
@@ -1386,16 +1386,76 @@
+ beep%0A
+ # Note: the warning is hidden while the blinkers are on%0A
valu
|
bba7b4074a4521ad94ae082a9888728e61c377f9 | Add fake env variable for theme_background | src/test_pocket.py | src/test_pocket.py | import unittest
import logging
import sys
import pocket
import pocket as pocket_backup
import test_data
CachedData = {}
Passwords = {}
class PocketTestCase(unittest.TestCase):
def test_main(self):
CachedData['__workflow_update_status'] = {
'available': True
}
CachedData['poc... | Python | 0 | @@ -3258,16 +3258,120 @@
lear()%0A%0A
+ pocket.Workflow.alfred_env = %7B%0A 'theme_background': 'rgba(40,40,40,0.1)',%0A %7D%0A%0A
|
075c64f41c686186ea16d0da4e63be1a4473c483 | use installed version of cros_workon | shell/subcmds/workon_cmd.py | shell/subcmds/workon_cmd.py | # Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Implementation of the 'workon' chromite command."""
import chromite.lib.cros_build_lib as cros_lib
from chromite.shell import subcmd
class Work... | Python | 0 | @@ -508,103 +508,8 @@
rk.%0A
- # Note that host version uses %22./%22, since it's in src/scripts and not in the%0A # path...%0A
@@ -575,10 +575,8 @@
, %5B'
-./
cros
|
e9e288d1bd4e55519eeb580ac809d70dfa1fcf4e | Improve TLS/SSL support (#9 progress) | src/testers/tls.py | src/testers/tls.py | # -*- coding: utf-8 -*-
def available(test):
"""
Check if MongoDB is compiled with OpenSSL support
"""
return 'OpenSSLVersion' in test.tester.info \
or 'openssl' in test.tester.info
def enabled(test):
"""
Check if TLS/SSL is enabled on the server side
"""
if not available(test)... | Python | 0 | @@ -16,16 +16,27 @@
tf-8 -*-
+%0Aimport ssl
%0A%0Adef av
@@ -369,209 +369,188 @@
-if 'OpenSSLVersion' in test.tester.info:%0A return bool(test.tester.info%5B'OpenSSLVersion'%5D)%0A else:%0A return test.tester.info%5B'openssl'%5D%5B'running'%5D != 'disabled'%0A except Key
+with te... |
10b4a5384b130ff85ac73587830a414a1187dab0 | Fix field name | runners/models.py | runners/models.py | from django.db import models
from django.utils.translation import ugettext as _
from platforms.models import Platform
class Runner(models.Model):
""" Model definition for the runners """
name = models.CharField(_("Name"), max_length=127)
slug = models.SlugField(unique=True)
website = models.CharField... | Python | 0.000003 | @@ -924,16 +924,24 @@
', 'arch
+itecture
')%0A%0A
|
8e0a8adf81ef7ff59c3c964eaabce25b6cd43cab | Delete a few names we import that are not intended for the user | vpython/__init__.py | vpython/__init__.py | import os
from ._version import get_versions
from .gs_version import glowscript_version
__version__ = get_versions()['version']
__gs_version__ = glowscript_version()
del get_versions
del glowscript_version
# Keep the remaining imports later to ensure that __version__ and
# __gs_version__ exist before importing vpyth... | Python | 0 | @@ -1036,16 +1036,78 @@
rsion()%0A
+%0A# Delete platform now that we are done with it%0Adel platform%0A%0A
__ispyth
@@ -1478,16 +1478,17 @@
ion(s)%0A%0A
+%0A
from .vp
@@ -1729,16 +1729,16 @@
rt rate%0A
-
from .gs
@@ -1759,16 +1759,126 @@
Sprint%0A%0A
+# For some reason gsprint and vpython are showing up in the%0... |
416a42bc01fc5c5c218a43bf5af11bad922c78d2 | update collection selection for record_db | coordinator_factory.py | coordinator_factory.py | from twisted.protocols.amp import AMP
from twisted.internet.protocol import Factory
from coordinator_commands import *
from pymongo import MongoClient
class CoordinatorProtocol(AMP):
@FetchData.responder
def fetchData(self, msg):
#TODO: msg contains the
pass
@GetMaster.responder
def ... | Python | 0 | @@ -620,16 +620,17 @@
ecord_db
+%5D
= conne
@@ -680,16 +680,27 @@
ecord_db
+%5B%22records%22%5D
.find_on
@@ -917,32 +917,43 @@
record_db
+%5B%22records%22%5D
.save(user_recor
@@ -1067,32 +1067,32 @@
ave%22%5D = is_save%0A
-
reco
@@ -1096,16 +1096,27 @@
ecord_db
+%5B%22records%22%5D
.save(u... |
8e423ce743dc5f1cd4dcd6e4ff45e7e29504b02b | Update lev_group.py | src/hyperloop/Python/lev_group.py | src/hyperloop/Python/lev_group.py | from openmdao.api import Group, Problem, IndepVarComp
from breakpointlev import Drag, Mass
class LevGroup(Group):
"""Group containing the breakpointlev.py classes Drag and Mass"""
def __init__(self):
super(LevGroup, self).__init__()
# Creates components of the group.
self.add('Drag', ... | Python | 0.000001 | @@ -52,16 +52,37 @@
mp%0Afrom
+src.hyperloop.Python.
breakpoi
|
a9c68c43607becf6882ce91d921d44d317bd9912 | Fix PyCharm refactor typo | yunity/api/public/chats.py | yunity/api/public/chats.py | from django.conf.urls import url
from django.db.models import Max, Q
from django.http import HttpRequest
from django.views.generic import View
from yunity.api.ids import chat_id_uri_pattern, user_id_uri_pattern
from yunity.api.utils import ApiBase, model_to_json, body_as_json
from yunity.models.concrete import Chat as... | Python | 0.000012 | @@ -2890,21 +2890,16 @@
chat =
-self.
chat_fro
|
0209f3a8a3cff785628d6e32cefb676eb0a0b61c | Add comment | zaifbot/exchange/action.py | zaifbot/exchange/action.py | from abc import ABCMeta, abstractclassmethod
def Action(action):
for cls in _TradeAction.__subclasses__():
if isinstance(action, str):
if cls.is_my_action(action):
return cls(action)
continue
if isinstance(action, _TradeAction):
return action
... | Python | 0 | @@ -417,32 +417,45 @@
_(self, action):
+ # necessary
%0A self._n
|
456f3812177d0c529ab76f08d9a45f57cd906a0e | Remove path filter from category listing | src/ifd.blog/ifd/blog/blogview.py | src/ifd.blog/ifd/blog/blogview.py | import calendar
from Acquisition import aq_inner
from DateTime import DateTime
from five import grok
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone.PloneBatch import Batch
from plone.app.discussion.interfaces import IConversation
from plone.app.contentlisting.interfaces import IContentListing... | Python | 0 | @@ -1,12 +1,91 @@
+# -*- coding: utf-8 -*-%0A%22%22%22Module providing filterable blog entry listings%22%22%22%0A%0A
import calen
@@ -160,25 +160,53 @@
rom
-five import grok%0A
+Products.CMFCore.interfaces import IFolderish
%0Afro
@@ -302,66 +302,29 @@
tch%0A
-%0A
from
-plone.app.discussion.interfaces import ICo... |
3865229667b7e8add10f914aa0f655621d4af82a | fix categorize warnings | zarr/tests/test_filters.py | zarr/tests/test_filters.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, division
import numpy as np
from numpy.testing import assert_array_equal, assert_array_almost_equal
from nose.tools import eq_ as eq
from numcodecs import (AsType, Delta, FixedScaleOffset, PackBits, Categorize, Zlib, Blosc, BZ2,
... | Python | 0.000474 | @@ -4624,25 +4624,25 @@
ce(%5B
-b
+u
'foo',
-b
+u
'bar',
-b
+u
'baz
@@ -4706,22 +4706,25 @@
ls=%5B
+u
'foo',
+u
'bar',
+u
'baz
|
22256758116277bbae8330d866c0a8290a5e9a6c | use choices instead of randoms | test_mikado_properties.py | test_mikado_properties.py | # coding: utf-8
from mikado import Goals
from hypothesis import given, note, assume
from hypothesis.strategies import integers, lists, tuples, sampled_from, composite, randoms
USER_ACTIONS = {
'add': lambda g, x: g.add('a'),
'delete': lambda g, x: g.delete(),
'hold_select': lambda g, x: g.hold_select(),
... | Python | 0.000061 | @@ -161,22 +161,22 @@
posite,
-random
+choice
s%0A%0A%0AUSER
@@ -1262,14 +1262,14 @@
(),
-random
+choice
s())
@@ -1312,19 +1312,22 @@
ctions,
-rnd
+choice
):%0A #
@@ -1367,16 +1367,36 @@
the end%0A
+ assume(actions)%0A
assu
@@ -1593,18 +1593,19 @@
l =
-rnd.sample
+choice(list
(g.a
@@ -1619,15 +1... |
03e519341063c5703080b4723112f1831816c77e | Fix a typo | congress/bills.py | congress/bills.py | from .client import Client
from .utils import CURRENT_CONGRESS, check_chamber
class BillsClient(Client):
def by_member(self, member_id, type='introduced'):
"""
Takes a bioguide ID and a type:
(introduced|updated|cosponsored|withdrawn)
Returns recent bills
"""
path ... | Python | 1 | @@ -1366,39 +1366,8 @@
'):%0A
- check_chamber(chamber)%0A
@@ -1491,32 +1491,63 @@
lls%0A %22%22%22%0A
+ check_chamber(chamber)%0A
path = %22
|
7cc66b0ece09a19231eab84ed80fbddc60a24554 | Revert "Show new-style locations in course staff debug info (opaque keys update)" | apps/openassessment/xblock/staff_info_mixin.py | apps/openassessment/xblock/staff_info_mixin.py | """
The Staff Info View mixin renders all the staff-specific information used to
determine the flow of the problem.
"""
import copy
from django.utils.translation import ugettext as _
from xblock.core import XBlock
from openassessment.xblock.resolve_dates import DISTANT_PAST, DISTANT_FUTURE
from submissions import api ... | Python | 0 | @@ -1433,25 +1433,24 @@
issions%0A
-%0A
# We nee
@@ -1445,275 +1445,52 @@
-# We need to display the new-style locations in the course staff%0A # info, even if we're using old-style locations internally,%0A # so course staff can use the locations to delete student state.%0A context... |
db0aad8333266905bb730f928e7f1c6dfc77f7e4 | Fix some missing imports | examples/terminal/terminal.py | examples/terminal/terminal.py | import os
import gtk
import vte
from sugar.activity.Activity import Activity
_TERMINAL_ACTIVITY_TYPE = "_terminal._tcp"
class Terminal(gtk.HBox):
def __init__(self):
gtk.HBox.__init__(self, False, 4)
self._vte = vte.Terminal()
self._configure_vte()
self._vte.set_size(30, 5)
self._vte.set_size_request(20... | Python | 0.999974 | @@ -25,16 +25,29 @@
port vte
+%0Aimport pango
%0A%0Afrom s
@@ -1708,16 +1708,22 @@
hell()%0A%0A
+try:%0A%09
gtk.main
@@ -1725,8 +1725,40 @@
.main()%0A
+except KeyboardInterrupt:%0A%09pass%0A
|
9e0d37d581b22b46b60bb563beb8fe3c44063a37 | fix download view for locked items: allow for admin, 403 for everybody else | bepasty/views/download.py | bepasty/views/download.py | # Copyright: 2013 Bastian Blank <bastian@waldi.eu.org>
# License: BSD 2-clause, see LICENSE for details.
import errno
import time
from flask import Response, current_app, render_template, stream_with_context
from flask.views import MethodView
from werkzeug.exceptions import NotFound
from ..utils.name import ItemName... | Python | 0 | @@ -202,17 +202,24 @@
_context
+, abort
%0A
-
from fla
@@ -321,16 +321,50 @@
temName%0A
+from ..utils.permissions import *%0A
from . i
@@ -709,87 +709,8 @@
not
-item.meta.get('unlocked'):%0A error = 'File Locked.'%0A elif not
item
@@ -986,16 +986,16 @@
inally:%0A
-
@@ -1016,16 +101... |
bd11cd11925a1fd9da7a7d5d57b53ae546f278bf | Add --use-src-side-runtest-py flag to testing/scripts/common.py | testing/scripts/common.py | testing/scripts/common.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.
import argparse
import contextlib
import json
import os
import subprocess
import sys
import tempfile
SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)... | Python | 0.000007 | @@ -1266,16 +1266,194 @@
lt=%5B%5D)%0A%0A
+ parser.add_argument(%0A '--use-src-side-runtest-py', action='store_true',%0A help='Use the src-side copy of runtest.py, as opposed to the build-side '%0A 'one')%0A%0A
subpar
|
8b4442731abfe2dc4a37ca2470719340a7ffcfdb | Fix None value of User-Agent option processing in Kit module | grab/kit/__init__.py | grab/kit/__init__.py | """
Credits:
* https://code.google.com/p/webscraping/source/browse/webkit.py
* https://github.com/jeanphix/Ghost.py/blob/master/ghost/ghost.py
"""
import time
import sys
from PyQt4.QtCore import QEventLoop, QUrl, QEventLoop, QTimer, QByteArray
from PyQt4.QtGui import QApplication
from PyQt4.QtWebKit import QWebView, Q... | Python | 0.000002 | @@ -1580,16 +1580,131 @@
, url):%0A
+ if self.user_agent is None:%0A return super(KitPage, self).userAgentForUrl(url)%0A else:%0A
|
21a68c997730c54201d806e25a6b8f71d998926d | Fix compression on python3 | extractMtree.py | extractMtree.py | #!/usr/bin/env python
#
# vim: set ts=4 sw=4 expandtab :
# Copyright (c) 2017 Timothy Savannah - All Rights Reserved
# This code is licensed under the terms of the APACHE license version 2.0
#
# extractMtree.py - Extracts the mtree from all available packages,
# attempting short-reads where possible to limit ban... | Python | 0.99973 | @@ -7147,16 +7147,32 @@
results)
+.encode('utf-8')
)%0A%0A
|
89b147a81fd50510f357dd578ea1d8d69ca19813 | update argparse | grab_huaban_board.py | grab_huaban_board.py | #!/usr/bin/env python
# -*- coding: utf8 -*-
__version__ = "2.0"
__author__ = "Mr.tao"
import requests,re,sys,os,logging
from multiprocessing import cpu_count
from multiprocessing.dummy import Pool as ThreadPool
logging.basicConfig(level=logging.DEBUG,
format='[ %(levelname)s ] %(asctime)s %(filena... | Python | 0.000001 | @@ -54,17 +54,17 @@
on__ = %22
-2
+3
.0%22%0A__au
@@ -3496,16 +3496,211 @@
(data)%0A%0A
+def main(boards, processes):%0A %22%22%22 Entrance %22%22%22%0A #check params%0A if isinstance(boards, (list, tuple)) and isinstance(processes, int):%0A pass%0A else:%0A return %22Params Error%22%0A%0A
... |
c69ac0c92e41f866e4637426207cf3a303491503 | Correct ansible imports | connection/ssh.py | connection/ssh.py | # Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | Python | 0.000027 | @@ -659,106 +659,8 @@
os%0A%0A
-from ansible.module_utils._text import to_bytes%0Afrom ansible.compat.six.moves import shlex_quote%0A%0A
# NO
@@ -3015,16 +3015,20 @@
_user =
+SSH.
to_bytes
@@ -3056,24 +3056,28 @@
emote_user,%0A
+
@@ -4594,16 +4594,20 @@
+SSH.
shlex_qu
|
45cfd99ce90028046a7cf820b8726006dc8a36fc | allow building gem5 in a nix environment | site_scons/gem5_scons/defaults.py | site_scons/gem5_scons/defaults.py | # Copyright (c) 2013, 2015-2017 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the fun... | Python | 0.000002 | @@ -3060,16 +3060,91 @@
ernels)%0A
+ %22NIX_%22, # wrapped binaries if using nix package manager%0A
|
2f6aae3c0ec7280b0992ac80da25e08525852d35 | change module getattr import error to attribute error | siuba/sql/verbs/__init__.py | siuba/sql/verbs/__init__.py | from . import (
arrange,
compute,
conditional,
count,
distinct,
explain,
filter,
group_by,
head,
join,
mutate,
select,
summarize,
)
def __getattr__(name):
import warnings
if name == "LazyTbl":
from ..backend import LazyTbl
warnings.warn(
... | Python | 0.000003 | @@ -516,71 +516,74 @@
ise
-ImportError(f%22cannot import name '%7Bname%7D' from 'siuba.sql.verbs
+AttributeError(f%22module 'siuba.sql.verbs' has no attribute '%7Bname%7D
'%22)%0A
|
b479f750001eb6db50512fbc71a7a921516fbb0b | Add contextmanager to get/return connections | cql/connection_pool.py | cql/connection_pool.py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | Python | 0.000001 | @@ -779,16 +779,54 @@
ense.%0A%0A%0A
+from contextlib import contextmanager%0A
from Que
@@ -3359,16 +3359,493 @@
ction)%0A%0A
+ @property%0A @contextmanager%0A def connection(self):%0A %22%22%22This method creates a instance property that is in turn a context%0A generator that borrows and fina... |
a83ed36625446224b073f5166f0feef5493f956b | Change quote command to only run if there's no subcommand | crabbot/cogs/quotes.py | crabbot/cogs/quotes.py | #!/usr/bin/env python3
# CrabBot quotes
#
# Partially inspired by LRRBot
'''
JSON format
{
Name1: [
"Quote1"
"Quote2"
...
],
Name2: [
...
'''
import json
from pathlib import Path
import random
# import sqlite3 # Leaving as a note of possible db alternatives
from discord.ext i... | Python | 0 | @@ -976,16 +976,45 @@
xt=True,
+ invoke_without_command=True,
%0A
@@ -1232,178 +1232,8 @@
x):%0A
- if ctx.invoked_subcommand is not None:%0A return%0A%0A # await self.bot.say(%22Be more quotable, then maybe we'd finish this command. :neutral_face:%22)%0A%0A
|
df05e16b370de750f65618c936f60da932a59c39 | Find correct beatmap | plugins/osulib/api.py | plugins/osulib/api.py | """ API integration for osu!
Adds Mods enums with raw value calculations and some
request functions. """
from enum import IntEnum
import re
import asyncio
from pcbot import utils
api_url = "https://osu.ppy.sh/api/"
api_key = "" # This variable can be changed to exclude the "k" parameter
requests_sent = 0... | Python | 0.999778 | @@ -4463,31 +4463,28 @@
, 0%0A for
-beatmap
+diff
in difficul
@@ -4497,20 +4497,21 @@
-diff
+stars
= float
@@ -4511,23 +4511,20 @@
= float(
-beatmap
+diff
%5B%22diffic
@@ -4548,20 +4548,21 @@
if
-diff
+stars
%3E highe
@@ -4600,21 +4600,19 @@
t =
-beatmap, diff
+diff, stars
%0A%0A
|
c231cc4a54e792d1e0c5f8d4f9540670004505a5 | Add prediction module | predict.py | predict.py | from models.cuberun import CubeRun
import numpy as np
import utils
def get_model():
nb_classes = 19
input_shape = (257, 624, 1)
model = CubeRun(nb_classes=nb_classes, input_shape=input_shape)
model.load_weights("../weights/2016_11_16_06:31:03_cuberun.h5")
return model
def predict(model, filenam... | Python | 0.000001 | @@ -1,13 +1,41 @@
from
+bird import utils%0Afrom bird.
models.c
@@ -67,18 +67,64 @@
ort
-numpy
+bird.loader as loader%0Aimport bird.signal_processing
as
-n
+s
p%0Aim
@@ -132,279 +132,227 @@
ort
-utils%0A%0Adef get_model():%0A nb_classes = 19%0A input_shape = (257, 624, 1)%0A%0A model = CubeRun(nb_cl... |
7429372801d6b4cc3a0a3235f41c0b97d17ce1aa | Test `max_elements_per_line` setting for primitive arrays | tests/DdlTextWrterTest.py | tests/DdlTextWrterTest.py | import os
import unittest
from pyddl import *
from pyddl.enum import *
__author__ = "Jonathan Hale"
class DdlTextWriterTest(unittest.TestCase):
def tearDown(self):
try:
os.remove("test.oddl")
except FileNotFoundError:
pass # test_empty failed?
def test_empty(self):
... | Python | 0 | @@ -1044,32 +1044,156 @@
)%0A
+%0A prim = DdlPrimitive(PrimitiveType.int32, range(1, 100))%0A DdlTextWriter.set_max_elements_per_line(prim, 10)%0A%0A
document
@@ -1299,56 +1299,12 @@
e, %5B
-DdlPrimitive(PrimitiveType.int32, range(1, 100))
+prim
%5D)%5D%0A
|
50df20f3b71163f62423c812f8415aef49a426cb | fix wrong parameter name in doc string | skimage/measure/_polygon.py | skimage/measure/_polygon.py | import numpy as np
from scipy import signal
def approximate_polygon(coords, tolerance):
"""Approximate a polygonal chain with the specified tolerance.
It is based on the Douglas-Peucker algorithm.
Note that the approximated polygon is always within the convex hull of the
original polygon.
Param... | Python | 0.000026 | @@ -3704,22 +3704,22 @@
ay.%0A
-method
+degree
: %7B1, 2
|
a8d800a13804ede7e6064c35976d0cbb4025af72 | Fix default value for manual additions ip list cron | cron/update_ip_list.py | cron/update_ip_list.py | #!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Copyright (c) 2017 Mozilla Corporation
#
# Contributors:
# Brandon Myers bmyers@mozilla.com
imp... | Python | 0 | @@ -1581,16 +1581,71 @@
itions:%0A
+ if manual_addition == '':%0A continue%0A
@@ -2857,10 +2857,10 @@
s',
-%5B%5D
+''
, op
|
f0313622346944b97046318ce3b2fbc879a72cec | Fix excel_test.py (do not create Datastore) | src/pudl/extract/excel_test.py | src/pudl/extract/excel_test.py | """Unit tests for pudl.extract.excel module."""
import unittest
from unittest import mock as mock
from unittest.mock import patch
import pandas as pd
from pudl.extract import excel as excel
from pudl.workspace import datastore
class TestMetadata(unittest.TestCase):
"""Tests basic operation of the excel.Metadata... | Python | 0 | @@ -189,45 +189,8 @@
cel%0A
-from pudl.workspace import datastore%0A
%0A%0Acl
@@ -1498,41 +1498,12 @@
(ds=
-datastore.Datastore(sandbox=True)
+None
)%0A%0A
|
462f7f03067c1923f80441eaa8500e92a1e0f630 | stop blipblip | slu4p/speech_to_text/asr.py | slu4p/speech_to_text/asr.py | #http://doc.aldebaran.com/2-5/naoqi/audio/alspeechrecognition-api.html
import signal
import qi
import argparse
import sys
from os.path import expanduser
import os
import time
class SpeechRecognition(object):
USE_GOOGLE = True
CHANNELS = [0, 0, 1, 0]
audio_recorder = None
recording = False
def __... | Python | 0.000285 | @@ -1505,16 +1505,71 @@
es%22, 3)%0A
+ self.asr_service.setAudioExpression(False)%0A
|
e587414313c706a23e5498d778ad6151b06110a7 | Remove unneeded main. | printing/printing.gyp | printing/printing.gyp | # Copyright (c) 2009 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.
{
'variables': {
'chromium_code': 1,
},
'targets': [
{
'target_name': 'printing',
'type': '<(library)',
'dependencies': [... | Python | 0.005881 | @@ -2381,50 +2381,8 @@
t',%0A
- '../testing/gtest.gyp:gtestmain',%0A
|
0ee52ae1c62435fcc90d71fda333fd49431b1525 | Make courgette_unittests depend on TCMalloc, like every other Linux binary at Chromium. | courgette/courgette.gyp | courgette/courgette.gyp | # Copyright (c) 2011 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.
{
'variables': {
'chromium_code': 1,
'courgette_lib_sources': [
'adjustment_method.cc',
'adjustment_method_2.cc',
'adjustment... | Python | 0.000046 | @@ -2980,32 +2980,330 @@
'conditions': %5B%0A
+ %5B 'os_posix == 1 and OS != %22mac%22 and OS != %22android%22 and OS != %22ios%22', %7B%0A 'conditions': %5B%0A %5B'linux_use_tcmalloc==1', %7B%0A 'dependencies': %5B%0A '../base/allocator/allocator.gyp:allocator',%... |
2264c0b6b916874c7d80942d763cb67a4f5699e5 | 376. Wiggle Subsequence | problems/test_0376.py | problems/test_0376.py | import unittest
from typing import List
import utils
# O(n) time. O(1) space. Greedy.
class Solution:
def wiggleMaxLength(self, nums: List[int]) -> int:
if not nums:
return 0
prev = nums[0]
i = 1
while i < len(nums):
if nums[i] != prev:
bre... | Python | 0.999972 | @@ -229,24 +229,25 @@
i = 1%0A
+%0A
whil
@@ -423,31 +423,8 @@
s%5Bi%5D
-%0A prev = nums%5Bi%5D
%0A%0A
@@ -445,16 +445,20 @@
range(i
+ + 1
, len(nu
@@ -467,34 +467,8 @@
)):%0A
- num = nums%5Bi%5D%0A
@@ -509,15 +509,26 @@
num
- %3C prev
+s%5Bi - 1%5D %3E nums%5Bi%5D
:%0A... |
8a8a09f8dca94eb11057ad3e23fd3d40a938edee | Update archivebot_tests.py after MW localisation update | tests/archivebot_tests.py | tests/archivebot_tests.py | # -*- coding: utf-8 -*-
"""Tests for archivebot scripts."""
#
# (C) Pywikibot team, 2014
#
# Distributed under the terms of the MIT license.
#
from __future__ import absolute_import, unicode_literals
__version__ = '$Id$'
from datetime import datetime
import pywikibot
import pywikibot.page
from pywikibot.textlib im... | Python | 0.000001 | @@ -594,17 +594,17 @@
, 'eo':
-1
+2
, 'es':
@@ -2939,16 +2939,22 @@
= %5B'ar',
+ 'eo',
'pdc',
@@ -3011,16 +3011,302 @@
for TZ%0A
+ # 'eo': changed month name setting in wiki from Sep to sep%0A # Localisation updates from https://translatewiki.net.%0A # Change-Id: I3d9b14ae3a5d77fea9694ef1... |
6a80422d5bce787ef576dfe41439c12b29cb2134 | fix ckeditor setting | 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 = ['127.0.0.1', 'localhost']
SITE_ID = 1
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
... | Python | 0.000002 | @@ -3181,17 +3181,17 @@
eight':
-2
+4
00,%0A
@@ -3264,16 +3264,50 @@
F00FF',%0A
+ 'allowedContent': 'true',%0A
%7D,%0A%7D
|
698eb220ababb935649860010c0cedd693bcb76a | Refactor form | csvsimpletools/forms.py | csvsimpletools/forms.py | # coding: utf-8
from csv_commands import command_list, commands
from flask.ext.babel import gettext
from flask_wtf import Form
from flask_wtf.file import FileField, FileRequired, FileAllowed
from wtforms import RadioField, SelectField
class GetCSV(Form):
csv = FileField(
'CSV File',
validators=[F... | Python | 0.000001 | @@ -1,68 +1,4 @@
-# coding: utf-8%0Afrom csv_commands import command_list, commands%0A
from
@@ -7,13 +7,9 @@
lask
-.ext.
+_
babe
@@ -165,91 +165,201 @@
ld%0A%0A
-%0Aclass GetCSV(Form):%0A%0A csv = FileField(%0A 'CSV File',%0A validators=%5B
+from csv_commands import ordered_commands%0A%0A%0ACOMMAND... |
ac4222e9586ce7d87dacff82bd33fc6ebc50a37d | remove extraneous logging statement | bin/amp4e_events_input.py | bin/amp4e_events_input.py | import sys
import time
import traceback
import json
from splunklib.modularinput import Argument, Event, Scheme, Script
from amp4e_events_input_lib.amp_storage_wrapper import AmpStorageWrapper
from util.logger import logger
from util.stream_consumer import StreamConsumer
class Amp4eEventsInput(Script):
# name: [... | Python | 0.000539 | @@ -1926,48 +1926,8 @@
w):%0A
- logger.info('In stream_events')%0A
|
ba8e567592c96dacb697e067004dc71799e4e93f | Store the basename of the generated files, to allow the unittests to clean up in the tearDown method. | ctypeslib/test/stdio.py | ctypeslib/test/stdio.py | import os
from ctypeslib.dynamic_module import include
from ctypes import *
if os.name == "nt":
_libc = CDLL("msvcrt")
else:
_libc = CDLL(None)
include("""\
#include <stdio.h>
#ifdef _MSC_VER
# include <fcntl.h>
#else
# include <sys/fcntl.h>
#endif
""",
persist=False)
| Python | 0 | @@ -147,16 +147,32 @@
(None)%0A%0A
+_gen_basename =
include(
@@ -270,16 +270,37 @@
%3E%0A#endif
+%0A%0A/* Silly comment */
%0A%22%22%22,%0A
|
1235955edf07bb3815628200cfd247057b91be19 | fix path | snoPlowPy/tests/conftest.py | snoPlowPy/tests/conftest.py | import pytest
@pytest.fixture
def remote_f():
return ('https://raw.githubusercontent.com/kepbod/' +
'SnoPlowPy/master/snoPlowPy/tests/data/a')
| Python | 0.000017 | @@ -92,14 +92,16 @@
com/
-kepbod
+weng-lab
/' +
|
788f0977d21ff88092dacf7840ddf38b0a660288 | Remove unused constant | cw/cw305/util/device.py | cw/cw305/util/device.py | # Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
r"""CW305 utility functions. Used to configure FPGA with OpenTitan design."""
import subprocess
import time
import chipwhisperer as cw
SPIFLASH=r'bin/linux/spiflash'
... | Python | 0.000002 | @@ -283,42 +283,8 @@
cw%0A%0A
-%0ASPIFLASH=r'bin/linux/spiflash'%0A%0A%0A
clas
|
a07c2960bac32593fe1aa81e1bf7d6a4f024e0d0 | Make area identifier an UsageRecord property | accloudtant/__main__.py | accloudtant/__main__.py | import csv
class UsageRecord(object):
def __init__(self, data):
self._data = data
def __getitem__(self, key):
return self._data[key]
def area(entry):
if entry[" UsageType"].startswith("EUC1-"):
return "EU (Frankfurt)"
def is_data_transfer(entry):
if "DataTransfer" in entry... | Python | 0.000136 | @@ -158,38 +158,63 @@
y%5D%0A%0A
-%0Adef area(entry):%0A
+ @property%0A def area(self):%0A
+
if
-entry
+self._data
%5B%22 U
@@ -241,24 +241,28 @@
h(%22EUC1-%22):%0A
+
retu
@@ -538,27 +538,26 @@
_name =
-area(entry)
+entry.area
%0A
@@ -2285,27 +2285,26 @@
if
-area(entry... |
bd677acb1869a4137e78ee137ed1a676928dadf1 | Update test_complexityclass_comparisons.py | big_o/test/test_complexityclass_comparisons.py | big_o/test/test_complexityclass_comparisons.py | import unittest
import numpy as np
from big_o.complexities import ComplexityClass
class FirstComplexityClass(ComplexityClass):
order = 1
class AltFirstComplexityClass(ComplexityClass):
order = 1
class SecondComplexityClass(ComplexityClass):
order = 2
class TestComplexities(unittest.TestCase):
... | Python | 0.000001 | @@ -12,27 +12,8 @@
test
-%0Aimport numpy as np
%0A%0Afr
@@ -315,30 +315,8 @@
f):%0A
- print('here')%0A
|
8a4f5ccc587873fb0a7826c4046558cee6bdc56b | Change shebang of sirius-lnls-gitall to python-sirius. | bin/sirius-lnls-gitall.py | bin/sirius-lnls-gitall.py | #!/usr/bin/env python3
import os
import siriuspy.envars as _envars
import argparse
import signal
import sys
import subprocess
def stop_now(signum, frame):
print(' - SIGINT received.')
sys.exit(1)
def run_git_clone(args):
def get_all(args):
repos = {}
for org, folder in _envars.org_folde... | Python | 0 | @@ -18,9 +18,15 @@
thon
-3
+-sirius
%0A%0Aim
|
40eda9e5d9cb6647e28d433e37457e4e8c86b9ad | Fix inconsistent docstring and ValueError message | acme/tf/losses/huber.py | acme/tf/losses/huber.py | # python3
# Copyright 2018 DeepMind Technologies Limited. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... | Python | 0.008414 | @@ -1340,17 +1340,16 @@
undary %3C
-=
0.%0A %22%22
@@ -1443,16 +1443,17 @@
ust be %3E
+=
0.%22)%0A%0A
|
71d5fc675f071a37d73bc1db576a8849d3e88f77 | Rename override_css_file | elections_screenshotter/screenshotter.py | elections_screenshotter/screenshotter.py | import datetime
import logging
import subprocess
import time
import util
class Screenshotter(object):
"""
Implements all screenshot-related logic.
"""
def __init__(self, config):
self.config = config
self.screenshot_filenames = []
def take_screenshots(self):
"""
R... | Python | 0.000006 | @@ -2142,22 +2142,24 @@
-depict
+override
_css_fil
@@ -2179,22 +2179,24 @@
ig.get('
-depict
+override
_css_fil
@@ -2210,22 +2210,24 @@
if
-depict
+override
_css_fil
@@ -2265,22 +2265,24 @@
--css',
-depict
+override
_css_fil
|
b21c2e6f783a97f2dabe9e9cfbe34134f7bad15c | save metadata in scenes | satsearch/main.py | satsearch/main.py | import os
import sys
import json
import logging
from .version import __version__
from satsearch import Search, Scenes
from satsearch.parser import SatUtilsParser
logger = logging.getLogger(__name__)
logging.getLogger('requests').setLevel(logging.CRITICAL)
def main(review=False, printsearch=False, printmd=None, prin... | Python | 0 | @@ -1567,25 +1567,8 @@
pend
-, metadata=search
)%0A%0A
|
c2adfa9e9accfa7ef9c2ff91c8fa23eee5516cf6 | update to upstream core-svn-01-Feb-2014 | src/daemon/core/__init__.py | src/daemon/core/__init__.py | # Copyright (c)2010-2012 the Boeing Company.
# See the LICENSE file included in this distribution.
"""core
Top-level Python package containing CORE components.
See http://cs.itd.nrl.navy.mil/work/core/ and
http://code.google.com/p/coreemu/ for more information on CORE.
Pieces can be imported individually, for examp... | Python | 0 | @@ -171,14 +171,11 @@
p://
-cs.itd
+www
.nrl
@@ -188,18 +188,29 @@
mil/
-work
+itd/ncs/products
/core
-/
and
|
5d4fac1947c6202c6d639f4f8c4fbd9f1a0c6fdc | Fix typo in status variable | cumulus/queue/slurm.py | cumulus/queue/slurm.py | import re
from cumulus.queue.abstract import AbstractQueueAdapter
from cumulus.constants import JobQueueState
class SlurmQueueAdapter(AbstractQueueAdapter):
# CA CANCELLED Job was explicitly cancelled by the user or system
# administrator. The job may or may not have been
... | Python | 0.000171 | @@ -2488,19 +2488,21 @@
-pbs
+slurm
_state =
@@ -2548,27 +2548,29 @@
%0A if
-pbs
+slurm
_state:%0A
@@ -2580,19 +2580,21 @@
if
-pbs
+slurm
_state i
@@ -2683,35 +2683,37 @@
elif
-pbs
+slurm
_state in SlurmQ
@@ -2790,35 +2790,37 @@
elif
-pbs
+slurm
_state in Slu... |
d14cf67db0a8427197ec972239250219c93e280d | add file wrapper to show upload progress bar (closes #119) | solvebio/resource/upload.py | solvebio/resource/upload.py | from __future__ import absolute_import
from .apiresource import DeletableAPIResource
from .apiresource import DownloadableAPIResource
from .apiresource import ListableAPIResource
from .solveobject import convert_to_solve_object
from ..client import client
from ..client import requests
from ..utils.md5sum import md5sum... | Python | 0 | @@ -322,18 +322,888 @@
%0Aimport
-os
+pyprind%0Aimport os%0A%0A%0Aclass UploadFileWrapper(object):%0A %22%22%22%0A Wraps an upload file to monitor read progress.%0A %22%22%22%0A def __init__(self, filename, mode='rb', progress=True):%0A self.filename = filename%0A self.mode = mode%0A ... |
89d7c72e0848f0c94e5923e45624bccfb421a641 | change patch list to group_id in runner | scripts/runner.py | scripts/runner.py | """
Run hugs-pipe on an HSC patch.
"""
import os
import hugs_pipe
def main(tract, patch, config, outdir):
data_id = {'tract': tract, 'patch': patch, 'filter': 'HSC-I'}
hugs_pipe.utils.mkdir_if_needed(outdir)
prefix = os.path.join(outdir, 'hugs-pipe-{}-{}'.format(tract, patch))
if type(config)==str:
... | Python | 0 | @@ -50,25 +50,90 @@
%0Aimport
-hugs_pipe
+numpy as np%0Aimport hugs_pipe%0Ahugs_pipe_io = os.environ.get('HUGS_PIPE_IO')
%0A%0Adef ma
@@ -947,34 +947,31 @@
t('-
-pl
+g
', '--
-patch_list
+group_id
', type=
str,
@@ -966,27 +966,27 @@
', type=
-str
+int
, help='
patch li
@@ -981,18 +981,16 @@
lp='
-patch list
... |
e69ea437de2ae468d1174fa6bc24db28a7742e77 | Fix relative import of nodes | dallinger/processes.py | dallinger/processes.py | """Processes manipulate networks and their parts."""
import random
from nodes import Agent
from nodes import Source
def random_walk(network):
"""Take a random walk from a source.
Start at a node randomly selected from those that receive input from a
source. At each step, transmit to a randomly-selected... | Python | 0.000027 | @@ -63,24 +63,25 @@
andom%0A%0Afrom
+.
nodes import
@@ -92,16 +92,17 @@
nt%0Afrom
+.
nodes im
|
a5948048673d391aaff6e1c2ad362e9aa74736e8 | Update study_arch_tool.py | study_arch_tool.py | study_arch_tool.py | """This module allows you to create studyarch file through python.
Use class StudyArchive to create a studyarch object and add the content into it.
Then save the file to the appointed location.
Example:
::
from stduy_archive_tool import StudyArchive
arch = StudyArchive(path_to_save)
group ... | Python | 0 | @@ -2522,24 +2522,48 @@
ative_path =
+ os.path.join(directory,
os.path.spl
@@ -2573,16 +2573,17 @@
path)%5B1%5D
+)
%0A
|
7b2adddc368618b6ea035eb93e2b48f612f4cb00 | Remove comment | suasimageparser.py | suasimageparser.py | from SUASImageParser import ImageParser
from options import parseOptions
from options import getOption
import cv2
# ------------------------ Creating option parser -------------------------
parseOptions()
# ------------------------ Loading image & parsing ------------------------
my_parser = ImageParser(mode="ADL... | Python | 0 | @@ -375,34 +375,8 @@
e%22))
-#'images/targets_400.JPG')
%0A%0A%0A#
|
9fbb5c45a77193047c831433e6b18278e1cdf90d | fix typo | summpy/mcp_summ.py | summpy/mcp_summ.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import getopt
import codecs
import collections
import pulp
from . import tools
def summarize(text, char_limit, sentence_filter=None, debug=False):
'''
select sentences in terms of maximum coverage problem
Args:
text: text to be summarized (... | Python | 0.998806 | @@ -3157,19 +3157,20 @@
ng = opt
-oin
+ions
%5B'-e'%5D i
|
71b6af52b1d26b1c6c366758c369ac2e35ee0636 | update the kth | data_providers/utils.py | data_providers/utils.py | from .data import DataProvider
def get_data_provider_by_name(name, train_params):
"""Return required data provider class"""
if name == 'UCF101':
return DataProvider(**train_params)
if name == 'MERL':
return DataProvider(**train_params)
else:
print("Sorry, data provider for `%s` ... | Python | 0 | @@ -254,24 +254,90 @@
ain_params)%0A
+ if name == 'KTH':%0A return DataProvider(**train_params)%0A
else:%0A
|
d71284dec713f46ae9e6e9c7cf90517cd6ad3e60 | bump version | synspy/__init__.py | synspy/__init__.py |
#
# Copyright 2015 University of Southern California
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
#
#import analyze
#import viewer
__version__ = "20171206.0"
| Python | 0 | @@ -182,9 +182,9 @@
7120
-6
+7
.0%22%0A
|
175eddaeb322d9897329d5985582af55abc98a07 | Fix load_vowel | data_util.py | data_util.py | from sklearn.cross_validation import train_test_split
from sklearn.preprocessing import Imputer
import numpy as np
_breast_cancer_path = 'datasets/wisconsin/breast-cancer-wisconsin.data'
_vowel_path = 'datasets/vowel/vowel.train'
_vowel_test_path = 'datasets/vowel/vowel.test'
def _is_nan(string):
if string is no... | Python | 0.000002 | @@ -2266,16 +2266,23 @@
t()%0A
+return
(train%5B0
|
fc6bf6f2dec61a002d2f2ac2144a4b06c05a5cd3 | Use inclusive query to avoid non-queryset haystack objects | serrano/resources/field/base.py | serrano/resources/field/base.py | import functools
import logging
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from preserialize.serialize import serialize
from restlib2.http import codes
from restlib2.params import Parametizer, param_cleaners
from avocado.models import DataField
from avocado.events import usage
fro... | Python | 0.000007 | @@ -5844,93 +5844,32 @@
-# Remove any orphaned fields before preparing the response%0A orphans = %5Bo
+pks = %5B%5D%0A
for o
+bj
in
@@ -5875,19 +5875,36 @@
objects
- if
+:%0A if not
is_fiel
@@ -5919,10 +5919,12 @@
ed(o
-)%5D
+bj):
%0A
@@ -5932,69 +5932,16 @@
-orphan_pk... |
6425471dae9e042c335f93e9f7ca9b2abd47ae04 | Fix callable (2nd) | aore/miscutils/bottlecl.py | aore/miscutils/bottlecl.py | # -*- coding: utf-8 -*-
from bottle import Bottle
class BottleCL(object):
def __init__(self):
self._app = Bottle()
self.init_routes()
def __call__(self, *args):
self._app(*args)
def init_routes(self):
pass
def add_route(self, route_path, handler):
self._app.... | Python | 0 | @@ -178,39 +178,84 @@
lf,
-*args):%0A self._app(*args
+environ, start_response):%0A self._app.__call__(environ, start_response
)%0A%0A
|
ecc77bd83db761b14c97e66f6d148f5a3afaccca | fix type check | feagen/tools/feagen_runner.py | feagen/tools/feagen_runner.py | from os.path import basename, splitext, join
import sys
import argparse
from importlib import import_module
import yaml
from mkdir_p import mkdir_p
from feagen.data_generator import draw_dag
from ..bundling import flatten_structure, bundle_data
def feagen_run_with_configs(global_config, bundle_config, dag_output_pa... | Python | 0.000001 | @@ -100,16 +100,35 @@
t_module
+%0Aimport collections
%0A%0Aimport
@@ -436,20 +436,35 @@
config (
-dict
+collections.Mapping
): globa
@@ -503,32 +503,65 @@
r_class: string%0A
+ data_bundles_dir: string%0A
generato
@@ -570,20 +570,35 @@
kwargs:
-dict
+collections.Mapping
%0A%0A bu
@@ -610,20 +... |
3123f01f28c68634f3993d40c7c71c4c617c0885 | Add support for tab order specification to QtView extra. | enthought/traits/ui/qt4/extra/qt_view.py | enthought/traits/ui/qt4/extra/qt_view.py | #------------------------------------------------------------------------------
# Copyright (c) 2009, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions describe... | Python | 0 | @@ -91,18 +91,18 @@
t (c) 20
-09
+11
, Enthou
@@ -504,25 +504,8 @@
son%0A
-# Date: 07/21/09%0A
#---
@@ -693,19 +693,136 @@
%0A%0A#
-ETS imports
+Standard library imports.%0Aimport logging%0A%0A# System library imports.%0Afrom enthought.qt import QtGui%0A%0A# Enthought library imports.
%0Afro
@@ -855,17 +855,23 @... |
e4d0d2c7919fd6adb63f8e3180b994cc2a3ec0d4 | Fix focus bug + general cleanup in SearchEditor. | enthought/traits/ui/qt4/search_editor.py | enthought/traits/ui/qt4/search_editor.py | #-------------------------------------------------------------------------------
#
# Copyright (c) 2009, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions ... | Python | 0 | @@ -74,18 +74,16 @@
-------%0A
-#%0A
# Copyr
@@ -94,17 +94,18 @@
(c) 200
-9
+11
, Enthou
@@ -516,30 +516,8 @@
son%0A
-# Date: 06/25/09%0A#%0A
#---
@@ -1030,335 +1030,43 @@
sc)%0A
-%0A def paintEvent(self, event):%0A %22%22%22 Overloads the QLineEdit paintEvent handler. Sets the default text if%0A ... |
1ff4dab34d4aa6935d4d1b54aa354882790b9b44 | Add config items for server, timeout | astroquery/astrometry_net/__init__.py | astroquery/astrometry_net/__init__.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
<Put Your Tool Name Here>
-------------------------
:author: <your name> (<your email>)
"""
# Make the URL of the server, timeout and other items configurable
# See <http://docs.astropy.org/en/latest/config/index.html#developer-usage>
# for docs and... | Python | 0 | @@ -410,16 +410,17 @@
config%0A%0A
+%0A
class Co
@@ -606,18 +606,209 @@
y.%22%0A
-
)%0A
+ server = _config.ConfigItem('http://nova.astrometry.net', 'Name of server')%0A timeout = _config.ConfigItem(60,%0A 'Default timeout for connecting to server')%0A%0A
%0Acon
|
4a5fc15593e2a3acd6928d41989bcdccad77e69b | add word2vec test script | src/tools/gen-word2vec-data.py | src/tools/gen-word2vec-data.py | import sys
import random
def gen_one_record(num_feas):
feas = []
target = random.random()
for i in xrange(random.randint(6, num_feas)):
id = random.randint(0, 300)
feas.append("%d" % id)
return " ".join(feas)
def gen_data(num):
for i in xrange(num):
line = gen_one_reco... | Python | 0.000001 | @@ -384,10 +384,11 @@
ata(1000
+0
)%0A
|
c7d3702f832fe2c624d51e600fd4e9186cc1a6a9 | Fix #1: relative redirects | src/http1.py | src/http1.py | # encoding=UTF-8
"""
Module to perform HTTP requests. To do so:
import http
response = http.request('www.google.com')
print 'Status: %s (%s)' % (response.status, response.message)
print 'Headers: %s' % response.headers
print 'Body: %s' % response.body.strip()
"""
import urllib
import httplib
import urlpa... | Python | 0.000013 | @@ -4861,16 +4861,38 @@
cation =
+ urlparse.urljoin(url,
_respon
@@ -4913,16 +4913,17 @@
cation'%5D
+)
%0A
|
bfbc58922efe00a21daa82900c9306419c65a94f | add a (failing) test for _protected variables in fabfiles | prototypes/fabfile.py | prototypes/fabfile.py |
def test_local_failures():
local('false 1', fail='ignore')
local('false 2', fail='warn')
local('echo must print')
local('false 3') # default fail is abort
local('echo must NOT print')
def test_remote_failures(**kwargs):
set(fab_hosts = ['127.0.0.1', 'localhost'])
exc = run
if 'sudo' in... | Python | 0.000001 | @@ -2220,12 +2220,123 @@
nd done.%22)%0A%0A
+_protected = %22Yes!%22%0Adef test_protected_names():%0A print %22Do we have access to _protected names?%22, _protected%0A
|
6e53e1262bec0823bd393158e19d9e94a61f37f2 | Version 0.4 | wordpress2puput/__init__.py | wordpress2puput/__init__.py | # -*- coding: utf-8 -*-
__author__ = 'David Valera'
__email__ = 'david.valera.martinez@gmail.com'
__version__ = '0.3'
| Python | 0.000001 | @@ -112,7 +112,7 @@
'0.
-3
+4
'%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.