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 |
|---|---|---|---|---|---|---|---|
ded8db519b1534d2f2af362dc9da8c8b2d6b4bf0 | Create Default Notebook for All Users | app/auth/views.py | app/auth/views.py | from flask import render_template, redirect, request, url_for, flash
from flask.ext.login import login_user, logout_user, login_required, current_user
from . import auth
from app import db
from ..models import User
from ..email import send_email
from .forms import *
@auth.before_app_request
def before_request():
... | Python | 0 | @@ -1476,24 +1476,136 @@
n.add(user)%0A
+ default_notebook = Notebook(title='Default',author_id=user.id)%0A db.session.add(default_notebook)%0A
db.s
|
58bab9291c85edc3f13d3dc0659eff3c17201eb1 | Improve pixelcnn namings and comments | eva/models/pixelcnn.py | eva/models/pixelcnn.py | from keras.models import Model
from keras.layers import Input, Convolution2D, Activation, Flatten, Dense, Reshape, Lambda
from keras.layers.advanced_activations import PReLU
from keras.engine.topology import merge
from keras.optimizers import Nadam
import keras.backend.tensorflow_backend as K
from eva.layers.residual_... | Python | 0 | @@ -508,16 +508,72 @@
_shape%0A%0A
+ # TODO: Make it scalable to any amount of channels.%0A
inpu
@@ -699,16 +699,35 @@
e='same'
+, name='masked2d_A'
)(input_
@@ -766,15 +766,8 @@
ist(
-model,
filt
@@ -778,16 +778,23 @@
blocks)
+(model)
%0A mod
@@ -943,74 +943,46 @@
1, 1
-)(model)%0A%0A # TODO: M... |
79b258dedda23c9130dda6d4d674f077ac52683e | Add select field for food type | app/main/forms.py | app/main/forms.py | import datetime
from dateutil.parser import parse
from flask.ext.wtf import Form
from wtforms import StringField, TextAreaField, BooleanField, SelectField,\
DateTimeField, SubmitField
from wtforms.validators import Required, Length, Email
from wtforms import ValidationError
from ..models import User, Event, Location
... | Python | 0.000001 | @@ -1083,24 +1083,499 @@
)%0A
-serving = String
+food_types = %5B(%22Fruit%22,%22Fruit%22), (%22Lemonade%22,%22Lemonade%22), (%22Breakfast%22,%22Breakfast%22), (%22Meat%22,%22Meat%22), (%22Sausage%22,%22Sausage%22), (%22Hot dogs%22,%22Hot dogs%22),%0A (%22Burgers%22,%22Burgers%22), (%22Candy%22,%22Candy%22), (%22Ic... |
82394b0312c880402b8dcf28a4c973c2e017e3ff | add featured flag to json repr | proso_subscription/models.py | proso_subscription/models.py | from datetime import datetime
from dateutil.relativedelta import relativedelta
from django.contrib.auth.models import User
from django.db import models
from django.db.models.signals import pre_save
from django.dispatch import receiver
from django.utils.timezone import now
from gopay.enums import PaymentStatus
from gopa... | Python | 0 | @@ -1158,16 +1158,55 @@
f.type,%0A
+ 'featured': self.featured,%0A
|
41b3bfdbaa7540e85d74aa6d248e6214f17fe432 | Converted to Python 3 code using 2to3 command | django-os2webscanner/os2webscanner/migrations/0003_organization_do_notify_all_scans.py | django-os2webscanner/os2webscanner/migrations/0003_organization_do_notify_all_scans.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('os2webscanner', '0002_auto_20160401_0817'),
]
operations = [
migrations.AddField(
model_name='organization',
... | Python | 0.999973 | @@ -21,47 +21,8 @@
-*-%0A
-from __future__ import unicode_literals
%0A%0Afr
|
724fae9315a8dd517ba486804bc82603e89cbc49 | Add comment for dimension label offset | examples/image_test.py | examples/image_test.py | from pylab import *
from pyspecdata import *
import matplotlib.lines as lines
# Generate fake data
t_axis = nddata(r_[0:2:2048j],'t2')
s = exp(1j*2*pi*5*t_axis - t_axis/800e-3 )
s += exp(1j*2*pi*-30*t_axis - t_axis/800e-3)
ph1 = nddata(r_[0:4]/4.,'ph1')
ph2 = nddata(r_[0,2]/4.,'ph2')
# this cannot start at 0 since we ... | Python | 0 | @@ -3194,24 +3194,96 @@
w_for_ticks%0A
+ # following line to create an offset for different dimension labels%0A
label_sp
@@ -4231,59 +4231,8 @@
1%5D%5D%0A
- print(first_axes)%0A print(last_axes)%0A
|
060b124888953d302d8611c459f978ef9201ae96 | update g95 version pattern | numpy/distutils/fcompiler/g95.py | numpy/distutils/fcompiler/g95.py | # http://g95.sourceforge.net/
import os
import sys
from numpy.distutils.cpuinfo import cpu
from numpy.distutils.fcompiler import FCompiler
class G95FCompiler(FCompiler):
compiler_type = 'g95'
version_pattern = r'G95 \((GCC (?P<gccversion>[\d.]+)|.*?) \(g95!\) (?P<version>.*)\).*'
# $ g95 --version
... | Python | 0 | @@ -193,16 +193,17 @@
= 'g95'%0A
+#
vers
@@ -287,17 +287,16 @@
*)%5C).*'%0A
-%0A
# $
@@ -351,16 +351,195 @@
2006)%0A%0A
+ version_pattern = r'G95 %5C((GCC (?P%3Cgccversion%3E%5B%5Cd.%5D+)%7C.*?) %5C(g95 (?P%3Cversion%3E.*)!%5C) (?P%3Cdate%3E.*)%5C).*'%0A # $ g95 --version%0A # G95 (GCC 4.0.3 (g9... |
594da79c98f360331613f786918f08957c39d13c | apply train_hook.gradients() | hypergan/trainers/simultaneous_trainer.py | hypergan/trainers/simultaneous_trainer.py | import tensorflow as tf
import numpy as np
import hyperchamber as hc
import inspect
from hypergan.trainers.base_trainer import BaseTrainer
TINY = 1e-12
class SimultaneousTrainer(BaseTrainer):
""" Steps G and D simultaneously """
def _create(self):
gan = self.gan
config = self.config
... | Python | 0 | @@ -1176,116 +1176,171 @@
-self.gan.gradient_mean = sum(%5Btf.reduce_mean(tf.abs(grad)) for grad in
+for t in self.train_hooks:%0A d_grads, g_grads = t.gradients(d_grads, g_grads)%0A apply_vec = list(zip((
d_grads
-+
+ +
g_grads
-%5D)/len(d_grads+g_grads
+), (d_vars + g_vars))).copy(
)%0A ... |
adfe91d2f6066d8f28aeca9574465be452fcd20e | Correct excel file extension | octoprint_printhistory/export.py | octoprint_printhistory/export.py | # coding=utf-8
__author__ = "Jarek Szczepanski <imrahil@imrahil.com>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2014 Jarek Szczepanski - Released under terms of the AGPLv3 License"
def exportHistoryData(self, exportType):
import f... | Python | 0 | @@ -3618,16 +3618,17 @@
port.xls
+x
%22%0D%0A%0D%0A
|
ee330d0b0092e1a8fe7c25cbe170973647d59baa | enable staff with clearance to create own office hours | web/impact/impact/v1/serializers/office_hours_serializer.py | web/impact/impact/v1/serializers/office_hours_serializer.py | from datetime import timedelta
from rest_framework.serializers import (
ModelSerializer,
ValidationError,
)
from accelerator_abstract.models.base_user_utils import is_employee
from accelerator.models import (
MentorProgramOfficeHour,
UserRole
)
from .location_serializer import LocationSerializer
from ... | Python | 0 | @@ -110,16 +110,100 @@
rror,%0A)%0A
+from accelerator_abstract.models.base_clearance import (%0A CLEARANCE_LEVEL_STAFF%0A)
%0Afrom ac
@@ -535,16 +535,34 @@
('must
+have clearance or
be of ty
@@ -588,18 +588,8 @@
in
-residence
'%0A
@@ -603,16 +603,26 @@
'
+residence
in an ac
@@ -1354,24 +1354,... |
430810f64cc274490027d0843b67f8ceee79db52 | Fix typo (#14802) | erpnext/hr/doctype/employee_advance/employee_advance.py | erpnext/hr/doctype/employee_advance/employee_advance.py | # -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, erpnext
from frappe import _
from frappe.model.document import Document
from frappe.utils import flt, nowdate
class Empl... | Python | 0.002483 | @@ -1409,16 +1409,17 @@
y curren
+c
y %7B0%7D%22)%0A
|
7e8e5ceb765189974bcaee86e15c26b94ac05f3a | Update modulation.py | examples/modulation.py | examples/modulation.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import initExample
import os
from lase.core import KClient
# Driver to use
from lase.drivers import Oscillo
# Modules to import
import numpy as np
import matplotlib.pyplot as plt
import time
# Connect to Lase
host = os.getenv('HOST','192.168.1.100')
client = KClient(hos... | Python | 0.000001 | @@ -240,23 +240,35 @@
%0A%0A#
-Connect to Lase
+Load the oscillo instrument
%0Ahos
@@ -305,16 +305,169 @@
1.100')%0A
+password = os.getenv('PASSWORD','changeme')%0Assh = ZynqSSH(host, password)%0Assh.unzip_app()%0Assh.install_instrument('oscillo')%0A%0A# Connect to the instrument%0A
client =
@@ -509,43 +509,8 @@
... |
011ee4cb3d83e9a83e490b2cfe4d5ee77b81bf8b | read transport_class from flask settings | opbeat/contrib/flask/__init__.py | opbeat/contrib/flask/__init__.py | """
opbeat.contrib.flask
~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2011-2012 Opbeat
Large portions are
:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import logging
import os
import warnings
from flask import ... | Python | 0 | @@ -3093,24 +3093,92 @@
'SERVERS'),%0A
+ transport_class=opbeat_config.get('TRANSPORT_CLASS', None),%0A
host
|
d876ce9e7b50b6e5f1161a937097f00b6fafe09f | update test | myideas/core/tests/test_views.py | myideas/core/tests/test_views.py | from django.test import TestCase
from django.shortcuts import resolve_url as r
from django.contrib.auth import get_user_model
from myideas.core.forms import IdeasForm
from myideas.core.models import Ideas
class HomeTest(TestCase):
def setUp(self):
self.response = self.client.get(r('home'))
def test... | Python | 0.000001 | @@ -119,17 +119,16 @@
r_model%0A
-%0A
from myi
@@ -3552,28 +3552,29 @@
(self.response, 'base.html')
+%0A
|
0aa6ab1858ccac9154a79ece6bc48a7e7172ad5a | Redefine CategorySerializer.parent | bulletin/api/serializers.py | bulletin/api/serializers.py | from django.contrib.auth.models import User
from rest_framework import serializers
from ..models import (Category,
Issue,
IssueTemplate,
Link,
Newsletter,
Section,
SectionTemplate,
... | Python | 0 | @@ -642,38 +642,42 @@
t = serializers.
-String
+PrimaryKey
RelatedField(man
@@ -665,32 +665,41 @@
KeyRelatedField(
+%0A
many=False,%0A
@@ -706,36 +706,47 @@
-
+default=None,%0A allow_null=True,%0A
@@ -743,38 +743,39 @@
True,%0A re
-quired
+ad_only
... |
0c0ff9eca91dd867ce097dfd6fe4164db8034ce1 | Optimize wow character command | Discord/cogs/wow.py | Discord/cogs/wow.py |
import discord
from discord.ext import commands
import datetime
import clients
import credentials
from utilities import checks
def setup(bot):
bot.add_cog(WoW(bot))
class WoW:
def __init__(self, bot):
self.bot = bot
@commands.group(aliases = ["worldofwarcraft", "world_of_warcraft"], invoke_without_command... | Python | 0.000003 | @@ -1442,16 +1442,23 @@
00:%0A%09%09%09%09
+return
await ct
@@ -1514,19 +1514,8 @@
%7D%22)%0A
-%09%09%09%09return%0A
%09%09ti
|
2cec24c4a870d76d725c14ed10202f419c80dfb0 | Update internal box metadata AGAIN | eex/metadata/additional_metadata.py | eex/metadata/additional_metadata.py | """
Contains metadata for additional simulation details
"""
_box_info = {
"dimensions": {
"xlo": "[length]",
"xhi": "[length]",
"ylo": "[length]",
"yhi": "[length]",
"zlo": "[length]",
"zhi": "[length]",
"alpha": "radian",
"beta": "radian",
"... | Python | 0 | @@ -102,11 +102,9 @@
%22
-xlo
+a
%22: %22
@@ -127,11 +127,9 @@
%22
-xhi
+b
%22: %22
@@ -152,92 +152,9 @@
%22
-ylo%22: %22%5Blength%5D%22,%0A %22yhi%22: %22%5Blength%5D%22,%0A %22zlo%22: %22%5Blength%5D%22,%0A %22zhi
+c
%22: %22
|
2bc474b83f0e3ad340127f626cfe6597cbd2ba4e | Allow for interactive inputs | cal_pipe/manual_flagging.py | cal_pipe/manual_flagging.py |
import sys
'''
Plot visibility data for each spw to allow for easy manual flags
'''
vis = sys.argv[1]
field = sys.argv[2]
corrstring = sys.argv[3]
tb.open(vis + '/SPECTRAL_WINDOW')
freqs = tb.getcol('REF_FREQUENCY')
nchans = tb.getcol('NUM_CHAN')
tb.close()
spws = range(0, len(freqs))
for spw in spws:
nchan ... | Python | 0.000002 | @@ -80,16 +80,25 @@
gs%0A'''%0A%0A
+try:%0A
vis = sy
@@ -107,16 +107,20 @@
argv%5B1%5D%0A
+
field =
@@ -131,16 +131,20 @@
argv%5B2%5D%0A
+
corrstri
@@ -159,16 +159,162 @@
.argv%5B3%5D
+%0Aexcept IndexError:%0A vis = raw_input(%22MS Name? : %22)%0A field = raw_input(%22Field Name/Number? : %22)... |
6dbcc892f8b659a22a33fce3836cb082b64dd817 | load order | campos_event/__openerp__.py | campos_event/__openerp__.py | # -*- coding: utf-8 -*-
##############################################################################
#
# This file is part of CampOS Event,
# an Odoo module.
#
# Copyright (c) 2015 Stein & Gabelgaard ApS
# http://www.steingabelgaard.dk
# Hans Henrik Gaelgaard
... | Python | 0.000001 | @@ -1972,32 +1972,8 @@
-'views/campos_menu.xml',
%0A
@@ -2352,24 +2352,57 @@
_view.xml%22,%0A
+ 'views/campos_menu.xml',%0A
%5D,%0A #
|
c48e825e768c1ff0c4eab9ce1f623c81b5856cd1 | Decrease Exploration Rate was True in the Grid search. | Dyna_Grid_Search.py | Dyna_Grid_Search.py | '''
This is a GRID search to find the best parameters of an algorithm.
In future developments it will be parallelized.
In the Mountain Car Problem, for Sarsa with Tile Coding, we
have the parameters from Sutton and Barto Book
alpha = 0.5 (then divided by num tilings, so it becomes 0.5/0.8, check the implement... | Python | 0.000001 | @@ -2486,19 +2486,20 @@
tion%22 :
-Tru
+Fals
e, #Moun
@@ -2818,76 +2818,8 @@
),%0D%0A
- %22model%22 : m3d_model.m3d_model(),%0D%0A
@@ -3495,32 +3495,46 @@
+#env.seed(7)%0D%0A
%0D%0A
@@ -4830,16 +4830,52 @@
tdiff%0D%0A
+ ... |
1908abeb6aa0082fb49428185c340a7231cdd467 | fix typo in binaryoperator | emu/processes/wps_binaryoperator.py | emu/processes/wps_binaryoperator.py | from pywps import Process, LiteralInput, LiteralOutput
from pywps.app.Common import Metadata
import logging
logger = logging.getLogger("PYWPS")
class BinaryOperator(Process):
def __init__(self):
inputs = [
LiteralInput('inputa', 'Input 1', data_type='float',
abstract=... | Python | 0.0171 | @@ -777,16 +777,17 @@
'multip
+l
y'%5D)%5D%0A
|
ebea01ea751a196fb71a1a7e1f2664e893fa5386 | Fix JavaScript presubmit checks to allow for *[...] syntax. | catapult_build/js_checks.py | catapult_build/js_checks.py | # Copyright (c) 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 os
import re
import sys
import warnings
from py_vulcanize import strip_js_comments
from catapult_build import parse_html
class JSChecker(objec... | Python | 0.000269 | @@ -3505,32 +3505,308 @@
.of statement.%0A%0A
+ if (error.code == errors.LINE_STARTS_WITH_OPERATOR and%0A error.token.string == '*'):%0A return False # *%5B...%5D syntax%0A%0A if (error.code == errors.MISSING_SPACE and%0A error.token.string == '%5B'):%0A return Fa... |
ae0b0b7281fd301b00a9fde12a3b208c7dbfcab0 | Fix bug caused by recycleing a variable | cats4all/cats_downloader.py | cats4all/cats_downloader.py | import os
import time
import imgurpython
import requests
import sqlite3
import itertools
from collections import namedtuple
import json
DIR_NAME_FRMT = 'cats-%s'
tag = 'cat'
DB_FILE_NAME = 'cats2.db'
ImageData = namedtuple('ImageData', ['id', 'link', 'title', 'height', 'width'])
ImgurConfig = namedtuple('ImgurConfig... | Python | 0.000001 | @@ -129,16 +129,27 @@
rt json%0A
+import pdb%0A
%0A%0ADIR_NA
@@ -2073,16 +2073,32 @@
image):%0A
+ return True%0A
if i
@@ -2355,16 +2355,56 @@
_data):%0A
+ print str(len(images_data)) + '!!!'%0A
none
@@ -3252,17 +3252,17 @@
_data =
-(
+%5B
i for i
@@ -3322,21 +3322,23 @@
icate(i)
-)
+%5D
%0A ... |
9911604243a1fb3612317fda91a61653ae396e20 | Fix script permissions | Source/Documentation/Runme.py | Source/Documentation/Runme.py | #!/usr/bin/python
import os
import sys
import shutil
import subprocess
def create_page(orig_path, page_name, page_header):
orig = open(orig_path)
dest = open("Temp/" + os.path.split(orig_path)[1] + ".txt", "w")
dest.write("/** @page " + page_name + " " + page_header + "\n")
dest.write(orig.read())
... | Python | 0.000001 | |
00c07a76185aff4873abe3eb814b847b6d02f58f | fix date | 02_BasicDataTypes/04_find-second-maximum-number-in-a-list.py | 02_BasicDataTypes/04_find-second-maximum-number-in-a-list.py | #!/usr/bin/python3.6
"""Jerod Gawne, 2017-09-12
Find the Second Largest Number
https://www.hackerrank.com/challenges/find-second-maximum-number-in-a-list/
Editorial:
- There are many ways to solve this problem.
This can be solved by maintaining two variables max and second_max.
Iterate through the list and fi... | Python | 0.00188 | @@ -42,10 +42,10 @@
-09-
-1
2
+8
%0A%0AFi
|
7d92018ee8952998ef8d19ec342c4a898c633687 | Fix character matching | Firmware/sampler.py | Firmware/sampler.py | #!/usr/bin/python2
# run openocd (0.9.0) with :
# $ openocd -f interface/stlink-v2.cfg -f target/stm32f4x.cfg &> /dev/null &
# then run
# $ python2 sampler.py path_to_myelf_with_symbols
# ctrl-c to stop sampling.
# To terminate the openocd session, enter command "fg" then do ctrl-c.
import sys
import time
import teln... | Python | 0.000004 | @@ -1408,23 +1408,27 @@
in (
+b
't',
+b
'T',
+b
'w',
+b
'W')
|
0c305e8bd8624af2d2ce1ca292bb26095d0e1dcc | Fix __eq__ method on ExecuteContainer to compare only proper classes | cekit/descriptor/execute.py | cekit/descriptor/execute.py | import yaml
import cekit
from cekit.descriptor import Descriptor
execute_schemas = [yaml.safe_load("""
map:
name: {type: str}
script: {type: str}
user: {type: text}""")]
container_schemas = [yaml.safe_load("""
seq:
- {type: any}""")]
class Execute(Descripto... | Python | 0 | @@ -2117,24 +2117,99 @@
lf, other):%0A
+ if not isinstance(other, self.__class__):%0A return False%0A
for
|
b0d88fccf51f240800fda462bddb9d934931c078 | Update tests.py | intermediate_words_search_python/tests.py | intermediate_words_search_python/tests.py | # imports from solution
from main import solution
from utils import show_path
def tests():
for search_method in ('BFS', 'A*'):
opts = { 'search_method': search_method }
assert solution('cat', 'dog', opts) == ('cat', 'cot', 'dot', 'dog')
assert solution('cat', 'dot', opts) == ('cat', 'cot... | Python | 0.000001 | @@ -39,24 +39,42 @@
ort solution
+, LOCAL_DICTIONARY
%0Afrom utils
@@ -90,16 +90,1041 @@
ow_path%0A
+from time import time%0A%0A%0ATEST_CASES = (%0A # start word, target word, minimal path length%0A ( 'cat', 'dog', 4 ),%0A ( 'cat', 'mistrial', 9 ),%0A ( 'strong', 'weak', 7 ),%0... |
446d578ec9765a22478abecc7df526f666f5e57c | remove 'devel' in filename and add 'runtime' | cerbero/packages/android.py | cerbero/packages/android.py | # cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; eit... | Python | 0 | @@ -897,16 +897,57 @@
ipfile%0A%0A
+from cerbero.packages import PackageType%0A
from cer
@@ -2563,16 +2563,442 @@
names)%0A%0A
+ def _get_name(self, package_type, ext='tar.bz2'):%0A if package_type == PackageType.DEVEL:%0A package_type = ''%0A elif package_type == PackageType.RUNTIME:%0A ... |
22f7c82d63fb7ccc9226d734bdacd4a47e96da89 | Fix the `clear_app` command for Django 1.8 | ixdjango/management/commands/clear_app.py | ixdjango/management/commands/clear_app.py | """
Management command to clear specified app's models of data.
.. moduleauthor:: Infoxchange Development Team <development@infoxchange.net.au>
"""
from __future__ import print_function
from django.core.management.base import BaseCommand
from django.core.management.color import no_style
from django.db import connec... | Python | 0.00069 | @@ -854,16 +854,58 @@
state.')
+%0A args = '%3Capp_label%3E %3Capp_label%3E ... '
%0A%0A de
|
6c4219e92611ed0f6721e86ca3d24a28c30825c2 | add 15 min total | cgi-bin/precip/snetRates.py | cgi-bin/precip/snetRates.py | #!/mesonet/python/bin/python
import mx.DateTime, cgi, sys
from pyIEM import iemdb
i = iemdb.iemdb()
mydb = i['snet']
def diff(nowVal, pastVal, mulli):
if (nowVal < 0 or pastVal < 0): return "%5s," % ("M")
differ = nowVal - pastVal
if differ < 0: return "%5s," % ("M")
return "%5.2f," % (differ * mulli)
def ... | Python | 0.000229 | @@ -699,16 +699,23 @@
,PCOUNT,
+P15MIN,
60min ,3
@@ -1637,24 +1637,123 @@
pcpn%5Bi%5D,),%0A%0A
+ if (i %3E= 15):%0A print diff(pcpn%5Bi%5D, pcpn%5Bi-15%5D, 1),%0A else:%0A print %22%255s,%22 %25 (%22 %22),%0A%0A
if (i %3E=
|
32e83559e00b7d5a363585d599cd087af854c445 | Support custom initializer in links.CRF1d | chainer/links/loss/crf1d.py | chainer/links/loss/crf1d.py | from chainer.functions.loss import crf1d
from chainer import link
from chainer import variable
class CRF1d(link.Link):
"""Linear-chain conditional random field loss layer.
This link wraps the :func:`~chainer.functions.crf1d` function.
It holds a transition cost matrix as a parameter.
Args:
... | Python | 0 | @@ -531,16 +531,28 @@
n_label
+, initialW=0
):%0A
@@ -663,11 +663,79 @@
ter(
-0,
+initializer=initialW,%0A shape=
(n_l
|
b0a03411dac3f933e4198d053de74cd7b31fd3e5 | update message | chainercv/utils/download.py | chainercv/utils/download.py | from __future__ import division
from __future__ import print_function
import hashlib
import os
import shutil
import tarfile
import tempfile
import zipfile
import filelock
from six.moves.urllib import request
import sys
import time
from chainer.dataset.download import get_dataset_directory
from chainer.dataset.downl... | Python | 0 | @@ -610,20 +610,25 @@
size / (
-1024
+(1 %3C%3C 10)
* durat
@@ -774,35 +774,63 @@
ite(
-'%5Cr...%7B%7D, %7B
+%0A '%5Cr... %7B:d%7D %25, %7B:.2f
%7D M
+i
B, %7B
+:.2f
%7D K
+i
B/s, %7B
+:.1f
%7D se
@@ -843,32 +843,36 @@
passed'.format(%0A
+
percent,
@@ -894,18 +894,14 @@
/ (1
-024 * 1024
+... |
8214d516b3feba92ab3ad3b1f2fa1cf253e83012 | Remove use of deprecated `scan_plugins` method | pyexcel/internal/__init__.py | pyexcel/internal/__init__.py | """
pyexcel.internal
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Pyexcel internals that subjected to change
:copyright: (c) 2015-2017 by Onni Software Ltd.
:license: New BSD License
"""
from lml.loader import scan_plugins
from pyexcel.internal.plugins import PARSER, RENDERER # noqa
from pyexcel.int... | Python | 0.000004 | @@ -734,18 +734,25 @@
gins
+_regex
(%22
+%5E
pyexcel_
%22, %22
@@ -747,16 +747,19 @@
pyexcel_
+.+$
%22, %22pyex
|
e85e63ad0eaf34ebb08805b308bd01f398387492 | handle string type input | pypeerassets/crypto/ecdsa.py | pypeerassets/crypto/ecdsa.py | from hashlib import sha256
from binascii import hexlify
from random import SystemRandom, randrange
class PrivateKey:
def __init__(self, privkey=None):
self.p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f
self.n = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0... | Python | 0.000056 | @@ -820,62 +820,85 @@
-try:%0A int(privkey.decode(),16)%0A
+self.private_key = hexlify(privkey)%0A if isinstance(privkey, str):%0A
@@ -922,54 +922,31 @@
priv
-ate_
key =
+int(
privkey
-%0A except:%0A
+, 16)%0A
@@ -976,31 +976,31 @@
e_key =
-he... |
708e105713d7fd480b4b45d3ef31a46e35e63a8e | annotate calculate_tx_fee. | pypeerassets/transactions.py | pypeerassets/transactions.py |
'''transaction assembly/dissasembly'''
from time import time
from math import ceil
from btcpy.structs.address import Address
from btcpy.structs.transaction import TxOut, TxIn, Sequence, Locktime, MutableTransaction
from btcpy.structs.script import StackData, ScriptSig, NulldataScript, ScriptSig, ScriptPubKey
from btc... | Python | 0.000001 | @@ -442,16 +442,25 @@
ze: int)
+ -%3E float
:%0A ''
|
56e4c14ea6e2266bb8fa6f25ef1c0a3b2123f5ad | fix py3k | pystacia/image/_impl/blur.py | pystacia/image/_impl/blur.py | # coding: utf-8
# pystacia/image/_impl/blur.py
# Copyright (C) 2011-2012 by Paweł Piotr Przeradowski
# This module is part of Pystacia and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
def _make_radius_strength_bias(c_name, names, order=None):
def function(image, *args)... | Python | 0.000002 | @@ -224,16 +224,50 @@
e.php%0A%0A%0A
+from future_builtins import zip%0A%0A%0A
def _mak
|
27273335422781dcee950ee081ed13e53816e6d6 | Bump version | pytablewriter/__version__.py | pytablewriter/__version__.py | __author__ = "Tsuyoshi Hombashi"
__copyright__ = f"Copyright 2016, {__author__}"
__license__ = "MIT License"
__version__ = "0.62.0"
__maintainer__ = __author__
__email__ = "tsuyoshi.hombashi@gmail.com"
| Python | 0 | @@ -120,17 +120,17 @@
_ = %220.6
-2
+3
.0%22%0A__ma
|
349f975e257192458b1944753d4f609869b9e8d6 | use yield_fixture to support pytest on py2.7 | python-cim/tests/fixtures.py | python-cim/tests/fixtures.py | import os
import pytest
import cim
import cim.objects
@pytest.fixture
def repopath():
"""
Returns:
str: path to the repos/win7/deleted-instance repository
"""
cd = os.path.dirname(os.path.abspath(__file__))
return os.path.join(cd, 'repos', 'win7', 'deleted-instance')
@pytest.fixture
de... | Python | 0 | @@ -460,32 +460,38 @@
th())%0A%0A%0A@pytest.
+yield_
fixture%0Adef root
|
fe4c66b2e50035ab2701923d6a2cd0cb82e63780 | Fix call mkl gemm in mkldnn.py (#7007) | python/tvm/contrib/mkldnn.py | python/tvm/contrib/mkldnn.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 | @@ -1602,16 +1602,19 @@
trib.mkl
+dnn
.matmul%22
|
a2097bf7c3103ec6e0482bb34f3b33c753ea7889 | Enable QtNetwork test for PySide | qtpy/tests/test_qtnetwork.py | qtpy/tests/test_qtnetwork.py | from __future__ import absolute_import
import pytest
from qtpy import PYSIDE, PYSIDE2, QtNetwork
@pytest.mark.skipif(PYSIDE2 or PYSIDE, reason="It fails on PySide/PySide2")
def test_qtnetwork():
"""Test the qtpy.QtNetwork namespace"""
assert QtNetwork.QAbstractNetworkCache is not None
assert QtNetwork.QN... | Python | 0 | @@ -97,84 +97,8 @@
k%0A%0A%0A
-@pytest.mark.skipif(PYSIDE2 or PYSIDE, reason=%22It fails on PySide/PySide2%22)%0A
def
@@ -261,32 +261,71 @@
ata is not None%0A
+ if not PYSIDE and not PYSIDE2:%0A
assert QtNet
@@ -348,32 +348,36 @@
art is not None%0A
+
assert QtNet
@@ -1530,32 +1530,55 @@
ket i... |
cd323386b61cd280fcf3e599ae6a02b889f81a40 | Remove support for old style api urls | raven/contrib/django/urls.py | raven/contrib/django/urls.py | """
raven.contrib.django.urls
~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
try:
from django.conf.urls import url
except ImportError:
# for Django version less than 1... | Python | 0 | @@ -443,11 +443,8 @@
i/(?
-:(?
P%3Cpr
@@ -465,10 +465,8 @@
%5D+)/
-)?
stor
|
d3e9e7f6873e54f9657d1fdc9c3339b49c4936ae | Update tests to use required request argument | rcamp/tests/test_lib_auth.py | rcamp/tests/test_lib_auth.py | from django.conf import settings
import mock
import pam
from lib.pam_backend import PamBackend
from tests.utilities.ldap import (
LdapTestCase,
get_ldap_user_defaults
)
from accounts.models import (
RcLdapUser,
User
)
# This test case covers functionality in the custom PAM Auth Backend
class PamBacken... | Python | 0 | @@ -868,32 +868,38 @@
pb.authenticate(
+None,
username='testus
@@ -1222,32 +1222,38 @@
pb.authenticate(
+None,
username='testus
@@ -1746,32 +1746,38 @@
pb.authenticate(
+None,
username='testus
@@ -2385,32 +2385,38 @@
pb.authenticate(
+None,
username='testus
@@ -2586,32 +2586,38 @@
pb.authenticate(
+None,
... |
15865668659ebee4cb49a28d09f9ff1d67d2a96d | Set issue to in progress when sending issue | rdmo/projects/views/issue.py | rdmo/projects/views/issue.py | import logging
from django.conf import settings
from django.core.mail import EmailMessage
from django.http import HttpResponseRedirect
from django.views.generic import DetailView, UpdateView
from rdmo.core.views import ObjectPermissionMixin, RedirectViewMixin
from ..forms import IssueMailForm
from ..models import Iss... | Python | 0 | @@ -1465,16 +1465,104 @@
bject()%0A
+ self.object.status = Issue.ISSUE_STATUS_IN_PROGRESS%0A self.object.save()%0A%0A
|
d62d12d2d274c7e065c48155c4dda6d9d135e4e8 | Use java method to get max count of steps | Server/integrations/cas2_duo/Cas2DuoExternalAuthenticator.py | Server/integrations/cas2_duo/Cas2DuoExternalAuthenticator.py | # oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
# Copyright (c) 2018, Gluu
#
# Author: Yuriy Movchan
#
from org.xdi.service.cdi.util import CdiUtil
from org.xdi.oxauth.security import Identity
from org.xdi.model.custom.script.type.auth import PersonAuthenticati... | Python | 0.000001 | @@ -7268,16 +7268,22 @@
return
+ Math.
max(cas
|
80c0f29d7b81a68d14e261ce1c062d37a0e6d4f7 | Increase ARM process startup time baseline | tests/integration_tests/performance/test_process_startup_time.py | tests/integration_tests/performance/test_process_startup_time.py | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""Test that the process startup time up to socket bind is within spec."""
import json
import os
import platform
import time
import host_tools.logging as log_tools
MAX_STARTUP_TIME_CPU_US = {'x86_64': 5500... | Python | 0 | @@ -327,17 +327,17 @@
ch64': 2
-6
+8
00%7D%0A%22%22%22
|
0a80fa2e610637a6c657f99c8eac5d99e33b5844 | Use /usr/bin/env in #! | lines2jsonarray.py | lines2jsonarray.py | #!/usr/bin/python
from __future__ import print_function
import sys
print('[')
for i, line in enumerate(sys.stdin):
if i != 0:
print(',')
print(line)
print(']')
| Python | 0 | @@ -4,16 +4,20 @@
usr/bin/
+env
python%0Af
|
2918aeaf34774528def5b798dadff2767e63c111 | Allow case sensitivity change in CLI | linguistica/cli.py | linguistica/cli.py | # -*- encoding: utf8 -*-
import sys
import os
from pprint import pformat
import linguistica as lxa
from linguistica.util import ENCODING
lxa_version = lxa.__version__
def main():
print('\nWelcome to Linguistica {}!'.format(lxa_version))
# -------------------------------------------------------------------... | Python | 0.000005 | @@ -3157,16 +3157,509 @@
coding%0A%0A
+ # --------------------------------------------------------------------------%0A # change case-sensitivity, if instructed%0A%0A keep_case = False%0A print('%5CnDefault behavior for case sensitivity: False%5Cn'%0A '(e.g. %22the%22 and %22The%22 are collapsed)'... |
6cae1c77094f91443781f33b04abe96541739599 | hello2 | robo/test/visual_test.py | robo/test/visual_test.py | import GPy
import matplotlib; matplotlib.use('GTKAgg')
import matplotlib.pyplot as plt
import numpy as np
import os
from robo.models.GPyModel import GPyModel
from robo.acquisition.EI import EI
from robo.maximizers.maximize import stochastic_local_search
from robo.recommendation.incumbent import compute_incumbent
from r... | Python | 0.999986 | @@ -2776,16 +2776,17 @@
2.png')%0A
+%0A
os.s
|
759f2510617813b3257e56fd422448a9670df3a3 | Add plugin startup commands. | rplugin/python3/cmake.py | rplugin/python3/cmake.py | import neovim
from pathlib import Path
import subprocess
cmake_build_info = {
"old_cmake_files": [
Path("CMakeCache.txt"),
Path("cmake_install.cmake"),
Path("Makefile"),
Path("compile_commands.json")
],
"old_cmake_dir":
Path("CMakeFiles"),
"cmake_proj":
Path("CMa... | Python | 0 | @@ -678,16 +678,117 @@
%22%5D)%5D%0A%7D%0A%0A
+plugin_cmd_info = %7B%0A %22chromatica%22: %22ChromaticaStart%22,%0A %22deoplete%22: %22call deoplete#enable()%22%0A%7D%0A%0A
%0Adef rem
@@ -4276,42 +4276,72 @@
-self.vim.command('ChromaticaStart'
+for cmd in plugin_cmd_info:%0A self.vim.comman... |
14884a18b42dab22e5893c619164049a475888cc | fix traceback on bank accounts creation | addons/account_bank_statement_import/wizard/setup_wizards.py | addons/account_bank_statement_import/wizard/setup_wizards.py | # -*- coding: utf-8 -*-
from odoo import models, fields, api
class SetupBarBankConfigWizard(models.TransientModel):
_inherit = 'account.setup.bank.manual.config'
def validate(self):
""" Default the bank statement source of new bank journals as 'file_import'
"""
super(SetupBarBankConf... | Python | 0.000001 | @@ -351,16 +351,17 @@
if
+(
self.cre
@@ -451,16 +451,17 @@
defined'
+)
%5C%0A
|
b12868d32bb295e5518265fb184e549c3f5c79c2 | Use static.mybinder.org for badge image (#334) | sphinx_gallery/binder.py | sphinx_gallery/binder.py | # -*- coding: utf-8 -*-
# Author: Chris Holdgraf
# License: 3-clause BSD
"""
Binder utility functions
========================
Integration with Binder is on an experimental stage. Note that this API may
change in the future.
.. warning::
Binder is still beta technology, so there may be instability in the
exper... | Python | 0 | @@ -2383,16 +2383,17 @@
r_conf)%0A
+%0A
rst
@@ -2485,16 +2485,23 @@
https://
+static.
mybinder
|
0b707c137aef4c6ad6ddd27b00585388b152666c | fix skitaid shutdown | skitai/skitaid.py | skitai/skitaid.py | #!/usr/bin/python3
# 2014. 12. 9 by Hans Roh hansroh@gmail.com
__version__ = "0.8.8.1"
version_info = tuple (map (lambda x: not x.isdigit () and x or int (x), __version__.split (".")))
import sys
import subprocess
import os
import signal
import time
from aquests.lib import confparse, logger, flock, pathtool
from s... | Python | 0.000015 | @@ -679,18 +679,16 @@
(False)%0A
-%09%09
%0A%09%09self.
@@ -1436,16 +1436,73 @@
kill')%0A%09
+%0A%09def hTERM (self, signum, frame):%09%09%09%0A%09%09self.shutdown ()%0A
%09%09%0A%09def
@@ -1570,32 +1570,29 @@
BREAK, self.
-shutdown
+hTERM
)%0A%09%09else:%0A%09%09
@@ -1631,30 +1631,17 @@
elf.
-shutdown)%0A%09%0... |
8fbdced7a4c8ea61116e8c978e420c30b8a1f1dc | update for urls.py | slothauth/urls.py | slothauth/urls.py | from django.conf.urls import include, url
from rest_framework.routers import DefaultRouter
from .views import change_email, login, logout, password_reset, profile, signup, passwordless_signup,\
passwordless_login, AccountViewSet, AuthViewSet
from . import settings
router = DefaultRouter()
router.... | Python | 0 | @@ -484,16 +484,103 @@
.urls)),
+ # TODO makes sense to have a settings.API_BASE_URL rather than a settings.API_VERSION?
%0A url
@@ -1324,8 +1324,65 @@
/'%7D),%0A%5D%0A
+%0A# TODO create setting for turning on and off debug urls%0A
|
ac765968a9a83685c28244200958164d2a0fc81e | fix typo | smartmin/email.py | smartmin/email.py | from django.conf import settings
from django.template import Context
from django.utils.module_loading import import_string
def link_components(request, user=None):
protocol = 'https' if request.is_secure() else 'http'
hostname = getattr(settings, 'HOSTNAME', request.get_host())
return {"protocol": proto... | Python | 0.999991 | @@ -576,17 +576,16 @@
in.email
-e
.link_co
|
091735fce650d6326e73ca6fb224a77ae68bb601 | Add data written to message | salaryzenaggr/manager.py | salaryzenaggr/manager.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/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... | Python | 0.000007 | @@ -1590,8 +1590,71 @@
close()%0A
+ print %22Data successfully written to %25s%22 %25 result_file%0A%0A
|
1dd8ce20632d8a6b857a06136b89ac11b27c8f07 | Update documentation | letters/models.py | letters/models.py | from django.db import models
from common.models import Citation
class Letter(models.Model):
"""A letter from one of Pliny's books of personal correspondence"""
book = models.PositiveSmallIntegerField()
manuscript_correspondent_name = models.CharField(blank=True, max_length=255)
letter = models.Positiv... | Python | 0 | @@ -155,16 +155,452 @@
pondence
+%0A Attributes:%0A book (PositiveSmallIntegerField): book number.%0A manuscript_correspondent_name (CharField): override if manuscript%0A correspondent as written differs from database name%0A letter (PositiveSmallIntegerField): le... |
e7f5efafbdbd674adfb60bbadac6665860dd23a0 | Update __main__.py | snake/__main__.py | snake/__main__.py | import argparse
import sys
from .assembler import Assembler
from .vm import System
def assembler():
parser = argparse.ArgumentParser(description='A 2 pass assembler.',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
# Take action depending on whether or not this is being pipelined
if... | Python | 0.000063 | @@ -1920,39 +1920,36 @@
elp=%22file to be
-assembl
+load
ed.%22)%0A pa
|
3b787bc966bda0e39c928fd0bf46c8e9bf012044 | bump up DB pool size and timeout for tests | biweeklybudget/tests/conftest.py | biweeklybudget/tests/conftest.py | """
The latest version of this package is available at:
<http://github.com/jantman/biweeklybudget>
################################################################################
Copyright 2016 Jason Antman <jason@jasonantman.com> <http://www.jasonantman.com>
This file is part of biweeklybudget, also known as bi... | Python | 0 | @@ -2678,16 +2678,52 @@
TABLES'%7D
+,%0A pool_size=10, pool_timeout=120
%0A)%0A%0Alogg
|
c1be270c96ef07faa7ceecf4117890ce06af65a8 | Update setup.py | wrappers/python/setup.py | wrappers/python/setup.py | from setuptools import setup, find_packages
from setuptools.dist import Distribution
# _version.py should be generated by running find_librs_version.py and copied to pyrealsense2 folder
from pyrealsense2._version import __version__
import os
import io
package_name = "pyrealsense2"
package_data = {}
print("version =... | Python | 0.000001 | @@ -1682,45 +1682,8 @@
e',%0A
- 'Operating System :: MacOS',%0A
|
26af472f187de01f6e0d8d609f2d857e6557c984 | allow case insensitive menu in top url only | mapannotations/urls.py | mapannotations/urls.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 University of Dundee.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your... | Python | 0 | @@ -1449,16 +1449,20 @@
url(r'%5E
+(?i)
%25s/$' %25
|
60ccc393fc428d609e772b838c5a4c4002e3ec49 | Add sendError method | snp/SNProtocol.py | snp/SNProtocol.py | from twisted.internet import defer
from twisted.protocols.basic import NetstringReceiver
import json
class SNError(Exception):
def __init__(self, *args, **kwargs):
Exception.__init__(self, args, kwargs)
self.code = args[1]
self.request = args[2]
class SNProtocol(NetstringReceiver):
i... | Python | 0.000001 | @@ -1253,16 +1253,133 @@
quest)%0A%0A
+ def sendError(self, code, request):%0A r = %7B%22Error%22: code, %22Request%22: request%7D%0A self._sendPacket(r)%0A%0A
def
|
b223865ded88b5467c1088abbf628048e39e564c | Test str_cat() schema; use fixtures for exception tests | blaze/expr/tests/test_strings.py | blaze/expr/tests/test_strings.py | import pytest
from datashape import dshape
from blaze import symbol
dshapes = ['var * {name: string}',
'var * {name: ?string}',
'var * string',
'var * ?string',
'string']
@pytest.mark.parametrize('ds', dshapes)
def test_like(ds):
t = symbol('t', ds)
expr = getattr(... | Python | 0 | @@ -211,16 +211,538 @@
ring'%5D%0A%0A
+lhsrhs_ds = %5B'var * %7Bname: string, comment: string%5B25%5D%7D',%0A 'var * %7Bname: string%5B10%5D, comment: string%7D',%0A 'var * %7Bname: string, comment: string%7D',%0A 'var * %7Bname: ?string, comment: string%7D',%0A 'var * %... |
a357e9bb209914a9e7ae4e391ea21f23b1c1f477 | Use a common cluster_config mock for unsubscribe_topics unit tests. | tests/kafka_consumer_manager/test_unsubscribe_topics.py | tests/kafka_consumer_manager/test_unsubscribe_topics.py | import contextlib
import mock
import pytest
from kazoo.exceptions import NoNodeError
from kazoo.exceptions import ZookeeperError
from yelp_kafka_tool.kafka_consumer_manager.commands. \
unsubscribe_topics import UnsubscribeTopics
@mock.patch('yelp_kafka_tool.kafka_consumer_manager.'
'commands.unsubsc... | Python | 0 | @@ -464,16 +464,69 @@
%0A %7D%0A%0A
+ cluster_config = mock.Mock(zookeeper='some_ip')%0A%0A
@con
@@ -1393,68 +1393,8 @@
)%0A
- cluster_config = mock.Mock(zookeeper='some_ip')%0A
@@ -1503,32 +1503,37 @@
opics.run(args,
+self.
cluster_config)%0A
@@ -2360,68 +2360,8 @@
= %5B%5D
-%0A ... |
20c0f26fa6d09fdb3a2177779e2495804931fccb | fix branch on core | master/master/steps.py | master/master/steps.py | # No shebang line, this module is meant to be imported
#
# Copyright 2014 Oliver Palmer
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unle... | Python | 0 | @@ -2969,36 +2969,20 @@
)%5D%0A%0A
-if project != %22core%22
+else
:%0A
@@ -3009,96 +3009,221 @@
-Clone(REPO_URL.format(project=%22core%22), workdir=%22core%22,%0A branch=%22master%22
+RemoveDirectory(%22core%22),%0A ShellCommand(%0A workdir=%22core%22,%0A ... |
7e648b7155836163da6abbfdb31f52d16204fe45 | fix brokeh app init | bokeh/application/application.py | bokeh/application/application.py | '''
'''
from __future__ import absolute_import
import logging
log = logging.getLogger(__name__)
from tornado import gen
from abc import ABCMeta, abstractmethod
from ..util.future import with_metaclass
from ..util.tornado import yield_for_all_futures
from ..document import Document
class ServerContext(with_metacla... | Python | 0.000001 | @@ -3215,24 +3215,87 @@
*handlers):%0A
+ self._static_path = None%0A self._template = None%0A
self
|
09fffb062b45e4715c092c0899a6d4f89cf0b4e1 | Fix toolbarbox test | bokeh/models/tests/test_tools.py | bokeh/models/tests/test_tools.py | from __future__ import absolute_import
from bokeh.models.layouts import Box
from bokeh.models.tools import Toolbar, ToolbarBox
# TODO (bev) validate entire list of props
def test_Toolbar():
tb = Toolbar()
assert tb.active_drag == 'auto'
assert tb.active_scroll == 'auto'
assert tb.active_tap == 'aut... | Python | 0.000001 | @@ -612,15 +612,13 @@
ols
-is None
+== %5B%5D
%0A
|
1f3200b34730bcbe516e7d4f7599e9d991270ade | Update generate strings script to output Google LLC rather than Inc | Scripts/generate_strings.py | Scripts/generate_strings.py | #!/usr/bin/python
"""
Generates a Swift String extension containing static variables for all strings
in the main Localizable.strings file. This script runs automatically at build
time in Xcode as a Run Script phase.
"""
##
# Copyright 2019 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License... | Python | 0.000022 | @@ -241,35 +241,35 @@
ght 2019 Google
-Inc
+LLC
. All Rights Res
@@ -995,11 +995,11 @@
gle
-Inc
+LLC
. Al
|
96704483b7821f40531fa494181ae4e0214fcb0a | Fix rogue format | tests/task_router/test_task_router_worker_capability.py | tests/task_router/test_task_router_worker_capability.py | import time
import unittest
from twilio import jwt
from twilio.task_router import TaskRouterWorkerCapability
class TaskRouterWorkerCapabilityTest(unittest.TestCase):
def check_policy(self, method, url, policy):
self.assertEqual(url, policy['url'])
self.assertEqual(method, policy['method'])
... | Python | 0.000038 | @@ -2679,11 +2679,13 @@
ls/%7B
+0
%7D/%7B
+1
%7D'.f
@@ -3872,16 +3872,17 @@
spaces/%7B
+0
%7D/Worker
@@ -3884,16 +3884,17 @@
orkers/%7B
+1
%7D%22.forma
@@ -4739,16 +4739,17 @@
spaces/%7B
+0
%7D/Tasks/
|
7daf7440b271c923e4a210a47ba4ba87d76181a3 | Add more assertions to rendering test | communication/tests.py | communication/tests.py | from communication.mail import SUBJECT, TEXT, HTML, send_email, render_blocks
from mock import Mock, patch, sentinel
from unittest2 import TestCase
from django.template.loader_tags import BlockNode
class SendEmailTestCase(TestCase):
def setUp(self):
patcher = patch('communication.mail.settings')
... | Python | 0 | @@ -2715,61 +2715,127 @@
-self.assertEquals(blocks, %7BHTML: html_block.render
+context_mock.assert_called_once_with(sentinel.context)%0A html_block.render.assert_called_once_with(context_mock
()
-%7D
)%0A
@@ -2840,36 +2840,41 @@
-context_mock
+some_block.render
.assert_
called_o
@@ -2869,3... |
32720b2cc4e2599a57ddf81ec1d9c334d71b29f1 | Add Schedule to the system job migration | awx/main/migrations/0010_v300_create_system_job_templates.py | awx/main/migrations/0010_v300_create_system_job_templates.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from django.utils.timezone import now
from awx.api.license import feature_enabled
def create_system_job_templates(apps, schema_editor):
'''
Create default system job templates if not present. Create default sche... | Python | 0 | @@ -463,24 +463,74 @@
bTemplate')%0A
+ Schedule = apps.get_model('main', 'Schedule')%0A
ContentT
|
129d96d9e1f4d247f48dec10ce551cd68efdf5d8 | use metric name in append to time series | jira_integration_example/tests/jira_notification_handler_integration_test.py | jira_integration_example/tests/jira_notification_handler_integration_test.py | # Copyright 2020 Google, LLC.
#
# 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, ... | Python | 0.002114 | @@ -4588,16 +4588,29 @@
(config,
+ metric_name,
point_v
@@ -4823,16 +4823,48 @@
RIC_PATH
+.format(METRIC_NAME=metric_name)
%0A ser
|
6dd4bdb35aca0f23ec5509e1a39748eeb146a720 | Fix if statement | df_pipelines_init.py | df_pipelines_init.py | """Initialise the DAGs for all the pipelines required to process different datasets containing MRI images"""
# Please keep keywords airflow and DAG in this file, otherwise the safe mode in DagBag may skip this file
import logging
from airflow import configuration
from common_steps import default_config
from preproc... | Python | 1 | @@ -6458,16 +6458,20 @@
wer()))%0A
+
regi
@@ -6558,32 +6558,36 @@
+
email_errors_to=
@@ -6595,32 +6595,36 @@
mail_errors_to,%0A
+
@@ -6674,16 +6674,28 @@
_runs))%0A
+ # endif%0A
%0A%0Adef in
|
a98ebc7728947e77d92378cdf867c500212738ca | Update dbx_email_alerts.py | Sharing/dbx_email_alerts.py | Sharing/dbx_email_alerts.py | #install the dropbox SDK with 'pip install dropbox'
import dropbox
import datetime
import time
import smtplib
import requests
#requires Dropbox Business API token with 'Team Auditing' permission
token = "<enter token here>"
cursor = None
# instantiating dropbox team object
dbxt = dropbox.DropboxTeam(token)
# Full li... | Python | 0.000006 | @@ -435,9 +435,9 @@
s =
-%5B
+%7B
%22sig
@@ -724,10 +724,9 @@
- %5D
+%7D
%0A%0A#
|
c00d2f55de2817616db49896b0de2a2b514800d3 | replace values with constants | jira_integration_example/tests/jira_notification_handler_integration_test.py | jira_integration_example/tests/jira_notification_handler_integration_test.py | # Copyright 2020 Google, LLC.
#
# 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, ... | Python | 0.001126 | @@ -3773,46 +3773,29 @@
e =
-'custom.googleapis.com/' + metric_name
+constants.METRIC_PATH
%0A
@@ -3822,22 +3822,31 @@
e =
-'gce_instance'
+constants.RESOURCE_TYPE
%0A
@@ -3890,29 +3890,29 @@
%5D =
-'1234567890123456789'
+constants.INSTANCE_ID
%0A
@@ -3949,23 +3949,22 @@
%5D =
-'us-central1-f'
+cons... |
1de1a8e06cdca30974575e6e6308bdae75a9d5de | Update set_license_key.py | examples/Redfish/set_license_key.py | examples/Redfish/set_license_key.py | # Copyright 2020 Hewlett Packard Enterprise Development LP
#
# 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.000002 | @@ -1682,30 +1682,20 @@
-
if '#
-HpeiLOLicense
+Manager
.' i
@@ -1737,34 +1737,179 @@
- ilo_lic_uri = instance
+manager_uri = instance%5B'@odata.id'%5D%0A mager_data = _redfishobj.get(manager_uri)%0A ilo_lic_uri = mager_data.obj%5B'Oem'%5D%5B'Hpe'%5D%5B'Links'%5D%5B'LicenseSer... |
edb1c61a7ded49b63e272bd409fcbf6468173948 | remove comment | bitbots_head_behavior/src/bitbots_head_behavior/head_node.py | bitbots_head_behavior/src/bitbots_head_behavior/head_node.py | #!/usr/bin/env python3
"""
This is the ROS-Node which contains the head behavior, starts the appropriate DSD, initializes the HeadBlackboard
and subscribes to head_behavior specific ROS-Topics.
"""
import os
import rospy
from bitbots_blackboard.blackboard import HeadBlackboard
from dynamic_stack_decider.dsd import DS... | Python | 0 | @@ -1462,112 +1462,8 @@
=1)%0A
- # rospy.Subscriber(%22balls_relative%22, PoseWithCertaintyArray, blackboard.world_model.balls_callback)%0A
|
a65c57b85ecd57fdb8d0521c1b6ce3ecda5d3916 | Add library to list of types to upgrade. | src/encoded/commands/upgrade.py | src/encoded/commands/upgrade.py | """\
Run this to upgrade the site.
Examples
To update on the production server:
%(prog)s production.ini
For the development.ini you must supply the paster app name:
%(prog)s development.ini --app-name app
"""
from contextlib import contextmanager
import logging
EPILOG = __doc__
logger = logging.getLogge... | Python | 0 | @@ -351,16 +351,31 @@
ONS = %5B%0A
+ 'library',%0A
%5D%0A%0A%0Adef
|
f93ce7ca0c73946e1997572576b28436d53ef970 | Update to V2 API | salt/modules/opsgenie.py | salt/modules/opsgenie.py | # -*- coding: utf-8 -*-
'''
Module for sending data to OpsGenie
.. versionadded:: 2018.3.0
:configuration: This module can be used in Reactor System for
posting data to OpsGenie as a remote-execution function.
For example:
.. code-block:: yaml
opsgenie_event_poster:
local.opsgenie.pos... | Python | 0 | @@ -804,32 +804,16 @@
om/v
-1/json/saltstack?apiKey=
+2/alerts
%22%0A%0Al
@@ -1957,31 +1957,8 @@
is
-None or action_type is
None
@@ -2045,23 +2045,8 @@
son
-or Action Type
cann
@@ -2088,20 +2088,21 @@
data%5B'
-name
+alias
'%5D = nam
@@ -2113,22 +2113,23 @@
data%5B'
-reason
+message
'%5D = rea
@@ -21... |
0fceb297dc4855cd5617daaf9821fb3a332c19ed | Fix descriptions | mediacrush/slimdown.py | mediacrush/slimdown.py | from functools import partial
from markdown import Markdown, odict
from markdown.blockprocessors import build_block_parser
from markdown.preprocessors import build_preprocessors
from markdown.inlinepatterns import build_inlinepatterns
from markdown.treeprocessors import build_treeprocessors
slimdown = Markdown(safe_m... | Python | 0.00079 | @@ -872,8 +872,205 @@
inline%0A
+%0A# Monkey-patch unicode fix%0Aslimdown._convert = slimdown.convert%0Adef slimdown_convert(text):%0A text = text.decode('utf-8')%0A%0A return slimdown._convert(text)%0Aslimdown.convert = slimdown_convert%0A
|
2871d4d45c70cb3619bbf12ed77a8a94e038702e | Set default language to finnish should the mail be sent to admins | ckanext/ytp/request/mail.py | ckanext/ytp/request/mail.py | from ckan.lib.i18n import set_lang, get_lang
from ckan.lib.mailer import mail_user
from pylons import i18n
from ckan.common import _
import logging
log = logging.getLogger(__name__)
_SUBJECT_MEMBERSHIP_REQUEST = lambda: _(
"New membership request (%(organization)s)")
_MESSAGE_MEMBERSHIP_REQUEST = lambda: _("""\
U... | Python | 0 | @@ -1181,72 +1181,135 @@
-current_locale = get_lang()%0A%0A if locale == 'en':%0A _res
+#Mail sent to admins should be sent with default locale, i.e. finnish not the locale defined by the user%0A current_locale = g
et_l
@@ -1314,34 +1314,56 @@
_lang()%0A
+%0A
-else:%0A
+#Set the locale to... |
9f26c83b1ba25d8c64a8e9418310f5dd0e6cb9bd | refactor clean | estudios_socioeconomicos/views.py | estudios_socioeconomicos/views.py | import csv
import json
from collections import OrderedDict
from django.shortcuts import render, get_object_or_404
from django.contrib.auth.decorators import login_required, user_passes_test
from django.http import HttpResponse
from rest_framework.response import Response
import django_excel as excel
from administrac... | Python | 0.000278 | @@ -1,64 +1,4 @@
-import csv%0Aimport json%0Afrom collections import OrderedDict%0A%0A
from
@@ -128,90 +128,8 @@
est%0A
-from django.http import HttpResponse%0A%0Afrom rest_framework.response import Response
%0Aimp
@@ -533,36 +533,24 @@
Comentario,
- Integrante,
Alumno, Tut
@@ -812,51 +812,8 @@
sta%0A
-from .se... |
dbb538d84d958d964319bf287a7bdc9587c62f15 | Use realistic identifiers in strategy | services/tests/services_import_hypothesis.py | services/tests/services_import_hypothesis.py | # from hypothesis import composite
from hypothesis import event
from hypothesis.strategies import (
text, integers, booleans, lists, composite, uuids, sampled_from, none, one_of,
permutations, sets)
from string import digits, ascii_letters, punctuation
from django.conf import settings
LANGUAGES = [l[0] for l ... | Python | 0.000109 | @@ -289,16 +289,69 @@
ttings%0A%0A
+SAFE_LETTERS = digits + ascii_letters + punctuation%0A%0A
LANGUAGE
@@ -2377,32 +2377,46 @@
'id': draw(text(
+SAFE_LETTERS,
min_size=1)), 's
@@ -2425,32 +2425,46 @@
rce': draw(text(
+SAFE_LETTERS,
min_size=1))%7D%0A%0A%0A
@@ -4907,44 +4907,20 @@
ext(
-digits + ascii_letters +... |
a25560008f6d83e1918f7f143bc40a6e44db7924 | Set the initial x-axes limits to be something resonable for the problem. | examples/models/transform_jitter.py | examples/models/transform_jitter.py | import numpy as np
from bokeh.io import vplot, hplot
from bokeh.plotting import figure, show, output_file
from bokeh.models.sources import ColumnDataSource
from bokeh.models import Slider, CustomJS, Dropdown, Toggle, Paragraph
from bokeh.models.transforms import Jitter
N = 50
source = ColumnDataSource(data=dict(x=[1]... | Python | 0 | @@ -487,14 +487,12 @@
ge=(
--10,10
+0, 3
), y
|
a23a1050501563889c2806a514fe2994a2ebe3a8 | Add python3 support in example | example/consume_many_csv_files.py | example/consume_many_csv_files.py | from __future__ import print_function
from itertools import chain
from itertools import imap
import karld
from karld.path import i_walk_csv_paths
def main():
"""
Consume many csv files as if one.
"""
import pathlib
input_dir = pathlib.Path('test_data/things_kinds')
# # Use a generator expr... | Python | 0.000001 | @@ -59,16 +59,26 @@
t chain%0A
+%0Atry:%0A
from ite
@@ -95,16 +95,69 @@
ort imap
+%0Aexcept ImportError:%0A # if python 3%0A imap = map
%0A%0Aimport
|
d27c34c65198280e324c37acda7f33ece07c2c92 | make text field usage consistnt | examples/plotting/server/markers.py | examples/plotting/server/markers.py | # The plot server must be running
# Go to http://localhost:5006/bokeh to view this plot
from numpy.random import random
from bokeh.plotting import *
def mscatter(p, x, y, typestr):
p.scatter(x, y, marker=typestr,
line_color="#6666ee", fill_color="#ee6666", fill_alpha=0.5, size=12)
def mtext(p, x, y,... | Python | 0.000004 | @@ -346,23 +346,25 @@
y, text=
+%5B
textstr
+%5D
,%0A
|
a6b8b040aab2fd8fb79c027e9f098d6748c6d52a | remove unique constraint here | dishpub/dishpubdb.py | dishpub/dishpubdb.py | from sqlalchemy import create_engine
from sqlalchemy import Table, Column, Integer, String, MetaData, ForeignKey, Boolean, DateTime
from sqlalchemy.orm import mapper
from sqlalchemy import ForeignKey
from sqlalchemy.orm import backref
try:
from sqlalchemy.orm import relationship
except:
from sqlalchemy.orm im... | Python | 0.000236 | @@ -538,16 +538,111 @@
traint%0A%0A
+%0A##########################################%0A# makes key value tables to increase flexibility.%0A%0A
Base = d
@@ -1210,36 +1210,24 @@
able = False
-,unique=True
)%0A value
@@ -2611,36 +2611,24 @@
able = False
-,unique=True
)%0A value
|
bfdfbe884fbadf04dd42e6e55e3c4ac633005a71 | Raise the exception even if we have a logger. | yapf/yapflib/yapf_api.py | yapf/yapflib/yapf_api.py | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | Python | 0 | @@ -5336,36 +5336,24 @@
logger(err)%0A
- else:%0A
raise%0A%0A
@@ -5595,20 +5595,8 @@
rr)%0A
- else:%0A
|
6eac3c570ce9a613071d09f675e65d4abcea95c5 | Disable AppAuthentication, requires further testing | mezzanine_api/views.py | mezzanine_api/views.py | from django.contrib.auth import get_user_model
from django.contrib.sites.models import Site
from mezzanine.blog.models import BlogPost as Post, BlogCategory
from mezzanine.pages.models import Page
from rest_framework import viewsets, filters, permissions, mixins
import django_filters
from django_filters.rest_framework... | Python | 0 | @@ -558,32 +558,36 @@
sAdminOrReadOnly
+ #
, IsAppAuthentic
@@ -3894,33 +3894,36 @@
sAdminOrReadOnly
-,
+%5D #
IsAppAuthentica
@@ -3917,33 +3917,32 @@
AppAuthenticated
-%5D
%0A filter_back
@@ -7076,17 +7076,20 @@
ReadOnly
-,
+%5D #
IsAppAu
@@ -7099,17 +7099,16 @@
nticated
-%5D
%0A fil
|
0051b5a5e287057cab06452d4f178e4c04cbd0c5 | Put the win_osinfo classes in a helper function | salt/utils/win_osinfo.py | salt/utils/win_osinfo.py | # -*- coding: utf-8 -*-
'''
Get Version information from Windows
'''
# http://stackoverflow.com/questions/32300004/python-ctypes-getting-0-with-getversionex-function
from __future__ import absolute_import
# Import Third Party Libs
import ctypes
try:
from ctypes.wintypes import BYTE, WORD, DWORD, WCHAR
HAS_WIN3... | Python | 0.000002 | @@ -733,45 +733,180 @@
'%0A%0A%0A
-if HAS_WIN32:%0A
+def os_version_info_ex():%0A '''%0A Helper function to return the OSVersionInfo class%0A%0A Returns:%0A
+
class
- OSVERSIONINFO
+: The OsVersionInfo class%0A '''%0A class OSVersionInfo
(cty
@@ -1274,26 +1274,26 @@
uper(OSV
-ERSIONINFO
+er... |
ed9be363029446638da5a1ae4ca6f5d1218615df | Send the keypair to the right place with the right name | saltcloud/clouds/hpcs.py | saltcloud/clouds/hpcs.py | '''
HP Cloud Module
======================
The HP cloud module. This module uses the preferred means to set up a
libcloud based cloud module and should be used as the general template for
setting up additional libcloud based modules.
The HP cloud module interfaces with the HP public cloud service
and requires that tw... | Python | 0.000003 | @@ -1848,25 +1848,24 @@
'HPCLOUD.key
-_
name'%0A
@@ -2618,64 +2618,8 @@
'%5D,%0A
- ex_key_name = __opts__%5B'HPCLOUD.key_name'%5D,%0A
@@ -3513,24 +3513,79 @@
eturn False%0A
+ kwargs%5B'ex_keyname'%5D = __opts__%5B'HPCLOUD.keyname'%5D%0A
try:%0A
|
be29826ded5f20f56a7996464a186ccc3f68c0d0 | Switch the default backend from amqp:// (deprecated) to rpc:// | openquake/engine/celeryconfig.py | openquake/engine/celeryconfig.py | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2010-2016 GEM Foundation
#
# OpenQuake 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 Licen... | Python | 0 | @@ -2058,24 +2058,20 @@
None%0A%0A#
-Rabbit
+A
MQ
+P
result
@@ -2117,16 +2117,48 @@
= '
-amqp://'
+rpc://'%0ACELERY_RESULT_PERSISTENT = False
%0A%0A#
|
ee8581536ec36e0e78bf5461fb4dc0365f454943 | Revert redirection to /dev/null (not needed anymore) | saltcontainers/models.py | saltcontainers/models.py | import re
import json
import yaml
import tarfile
import logging
import subprocess
from utils import retry, load_json
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
class ContainerModel(dict):
@retry()
def run(self, command, stream=False):
return self['config']['client'].run(
... | Python | 0 | @@ -1685,36 +1685,24 @@
son -l quiet
- 2%3E/dev/null
%22.format(%0A
@@ -2505,36 +2505,24 @@
son -l quiet
- 2%3E/dev/null
%22.format(%0A
@@ -2755,28 +2755,16 @@
-l quiet
- 2%3E/dev/null
%22.format
@@ -3125,20 +3125,8 @@
%7B0%7D%7D
- 2%3E/dev/null
%22.fo
|
c2f7b71276fbf103aabf008d2ab2cacacfa3e9e7 | Remove debug output | src/gmail_launcher.py | src/gmail_launcher.py | import argparse
import os
import sys
import httplib2
from apiclient.discovery import build
from oauth2client.client import flow_from_clientsecrets, OAuth2Credentials
from oauth2client.tools import run
from workflow import Workflow, PasswordNotFound
import config
def execute(wf):
parser = argparse.ArgumentParse... | Python | 0.000037 | @@ -2715,33 +2715,8 @@
_id%0A
- wf.logger.debug(url)%0A
|
f20699b6154ce9d5c659a15d29737403234484b7 | Fix annotations. | zerver/lib/statistics.py | zerver/lib/statistics.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from zerver.models import UserProfile, UserActivity, UserActivityInterval, Message
from django.utils.timezone import utc
from typing import Any
from datetime import datetime, timedelta
from itertools import chain
from six... | Python | 0 | @@ -233,16 +233,43 @@
port Any
+, Dict, List, Sequence, Set
%0A%0Afrom d
@@ -399,28 +399,32 @@
# type: (
-List
+Sequence
%5Bfloat%5D) -%3E
@@ -852,36 +852,40 @@
# type: () -%3E
-List
+Sequence
%5BUserProfile%5D%0A
@@ -3180,16 +3180,42 @@
ers = %5B%5D
+ # type: List%5BUserProfile%5D
%0A for
@@ -3674,... |
e79e0240165bf2aa77612be2f1227ca7bb3c5fc7 | add empty return docs | lib/ansible/modules/extras/system/make.py | lib/ansible/modules/extras/system/make.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Linus Unnebäck <linus@folkdatorn.se>
#
# This file is part of Ansible
#
# This module 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 ... | Python | 0.000926 | @@ -1629,16 +1629,125 @@
ck%0A'''%0A%0A
+# TODO: Disabled the RETURN as it was breaking docs building. Someone needs to%0A# fix this%0ARETURN = '''# '''%0A%0A
%0Adef for
|
08202533755ed0094518bb31341c4d094e55759e | Create RepositoryConfiguratorCs and run it | projects/epicycle.derkonfigurator-py/epicycle/derkonfigurator/repository/Repository.py | projects/epicycle.derkonfigurator-py/epicycle/derkonfigurator/repository/Repository.py | """
Contains the Repository class
@author: Dima Potekhin
"""
import os
from epicycle.derkonfigurator.utils import nget
from epicycle.derkonfigurator.WorkspaceEntity import WorkspaceEntity
from epicycle.derkonfigurator.externals.ExternalsManager import ExternalsManager
from epicycle.derkonfigurator.packaging.NuGetPac... | Python | 0 | @@ -401,16 +401,78 @@
Project%0A
+from RepositoryConfiguratorCs import RepositoryConfiguratorCs%0A
%0A%0Aclass
@@ -1970,109 +1970,375 @@
lf._
-nuget_packager = NuGetPackager(self)%0A%0A @property%0A def config(self):%0A return self._config
+configurator = self._create_configurator()%0A self._nug... |
f81536c5e17180715b232ea0befedb16d0555873 | use make -j{{JOB_CPUS}} | samples/build-android.py | samples/build-android.py | #!/usr/bin/env python
import time, itertools
from sci import Job
job = Job(__name__, debug = True)
# Parameters - to allow a GUI to easily list them
branch = job.parameter("BRANCH", "Manifest branch", required = True)
build_id_prefix = job.parameter("BUILD_ID_PREFIX", "The build ID prefix to use")
manifest_f... | Python | 0.000002 | @@ -2583,58 +2583,18 @@
%7BJOB
+_CPU
S%7D%7D%22%22%22
-,%0A JOBS = job.var(%22JOB_CPUS%22) + 1
)%0A%0A%0A
|
1cc1df8c00a7a956b0a1207f99928f731714541a | add main path reminder in TaskLog | TaskList/TaskLog/TaskLog.py | TaskList/TaskLog/TaskLog.py | #!/usr/bin/python3.4
# -*-coding:Utf-8 -*
'''module to manage task running log'''
import xml.etree.ElementTree as xmlMod
from TaskList.TaskLog.GroupLog import *
from Preferences.PresetList.Preset.Preset import *
from Preferences.PresetList.Preset.Metapreset import *
class TaskLog:
'''class to manage task running lo... | Python | 0 | @@ -811,16 +811,196 @@
py()%0A%09%09%0A
+%09%09fileName = task.path.split('/').pop()%0A%09%09fileName = fileName%5B0:fileName.rfind('.blend')%5D%0A%09%09self.path = preferences.output.getMainPath(fileName, task.scene, self.presetName)%0A%09%09%0A%09%09%0A
%09%09if typ
|
3d571b1c5602b405b264eb4a9dc316640fd9605a | Remove intermediate images while building the image | cekit/builders/docker_builder.py | cekit/builders/docker_builder.py | import docker
import logging
import os
import re
import yaml
from cekit.builder import Builder
from cekit.errors import CekitError
from docker_squash.squash import Squash
try:
docker_client = docker.Client(version="1.22")
except AttributeError:
docker_client = docker.APIClient(version="1.22")
logger = loggin... | Python | 0.000056 | @@ -1410,16 +1410,42 @@
lf._pull
+%0A args%5B'rm'%5D = True
%0A%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.