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 |
|---|---|---|---|---|---|---|---|
077119989abb6b176c6b77ae8f4e1003769152b2 | Fix #2 - wrong exception handling | django_smoke_tests/management/commands/smoke_tests.py | django_smoke_tests/management/commands/smoke_tests.py | import argparse
import os
from django.core.management import BaseCommand, CommandParser
from django.core.management.base import CommandError
from ...generator import SmokeTestsGenerator
class Command(BaseCommand):
help = "Smoke tests for Django endpoints."
def create_parser(self, prog_name, subcommand):
... | Python | 0.000001 | @@ -829,32 +829,99 @@
parse.SUPPRESS)%0A
+ parser.add_argument('--traceback', help=argparse.SUPPRESS)%0A
self.add
|
443e1fab3c79ccf6a40bf01393fe4dad399926d2 | add tags to local item | pystash/common.py | pystash/common.py | # -*- coding: utf-8 -*-
import os
import sys
import shelve
import abc
import time
from clint.textui import colored
def output(message, color='white', text_only=False):
if text_only:
return str(getattr(colored, color)(message))
else:
sys.stdout.write(str(getattr(colored, color)(message)))
... | Python | 0 | @@ -6024,16 +6024,32 @@
.time())
+, 'tags' : tags
%7D%0A
|
b47143d38027a7bafc73376de01bd2fa2196ac60 | Add test for file interface in put_attachment | couchdb/tests/client.py | couchdb/tests/client.py | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import doctest
import os
import unittest
from couchdb import client
class DatabaseTestCase(unittest.Te... | Python | 0.000001 | @@ -248,16 +248,32 @@
unittest
+%0Aimport StringIO
%0A%0Afrom c
@@ -2495,16 +2495,903 @@
ents'))%0A
+ %0A def test_attachment_crud_with_files(self):%0A doc = %7B'bar': 42%7D%0A self.db%5B'foo'%5D = doc%0A old_rev = doc%5B'_rev'%5D%0A f = StringIO.StringIO('Foo bar baz')%0A ... |
2dcfccd75c49a4f375d49a52bff5d33cd971e8b6 | Update install.py | frappe/utils/install.py | frappe/utils/install.py | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import getpass
def before_install():
frappe.reload_doc("core", "doctype", "docfield")
frappe.reload_doc("core", "doctype", "docperm")
frappe.reload_doc("core", ... | Python | 0.000001 | @@ -1557,37 +1557,255 @@
'doctype': %22
-Email Account
+Domain%22, %22domain_name%22:%22example.com%22, %22email_id%22: %22account@example.com%22, %22password%22: %22pass%22, %22email_server%22: %22imap.example.com%22,%22use_imap%22: 1, %22smtp_server%22: %22smtp.example.com%22%7D,%0A%09%09%7B'doctype': %22Email Accou... |
43f67a09d0e194ef3012bad97e0cb45db7c34d35 | test travis | binding.gyp | binding.gyp | {
"targets": [
{
"target_name": "addon",
"sources": [
"src/addon.cc",
"src/object.cc",
"src/async.cc",
"src/engine.cc",
"src/results.cc"
],
#"cflags": [ "-Werror", "-Wall", "-Wextra", "-Wpedantic", "-Wunused-parameter", "-funroll-loops", "-Ofast" ],#targets all... | Python | 0.000002 | @@ -545,16 +545,30 @@
%22-O2%22,
+%22-std=gnu++14%22
%5D,%0A
@@ -633,24 +633,8 @@
-O3%22
-, %22-std=gnu++1y%22
%5D,%0A
|
4d0d8862b6741e6a34eb28eeb8d4f6e8861903e8 | Print sensible message if trying to load lattice without cothread. | pytac/load_csv.py | pytac/load_csv.py | """Module to load the elements of the machine from multiple csv files stored in the same directory."""
import os
import csv
from pytac import lattice, element, device, units, utils
import collections
def get_div_rigidity(energy):
rigidity = utils.rigidity(energy)
def div_rigidity(input):
return input ... | Python | 0 | @@ -96,16 +96,65 @@
ory.%22%22%22%0A
+from __future__ import print_function%0Aimport sys%0A
import o
@@ -2756,24 +2756,37 @@
ts.%0A %22%22%22%0A
+ try:%0A
if contr
@@ -2812,16 +2812,20 @@
+
+
# Don't
@@ -2884,16 +2884,20 @@
+
# instal
@@ -2923,16 +2923,20 @@
+ ... |
ff9822c7776cdef1e14e80a2cc56700bbc4f24f2 | Fix Mac OS build warnings on old node versions | binding.gyp | binding.gyp | {
"targets": [
{
"target_name": "anitomy-js",
"sources": [
"lib/anitomy/anitomy/anitomy.cpp",
"lib/anitomy/anitomy/anitomy.h",
"lib/anitomy/anitomy/element.cpp",
"lib/anitomy/anitomy/element.h",
"lib/anit... | Python | 0 | @@ -1187,109 +1187,310 @@
%22
-OTHER_CFLAGS%22: %5B%0A %22-mmacosx-version-min=10.7%22,%0A %22-stdlib=libc++
+CLANG_CXX_LANGUAGE_STANDARD%22: %22c++14%22,%0A %22CLANG_CXX_LIBRARY%22: %22libc++%22,%0A %22MACOSX_DEPLOYMENT_TARGET%22: %2210.9%22,%0A ... |
19d6e96a7039f6959cc9f47ba75c2972136893a5 | Update config for email handling | app/config.py | app/config.py | #!/usr/bin/python
import json
import sys
import argparse
import os
from celery.schedules import crontab
def parse_args(): # pragma: no cover
parser = argparse.ArgumentParser()
parser.add_argument("-e", "--env", default="development", help="environment")
return parser.parse_args()
def output(stmt): #... | Python | 0.000001 | @@ -2767,16 +2767,70 @@
T = 400%0A
+ EMAIL_RESTRICT = os.environ.get('EMAIL_RESTRICT')%0A
%0A%0Aclass
@@ -3113,32 +3113,52 @@
GOOGLE_STORE'))%0A
+ EMAIL_LIMIT = 3%0A
%0A%0Aclass Preview(
@@ -3360,16 +3360,16 @@
eview')%0A
-
STOR
@@ -3425,16 +3425,36 @@
TORE'))%0A
+ EMAIL_LIMIT = 3%0A
%0A%0Aclass
|
961e595cdbed8dc88c14ae55dc4671c0b7c23031 | debug print | src/main/python/service_manager/util/services.py | src/main/python/service_manager/util/services.py | import json
import logging
import os
import subprocess
from collections import defaultdict
from service_manager.util.log_handler import print_red_bold
REPO_URL = 'repository_url'
REPOSITORY_NAME = 'repository'
REPOSITORY_URL = 'repository_url'
DESCRIPTION = 'description'
ROLE = 'role'
APPLICATION = 'application'
FQN... | Python | 0.000003 | @@ -4521,24 +4521,71 @@
run=False):%0A
+ print_red_bold(u%22%5Ct %7B%7D%22.format(str(args)))%0A
if dry_r
|
a57e38233679bf6d95dad533d87ce1c69c00cc26 | Include process name | docker-memusage.py | docker-memusage.py | #!/usr/bin/env python
from collections import OrderedDict
from pprint import pprint
import os.path
import re
import sys
def parse_mem_file(filename):
data = OrderedDict()
with open(filename, 'rb') as f:
for line in f:
splittage = line.split(':')
data[splittage[0]] = splittage[1... | Python | 0.000002 | @@ -55,34 +55,8 @@
ict%0A
-from pprint import pprint%0A
impo
@@ -80,19 +80,8 @@
re%0A
-import sys%0A
%0A%0Ade
@@ -795,32 +795,64 @@
e%0A%0A try:%0A
+ name = data%5B'name'%5D%0A
pid2
@@ -861,19 +861,27 @@
age%5B
+(
pid
+, name)
%5D = int(
re_m
@@ -876,16 +876,33 @@
%5D = int(
+%... |
57b707b7f7e7076f8c1f84e57ba3a3db45135340 | Fix compilations for macos mountain lion | binding.gyp | binding.gyp | {
"targets": [
{
"target_name": "protobuf_for_node",
"include_dirs": ["protobuf/src"],
"dependencies": ["protobuf/protobuf.gyp:protobuf_full_do_not_use"],
"sources": [
"protobuf_for_node.cc", "addon.cc"
]
}
]
}
| Python | 0.000006 | @@ -215,16 +215,187 @@
don.cc%22%0A
+%09%09%09%5D,%0A%09%09%09'conditions': %5B%0A%09%09%09%09%5B%0A%09%09%09%09%09'OS ==%22mac%22',%7B%0A%09%09%09%09%09%09'xcode_settings':%7B%0A%09%09%09%09%09%09 'OTHER_CFLAGS' : %5B%0A%09%09%09%09%09%09%09'-mmacosx-version-min=10.7'%0A%09%09%09%09%09%09 %5D%0A%09%09%09%09%09%09%7... |
644fbef7030f0685be7dd056606ab23daaefdc72 | Fix typo in error message variable | app/gitlab.py | app/gitlab.py | from __future__ import absolute_import
from __future__ import unicode_literals
from .webhooks import WebHook
from werkzeug.exceptions import BadRequest, NotImplemented
EVENTS = {
'Push Hook': 'push',
'Tag Push Hook': 'tag_push',
'Issue Hook': 'issue',
'Note Hook': 'note',
'Merge Request Hook': 'me... | Python | 0.000178 | @@ -709,17 +709,17 @@
s' %25 git
-h
+l
ab_heade
|
893b9947ef8d884ff67c84a60ea2c251b408a6d0 | update build_db.py script | build_db.py | build_db.py | import json
import os
import sqlite3
WEEKDAYS = 0x1
SATURDAY = 0x2
SUNDAY = 0x3
def setup(conn):
cursor = conn.cursor()
cursor.execute(
'''
CREATE TABLE IF NOT EXISTS visit
(
stop_num text,
visit_day_type integer,
route_num integer,
ho... | Python | 0.000001 | @@ -457,16 +457,202 @@
um);')%0A%0A
+ cursor.execute(%0A 'CREATE TABLE %22android_metadata%22 (%22locale%22 TEXT DEFAULT %22en_US%22);'%0A )%0A cursor.execute(%0A 'INSERT INTO %22android_metadata%22 VALUES (%22en_US%22)'%0A )%0A%0A
%0Adef dum
@@ -1302,17 +1302,17 @@
db = '
-A
+a
ssets/tr... |
7f01aa6deaa9a13ca388fb4c84849bce53d34d5f | Make sure C++11 is used under Mac OS | binding.gyp | binding.gyp | {
"targets": [{
"target_name": "mmap-io",
"sources": [ "src/mmap-io.cc" ],
"include_dirs": [
"<!(node -e \"require('nan')\")"
],
"cflags_cc": [
"-std=c++11"
]
}]
}
| Python | 0 | @@ -218,16 +218,339 @@
=c++11%22%0A
+ %5D,%0A %22conditions%22: %5B%0A %5B 'OS==%22mac%22',%0A %7B %22xcode_settings%22: %7B%0A 'OTHER_CPLUSPLUSFLAGS' : %5B'-std=c++11','-stdlib=libc++'%5D,%0A 'OTHER_LDFLAGS': %5B'-stdlib=libc++'%5D,%0A ... |
6b6948b4dcf7400eefcfb2a499c0180d03052550 | Remove unnecessary string formatting | sympy/matrices/expressions/dotproduct.py | sympy/matrices/expressions/dotproduct.py | from __future__ import print_function, division
from sympy.core import Basic
from sympy.core.sympify import _sympify
from sympy.matrices.expressions.transpose import transpose
from sympy.matrices.expressions.matexpr import MatrixExpr
class DotProduct(MatrixExpr):
"""
Dot Product of vector matrices
""... | Python | 0.005099 | @@ -496,28 +496,16 @@
matrix%22
- %25 str(arg1)
)%0A
@@ -603,20 +603,8 @@
rix%22
- %25 str(arg2)
)%0A
@@ -705,28 +705,16 @@
vector%22
- %25 str(arg1)
)%0A
@@ -815,20 +815,8 @@
tor%22
- %25 str(arg1)
)%0A%0A
|
a6dff532d75d0a63c59db0cbf800587845d587a1 | add compiler flag | binding.gyp | binding.gyp | {
"targets": [
{
"target_name": "addon",
"sources": [
"src/addon.cc",
"src/object.cc",
"src/async.cc",
"src/engine.cc",
"src/results.cc"
],
"cflags": [ "-O2", "-Wendif-labels", "-Werror", "-Wpedantic", "-Wunused-parameter", "-finline-functions", "-funswitch-lo... | Python | 0.000002 | @@ -429,16 +429,34 @@
ial-pre%22
+, %22-fipa-cp-clone%22
%5D,%0A%0A
|
5e2ef9885a65d61edcdffaef9e4f8a960bef567e | Refactor CAS tests. | fridge/test/test_cas.py | fridge/test/test_cas.py | import pytest
from fridge.cas import ContentAddressableStorage
from fridge.memoryfs import MemoryFS
class TestContentAddressableStorage(object):
def create_cas(self, fs=None, path='cas'):
if fs is None:
fs = MemoryFS()
return ContentAddressableStorage(path, fs)
def has_root_prope... | Python | 0 | @@ -73,182 +73,205 @@
dge.
-memoryfs import MemoryFS%0A%0A%0Aclass TestContentAddressableStorage(object):%0A def create_cas(self, fs=None, path='cas'):%0A if fs is None:%0A fs = MemoryFS()%0A
+fstest import (%0A assert_file_content_equal, assert_open_raises, write_file)%0Afrom fridge.memory... |
167101baa4d57d22bc6a40d7ff8afd3688e23580 | fix ControlText focusout bug | pyforms/gui/Controls/ControlText.py | pyforms/gui/Controls/ControlText.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
@author: Ricardo Ribeiro
@credits: Ricardo Ribeiro
@license: MIT
@version: 0.0
@maintainer: Ricardo Ribeiro
@email: ricardojvr@gmail.com
@status: Development
@lastEditedBy: Carlos Mão de Ferro (carlos.maodeferro@neuro.fchampalimaud.org)
'''
from pyforms.gui.Controls.Contro... | Python | 0 | @@ -891,44 +891,8 @@
)%0A%09%09
-self.form.lineEdit.focusNextChild()%0A
%0A%09##
|
22cf663731bc556ef625695ab3213e87432ed4f9 | fix docs link | pyvex/__init__.py | pyvex/__init__.py | """
PyVEX provides an interface that translates binary code into the VEX intermediate represenation (IR).
For an introduction to VEX, take a look here: https://docs.angr.io/docs/ir.html
"""
__version__ = (8, 19, 4, 5)
if bytes is str:
raise Exception("This module is designed for python 3 only. Please install an o... | Python | 0 | @@ -170,20 +170,26 @@
.io/
-docs/ir.html
+advanced-topics/ir
%0A%22%22%22
|
d9a034e74bf03a5a9837201d2e358d51e759f112 | add dc_aware_policy | binding.gyp | binding.gyp | {
"targets": [
{
"target_name": "cassandra-native",
"sources": [
"cpp-driver/src/address.cpp",
"cpp-driver/src/auth.cpp",
"cpp-driver/src/auth_requests.cpp",
"cpp-driver/src/auth_responses.cpp",
"cpp-driver/src/batch_request.cpp",
"cpp-driver/src/buffer.... | Python | 0.000039 | @@ -621,32 +621,78 @@
onnection.cpp%22,%0A
+ %22cpp-driver/src/dc_aware_policy.cpp%22,%0A
%22cpp-dri
|
fb53f764a82dd8e6d1992c4c254e90c185fd9c53 | Change socket type in nova.utils.get_my_ip() to SOCK_DGRAM. This way, we don't actually have to set up a connection. Also, change the destination host to an IP (chose one of Google's DNS's at random) rather than a hostname, so we avoid doing a DNS lookup. | nova/utils.py | nova/utils.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | Python | 0 | @@ -4800,12 +4800,11 @@
OCK_
-STRE
+DGR
AM)%0A
@@ -4831,22 +4831,15 @@
t(('
-www.google.com
+8.8.8.8
', 8
|
73b66a32763b7efe36612db7f3a3b4566d8e44a2 | set uid=197610(OIdiot) gid=197610 groups=197610 as primary_key instead of | app/models.py | app/models.py | from django.db import models
# Create your models here.
class Person(models.Model):
student_number = models.CharField(verbose_name = '学号', max_length = 12, unique = True, primary_key = True)
name = models.CharField(verbose_name = '姓名', max_length = 10)
pinyin = models.CharField(verbose_name = '拼音', max_length = 2... | Python | 0.000001 | @@ -80,16 +80,95 @@
Model):%0A
+%09id = models.AutoField(verbose_name = '%E7%B4%A2%E5%BC%95', primary_key = True, unique = True)%0A
%09student
@@ -244,28 +244,8 @@
ue =
- True, primary_key =
Tru
|
68170652d104873ea4fa210daaedb05ba9bf3b44 | Wrong syntax | config/gunicorn_conf.py | config/gunicorn_conf.py | import os
import psutil
import math
GIGS_OF_MEMORY = psutil.virtual_memory().total/1024/1024/1024.
NUM_CPUS = psutil.cpu_count()
bind = "0.0.0.0:8000"
pidfile = "/srv/newsblur/logs/gunicorn.pid"
logfile = "/srv/newsblur/logs/production.log"
accesslog = "/srv/newsblur/logs/production.log"
errorlog = "/srv/newsblur/log... | Python | 0.930983 | @@ -542,16 +542,17 @@
r =
+%22
/dev/shm
%0A%0Aif
@@ -547,16 +547,17 @@
/dev/shm
+%22
%0A%0Aif GIG
|
c908db488f3e1d7aab0993780b38baaf4c995eb1 | add docstrings | Lib/fontelemetry/datastructures/source.py | Lib/fontelemetry/datastructures/source.py | # Copyright 2019 Fontelemetry Authors and Contributors
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or... | Python | 0 | @@ -746,69 +746,1194 @@
-def __init__(self, source_object, path=None, source_id=None):
+%22%22%22A source specification specific object that holds source data.%0A%0A The Source object is instantiated with an external library object that%0A is instantiated on source read and used to manipulate source file da... |
decbdb176121830dbaffe5db0596b0567be57a76 | Make char parser public and document module better | npc/parser.py | npc/parser.py | """
Parse character files into Character objects
"""
import re
import itertools
from os import path, walk
from .util import Character
def get_characters(search_paths=None, ignore_paths=None):
"""
Get data from character files
Normalizes the ignore paths with os.path.normpath.
Args:
search_pa... | Python | 0 | @@ -41,16 +41,146 @@
objects
+%0A%0AThe main entry point is get_characters, which creates a list of characters. To%0Aparse a single file, use parse_character instead.
%0A%22%22%22%0A%0Aim
@@ -594,33 +594,46 @@
racters
-containing
+generated from every
parse
-d
+able
charact
@@ -639,19 +639,80 @@
ter
-informa... |
0e913b3fc20e69a6ff77bafcc144e00175f8ed83 | Put new classes to submodule level import | indra/assemblers/english/__init__.py | indra/assemblers/english/__init__.py | from .assembler import EnglishAssembler
| Python | 0.000001 | @@ -32,9 +32,48 @@
ssembler
+, AgentWithCoordinates, SentenceBuilder
%0A
|
6566ef14ff19640c238ba935ff21643d554b4654 | Fix breakage when celery is running | indico/core/celery/__init__.py | indico/core/celery/__init__.py | # This file is part of Indico.
# Copyright (C) 2002 - 2018 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | Python | 0.000172 | @@ -3036,16 +3036,40 @@
+else:%0A return%0A
return
-(
'war
@@ -3081,25 +3081,24 @@
, text, True
-)
%0A%0A%0A@celery.p
|
a8e3a0b7896403d5d9de9edf147693befc90493d | Use SSL. | securelayer/views.py | securelayer/views.py | # -*- coding: utf-8 -*-
# (c) 2010-2011 Ruslan Popov <ruslan.popov@gmail.com>
from django.conf import settings
from django import forms
from django.http import Http404
from django.utils import simplejson
from django.utils.translation import ugettext_lazy as _
from django.shortcuts import redirect
from securelayer.htt... | Python | 0 | @@ -973,16 +973,25 @@
YER_PORT
+, 'https'
)%0A if
@@ -1848,16 +1848,17 @@
': 'http
+s
://%25s:%25s
|
36608c6bd0035e4a78da2cd30d9fcca2c660ec3a | Add prepare in rpc client | common/numeter/queue/client.py | common/numeter/queue/client.py | from oslo import messaging
from oslo.config import cfg
import logging
LOG = logging.getLogger(__name__)
class BaseAPIClient(messaging.RPCClient):
def __init__(self, transport):
target = messaging.Target(topic='default_topic')
super(BaseAPIClient, self).__init__(transport, target)
def ping(sel... | Python | 0 | @@ -670,29 +670,41 @@
-args%5B'topic'%5D =
+cctxt = self.prepare(topic=
topic
+)
%0A
@@ -715,20 +715,21 @@
return
-self
+cctxt
.cast(co
|
bead9f9051ca1ca9b1823547732e847dd86e1ea1 | Add verbose | pysteps/advection/semilagrangian.py | pysteps/advection/semilagrangian.py | """Implementation of the semi-Lagrangian method of Germann et al (2002).
"""
import numpy as np
import scipy.ndimage.interpolation as ip
def extrapolate(R, V, num_timesteps, outval=np.nan, **kwargs):
"""Apply semi-Lagrangian extrapolation to a two-dimensional precipitation
field.
Parameters
----... | Python | 0.999999 | @@ -130,16 +130,28 @@
on as ip
+%0Aimport time
%0A%0Adef ex
@@ -2031,16 +2031,71 @@
efaults%0A
+ verbose = kwargs.get(%22verbose%22, False)%0A
D_pr
@@ -2311,24 +2311,144 @@
False)%0A %0A
+ if verbose:%0A print(%22Computing the advection with the semi-lagrangian scheme.%22)%0A ... |
34a811429e2025f396f8997aeb628253487537fb | Change Sparser call pattern along with actual exec | indra/sources/sparser/sparser_api.py | indra/sources/sparser/sparser_api.py | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import os
import logging
import subprocess
import xml.etree.ElementTree as ET
from indra.util import UnicodeXMLTreeBuilder as UTB
from .processor import SparserProcessor
logger = logging.getLogger('sparser')
sparse... | Python | 0 | @@ -107,16 +107,28 @@
port os%0A
+import json%0A
import l
@@ -269,16 +269,41 @@
Sparser
+XMLProcessor, SparserJSON
Processo
@@ -1131,16 +1131,88 @@
format)%0A
+ sparser_exec_path = os.path.join(sparser_path, 'save-semantics.sh')%0A
subp
@@ -1228,24 +1228,29 @@
ll(%5Bsparser_
+exec_
path, format
@@ -1358... |
9271eea8191a5be0fd74d9b3be72acf1f3d6a213 | Store challenge, signature as str/unicode for JSON serialization | crossbar/router/auth.py | crossbar/router/auth.py | #####################################################################################
#
# Copyright (C) Tavendo GmbH
#
# Unless a separate license agreement exists between you and Tavendo GmbH (e.g. you
# have purchased a commercial license), the license terms below apply.
#
# Should you enter into a separate licen... | Python | 0 | @@ -3361,42 +3361,8 @@
%7D%0A%0A
- # challenge must be bytes%0A
@@ -3431,23 +3431,8 @@
lse)
-.encode('utf8')
%0A
@@ -3492,16 +3492,47 @@
hallenge
+.encode('utf8')).decode('ascii'
)%0A%0A%0Aclas
|
a9365aa4a32fbe358a6f74b5730a7a3a0a8b3cda | Convert journal to pickled extra | qualia/journal.py | qualia/journal.py | import datetime
import sqlite3
class Journal:
def __init__(self, filename):
self.db = sqlite3.connect(
filename,
detect_types = sqlite3.PARSE_DECLTYPES
)
self.upgrade_if_needed()
self.f = open(filename, 'ab')
def upgrade_if_needed(self):
version = self.db.execute('PRAGMA user_version').fetchone()[0]... | Python | 0.999999 | @@ -1,22 +1,50 @@
import
-datetim
+base64%0Aimport datetime%0Aimport pickl
e%0Aimport
@@ -857,73 +857,28 @@
op,
-(b'%5Ct'.join(str(arg).encode('unicode-escape') for arg in
+pickle.dumps(
args)))
-)
%0A%09%09s
|
ce6e67890b5860d89e9c3ea6628a7a94ad9e10b3 | Update Default_Settings.py | components/Default_Settings.py | components/Default_Settings.py | #Sequences of actual rotors used in WWII, format is name, sequences, turnover notch(es)
rotor_sequences = {
'I': ('EKMFLGDQVZNTOWYHXUSPAIBRCJ', ('Q')),
'II': ('AJDKSIRUXBLHWTMCQGZNPYFVOE', ('E')),
'III': ('BDFHJLCPRTXVZNYEIWGAKMUSQO', ('V')),
'IV': ('ESOVPZJAYQUIRHXLNFTGKDCMWB', ('J')),
'V': ('VZ... | Python | 0.000001 | @@ -1368,16 +1368,17 @@
'QWERTZ
+U
IOPASDFG
|
6ddbfbf4f4ccd0350e6066ef30967489f1e504d0 | Allow for <RESIDUAL> to be present in markdown | python/MooseDocs/tree/app_syntax.py | python/MooseDocs/tree/app_syntax.py | #pylint: disable=missing-docstring
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/... | Python | 0.000003 | @@ -2995,16 +2995,55 @@
UAL%3E'):%0A
+ node.alias = node.fullpath%0A
|
64bd44d4338d57a68ff07527d1d2c3b37960c63b | call parent filter, cleanup | web/impact/impact/v1/views/mentor_program_office_hour_list_view.py | web/impact/impact/v1/views/mentor_program_office_hour_list_view.py | # MIT License
# Copyright (c) 2019 MassChallenge, Inc.
from django.db.models import Value as V
from django.db.models.functions import Concat
from impact.v1.views.base_list_view import BaseListView
from impact.v1.helpers import (
MentorProgramOfficeHourHelper,
)
ID_FIELDS = ['mentor_id', 'finalist_id']
NAME_FIELDS... | Python | 0 | @@ -502,32 +502,64 @@
lter(self, qs):%0A
+ qs = super().filter(qs)%0A
if not s
@@ -2080,19 +2080,21 @@
-key
+field
in self
@@ -2126,19 +2126,21 @@
s() for
-key
+field
in fiel
|
30e2ab7568dc00b9a8617c87269310691c19ed95 | variable-length fields are initialized with a width of None | serial/core/_util.py | serial/core/_util.py | """ Private utility functions.
"""
from collections import namedtuple
Field = namedtuple("Field", ("name", "pos", "dtype", "width"))
def field_type(name, pos, dtype):
""" Create a Field tuple.
"""
try:
pos = slice(*pos)
width = pos.stop - pos.start
except TypeError: # pos is an... | Python | 0.998252 | @@ -242,16 +242,100 @@
e(*pos)%0A
+ except TypeError: # pos is an int%0A width = 1%0A else:%0A try:%0A
@@ -363,24 +363,28 @@
s.start%0A
+
+
except TypeE
@@ -388,38 +388,119 @@
peError: #
-pos is an int%0A
+stop is None%0A # Variable-width field; width is deter... |
d50b47cfe7df1a0c526189521b39625466615fcc | Add log indexes | radar/radar/models/logs.py | radar/radar/models/logs.py | from datetime import datetime
from sqlalchemy import event, DDL, Column, Integer, DateTime, String, text, Index
from sqlalchemy.dialects import postgresql
from sqlalchemy.orm import relationship
from radar.database import db
class Log(db.Model):
__tablename__ = 'logs'
id = Column(Integer, primary_key=True)... | Python | 0.000002 | @@ -736,16 +736,119 @@
er_id)%0A%0A
+Index('logs_user_date_idx', Log.user_id, Log.date)%0AIndex('logs_user_type_idx', Log.user_id, Log.type)%0A%0A
Index('l
|
abb00ac993154071776488b5dcaef32cc2982f4c | Fix broken functional tests on windows | test/functional/master/test_endpoints.py | test/functional/master/test_endpoints.py | import os
import yaml
from test.framework.functional.base_functional_test_case import BaseFunctionalTestCase
from test.functional.job_configs import BASIC_JOB
class TestMasterEndpoints(BaseFunctionalTestCase):
def _start_master_only_and_post_a_new_job(self):
master = self.cluster.start_master()
... | Python | 0.000002 | @@ -3,16 +3,33 @@
port os%0A
+import tempfile%0A%0A
import y
@@ -32,16 +32,16 @@
rt yaml%0A
-
%0Afrom te
@@ -224,16 +224,120 @@
Case):%0A%0A
+ def setUp(self):%0A super().setUp()%0A self._project_dir = tempfile.TemporaryDirectory()%0A%0A
def
@@ -618,14 +618,30 @@
y':
-'/tmp'
+self._project... |
b90d9ce7745aeef2d8d562d19a8cd6836b40eaa6 | Fix handling partof closure in expand families | indra/tools/expand_families.py | indra/tools/expand_families.py | from __future__ import print_function, unicode_literals, absolute_import
from builtins import dict, str
import logging
import itertools
from copy import deepcopy
from indra.preassembler.hierarchy_manager import HierarchyManager, \
hierarchies as default_hierarchies
from indra.databases import hgnc_client
from indra... | Python | 0 | @@ -4521,18 +4521,16 @@
complex
-es
in self
@@ -4557,60 +4557,10 @@
sure
-.items()
:%0A
- for complex in complexes:%0A
@@ -4621,36 +4621,32 @@
%5B%5D)%0A
-
complex_subunits
@@ -4662,20 +4662,16 @@
ubunit)%0A
-
|
bde7322df85371c67fefe7169c2b6efb5e7717f6 | Update rasa/cli/arguments/test.py | rasa/cli/arguments/test.py | rasa/cli/arguments/test.py | import argparse
from typing import Union
from rasa.constants import DEFAULT_MODELS_PATH, DEFAULT_CONFIG_PATH
from rasa.cli.arguments.default_arguments import (
add_stories_param,
add_model_param,
add_nlu_data_param,
add_endpoint_param,
)
from rasa.model import get_latest_model
def set_test_arguments... | Python | 0 | @@ -2034,17 +2034,16 @@
e from a
-n
URL and
|
2a243c893ac8a4ddadd98f6fbb4ef5628a6d7607 | Support single-ended slices on Tries | dispatch/util/trie.py | dispatch/util/trie.py | from ..constructs import Instruction
class Trie(object):
BUCKET_LEN = 1
BUCKET_MASK = (2**BUCKET_LEN)-1
def __init__(self):
self.children = [None for _ in range(2**Trie.BUCKET_LEN)]
self.value = None
def __setitem__(self, key, value):
assert type(value) == Instruction
... | Python | 0 | @@ -1024,16 +1024,283 @@
slice:%0A
+ start = item.start%0A stop = item.stop%0A if start is None:%0A start = 0%0A if stop is None:%0A # 128 bits max address. Seems big enough for practical purposes%0A stop = 0xFFFFFFFFFFFFFFFF%0A
... |
3d878557a5e2d4f39474b1ca3df8af9012fd4303 | Make the MpaDesignation optional for an MPA; Allows adding undesignated mpas. | lingcod/mpa/models.py | lingcod/mpa/models.py | from django.contrib.gis.db import models
from django.contrib.auth.models import User, Group
from django.conf import settings
from lingcod.common.utils import LookAtKml
from lingcod.manipulators.manipulators import *
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import gener... | Python | 0.000006 | @@ -3725,16 +3725,39 @@
ignation
+, blank=True, null=True
)%0A%0A o
|
8d4c7c94dba6708758732d74228e1337bd9f0b83 | raise version number | yam/__init__.py | yam/__init__.py | __version__ = '0.2.1'
from yam.main import run
from yam.commands import read_dicts | Python | 0.000006 | @@ -16,9 +16,13 @@
0.2.
-1
+2-dev
'%0A%0Af
|
ce6a23206271f4e9a0dfd54e7a2663789d5237de | update test | accelerator_abstract/tests/test_startup_progress.py | accelerator_abstract/tests/test_startup_progress.py | from django.test import TestCase
from accelerator.tests.factories import (
BusinessPropositionFactory,
StartupFactory
)
from accelerator.models import BusinessProposition
from accelerator_abstract.models.base_startup import (
APPLICATION_READY,
PROFILE_COMPLETE,
)
from accelerator_abstract.models impor... | Python | 0 | @@ -1658,31 +1658,41 @@
ef test_
-startup_profile
+profile_application_field
_complet
@@ -1717,17 +1717,16 @@
complete
-_
(self):%0A
@@ -1948,33 +1948,32 @@
tone'%5D,
-APPLICATION_READY
+PROFILE_COMPLETE
)%0A
@@ -2033,35 +2033,36 @@
self.assert
-Tru
+Fals
e(progress%5B'prof
|
3ea84302368818133b045d56a0c8c798872eedd1 | Add default logger and log exception | influxdb_metrics/middleware.py | influxdb_metrics/middleware.py | """Middlewares for the influxdb_metrics app."""
from django import VERSION as DJANGO_VERSION
import inspect
import time
try:
from urllib import parse
except ImportError:
import urlparse as parse
from django.conf import settings
try:
from django.utils.deprecation import MiddlewareMixin
except ImportError:
... | Python | 0 | @@ -114,16 +114,31 @@
rt time%0A
+import logging%0A
try:%0A
@@ -690,16 +690,54 @@
icated%0A%0A
+logger = logging.getLogger(__name__)%0A%0A
%0Aclass I
@@ -3992,20 +3992,80 @@
-pass
+logger.exception(err, extra=%7B%22request%22: request%7D)%0A
# sadl
|
5aa1ebc3ab10eb2bce9410d4997944a411a4bac4 | Make the test case SourceManagerTestCase.display_source_python stronger by also matching the source line number displayed. | test/source-manager/TestSourceManager.py | test/source-manager/TestSourceManager.py | """
Test lldb core component: SourceManager.
Test cases:
o test_display_source_python:
Test display of source using the SBSourceManager API.
o test_modify_source_file_while_debugging:
Test the caching mechanism of the source manager.
"""
import unittest2
import lldb
from lldbtest import *
class SourceManagerTes... | Python | 0.999996 | @@ -2469,16 +2469,19 @@
rns = %5B'
+%25d
=%3E.*Hell
@@ -2488,16 +2488,28 @@
o world'
+ %25 self.line
%5D)
|
71d0f02e1274829a302cdd6f716f2fc0680cce49 | Update fab.py | ydcommon/fab.py | ydcommon/fab.py | from fabric.api import local, sudo, run
from fabric.operations import prompt
from fabric.colors import red
from fabric.contrib.console import confirm
def get_branch_name(on_local=True):
cmd = "git branch --no-color 2> /dev/null | sed -e '/^[^*]/d'"
if on_local:
name = local(cmd, capture=True).replace(... | Python | 0 | @@ -2302,55 +2302,37 @@
to
-replace your
+checkout %25s ?' %25
local
-
+_
branch
- with server version?'
), d
|
95aa4c210c735bd9ac74a65cdbef418d99beb319 | Bump to v0.2.0 | sii/__init__.py | sii/__init__.py | # -*- coding: utf-8 -*-
__LIBRARY_VERSION__ = '0.1.0alpha'
__SII_VERSION__ = '0.7'
| Python | 0.000001 | @@ -47,16 +47,11 @@
'0.
-1
+2
.0
-alpha
'%0A__
|
bf71ea3e0f84d0e8317429e41b45dfe2e157d8a9 | fix import | test/unit_test/test_general_functions.py | test/unit_test/test_general_functions.py | from lexos.helpers.general_functions import get_encoding, make_preview_from, \
generate_d3_object, merge_list, load_stastic, matrix_to_dict, \
dict_to_matrix, html_escape, apply_function_exclude_tags, decode_bytes
from test.helpers.file_path import CHINESE_ENCODING_TEST_FILE
class TestGeneralFunctions:
de... | Python | 0.000001 | @@ -219,70 +219,8 @@
tes%0A
-from test.helpers.file_path import CHINESE_ENCODING_TEST_FILE%0A
%0A%0Acl
|
c273fa5ba0ae43cc5979f1076349edf737a67710 | Add reserved words to custom data field validation | corehq/apps/custom_data_fields/models.py | corehq/apps/custom_data_fields/models.py | from dimagi.ext.couchdbkit import (Document, StringProperty,
BooleanProperty, SchemaListProperty, StringListProperty)
from dimagi.ext.jsonobject import JsonObject
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext as _
from .dbaccessors import *
CUSTOM_DATA_FIELD_PRE... | Python | 0 | @@ -461,17 +461,17 @@
IELDS =
-%5B
+(
%22commtra
@@ -486,17 +486,18 @@
y-point%22
-%5D
+,)
%0ASYSTEM_
@@ -516,16 +516,91 @@
mmcare%22%0A
+RESERVED_WORDS = ('name', 'type', 'owner_id', 'external_id', 'hq_user_id')%0A
%0A%0Adef _v
@@ -622,24 +622,45 @@
d_words(slug
+, words=SYSTEM_FIELDS
):%0A if sl
@@ -665,2... |
510e04dfd68eeca2e940487eeca9e7474e7f2383 | Fix methodcheck.py for the new API documentation style (split into subsections) | linode/methodcheck.py | linode/methodcheck.py | #!/usr/bin/python
"""
A quick script to verify that api.py is in sync with Linode's
published list of methods.
Copyright (c) 2010 Josh Wright <jshwright@gmail.com>
Copyright (c) 2009 Ryan Tucker <rtucker@gmail.com>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and assoc... | Python | 0 | @@ -1243,452 +1243,881 @@
%22%0A%0A#
- URL of API documentation%0Aapidocurl = 'http://www.linode.com/api/autodoc.cfm'%0A%0Aimport api%0Aimport re%0Aimport urllib%0A%0Atmpfile, httpheaders = urllib.urlretrieve(apidocurl)%0Atmpfd = open(tmpfile)%0A%0Alocal_methods = api.Api.valid_commands()%0Aremote_methods = %5B%5D%0A%... |
e0521c1f9a12819fd89f12aed01c623628dc4c4d | Build options added. | intexration/propertyhandler.py | intexration/propertyhandler.py | import configparser
import os
class Build:
def __init__(self, name, idx, bib):
self._name = name
self._idx = idx
self._bib = bib
def get_name(self):
return self._name
def get_idx(self):
return self._idx
def get_bib(self):
return self._bib
def get... | Python | 0 | @@ -800,33 +800,303 @@
i
-dx = build_name + '.idx'%0A
+f parser.has_option(build_name, 'idx'):%0A idx = parser%5Bbuild_name%5D%5B'idx'%5D%0A else:%0A idx = build_name + '.idx'%0A if parser.has_option(build_name, 'bib'):%0A bib = ... |
3a3fe2687fb65a99a799e9cb3c63f00223f4b92b | Update models.py | simit/models.py | simit/models.py | from django.db import models
from django.utils.translation import ugettext as _
from mptt.fields import TreeForeignKey
from mptt.models import MPTTModel
from simit.helper import load_url_pattern_names
from tinymce.models import HTMLField
from django.conf import settings
from django.utils.functional import lazy
from dja... | Python | 0 | @@ -2745,16 +2745,17 @@
elf.slug
+,
))%0A
|
53055e47d14fd5905673941aa45ef9fe383eb885 | Version for pypi. | inovonics/cloud/oauth/__version__.py | inovonics/cloud/oauth/__version__.py | #!/usr/bin/env python3
__version__ = '0.1.0.7'
| Python | 0 | @@ -41,7 +41,7 @@
1.0.
-7
+8
'%0A
|
e6885fd2260dc9399f5ea2f835cbf65294d18a8d | make competiable with postgres new version 8.3 | addons/report_analytic_line/report_analytic_line.py | addons/report_analytic_line/report_analytic_line.py | ##############################################################################
#
# Copyright (c) 2004-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# $Id: sale.py 1005 2005-07-25 08:41:42Z nicoe $
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole respons... | Python | 0 | @@ -2335,43 +2335,37 @@
NCT(
-SUBSTRING(l.date for 7))%7C%7C'-'%7C%7C'01'
+to_char(l.date,'YYYY-MM-DD'))
AS
@@ -3065,28 +3065,33 @@
-SUBSTRING(date for 7
+to_char(date,'YYYY-MM-DD'
), p
|
5d36e7d939b89a59dcb68002c244ac6684cb94c4 | Fix access to assoc params | sydent/threepid/bind.py | sydent/threepid/bind.py | # -*- coding: utf-8 -*-
# Copyright 2014 OpenMarket Ltd
# Copyright 2018 New Vector Ltd
#
# 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
#
#... | Python | 0 | @@ -4355,30 +4355,22 @@
soc.
-extra_fields%5B
+get(
%22invite
-%22%5D
+s%22)
:%0A
@@ -4510,30 +4510,36 @@
ssoc
-.
+%5B%22
medium
+%22%5D
, assoc
-.
+%5B%22
address
+%22%5D
)%0A
@@ -4693,16 +4693,16 @@
xid, e,%0A
+
@@ -4716,17 +4716,16 @@
)%0A%0A
-%0A
def
|
602aa1ecdf74847b27d6cce0d91e8d2be721671d | clean up a bit of the at commands with newer conventions and more complete commands | ardrone/at.py | ardrone/at.py | import socket
import struct
import ardrone.constant
def f2i(f):
"""Interpret IEEE-754 floating-point value as signed integer.
Arguments:
f -- floating point value
"""
return struct.unpack('i', struct.pack('f', f))[0]
def ref(host, seq, takeoff, emergency=False):
"""
Basic behaviour of th... | Python | 0.000001 | @@ -563,25 +563,25 @@
:%0A p
-+
+%7C
= 0b10000000
@@ -611,17 +611,17 @@
p
-+
+%7C
= 0b0100
@@ -2549,16 +2549,25 @@
m1 --
+ Integer:
front l
@@ -2592,13 +2592,21 @@
--
-frigh
+Integer: fron
t ri
@@ -2626,16 +2626,25 @@
m3 --
+ Integer:
back ri
@@ -2664,16 +2664,25 @@
m4 --
+ Intege... |
9069c2678b68571406458f7414c7b0474183090b | Fix check for dictionary entry | lit/Suite/lldbtest.py | lit/Suite/lldbtest.py | from __future__ import absolute_import
import os
import subprocess
import sys
import lit.Test
import lit.TestRunner
import lit.util
from lit.formats.base import TestFormat
def getBuildDir(cmd):
found = False
for arg in cmd:
if found:
return arg
if arg == '--build-dir':
... | Python | 0 | @@ -2188,56 +2188,58 @@
if
-test.config.environment%5B'DYLD_INSERT_LIBRARIES'%5D
+'DYLD_INSERT_LIBRARIES' in test.config.environment
and
|
f27dc9d2793bb555d80a5c8e6635ba246278d017 | Add DES support | simplecrypto.py | simplecrypto.py | import hashlib
import math
import base64
from Crypto.Cipher import DES, AES
from Crypto import Random
random_instance = Random.new()
algorithms = {'aes': AES, 'des': DES}
def sha1(message):
return hashlib.sha1(message).hexdigest()
def md5(message):
return hashlib.md5(message).hexdigest()
def sha256(message... | Python | 0 | @@ -24,21 +24,47 @@
ath%0A
-import base64
+from base64 import b64encode, b64decode
%0Afro
@@ -498,23 +498,16 @@
return
-base64.
b64encod
@@ -561,15 +561,8 @@
urn
-base64.
b64d
@@ -573,24 +573,48 @@
e(message)%0A%0A
+base64 = str_to_base64%0A%0A
def pad(mess
@@ -1681,28 +1681,192 @@
t(message, password, 'aes... |
1bd814df2c5175ac7745b2d58fbe6b82c5a941ae | add 'debug' hack | sts/util/console.py | sts/util/console.py | BEGIN = '\033[1;'
END = '\033[1;m'
class color(object):
GRAY, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, CRIMSON = map(lambda num : BEGIN + str(num) + "m", range(30, 39))
B_GRAY, B_RED, B_GREEN, B_YELLOW, B_BLUE, B_MAGENTA, B_CYAN, B_WHITE, B_CRIMSON = map(lambda num: BEGIN + str(num) + "m", range(40, 49))
... | Python | 0.000001 | @@ -1060,22 +1060,19 @@
:%0A
-return
+s =
msg.glo
@@ -1123,14 +1123,11 @@
-return
+s =
raw
@@ -1142,16 +1142,90 @@
rompt)%0A%0A
+ if s == %22debug%22:%0A import pdb%0A pdb.set_trace()%0A return s%0A%0A
@stati
|
4987412578744db64984cb40841994b3852287f7 | update evalrunner | pytools/src/IndexEval/evalrunner.py | pytools/src/IndexEval/evalrunner.py | '''
Created on 04.11.2015
@author: selen00r
'''
import datetime
from pymongo.mongo_client import MongoClient
import evalresult
class EvalRunner(object):
'''
Base class to run an evaluation of an index.
'''
def __init__(self):
'''
Constructor
'''
... | Python | 0 | @@ -359,19 +359,19 @@
self.idx
-Dax
+ATX
@@ -374,18 +374,18 @@
= %22
-d
a
+t
x%22%0D%0A
@@ -396,20 +396,20 @@
self.idx
-MDax
+CAC
@@ -415,12 +415,11 @@
= %22
-mdax
+cac
%22%0D%0A
@@ -433,22 +433,22 @@
self.idx
-Tec
Dax
+
=
@@ -452,11 +452,8 @@
= %22
-tec
dax%22
@@ ... |
5ba73b9dd92b55b3f02f76ae981e53744abac750 | Add an option to time SQL statements | sir/__main__.py | sir/__main__.py | # Copyright (c) 2014 Wieland Hoffmann
# License: MIT, see LICENSE for details
import argparse
import logging
import multiprocessing
from . import config
from .indexing import reindex
from .schema import SCHEMA
from sqlalchemy import exc as sa_exc
logger = logging.getLogger("sir")
def watch(args):
raise NotImp... | Python | 0.000014 | @@ -768,24 +768,85 @@
tore_true%22)%0A
+ parser.add_argument(%22--sqltimings%22, action=%22store_true%22)%0A
subparse
@@ -1392,79 +1392,8 @@
ug:%0A
- logging.getLogger(%22sqlalchemy.engine%22).setLevel(logging.DEBUG)%0A
@@ -1475,16 +1475,986 @@
g.INFO)%0A
+%0A if args.sqltimings:%0A fr... |
dde133a9ae751ce3caab8e8896c1e04e48c0cc1e | fix typo | qiita_pet/handlers/base_handlers.py | qiita_pet/handlers/base_handlers.py | from tornado.web import RequestHandler
class BaseHandler(RequestHandler):
def get_current_user(self):
'''Overrides default method of returning user curently connected'''
user = self.get_secure_cookie("user")
if user is None:
self.clear_cookie("user")
return None
... | Python | 0.999991 | @@ -1214,16 +1214,17 @@
oper res
+p
onse for
|
2850768bcc18dd8628211ad72af4c9de5df13ad9 | Increase job watcher cancel button width. (#3708) | qiskit/tools/jupyter/job_widgets.py | qiskit/tools/jupyter/job_widgets.py | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | Python | 0 | @@ -2449,17 +2449,17 @@
px 0px 3
-5
+7
px'))%0A
@@ -3880,17 +3880,17 @@
width='3
-0
+2
px',%0A
|
5763cb2f95b731933263f0dd38fbffff6f71147c | Add default_diff and timeout to plugin | tests/examples/examples_report_plugin.py | tests/examples/examples_report_plugin.py | from __future__ import absolute_import
import pytest
import jinja2
import os
import re
import sys
from os.path import join, dirname
from py.xml import html
from ..constants import __version__
from ..utils import write, green
from .utils import no_ext, human_bytes
PY3 = sys.version_info[0] == 3
def pytest_addopti... | Python | 0 | @@ -187,16 +187,47 @@
ersion__
+, default_diff, default_timeout
%0Afrom ..
|
6fbb50fcb851d0387d44dbaca361cc63f1dbbe79 | Add get_db_query method. | loldb/v2/resources.py | loldb/v2/resources.py | import collections
import os
import re
import sqlite3
import raf
def _get_highest_version(versions):
versions = [(v, v.split('.')) for v in versions]
def version_converter(version):
try:
parts = map(int, version[1])
except ValueError:
return None
else:
... | Python | 0 | @@ -2262,24 +2262,25 @@
_db_
-rows
+query
(self,
-table
+query
):%0A
@@ -2328,21 +2328,21 @@
atabase
-table
+query
.%22%22%22%0A
@@ -2503,36 +2503,13 @@
ute(
-%22SELECT * FROM %60%25s%60%22 %25 table
+query
)%0A%0A
@@ -2718,16 +2718,16 @@
s(*row)%0A
-
@@ -2741,16 +2741,174 @@
ld row%0A%0A
+ ... |
3968a526dea052008b608004b9bde8ee7d55309c | Fix type in FileFields | django_afip/models.py | django_afip/models.py | from django.db import models
class GenericAfipType(models.Model):
code = models.CharField(max_length=3)
description = models.CharField(max_length=250)
valid_from = models.DateField()
valid_to = models.DateField()
class Meta:
abstract = True
class ReceiptType(GenericAfipType):
pass
... | Python | 0.000001 | @@ -627,35 +627,34 @@
key = models.Fi
+l
e
-ld
Field(%0A n
@@ -696,19 +696,18 @@
odels.Fi
+l
e
-ld
Field(%0A
|
b2ec61003a7df4ebc46d40a3d72e262440c5008d | version 1.1.0 | django_th/__init__.py | django_th/__init__.py | VERSION = (1, 0, 0) # PEP 386
__version__ = ".".join([str(x) for x in VERSION])
default_app_config = 'django_th.apps.DjangoThConfig'
| Python | 0.000002 | @@ -7,17 +7,17 @@
N = (1,
-0
+1
, 0) #
|
45ab8a3585008cc4ad31eb553b9291f4e1a65c01 | Update C++ version, #190 | binding.gyp | binding.gyp | {
"variables": {
"os_linux_compiler%": "gcc",
"use_vl32%": "false",
"use_fixed_size%": "false",
"use_posix_semaphores%": "false"
},
"targets": [
{
"target_name": "node-lmdb",
"win_delay_load_hook": "false",
"sources": [
"dependencies/lmdb/libraries/liblmdb/mdb... | Python | 0 | @@ -1327,10 +1327,10 @@
=c++
-0x
+14
%22%0A
@@ -1593,33 +1593,33 @@
S%22 : %5B%22-std=c++1
-1
+4
%22%5D,%0A
@@ -1694,17 +1694,17 @@
std=c++1
-1
+4
%22%5D,%0A
|
9c950c73bdc518c35aa471834431222c7c60ea4b | update binding.gyp | binding.gyp | binding.gyp | {
"targets": [
{
"target_name": "ons",
"sources": [
"src/entry.cpp",
"src/ons_options.cpp",
"src/consumer_ack.cpp",
"src/consumer.cpp",
"src/producer.cpp",
"src/consumer_listener.cpp"
... | Python | 0 | @@ -308,16 +308,65 @@
ner.cpp%22
+,%0A %22src/third_party/sole/sole.cpp%22
%0A
@@ -447,16 +447,56 @@
clude%22,%0A
+ %22src/third_party/sole%22,%0A
|
f0f3a7ab0b285f447f0573ff537e6252a8752528 | Use pkg-build in binding.gyp | binding.gyp | binding.gyp | {
"targets": [
{
"target_name": "tiff-multipage",
"sources": [
"src/module.cc",
"src/sync.cc",
"src/async.cc",
"src/tiff_multipage.cc"
],
"include_dirs": ["<!(node -e \"require('nan')\")"],
... | Python | 0 | @@ -272,16 +272,33 @@
dirs%22: %5B
+%0A
%22%3C!(node
@@ -321,16 +321,104 @@
an')%5C%22)%22
+,%0A %22%3C!@(pkg-config libtiff-4 --cflags-only-I %7C sed s/-I//g)%22%0A
%5D,%0A
@@ -463,16 +463,68 @@
%22-ltiff%22
+,%0A %22%3C!@(pkg-config --libs libtiff-4)... |
c34f040ba19c27277d6cc9a1ad46e4c8d668e77b | Apply -DNDEBUG globally on release builds | binding.gyp | binding.gyp | {
"target_defaults": {
"target_conditions": [
["OS != 'win'", {
"cflags": ["-fdata-sections", "-ffunction-sections", "-fvisibility=hidden"],
"ldflags": ["-Wl,--gc-sections"]
}],
["OS == 'mac'", {
"xcode_settings": {
"MACOSX_DEPLOYMENT_TARGET": "10.9",
}
... | Python | 0 | @@ -318,24 +318,144 @@
%7D%0A %7D%5D%0A
+ %5D,%0A %22target_configurations%22: %5B%0A %5B%7B%0A %22Release%22: %7B%0A %22defines+%22: %5B%22NDEBUG%22%5D%0A %7D%0A %7D%5D%0A
%5D%0A %7D,%0A
@@ -1563,73 +1563,8 @@
%5D%0A
- %7D,%0A %22Release%22: %7B%0A ... |
b0dea361dfb27e537c0165dac69e71c20f33e883 | Add helpers to bindings.gyp | binding.gyp | binding.gyp | {
'targets': [
{
'target_name': 'jsaudio',
'sources': ['src/jsaudio.cc'],
'include_dirs': [
'<!(node -e "require(\'nan\')")',
'<(module_root_dir)/vendor/'
],
"conditions": [
[
'OS=="win"', {
"conditions": [
[
'target_arch=="ia32"', {
... | Python | 0.000001 | @@ -76,16 +76,34 @@
udio.cc'
+, 'src/helpers.cc'
%5D,%0A '
|
7e5cafed3908f829bb8ff334a7d8f6ebb939a7cc | fix test import for python3 | d4s2_api/dukeds_auth.py | d4s2_api/dukeds_auth.py | from gcb_web_auth.dukeds_auth import DukeDSTokenAuthentication
from gcb_web_auth.backends.dukeds import DukeDSAuthBackend
from gcb_web_auth.backends.base import BaseBackend
from models import DukeDSUser
class D4S2DukeDSTokenAuthentication(DukeDSTokenAuthentication):
"""
Extends authorization to save users to ... | Python | 0.000001 | @@ -171,16 +171,17 @@
nd%0Afrom
+.
models i
|
5f8f93a366c7f1007a67849346eb094630ab15fb | Change different rounding date to March instead of April | custom/icds_reports/reports/incentive.py | custom/icds_reports/reports/incentive.py | from __future__ import unicode_literals, absolute_import, division
from custom.icds_reports.models.views import AWWIncentiveReportMonthly
from custom.icds_reports.utils import india_now, DATA_NOT_ENTERED
class IncentiveReport(object):
def __init__(self, location, month, aggregation_level):
self.location... | Python | 0.000024 | @@ -2495,9 +2495,9 @@
h %3C
-4
+3
):%0A
|
a9104e7529eb75454aaaa2ea29b8ebe40ee7bbd0 | Add documentation to sloppy_interleave function | tensorflow/contrib/data/python/ops/sloppy_ops.py | tensorflow/contrib/data/python/ops/sloppy_ops.py | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Python | 0.000001 | @@ -4213,16 +4213,324 @@
stead.%0A%0A
+ Example usage:%0A%0A %60%60%60python%0A # Preprocess 4 files concurrently.%0A filenames = tf.data.Dataset.list_files(%22/path/to/data/train*.tfrecords%22)%0A dataset = filenames.apply(%0A tf.contrib.data.sloppy_interleave(%0A lambda filename: tf.data.TFRecordD... |
efe41c344873454223e952e8edc3886c3aa77b78 | Fix compatibility issue - ecdsa Curve is not hashable. (#261) | jose/backends/ecdsa_backend.py | jose/backends/ecdsa_backend.py | import hashlib
import ecdsa
from jose.backends.base import Key
from jose.constants import ALGORITHMS
from jose.exceptions import JWKError
from jose.utils import base64_to_long, long_to_base64
class ECDSAECKey(Key):
"""
Performs signing and verification operations using
ECDSA and the specified hash funct... | Python | 0 | @@ -667,24 +667,176 @@
T521p,%0A %7D
+%0A CURVE_NAMES = (%0A (ecdsa.curves.NIST256p, %22P-256%22),%0A (ecdsa.curves.NIST384p, %22P-384%22),%0A (ecdsa.curves.NIST521p, %22P-521%22),%0A )
%0A%0A def __
@@ -4081,17 +4081,16 @@
red_key%0A
-%0A
@@ -4095,17 +4095,20 @@
crv =
... |
7c788c868323aa8c6237caab208d726c5cce24ac | address first time new user condition where user_id may be none | cis/user.py | cis/user.py | """First class object to represent a user and data about that user."""
import logging
from cis.settings import get_config
logger = logging.getLogger(__name__)
class Profile(object):
def __init__(self, boto_session=None, profile_data=None):
"""
:param boto_session: The boto session object from t... | Python | 0.000009 | @@ -1056,16 +1056,54 @@
r_id')%7D%0A
+%0A if user_key is not None:%0A
@@ -1156,16 +1156,59 @@
er_key)%0A
+ else:%0A response = None%0A%0A
|
81833470d1eb831e27e9e34712b983efbc38a735 | Convert entire table to cartesian | solar_neighbourhood/prepare_data_add_kinematics.py | solar_neighbourhood/prepare_data_add_kinematics.py | """
Add very large RV errors for stars with no known RVs.
Convert to cartesian.
"""
import numpy as np
import sys
sys.path.insert(0, '..')
from chronostar import tabletool
from astropy.table import Table
datafile = Table.read('../data/ScoCen_box_result.fits')
d = tabletool.read(datafile)
# Set missing radial velocit... | Python | 0.999999 | @@ -259,25 +259,21 @@
s')%0Ad =
-t
+T
able
-tool
.read(da
|
452ceaa37bd070704d6acb276fdf9e4f0a9b3c56 | Add logging to platform for debugging | setupext/platform.py | setupext/platform.py | # -*- coding: utf-8 -*-
# *****************************************************************************
#
# 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/l... | Python | 0.000001 | @@ -847,16 +847,37 @@
ysconfig
+%0Aimport distutils.log
%0A%0A# This
@@ -1620,13 +1620,26 @@
-print
+distutils.log.info
(%22Fo
@@ -1765,32 +1765,37 @@
-warnings
+distutils.log
.warn('Falli
@@ -1848,16 +1848,21 @@
ovided'%0A
+
@@ -2075,35 +2075,148 @@
-if sys.platform == 'wi... |
0700e25b4dce989fcfc6ee367c7516578c8aaf5b | Update heartbeat in idle times | lava_scheduler_daemon/service.py | lava_scheduler_daemon/service.py | # Copyright (C) 2013 Linaro Limited
#
# Author: Senthil Kumaran <senthil.kumaran@linaro.org>
#
# This file is part of LAVA Scheduler.
#
# LAVA Scheduler is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License version 3 as
# published by the Free Software Fou... | Python | 0.000003 | @@ -1476,210 +1476,8 @@
f):%0A
- self.logger.debug(%22Refreshing jobs%22)%0A return self.source.getJobList().addCallback(%0A self._startJobs).addErrback(catchall_errback(self.logger))%0A%0A def _startJobs(self, jobs):%0A
@@ -1506,16 +1506,16 @@
artbeat%0A
+
@@ -1671,16 +167... |
5874429ac469f18067243bb6f35a0c27bf4a1a2f | Fix error in ajax item | aukro/core.py | aukro/core.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import Blueprint, jsonify, render_template, request, url_for
from aukro import app, db
from aukro.parser import Parser
import re
# create blueprint
core = Blueprint("core", __name__, template_folder="templates")
@core.route("/")
def index():
return rende... | Python | 0.000002 | @@ -2228,34 +2228,13 @@
jax_
-seller_list(id, count=9999
+item(
):%0A
@@ -2277,34 +2277,34 @@
%22)%0A result =
-%5B%5D
+%7B%7D
%0A%0A # init par
@@ -2623,32 +2623,12 @@
ct(%22
-.product.productwide h1
+meta
%5Bite
@@ -2693,37 +2693,29 @@
= el%5B0%5D.
-text_
+get(%22
content
-().strip(
+%22
)%0A%0A ... |
fedb3768539259568555d5a62d503c7995f4b9a2 | Handle orgs that you don’t own personally. | readthedocs/oauth/utils.py | readthedocs/oauth/utils.py | import logging
from .models import GithubProject, GithubOrganization
log = logging.getLogger(__name__)
def make_github_project(user, org, privacy, repo_json):
if (repo_json['private'] is True and privacy == 'private' or
repo_json['private'] is False and privacy == 'public'):
project, created ... | Python | 0 | @@ -368,18 +368,84 @@
-user=
+full_name=repo_json%5B'full_name'%5D,%0A )%0A if project.user !=
user
-,
+:
%0A
@@ -457,25 +457,170 @@
-organization=org,
+log.debug('Not importing %25s because mismatched user' %25 repo_json%5B'name'%5D)%0A return None%0A if project.organi... |
b23415e3f3c34c3911e4e05758a41a81e5882453 | Replace space in "Fraction of Zero Values" with _ because using space is illegal and will be auto replaced. | tensorflow/contrib/slim/python/slim/summaries.py | tensorflow/contrib/slim/python/slim/summaries.py | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Python | 0.000012 | @@ -5223,17 +5223,17 @@
tion
- of
+_of_
Zero
-
+_
Valu
|
40eb7ede3a223ec89c28a43abb8d626027e2dc12 | Fix logging message omission. (#1022) | auslib/log.py | auslib/log.py | import json
import logging
import socket
import sys
import traceback
from flask import request
log_format = "%(asctime)s - %(levelname)s - PID: %(process)s - Request: %(requestid)s - %(name)s.%(funcName)s#%(lineno)s: %(message)s"
class BalrogLogger(logging.Logger):
def makeRecord(self, name, level, fn, lno, msg... | Python | 0.003285 | @@ -4417,19 +4417,18 @@
th(%22%7B%22)
-and
+or
not mes
|
7755c117e354871bbc06c98d0709545cee2032ba | Add versioning managers | share/models/base.py | share/models/base.py | import uuid
import inspect
from django.db import models
from django.conf import settings
from django.db import transaction
from django.db.models.base import ModelBase
from django.db.models.fields.related import lazy_related_operation
from share.models.core import RawData
from share.models.core import ShareUser
clas... | Python | 0 | @@ -686,24 +686,28 @@
eld(auto_now
+_add
=True)%0A%0A
@@ -949,32 +949,69 @@
abstract = True%0A
+ ordering = ('-changed_at', )%0A
%0A%0Aclass ShareFor
@@ -3010,16 +3010,53 @@
module,%0A
+ 'VersionModel': version,%0A
@@ -3198,49 +3198,8 @@
-concrete.VersionModel = version%0A%0A ... |
0ef0e6c1d130dd25ec9dd9618ffcfc9f85913137 | Add dock interface | barpyrus.py | barpyrus.py | import sys
import contextlib
from barpyrus import hlwm
from barpyrus import widgets as W
from barpyrus.core import Theme, Painter
from barpyrus import lemonbar
from barpyrus import conky
@contextlib.contextmanager
def maybe_orange(match, predicate='> 90'):
with cg.if_('match ${%s} %s' % (match, predicate)):
... | Python | 0 | @@ -2037,16 +2037,24 @@
%5B'eth',
+ 'dock',
'wlan',
@@ -2611,16 +2611,26 @@
ace
-==
+in %5B
'eth'
+, 'dock'%5D
:%0A
|
bc4a37e3a93a68fa76c47bd355e1b028f0ca6c60 | fix skynetqa url, add timeout and more graceful error handling | daft/scorebig/action.py | daft/scorebig/action.py | __author__ = 'bkeroack'
import logging
import ec2
import salt.client
import requests
import re
class QualType:
Corp = 0
EC2 = 1
CorpMaster = 'laxqualmaster'
EC2Master = 'qualmaster001'
class QualTypeUnknown(Exception):
pass
class UploadBuildAction:
def __init__(self, **kwargs):
#pa... | Python | 0 | @@ -1070,16 +1070,33 @@
, url))%0A
+ try:%0A
@@ -1116,17 +1116,153 @@
post(url
-)
+, timeout=45)%0A except requests.ConnectionError:%0A return False%0A except requests.Timeout:%0A return False
%0A
@@ -1842,17 +1842,16 @@
-#
url = %22h
@@ -192... |
588fb283cc82be28d3fb28bb6a8896c42d1a7eee | Fix the CONF_LOOP check to use the config (#38890) | homeassistant/components/environment_canada/camera.py | homeassistant/components/environment_canada/camera.py | """Support for the Environment Canada radar imagery."""
import datetime
import logging
from env_canada import ECRadar
import voluptuous as vol
from homeassistant.components.camera import PLATFORM_SCHEMA, Camera
from homeassistant.const import (
ATTR_ATTRIBUTION,
CONF_LATITUDE,
CONF_LONGITUDE,
CONF_NAM... | Python | 0 | @@ -1645,16 +1645,25 @@
devices(
+%0A
%5BECCamer
@@ -1703,16 +1703,35 @@
AME)
+, config%5BCONF_LOOP%5D
)%5D, True
)%0A%0A%0A
@@ -1726,16 +1726,21 @@
)%5D, True
+%0A
)%0A%0A%0Aclas
@@ -1872,16 +1872,25 @@
era_name
+, is_loop
):%0A
@@ -1990,16 +1990,16 @@
_object%0A
-
@@ -2021,32 +202... |
c96cccbe7afc282aedbb316a2e9e41e47e68bcb6 | fix efs lvm create (#610) | chroma-manager/tests/integration/utils/test_blockdevices/test_blockdevice_lvm.py | chroma-manager/tests/integration/utils/test_blockdevices/test_blockdevice_lvm.py | # Copyright (c) 2017 Intel Corporation. All rights reserved.
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
import re
from tests.integration.utils.test_blockdevices.test_blockdevice import TestBlockDevice
class TestBlockDeviceLvm(TestBlockDevice):
_supporte... | Python | 0 | @@ -783,16 +783,70 @@
eturn %5B%0A
+ %22wipefs -a %7B%7D%22.format(self._device_path),%0A
|
64b225f64a26cacff5609d2c2083a4f7f406a2c3 | complete bug fix | lexos/models/similarity_model.py | lexos/models/similarity_model.py | from typing import Optional
import numpy as np
import pandas as pd
from sklearn.metrics.pairwise import cosine_similarity
from lexos.models.base_model import BaseModel
from lexos.helpers.error_messages import NON_NEGATIVE_INDEX_MESSAGE
from lexos.models.matrix_model import MatrixModel
from lexos.receivers.matrix_recei... | Python | 0 | @@ -2531,150 +2531,8 @@
GE%0A%0A
- # get labels%0A labels = %5Bself._id_temp_label_map%5Bfile_id%5D%0A for file_id in self._doc_term_matrix.index.values%5D%0A%0A
@@ -2645,79 +2645,64 @@
get
-an array of file index in file manager files%0A other_file
+index of selected file... |
d0e75c65505713a5f044d67a08e6697c4e332611 | Add djangobower and update static settings | darts/darts/settings.py | darts/darts/settings.py | """
Django settings for darts project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
impo... | Python | 0 | @@ -1000,16 +1000,34 @@
files',%0A
+ 'djangobower'%0A
)%0A%0AMIDDL
@@ -2050,8 +2050,494 @@
tatic/'%0A
+STATIC_ROOT = os.path.join(BASE_DIR, 'static')%0ASTATIC_DIRS = (%0A os.path.join(BASE_DIR, 'assets'),%0A)%0A%0ASTATICFILES_FINDERS = (%0A 'django.contrib.staticfiles.finders.FileSystemFinder',%0A 'djang... |
5273e0fcdf2b7f1b03301cb0834b07da82064b98 | Remove trailing /n | mailproc/vidmaster.py | mailproc/vidmaster.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Zoe vidmaster - https://github.com/rmed/zoe-vidmaster
#
# Copyright (c) 2015 Rafael Medina García <rafamedgar@gmail.com>
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documen... | Python | 0.000017 | @@ -1689,10 +1689,8 @@
r=%25s
-%5Cn
%22 %25
|
a7a1a83bf0f6546b1e985b7c4611b5b83df25853 | Add python's version in breakpad stack traces | breakpad.py | breakpad.py | # 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.
"""Breakpad for Python.
Sends a notification when a process stops on an exception.
It is only enabled when all these conditions are met:
1. hostname ... | Python | 0.000057 | @@ -1840,24 +1840,56 @@
s.getcwd(),%0A
+ 'version': sys.version,%0A
%7D%0A #
|
95d9c3ecd9a8c2aa73fd91ffdf40a55fee541dd3 | Enable flatpages without middleware. | suorganizer/urls.py | suorganizer/urls.py | """suorganizer URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class... | Python | 0 | @@ -687,16 +687,81 @@
rt admin
+%0Afrom django.contrib.flatpages import %5C%0A urls as flatpage_urls
%0A%0Afrom b
@@ -1283,10 +1283,49 @@
urls)),%0A
+ url(r'%5E', include(flatpage_urls)),%0A
%5D%0A
|
411751a10ece8b84bb122422b8d58f22710731aa | Fix typo | relayer/flask/logging_middleware.py | relayer/flask/logging_middleware.py | from datetime import datetime
class LoggingMiddleware(object):
def __init__(self, app, wsgi_app, context, logging_topic):
self.app = app
self.wsgi_app = wsgi_app
self.context = context
self.logging_topic = logging_topic
def __call__(self, environ, start_response):
with... | Python | 0.999999 | @@ -1728,20 +1728,20 @@
'X_F
-orwarded_For
+ORWARDED_FOR
'),%0A
|
e29878f36ed78c8e7acf683029252001daf1e4c4 | Add a description method. | bsd/geom.py | bsd/geom.py | #+
# Copyright 2015 iXsystems, Inc.
# All rights reserved
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted providing that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and t... | Python | 0.000107 | @@ -4197,32 +4197,203 @@
offset').text)%0A%0A
+ @property%0A def description(self):%0A try:%0A d = self.xml.find(%22config/descr%22)%0A return d.text%0A except:%0A return None%0A %0A
@property%0A
|
17eaf5d3d0b3cf6c6fffc4ea70499cd9feeb6723 | Set Logger to UTC | browbeat.py | browbeat.py | #!/usr/bin/env python
# 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 writing, sof... | Python | 0.000012 | @@ -764,16 +764,28 @@
rt yaml%0A
+import time%0A
import d
@@ -3128,24 +3128,63 @@
message)s')%0A
+ _formatter.converter = time.gmtime%0A
_dbg_fil
|
911e961f189967554bc5a046f022bb1c394cc119 | Debug and test before finishing. p50-52 | bruteKey.py | bruteKey.py | #!/usr/bin/env python
import pexpect, optparse, os
from threading import *
maxConnections = 5
connection_lock = BoundSemapohre(value=maxConnections)
Stop = False
Fails = 0
usage = "Example: bruteKey.py -H <target> -u <user name> -d <directory> "
def banner():
print "##### SSH Weak Key Exploit #######"
usage
prin... | Python | 0 | @@ -1173,21 +1173,903 @@
%09parser.
-%0A%0A%0A%0A%0A
+add_option('-H', dest='tgtHost', type='string', help='specify target host')%0A%09parser.add_option('-d', dest='passDir', type='string', help='specify directory with keys')%0A%09parser.add_option('u', dest=user, type='string', help='specify the user')%0A%09(options,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.