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 |
|---|---|---|---|---|---|---|---|
0c6316d76f57dbd64bc055be0fa30d4cdf3e5c0b | Move getspec() function into TestCase class | test.py | test.py | from __future__ import print_function
import sys, os, unittest, subprocess, json
from runac import util
import runac
DIR = os.path.dirname(__file__)
TEST_DIR = os.path.join(DIR, 'tests')
def getspec(src):
with open(src) as f:
h = f.readline()
if h.startswith('# test: '):
return json.loads(h[8:])
else:
re... | Python | 0.000001 | @@ -186,148 +186,8 @@
')%0A%0A
-def getspec(src):%0A%09with open(src) as f:%0A%09%09h = f.readline()%0A%09%09if h.startswith('# test: '):%0A%09%09%09return json.loads(h%5B8:%5D)%0A%09%09else:%0A%09%09%09return %7B%7D%0A%0A
def
@@ -451,16 +451,168 @@
.fn = fn
+%0A%0A%09def getspec(self):%0A%09%09with open(self.fn) a... |
d2bb5dd320253b2fdccddd79eeb240aef70e7098 | Update command.py | src/command.py | src/command.py | # -*- coding: utf-8 -*-
import math
def parse_command(commands, game_stats):
"""
Parse a command from a player and run it.
Parameters
----------
command : command from the player (str).
game_stats : stat of the game (dic).
Return
------
game_stats : game stat after the command exe... | Python | 0.000002 | @@ -2563,17 +2563,16 @@
Version%0A
-h
----
@@ -4151,17 +4151,20 @@
%22%22%22%0A
-%09
+
board_wi
@@ -4195,17 +4195,20 @@
ze'%5D%5B0%5D%0A
-%09
+
board_le
@@ -4242,17 +4242,20 @@
'%5D%5B1%5D%0A%09%0A
-%09
+
damages=
@@ -4291,17 +4291,20 @@
mages'%5D%0A
-%09
+
ship_abs
@@ -4350,17 +4350,2... |
91a3a94466736ef6996befa73549e309fb9251f8 | Remove unused import | explorer/urls.py | explorer/urls.py | from django.conf.urls import patterns, url
from explorer.views import (
QueryView,
CreateQueryView,
PlayQueryView,
DeleteQueryView,
ListQueryView,
ListQueryLogView,
download_query,
view_csv_query,
email_csv_query,
download_csv_from_sql,
schema,
format_sql,
)
urlpatterns ... | Python | 0.000001 | @@ -25,18 +25,8 @@
port
- patterns,
url
|
eb758ca756dc5716252b0364aadd5ef5a40ef773 | Streamline test_ExpectationsStore_with_DatabaseStoreBackend | tests/data_context/store/test_expectations_store.py | tests/data_context/store/test_expectations_store.py | import pytest
from great_expectations.core import ExpectationSuite
from great_expectations.data_context.store import (
DatabaseStoreBackend,
ExpectationsStore,
)
from great_expectations.data_context.types.resource_identifiers import (
ExpectationSuiteIdentifier,
)
from great_expectations.exceptions import ... | Python | 0 | @@ -1145,237 +1145,122 @@
kend
-_postgres(caplog, sa):%0A connection_kwargs = %7B%0A %22drivername%22: %22postgresql%22,%0A %22username%22: %22postgres%22,%0A %22password%22: %22%22,%0A %22host%22: %22localhost%22,%0A %22port%22: %225432%22,%0A %22database%22: %22test_ci%22... |
eff3a021cbd816c83537f13ec37b203aaeb5d79e | testing encoding of std. err file in parse_to_json_file | cgum/program.py | cgum/program.py | from cgum.basic import *
from cgum.utility import FNULL
import cgum.statement as statement
import cgum.expression as expression
import cgum.preprocessor as preprocessor
import cgum.typs as typs
from subprocess import Popen, CalledProcessError
import os.path
import json
import tempfile
# TODO: Probe
class Asm(Node):
... | Python | 0.999931 | @@ -5234,16 +5234,20 @@
err =
+str(
f_err.re
@@ -5250,16 +5250,41 @@
r.read()
+)%0A%0A print(err)
%0A%0A
|
3b4dd9a59de9a37a4167f64fec2f3896479f56c9 | Simplify option formatting. | qipipe/registration/ants/similarity_metrics.py | qipipe/registration/ants/similarity_metrics.py | class SimilarityMetric(object):
_FMT = "{name}[{fixed}, {moving}, {opts}]"
def __init__(self, name, *opts):
self.name = name
self.opts = opts
def format(self, fixed, moving, weight=1):
"""
Formats the ANTS similiarity metric argument.
:param reference: the fixed re... | Python | 0.000001 | @@ -488,16 +488,71 @@
opt
+s = %5Bweight%5D%0A opts.extend(self.opts)%0A opt
_arg = '
@@ -564,24 +564,8 @@
oin(
-%5Bweight%5D + self.
opts
|
0d666e9d3a1f998d92fb9c6cc1ffdb9e9414e74e | reduce the size of the "smile" text | photobooth.py | photobooth.py | #!/usr/bin/env python3
import pygame
import subprocess
import os
import configparser
import sys
import time
import calendar
from itertools import chain
config = {
"photostorage": "Pictures",
"chdkptp": "chdkptp",
"fullscreen": "-w" not in sys.argv, # -w for windowed
"bgcolor": (0, 0, 0),
"textcolo... | Python | 0.999999 | @@ -3381,16 +3381,17 @@
tdout)%0A%0A
+%0A
def doCo
@@ -3662,23 +3662,38 @@
t(%22smile
+!
%22, game
+, fontSize=200
)%0A
|
01ea3c8481aeba52dc17d8324ddbec8b6a633f35 | Add a method that inserts comma to given number. | numberutils.py | numberutils.py | ##-*- coding: utf-8 -*-
#!/usr/bin/python
"""
Number to Hangul string util.
"""
__author__ = 'SeomGi, Han'
__credits__ = ['SeomGi, Han']
__copyright__ = 'Copyright 2015, Python Utils Project'
__license__ = 'MIT'
__version__ = '0.0.1'
__maintainer__ = 'SeomGi, Han'
__email__ = 'iandmyhand@gmail.com'
__status__ = 'Prod... | Python | 0.000075 | @@ -43,36 +43,35 @@
%22%22%22%0A
-Number to Hangul string util
+Utilities related to Number
.%0A%22%22
@@ -225,13 +225,13 @@
= '
+1.
0.0
-.1
'%0A__
@@ -779,16 +779,135 @@
value)%0A%0A
+ def __del__(self):%0A self._int_value = 0%0A self._string_value = ''%0A self._len_string_value = 0%0A%0... |
bc6bacf6bd5fccf2e09dd3c07f6104e1f845351b | Revert "Added solution to assignment 4" | bootcamp/lesson4.py | bootcamp/lesson4.py | import datetime
import math
import requests
from core import test_helper
# Question 1
# ----------
# Using the datetime module return a datetime object with the year of 2015, the month of June, and the day of 1
def playing_with_dt():
return datetime.datetime(year=2015, month=06, day=01)
# Question 2
# -------... | Python | 0 | @@ -239,61 +239,34 @@
-return datetime.datetime(year=2015, month=06, day=01)
+# Write code here%0A pass
%0A%0A%0A#
@@ -357,22 +357,34 @@
-return math.pi
+# Write code here%0A pass
%0A%0A%0A#
@@ -899,637 +899,34 @@
-demo_attributes = %5B%5D%0A url = 'http://data.cityofnewyork.us/api/views/kk... |
46eeffee39ea9ae7edacc1fe63b0686f6f2a68ad | Simplify logger initization logic | wolfbot.py | wolfbot.py | #!/usr/bin/env python3.2
# Copyright (c) 2011 Jimmy Cao
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, m... | Python | 0.001181 | @@ -1361,12 +1361,8 @@
if
-not
botc
@@ -1375,24 +1375,120 @@
DEBUG_MODE:%0A
+ logging.basicConfig(level=logging.DEBUG)%0A logger = logging.getLogger()%0A else:%0A
logg
@@ -1830,20 +1830,16 @@
r(hdlr)%0A
-
form
@@ -1901,36 +1901,32 @@
b/%25Y %25H:%25M:%25S')%0A
-
for h... |
d81ac294add6d2f14f283556ca1b0b2addd5f1ee | Update main.py | fx_collect/main.py | fx_collect/main.py | class MainAggregator(object):
def __init__(self):
"""
The MainAggregator class is just here to setup the initial
databases and then start each subprocess.
I'm going to change the name because its shit.
Later updates will have database health monitoring or
... | Python | 0.000001 | @@ -1,12 +1,139 @@
+from database import DatabaseHandler%0Afrom broker import FXCMBrokerHandler%0A%0Aimport subprocess%0Aimport time%0Aimport sys%0Aimport re%0A%0A
class MainAg
|
864d551ca7aaf661ecfe54cca8c69e0f9daf1c46 | fix license | ezcf/__init__.py | ezcf/__init__.py | __author__ = "laike9m (laike9m@gmail.com)"
__title__ = 'ezcf'
__version__ = '0.0.1'
# __build__ = None
__license__ = 'Apache 2.0'
__copyright__ = 'Copyright 2015 laike9m'
import sys
from .api import ConfigFinder
sys.meta_path.append(ConfigFinder()) | Python | 0.000001 | @@ -81,27 +81,8 @@
.1'%0A
-# __build__ = None%0A
__li
@@ -96,18 +96,11 @@
= '
-Apache 2.0
+MIT
'%0A__
|
ae8e98a4e609bee0e73175bdc50859dd0bed62cb | Fix lint errors. | recipe-server/normandy/base/api/serializers.py | recipe-server/normandy/base/api/serializers.py | from django.contrib.auth.models import User
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
id = serializers.IntegerField()
first_name = serializers.CharField()
last_name = serializers.CharField()
email = serializers.CharField()
class Meta:
model... | Python | 0.000006 | @@ -531,9 +531,8 @@
er()
-;
%0A
|
53db7465c8bb5f7ea0a9647b69555df36ade4191 | Use a trigger and lambda instead of schedule for the delay stage. | moa/stage/delay.py | moa/stage/delay.py |
__all__ = ('Delay', )
import random
import time
from kivy.clock import Clock
from kivy.properties import (OptionProperty, BoundedNumericProperty,
ReferenceListProperty)
from moa.stage import MoaStage
class Delay(MoaStage):
def pause(self, *largs, **kwargs):
if super(Delay, self).pause(*largs, **kw... | Python | 0 | @@ -226,16 +226,271 @@
tage):%0A%0A
+ _delay_step_trigger = None%0A%0A def __init__(self, **kwargs):%0A super(Delay, self).__init__(**kwargs)%0A self._delay_step_trigger = Clock.create_trigger(lambda dt:%0A self.step_stage())%0A%0A
def
@@... |
bdacc7646c087d8fd87feb20c6af1d23d5cb1feb | clean up track/models | common/djangoapps/track/models.py | common/djangoapps/track/models.py | from django.db import models
from django.db import models
class TrackingLog(models.Model):
dtcreated = models.DateTimeField('creation date', auto_now_add=True)
username = models.CharField(max_length=32, blank=True)
ip = models.CharField(max_length=32, blank=True)
event_source = models.CharField(max_l... | Python | 0.000001 | @@ -1,34 +1,4 @@
-from django.db import models%0A%0A
from
@@ -57,16 +57,90 @@
Model):%0A
+ %22%22%22Defines the fields that are stored in the tracking log database%22%22%22%0A
dtcr
@@ -735,47 +735,32 @@
-s = %22%5B%25s%5D %25s@%25s: %25s %7C %25s %7C %25s %7C %25s%22 %25 (
+fmt = (%0A u%22%5B... |
de99cf5de9fa96c0a5e0853b04070cd4637c43af | Fix bug in csv report generation and add some code refactoring | edx_data_research/reporting/edx_base.py | edx_data_research/reporting/edx_base.py | import csv
import os
from pymongo import MongoClient
class EdX(object):
def __init__(self, args):
self.uri = args.uri
client = MongoClient(self.uri)
self.db = client[args.db_name]
self._collections = None
self.output_directory = args.output_directory
self.row_limi... | Python | 0 | @@ -588,25 +588,28 @@
%09%22%22%22%0A
-%09
+
self.csv_dat
@@ -670,19 +670,26 @@
mber_of_
-row
+data_point
s = len(
@@ -702,20 +702,16 @@
sv_data)
- + 1
%0A
@@ -728,15 +728,21 @@
_of_
-row
+data_point
s %3C
-=
sel
@@ -754,24 +754,44 @@
_limit:%0A
-%09
+
+number_of_rows =
self... |
ed6b086f785c4856ef73484ffc2082a0fba200b8 | Update accessible classes | ezhc/__init__.py | ezhc/__init__.py |
from ._config import load_js_libs
from ._highcharts import Highcharts
from ._highstock import Highstock
from . import sample
from . import build
from ._clock import Clock
__all__ = ['Highcharts',
'Highstock',
'sample',
'build',
'Clock',
]
load_js_libs()
| Python | 0 | @@ -101,16 +101,85 @@
ghstock%0A
+from ._global_options import GlobalOptions%0Afrom ._theme import Theme%0A
from . i
@@ -284,24 +284,72 @@
Highstock',%0A
+ 'GlobalOptions',%0A 'Theme',%0A
'
|
dec3d29f8482cb71f5ea3337622460a38b4f9124 | Set the default to production | galaxy/__init__.py | galaxy/__init__.py | # (c) 2012-2016, Ansible by Red Hat
#
# This file is part of Ansible Galaxy
#
# Ansible Galaxy is free software: you can redistribute it and/or modify
# it under the terms of the Apache License as published by
# the Apache Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
... | Python | 0.000014 | @@ -1414,23 +1414,26 @@
ettings.
-default
+production
')%0A l
|
20d41f31e40a8d20902fcfea4543fa9c2c4d8cae | add dummy import function, so modulefinder can find our tables. | Lib/fontTools/ttLib/tables/__init__.py | Lib/fontTools/ttLib/tables/__init__.py | """Empty __init__.py file to signal Python this directory is a package.
(It can't be completely empty since WinZip seems to skip empty files.)
"""
| Python | 0.000002 | @@ -1,147 +1,793 @@
-%22%22%22Empty __init__.py file to signal Python this directory is a package.%0A(It can't be completely empty since WinZip seems to skip empty files.)%0A%22%22%22
+def _moduleFinderHint():%0A%09import B_A_S_E_%0A%09import C_F_F_%0A%09import D_S_I_G_%0A%09import DefaultTable%0A%09import G_D_E_F_%0A%... |
4380f7484f7ee7a122bb598e0a8ffa700fdac6a2 | Allow for runserver_plus | i18n_helper/__init__.py | i18n_helper/__init__.py | from django.utils.functional import lazy
from django.utils.safestring import mark_safe
from django.utils.encoding import is_protected_type
from django.utils.safestring import SafeUnicode
from django.conf import settings
from wraptools import wraps
import django
import copy
import sys
# Default values
DEFAULT_I18N_CLA... | Python | 0.000001 | @@ -495,11 +495,14 @@
1:2%5D
- ==
+%5B0%5D in
%5B'r
@@ -510,16 +510,34 @@
nserver'
+, 'runserver_plus'
%5D%0A# Omit
|
c24979627a8a2282a297704b735b1445b56dbce6 | Bump version. [skip ci] | mocket/__init__.py | mocket/__init__.py | try:
# Py2
from mocket import mocketize, Mocket, MocketEntry, Mocketizer
except ImportError:
# Py3
from mocket.mocket import mocketize, Mocket, MocketEntry, Mocketizer
__all__ = (mocketize, Mocket, MocketEntry, Mocketizer)
__version__ = '2.7.1'
| Python | 0 | @@ -257,7 +257,7 @@
2.7.
-1
+2
'%0A
|
974f46f4bfe6a8307a5e4a878c14028e89d0c6d6 | update pep8 | newfies/dialer_campaign/admin.py | newfies/dialer_campaign/admin.py | #
# Newfies-Dialer License
# http://www.newfies-dialer.org
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (C) 2011-2012 Star2Billing S.L.
#
# The Initia... | Python | 0 | @@ -779,50 +779,8 @@
ing,
- %5C%0A
dia
@@ -2468,15 +2468,58 @@
-(r'%5E$',
+ (r'%5E$',%0A
sel
@@ -2574,24 +2574,39 @@
+
+
(r'%5Eadd/$',
@@ -2604,16 +2604,44 @@
%5Eadd/$',
+%0A ... |
35e82ceae764048aab3a92c92e4fcfebb624e4fd | use the new delete endpoint in client testing | test.py | test.py | import logging
import subprocess
import sys
import os
from nose.tools import raises
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
from luminoso_api import LuminosoClient
from luminoso_api.errors import LuminosoAPIError, LuminosoError
ROOT_CLIENT = None
PROJECT = None
USERNAME = None
P... | Python | 0 | @@ -1377,22 +1377,26 @@
-P
RO
-JEC
+OT_CLIEN
T.delete
@@ -1396,16 +1396,60 @@
.delete(
+USERNAME + '/projects', project=PROJECT_NAME
)%0A%0A #
@@ -3686,37 +3686,43 @@
AME + '/projects
-/' +
+', project=
PROJECT_NAME)%0A
|
3e96eaeb9bb722d24fe4e589c49e52d32e8af1aa | Bump version. | mocket/__init__.py | mocket/__init__.py | try:
# Py2
from mocket import mocketize, Mocket, MocketEntry, Mocketizer
except ImportError:
# Py3
from mocket.mocket import mocketize, Mocket, MocketEntry, Mocketizer
__all__ = (mocketize, Mocket, MocketEntry, Mocketizer)
__version__ = '3.7.0'
| Python | 0 | @@ -257,7 +257,7 @@
3.7.
-0
+1
'%0A
|
049ea0ecf4a3b7bafc3989865a1ec95fc15b8ac8 | change dogbone test to not check for the number of dogbones, just location. Due to the path changing | src/Mod/Path/PathTests/TestPathDressupDogbone.py | src/Mod/Path/PathTests/TestPathDressupDogbone.py | # -*- coding: utf-8 -*-
# ***************************************************************************
# * *
# * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> *
# * ... | Python | 0 | @@ -5800,32 +5800,169 @@
heights)%0A
+ # with start point changes it passes back over the same spot multiple times, so just make sure they are in the right locations%0A #
self.assertEqua
|
4f6ceb1147d0c326f55621de4b60c440d22d336a | add basis parsing to volume parser | envision/envision/parser/vasp/volume.py | envision/envision/parser/vasp/volume.py | #
# ENVISIoN
#
# Copyright (c) 2017 Fredrik Segerhammar
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,... | Python | 0.000001 | @@ -1486,16 +1486,91 @@
e_volume
+%0D%0Afrom ..h5writer import _write_basis%0D%0Afrom .unitcell import _parse_lattice
%0A%0Aline_r
@@ -1789,16 +1789,93 @@
%0A %22%22%22
+%0D%0A %0D%0A basis = _parse_lattice(f)%0D%0A _write_basis(h5_path, basis)%0D%0A
%0A arr
|
fe6b00078507158ec823c61d9d78e29a08ade084 | fix args err | BEGAN/began_train.py | BEGAN/began_train.py | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import tensorflow as tf
import numpy as np
import sys
import time
import began_model as began
from dataset import DataIterator
from dataset import CelebADataSet as DataSet
sys.path.append('../')
import image... | Python | 0.99997 | @@ -1469,11 +1469,8 @@
ages
-, _
in
|
469b07c2d13486e760b485025dfa08c08b6696a7 | Fix logger name to match module name | check_python.py | check_python.py | # Copyright 2021 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | Python | 0.000003 | @@ -4235,18 +4235,20 @@
isp.
-run_pylint
+check_python
')%0A%0A
|
d043afa075cfdb347172047ac17082911c637ef9 | set default values for required config variables | packages/grid/backend/app/app/core/config.py | packages/grid/backend/app/app/core/config.py | # stdlib
import secrets
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
from typing import Union
# third party
from pydantic import AnyHttpUrl
from pydantic import BaseSettings
from pydantic import EmailStr
from pydantic import HttpUrl
from pydantic import PostgresDsn... | Python | 0.000003 | @@ -570,24 +570,41 @@
ER_NAME: str
+ = %22unconfigured%22
%0A SERVER_
@@ -619,16 +619,38 @@
yHttpUrl
+ = %22https://localhost%22
%0A # B
@@ -1268,24 +1268,33 @@
CT_NAME: str
+ = %22grid%22
%0A SENTRY_
@@ -1420,19 +1420,23 @@
ptional%5B
-str
+HttpUrl
%5D:%0A
@@ -1441,16 +1441,29 @@
if
+v is ... |
0af1c7da5d030a66d1e3a9054c15429618048cc3 | Extend the unlink method | obuka/obuka.py | obuka/obuka.py | # -*- coding: utf-8 -*-
from osv import osv, fields
class obuka_session(osv.osv):
_name = "obuka.session"
_order = 'name'
def _obuka_occupied(self, cr, uid, ids, name, arg, context=None):
res = {}
for obuka in self.browse(cr, uid, ids, context):
#import pdb; pdb.set_trace()
... | Python | 0 | @@ -2972,16 +2972,363 @@
ntext)%0A%0A
+ def unlink(self, cr, uid, ids, context=None):%0A for obuka in self.browse(cr, uid, ids, context=context):%0A if obuka.state in %5B'done', 'cancel'%5D:%0A raise osv.except_osv('Error',%0A %22You can't delete this data!%22... |
812c40bfaf2ef4f59643c53e8b8ac76f20777423 | Modify a debian example to archlinux | fabtools/arch.py | fabtools/arch.py | """
Archlinux packages
==================
This module provides tools to manage Archlinux packages
and repositories.
"""
from __future__ import with_statement
from fabric.api import hide, run, settings
from fabtools.utils import run_as_root
MANAGER = 'LC_ALL=C pacman'
def update_index(quiet=True):
"""
Up... | Python | 0.999775 | @@ -1425,23 +1425,15 @@
ll('
-build-essential
+mongodb
', u
@@ -1530,18 +1530,15 @@
'
-python-dev
+mongodb
',%0A
@@ -1553,19 +1553,22 @@
'
-libxml2-dev
+python-pymongo
',%0A
|
97805f122e18831ac69a59f3cb9ac539d8a65246 | Disable up to date checking. It has a huge overall system perf penalty. | src/db_stub.py | src/db_stub.py | # Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | Python | 0 | @@ -1936,32 +1936,34 @@
_idle(self):%0A
+ #
self.db.check_u
|
c9aff74371f176daa011514a05875f59c86a33c6 | Refactor CLI argument parsing. | checker/main.py | checker/main.py | #!/usr/bin/env python
import os
import sys
import subprocess
import getopt
class Checker:
def __init__(self, path):
if not os.path.isdir(path):
sys.exit(1);
self.path = os.path.realpath(path)
self.jobs = self.getExecutableFiles(self.path)
def getExecutableFiles(self,path)... | Python | 0 | @@ -61,22 +61,24 @@
%0Aimport
-getopt
+argparse
%0A%0A%0Aclass
@@ -741,174 +741,419 @@
-opts, path = getopt.getopt(sys.argv%5B1%5D, %22h%22)%0A for opt, arg in opts:%0A if opt == '-h':%0A print './main.py /full/path/to/jobs'%0A sys.exit()
+# Add CLI parsing.%0A parser = argpa... |
cb97332633a0e34205abdbc97f4e85a1342ea2ed | add code in test ean | erpeek_inventory/erpeek_article_test.py | erpeek_inventory/erpeek_article_test.py | # -*- coding: utf-8 -*-
###############################################################################
#
# ODOO (ex OpenERP)
# Open Source Management Solution
# Copyright (C) 2001-2015 Micronaet S.r.l. (<http://www.micronaet.it>)
# Developer: Nicola Riolini @thebrush (<https://it.linkedin.com/in/thebrush>)
# This pro... | Python | 0.000001 | @@ -2548,16 +2548,38 @@
O Code%22,
+ variant.default_code,
ean13,
|
3c231fb34f8adb1d290f2cfc0164dbea6049bc34 | Reorder methods in test.py | test.py | test.py | from ethjsonrpc import EthJsonRpc
methods = [
'web3_clientVersion',
'net_version',
'net_listening',
'net_peerCount',
'eth_protocolVersion',
'eth_coinbase',
'eth_mining',
'eth_hashrate',
'eth_gasPrice',
'eth_accounts',
'eth_blockNumber',
'eth_getCompilers',
'eth_newPe... | Python | 0.000003 | @@ -98,17 +98,17 @@
net_
-listening
+peerCount
',%0A
@@ -111,33 +111,33 @@
',%0A 'net_
-peerCount
+listening
',%0A 'eth_
|
33824535f4938c6b2b5170d0bb952d5cac8e3408 | fix missing database commit, thanks Jeff! | checkservers.py | checkservers.py | #!/usr/bin/env python
# Copyright (c) 2009, Steve Oliver (steve@xercestech.com)
#All rights reserved.
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
#... | Python | 0 | @@ -4172,16 +4172,33 @@
= True%0A
+%09%09%09%09server.put()%0A
%09%09else:%0A
|
7a1ad4ae0e3ec15c1fd5aec763476e482ea76ba8 | Make a better version of shuffle | somber/components/utilities.py | somber/components/utilities.py | """Utility functions."""
import numpy as np
class Scaler(object):
"""
Scales data based on the mean and standard deviation.
Attributes
----------
mean : numpy array
The columnwise mean of the data after scaling.
std : numpy array
The columnwise standard deviation of the data a... | Python | 0.998703 | @@ -1728,59 +1728,40 @@
-z = array.copy()%0A np.random.shuffle(z)%0A return z
+return np.random.permutation(array)
%0A
|
00b57b668a5c68a209dac335915bbf2312df0580 | Make sure tests run on local package | test.py | test.py | #
# Copyright (c) 2013-2014, Scott J Maddox
#
# This file is part of openbandparams.
#
# openbandparams 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
# ... | Python | 0 | @@ -897,16 +897,165 @@
ct.%0A'''%0A
+# Make sure we import the local package%0Aimport os%0Aimport sys%0Asys.path.insert(0,%0A os.path.abspath(os.path.join(os.path.dirname(__file__), 'src')))%0A
import n
|
736c18d692a3e69179ef164f1b9d927c2eb2637a | Update test.py | test.py | test.py | from ethjsonrpc import EthJsonRpc
methods = [
'web3_clientVersion',
'net_version',
'net_peerCount',
'net_listening',
'eth_protocolVersion',
'eth_coinbase',
'eth_mining',
'eth_hashrate',
'eth_gasPrice',
'eth_accounts',
'eth_blockNumber',
'eth_getCompilers',
'eth_newPe... | Python | 0.000001 | @@ -4103,21 +4103,24 @@
nt_id)%0A%0A
-print
+digest =
c.web3_
@@ -4128,8 +4128,134 @@
ha3('')%0A
+print digest%0A# keccak-256, not sha3-256%0Aassert digest == '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'%0A
|
13b2be31b19b2ca6f6b7979ce6754ee35a2aeb51 | Remove print statement | boundary/api_cli.py | boundary/api_cli.py | #!/usr/bin/env python
###
### Copyright 2014-2015 Boundary, Inc.
###
### Licensed under the Apache License, Version 2.0 (the "License");
### you may not use this file except in compliance with the License.
### You may obtain a copy of the License at
###
### http://www.apache.org/licenses/LICENSE-2.0
###
### Unless ... | Python | 0.007015 | @@ -4677,28 +4677,8 @@
s())
-%0A print(self.url)
%0A%0A
|
a038be51410c66d7dff819093b1c71c4ddfa5516 | Move to 2 channels to stop OS X IOError | soundbooth/apps/booth/utils.py | soundbooth/apps/booth/utils.py | import os
from sys import byteorder
from array import array
from struct import pack
import pyaudio
import wave
from django.conf import settings
CHANNELS = 1
SAMPLE_RATE = 44100
THRESHOLD = 500
CHUNK_SIZE = 1024
FORMAT = pyaudio.paInt16
TEMP_PATH = getattr(settings, 'BOOTH_RECORDING_STORAGE_PATH', '/tmp')
def is_s... | Python | 0 | @@ -151,17 +151,17 @@
NNELS =
-1
+2
%0ASAMPLE_
@@ -1865,16 +1865,25 @@
p.open(
+%0A
format=F
@@ -1888,16 +1888,24 @@
=FORMAT,
+%0A
channel
@@ -1908,16 +1908,24 @@
nnels=1,
+%0A
rate=SA
@@ -1954,16 +1954,24 @@
ut=True,
+%0A
output=
@@ -2012,16 +2012,21 @@
UNK_SIZE
+%0A
)... |
c1ec2b58ca0520b64cd34c6fa88156d9d2e58462 | add stop all option | kbservices.py | kbservices.py | #!/usr/bin/python
# -*- coding:utf-8 -*-
#############################################
# Flask & werkzeug HTTP Proxy Sample code.
# - Code by Jioh L. Jung (ziozzang@gmail.com)
#############################################
import ConfigParser
import os
import docker
from docker.utils import kwargs_from_env
import time... | Python | 0.000538 | @@ -5944,32 +5944,134 @@
%22Stop %22+service%0A
+ if service=='all':%0A for s in kbs.get_list():%0A kbs.kill_service(s)%0A else:%0A
kbs.kill_s
|
8c0e26f6b15b605831e6394cbce7feb8f4a35de4 | Fix test. | gdax_utils_test.py | gdax_utils_test.py | """Unit tests."""
import unittest
import gdax_utils
import mock
import utils
utils.configure_logging(to_stderr=True, to_file=False)
class TestInit(unittest.TestCase):
def setUp(self):
self.patcher = mock.patch('gdax.AuthenticatedClient', autospec=True)
self.mock_gdax_client_class = self.patcher.start()
... | Python | 0.000001 | @@ -2909,28 +2909,8 @@
D',%0A
- 'stp': True%0A
|
a122193144185320f045367613650b40f7df00b8 | Rework the test script a bit. | test.py | test.py | import codegen, jinja2, spidermonkey, sys
import simplejson as json
def jstest(env, src, data):
run = spidermonkey.Runtime()
ctx = run.new_context()
js = codegen.generate(env, codegen.compile(env, src))
jsobj = json.dumps(data)
code = js + '\ntemplate.render(%s);' % jsobj
return ctx.execute(code)
def pytest(env... | Python | 0 | @@ -66,333 +66,12 @@
on%0A%0A
-def jstest(env, src, data):%0A%09run = spidermonkey.Runtime()%0A%09ctx = run.new_context()%0A%09js = codegen.generate(env, codegen.compile(env, src))%0A%09jsobj = json.dumps(data)%0A%09code = js + '%5Cntemplate.render(%25s);' %25 jsobj%0A%09return ctx.execute(code)%0A%0Adef pytest(env, s... |
5d71fadb5b1e1453c7667a9264f9b2fb3cfe5398 | Fix filename and name table info of Arabic fonts. | nototools/autofix_for_release.py | nototools/autofix_for_release.py | #!/usr/bin/python
#
# Copyright 2014 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... | Python | 0 | @@ -809,16 +809,31 @@
ttLib%0A%0A
+from nototools
import f
@@ -1758,16 +1758,65 @@
ONS = %7B%0A
+ 'Sans Kufi': 'Kufi',%0A 'SansKufi': 'Kufi',%0A
'UI
@@ -3744,24 +3744,16 @@
modified
-
%0A%0A%0ATABLE
@@ -4150,24 +4150,16 @@
= False%0A
-
%0A
@@ -4405,24 +4405,16 @@
s(font)%0A
... |
0b46c6636dc97a008277566e20c5f72cd0e5384f | Allow to upload retina '@2x' files | cmscloud_client/utils.py | cmscloud_client/utils.py | # -*- coding: utf-8 -*-
from cStringIO import StringIO
import hashlib
import shutil
import subprocess
import tarfile
import tempfile
from cmscloud_client.serialize import register_yaml_extensions
import os
import re
import yaml
FILENAME_BASIC_RE = re.compile(r'^[a-zA-Z0-9_]+[a-zA-Z0-9._-]*\.[a-zA-Z]{2,4}$')
ALLOWED_EX... | Python | 0 | @@ -284,16 +284,22 @@
0-9._-%5D*
+(@2x)?
%5C.%5Ba-zA-
|
58603e6d49b058c3c8ac70a5d1c50897d8409d82 | Use new webhook URL in place of token | icinga_slack/webhook.py | icinga_slack/webhook.py | #!/usr/bin/env python
import argparse
import json
import urllib
import sys
from icinga_slack import __version__
alert_colors = {'UNKNOWN': '#6600CC',
'CRITICAL': '#FF0000',
'WARNING': '#FF9900',
'OK': '#36A64F'}
class AttachmentField(dict):
def __init__(self, tit... | Python | 0.000003 | @@ -2396,32 +2396,27 @@
d(self,
-subdomain, token
+webhook_url
):%0A
@@ -2511,98 +2511,19 @@
pen(
-'https://%7B0%7D.slack.com/services/hooks/incoming-webhook?token=%7B1%7D'.format(subdomain, token)
+webhook_url
, da
@@ -3066,17 +3066,17 @@
ument('-
-s
+u
', metav
@@ -3083,117 +3083,18 @@
ar=%22
-SUBDOMAIN%... |
73021d7b456c2cc76816ffebf37a440ec21f5019 | Add the prog to the ArgumentParser arguments | icinga_slack/webhook.py | icinga_slack/webhook.py | #!/usr/bin/env python3
import argparse
import json
import urllib.parse
import urllib.request
import sys
from icinga_slack import __version__
alert_colors = {'UNKNOWN': '#6600CC',
'CRITICAL': '#FF0000',
'WARNING': '#FF9900',
'OK': '#36A64F'}
class AttachmentField(dict... | Python | 0 | @@ -2786,16 +2786,69 @@
tParser(
+%0A prog=%22icinga_slack_webhook_notify%22,%0A
descript
@@ -2912,32 +2912,37 @@
ook integration%22
+%0A
)%0A parser.add
|
6d425b617a28b2eb35d53f35f5136148aa1f2ef6 | Add relative import for the parser | source/champollion/__init__.py | source/champollion/__init__.py | # :coding: utf-8
import os
from ._version import __version__
from .directive.data import AutoDataDirective
from .directive.function import AutoFunctionDirective
from .directive.class_ import AutoClassDirective
from .directive.method import AutoMethodDirective
from .directive.attribute import AutoAttributeDirective
... | Python | 0.000003 | @@ -422,21 +422,43 @@
k%0A)%0A
-import parser
+from .parser import get_environment
%0A%0A%0Ad
@@ -608,15 +608,8 @@
t =
-parser.
get_
|
feb745334c4b7ba97a54c8e2b1862888ed9369ea | fix test: str->bytes | test.py | test.py | #!/usr/bin/env python
# Standard library imports
import unittest
import random
import hashlib
# Custom SHA-1 library
import sha1
class TestSha1(unittest.TestCase):
"""TestSha1 class
Test case for the custom SHA-1 implementation.
"""
def test_similar(self):
"""Test Similar SHA-1 Inputs
... | Python | 0.000023 | @@ -16,16 +16,72 @@
python%0A%0A
+from __future__ import print_function, unicode_literals%0A
# Standa
@@ -145,16 +145,68 @@
ashlib%0A%0A
+try:%0A range = xrange%0Aexcept NameError:%0A pass%0A%0A
# Custom
@@ -606,33 +606,33 @@
%22%22%0A print
-
+(
'%5Cn%3E%3E%3E running:
@@ -644,16 +644,17 @@
simil... |
1caace2631f8e9c38cf0adfb1179a5260dcd3c33 | Change output_all_unitprot to allow multi ids for some proteins. | tools/management/commands/output_all_uniprot.py | tools/management/commands/output_all_uniprot.py | from django.core.management.base import BaseCommand, CommandError
from django.core.management import call_command
from django.conf import settings
from django.db import connection
from django.db.models import Q
from django.template.loader import render_to_string
from protein.models import Protein
from residue.models im... | Python | 0 | @@ -1052,19 +1052,22 @@
b_links.
-get
+filter
(web_res
@@ -1088,16 +1088,50 @@
niprot')
+.values_list('index', flat = True)
%0A
@@ -1163,21 +1163,22 @@
%5D =
+list(
uniprot
-.index
+)%0A
%0A%0A
|
595767b396fa5fc54a924cc8e2565505eb8389a8 | Mangle expections to avoid matching line twice | ilogue/fexpect/tests.py | ilogue/fexpect/tests.py | import unittest
import sys
from fabric.api import *
def runtest(testclass):
suite = unittest.TestLoader().loadTestsFromTestCase(testclass)
testResult = unittest.TextTestRunner(verbosity=2).run(suite)
if not testResult.wasSuccessful():
sys.exit('[fexpect test wrapper] One or more tests failed!')
c... | Python | 0.999998 | @@ -4978,8 +4978,552 @@
result %0A
+%0A def test_multimatch(self):%0A %22%22%22 Match same prompt but with different responses %22%22%22%0A%0A cmd = 'echo %22name%22 && read NAME1 && echo %22name is $NAME1%22 && echo %22name%22 && read NAME2 && echo %22name is $NAME2%22'%0A%0A from ilogue.fexp... |
d908fd35c751ea47e7e5162f93a9d64a7fdc2f35 | Test escape of single quotes. | test_alias.py | test_alias.py | import unittest
import json
import io
import alias
from alias import Alias, Aliases, JSONBackend
class FakeAliasDatabase():
def __init__(self):
self.aliases = []
def add_alias(self, alias):
self.aliases.append(alias)
def get_aliases(self):
return self.aliases
def make_fake_alia... | Python | 0 | @@ -3018,16 +3018,324 @@
contains
+_singlequote(self):%0A aliases = make_aliases()%0A%0A aliases.add_alias(Alias('test', %22echo 'This contains quotes'%22))%0A result = aliases.get_sh_script()%0A%0A expected = %22%22%22alias test=%22echo %5C%5C%5C'This contains quotes%5C%5C%5C'%22%5Cn%22%22... |
1b06091101c119f30eb5eabb2d2638fab0e8f658 | Test modified to work with renamed debug function | test_debug.py | test_debug.py | from bullsandcows import isdebugmode
def test_isdebugmode():
assert isdebugmode() == 0, "program is in debug mode, this should not be commited"
| Python | 0 | @@ -25,20 +25,16 @@
isdebug
-mode
%0D%0A%0D%0Adef
@@ -45,20 +45,16 @@
_isdebug
-mode
():%0D%0A
@@ -68,20 +68,16 @@
isdebug
-mode
() == 0,
|
f1c47f99255bc6ff2dc7819d72ceafbecaa328a4 | Fix comment formatting | imapclient/test/util.py | imapclient/test/util.py | # Copyright (c) 2014, Menno Smits
# Released subject to the New BSD License
# Please see http://en.wikipedia.org/wiki/BSD_licenses
from __future__ import unicode_literals
def find_unittest2():
import unittest
if hasattr(unittest, 'skip') and hasattr(unittest, 'loader'):
return unittest # unittest f... | Python | 0.000003 | @@ -758,18 +758,16 @@
sesRegex
- #
and new
@@ -811,18 +811,16 @@
you use
- #
assertR
|
6e35f8778b3293a9b2ad60624637460146f755ba | add njobs parameters | implement/tunemodels.py | implement/tunemodels.py | import sys
import os
sys.path.insert(0, os.path.abspath('..'))
from implement.decisiontreemodel import DecisionTreeModel
from sklearn.grid_search import GridSearchCV, RandomizedSearchCV
from evaluation.sklearnmape import mean_absolute_percentage_error_scoring
import logging
from utility.logger_tool import Logger
from ... | Python | 0.000001 | @@ -975,17 +975,43 @@
earch =
-5
+260%0A self.n_jobs = 1
%0A
@@ -1591,32 +1591,52 @@
ptions(), cv=cv,
+ n_jobs=self.n_jobs,
%0A
@@ -1840,16 +1840,36 @@
, cv=cv,
+n_jobs=-self.n_jobs,
%0A
|
e1088b744b9b8040c3304f75980adb60ffb6d1c5 | Fix python3 compatibility. | khal/calendar_display.py | khal/calendar_display.py | # vim: set ts=4 sw=4 expandtab sts=4 fileencoding=utf-8:
# Copyright (c) 2013-2015 Christian Geier et al.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# wi... | Python | 0 | @@ -1260,16 +1260,17 @@
e%0A%0Afrom
+.
terminal
|
96261b3c277cb2f694fb5cc2f7cbe29847ff1a53 | change the receiver | SyncEmailNotification.py | SyncEmailNotification.py | __author__ = 'chuqiao'
import smtplib
import base64
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
def viewlog(file):
file = open("syncsolr.log")
file.seek(0,2)# Go to the end of the file
while True:
line = file.readline()
if "***Finished synchronizi... | Python | 0.000017 | @@ -514,35 +514,28 @@
fo@bioevents
--portal.org
+.pro
'%0A%0A msg =
@@ -1184,19 +1184,12 @@
ents
--portal.org
+.pro
'%0A%0A
|
474dfd3aa9d03ed6bbda47078523badcc7909664 | Reorganize and refactor | scripts/observations/scrape/CalFloraScraper.py | scripts/observations/scrape/CalFloraScraper.py | from selenium import webdriver
import pandas as pd
import argparse
import PyFloraBook.web.communication as scraping
import PyFloraBook.input_output.data_coordinator as dc
# ---------------- INPUT ----------------
# Parse arguments
parser = argparse.ArgumentParser(
description='Scrape CalFlora for species counts... | Python | 0.000002 | @@ -168,16 +168,84 @@
as dc%0A%0A%0A
+# ---------------- GLOBALS ----------------%0ASITE_NAME = %22CalFlora%22%0A%0A
# ------
@@ -296,22 +296,22 @@
guments%0A
-parser
+PARSER
= argpa
@@ -403,16 +403,21 @@
ily'
-)%0Aparser
+%0A )%0APARSER
.add
@@ -426,16 +426,21 @@
rgument(
+%0A
%22-f%22, %22-
@@ -510,16... |
1305af162dd05591cc0e5328eb192843b63dabb1 | Use DefaultRouter instead of SimpleRouter | kk/urls_v1.py | kk/urls_v1.py | from django.conf.urls import include, url
from kk.views import (
HearingCommentViewSet, HearingImageViewSet, HearingViewSet, SectionCommentViewSet,
SectionViewSet, UserDataViewSet
)
from rest_framework_nested import routers
router = routers.SimpleRouter()
router.register(r'hearing', HearingViewSet)
router.regi... | Python | 0 | @@ -243,22 +243,23 @@
routers.
-Simple
+Default
Router()
|
cd04513f6f0f5bb9f55e895aa852ffefefe1e47f | fix building by name of configuration; add some form of pretty-printing to the build by id command | pnc/builds.py | pnc/builds.py | from argh import arg
import client
from client.BuildconfigurationsApi import BuildconfigurationsApi
import utils
__author__ = 'thauser'
def _create_build_configuration(name, project_id, environment, description, scm_url, scm_revision, patches_url,
build_script):
created_build_config... | Python | 0 | @@ -729,23 +729,16 @@
ponse =
-client.
Buildcon
@@ -1583,16 +1583,45 @@
print(
+utils.pretty_format_response(
Buildcon
@@ -1673,16 +1673,24 @@
r(id=id)
+.json())
)%0A
|
9f7fb674333d8b7f0846759df6b1ac89d99d2536 | use openmm topology | examples/neq-switching/run_equilibrium_setup.py | examples/neq-switching/run_equilibrium_setup.py | import numpy as np
import os
import tqdm
from openeye import oechem, oeiupac
from openmmtools import integrators, states, mcmc, constants
from openmoltools import forcefield_generators
from perses.rjmc.topology_proposal import TopologyProposal, SystemGenerator
from perses.rjmc.geometry import FFAllAngleGeometryEngine
f... | Python | 0 | @@ -3872,16 +3872,28 @@
topology
+.to_openmm()
, initia
@@ -4517,32 +4517,44 @@
_system(topology
+.to_openmm()
, positions, sys
|
a0dcb73836222e3515c4af4cf4cfe2d41f470b9e | handle missing stash[benchstorage] (#3564) | tests/integration_tests/tests/benchmarks/conftest.py | tests/integration_tests/tests/benchmarks/conftest.py | import pytest
from datetime import datetime
def log_result(name, timing, start, stop):
if timing:
name = f'{name}.{timing}'
print(f'BENCH {name}: {stop - start}')
class _Timings(object):
def __init__(self, func_name):
self.records = {}
self._func_name = func_name
def start(s... | Python | 0 | @@ -1341,33 +1341,37 @@
in session.stash
-%5B
+.get(
'benchstorage'%5D.
@@ -1368,17 +1368,21 @@
storage'
-%5D
+, %7B%7D)
.items()
|
f14ffce0f11a34554e48bd14c17c296e346bc611 | Fix press events not propagating in ripple behavior | kivymd/ripplebehavior.py | kivymd/ripplebehavior.py | # -*- coding: utf-8 -*-
from kivy.properties import ListProperty, NumericProperty, StringProperty, \
BooleanProperty
from kivy.animation import Animation
from kivy.graphics import Color, Ellipse, StencilPush, StencilPop, \
StencilUse, StencilUnUse, Rectangle
class CommonRipple(object):
ripple_rad = NumericProperty... | Python | 0.000024 | @@ -1732,16 +1732,72 @@
ripple()
+%0A%09%09return super(CommonRipple, self).on_touch_down(touch)
%0A%0A%09def l
@@ -5617,28 +5617,29 @@
er_y - self.ripple_rad / 2.)
+%0A
|
ec2fa6c99e59e80348b6f91f0f7d081df2e99878 | Update api url. | latubot/source/kunto.py | latubot/source/kunto.py | """Fetch and parse data from fluentprogress (previously kunto) servers."""
import logging
import json
import requests
import dateutil.parser
from latubot import time_utils
logger = logging.getLogger(__name__)
# all areas with kunto service
ALL_AREAS = (
"HAMEENLINNA",
"HYRYNSALMIPUOLANKA",
"HYVINKAA",... | Python | 0 | @@ -1444,17 +1444,21 @@
pi/venue
-s
+/list
%22%0A re
|
ab989d8ddf24b86a2ac394b97018c242877ec1ed | Allow config parameter fallback to config file | bumblebee/engine.py | bumblebee/engine.py | """Core application engine"""
import os
import time
import pkgutil
import importlib
import bumblebee.error
import bumblebee.modules
def all_modules():
"""Return a list of available modules"""
result = []
path = os.path.dirname(bumblebee.modules.__file__)
for mod in [name for _, name, _ in pkgutil.iter... | Python | 0.000294 | @@ -127,16 +127,134 @@
odules%0A%0A
+try:%0A from ConfigParser import SafeConfigParser%0Aexcept ImportError:%0A from configparser import SafeConfigParser%0A%0A
def all_
@@ -960,24 +960,339 @@
= self.name%0A
+%0A self._configFile = None%0A for cfg in %5B os.path.expanduser(%22~/.bumblebee-status.c... |
0902b33e3baebfc1e48c321c4a47216addecdee1 | Use "NOTE(username):" instead of "XXX:" | tests/onnx_chainer_tests/functions_tests/test_rnn.py | tests/onnx_chainer_tests/functions_tests/test_rnn.py | import chainer
import chainer.functions as F
import chainer.links as L
from chainer import testing
import numpy as np
from onnx_chainer import onnx_helper
from onnx_chainer.testing import input_generator
from onnx_chainer_tests.helper import ONNXModelTest
@testing.parameterize(
{'n_layers': 1, 'name': 'n_step_gr... | Python | 0.000651 | @@ -3436,19 +3436,28 @@
#
-XXX
+NOTE(msakai)
: Replac
|
f32aa62b097ae603bf26e62a1abc5867f31faaed | Add run_table parser | km3pipe/db.py | km3pipe/db.py | # coding=utf-8
# Filename: db.py
# pylint: disable=locally-disabled
"""
Database utilities.
"""
from __future__ import division, absolute_import, print_function
from datetime import datetime
import ssl
import urllib
from urllib2 import (Request, build_opener, HTTPCookieProcessor, HTTPHandler)
import cookielib
import ... | Python | 0.000007 | @@ -2781,16 +2781,374 @@
aframe%0A%0A
+ def run_table(self, detid='D_ARCA001'):%0A url = 'streamds/runs.txt?detid=%7B0%7D'.format(detid) %0A content = self._get_content(url)%0A try:%0A dataframe = pd.read_csv(StringIO(content), sep=%22%5Ct%22)%0A except ValueError:%0A ... |
57adb8240cf0015e1e10f2e9fd4f090a8d896a27 | Revert "[examples...bindings_generator] began to update" | examples/stationarylinear_bindings_generator.py | examples/stationarylinear_bindings_generator.py | #! /usr/bin/env python
# This file is part of the dune-pymor project:
# https://github.com/pymor/dune-pymor
# Copyright Holders: Felix Albrecht, Stephan Rave
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
import sys
from pybindgen import param, retval
from dune.pymor.core import prepa... | Python | 0 | @@ -381,17 +381,16 @@
indings%0A
-#
from dun
@@ -466,16 +466,16 @@
ntation%0A
+
%0A%0Adef in
@@ -993,33 +993,32 @@
e_pymor(module)%0A
-#
# add exampl
@@ -1029,17 +1029,16 @@
er code%0A
-#
inje
@@ -1056,17 +1056,16 @@
module)%0A
-#
# ad
@@ -1083,33 +1083,32 @@
discretization%0A
-#
discretiza... |
e6cef6d96a3c2bd6dd07f580f4a704734133d316 | Bump version to 0.3c2 | lava_server/__init__.py | lava_server/__init__.py | # Copyright (C) 2010, 2011 Linaro Limited
#
# Author: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
#
# This file is part of LAVA Server.
#
# LAVA Server 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 F... | Python | 0.000001 | @@ -753,11 +753,11 @@
idate%22,
-1
+2
)%0A
|
40b1b89485216e66d0e422bd1df73180c00072cf | update doc string on alarm-request rest api | newfies/apirest/alarm_request_serializers.py | newfies/apirest/alarm_request_serializers.py | # -*- coding: utf-8 -*-
#
# Newfies-Dialer License
# http://www.newfies-dialer.org
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (C) 2011-2013 Star2Bi... | Python | 0 | @@ -3270,16 +3270,682 @@
st-id%25/%0A
+%0A%0A **get_nested_alarm_request**:%0A%0A CURL Usage::%0A%0A curl -u username:password -H 'Accept: application/json' http://localhost:8000/rest-api/alarm-request/%25alarm-request-id%25/get_nested_alarm_request/%0A%0A Response::%0A%0A %7B%0A... |
c6878b3306290760231ca24893418e0c87eb1f8a | Make directory in selinux tests | tests/pytests/unit/modules/file/test_file_selinux.py | tests/pytests/unit/modules/file/test_file_selinux.py | import logging
import os
import shutil
import pytest
import salt.config
import salt.loader
import salt.modules.cmdmod as cmdmod
import salt.modules.file as filemod
import salt.utils.data
import salt.utils.files
import salt.utils.platform
import salt.utils.stringutils
from tests.support.mock import MagicMock, patch
lo... | Python | 0 | @@ -1017,16 +1017,35 @@
st-dir%22%0A
+ subdir.mkdir()%0A
yiel
|
68e2f4eb1ca3a4b8e85cc4968db87a85c59b095f | Remove stop_trigger | examples/chainermn/cifar/train_cifar.py | examples/chainermn/cifar/train_cifar.py | import argparse
import chainermn
import chainer
import chainer.links as L
from chainer import training
from chainer.training import extensions
from chainer.datasets import get_cifar10
from chainer.datasets import get_cifar100
import models.VGG
def main():
parser = argparse.ArgumentParser(description='Chainer C... | Python | 0.000014 | @@ -3677,20 +3677,29 @@
er,
-stop_trigger
+(args.epoch, 'epoch')
, ou
|
cf194c1c3a64c4547049c16fb901a2b33dc84ddf | Add verbose output | src/xii/output.py | src/xii/output.py | import os
from threading import Lock
from abc import ABCMeta, abstractmethod
# synchronize output from multiple threads
output_lock = Lock()
class colors:
TAG = '\033[0m'
NORMAL = '\033[37m'
CLEAR = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
WARN = '\033[91m'
SUCCESS = '\033[34m'
... | Python | 0.999999 | @@ -679,16 +679,252 @@
pass%0A%0A
+ @abstractmethod%0A def is_verbose(self):%0A pass%0A%0A def verbose(self, msg):%0A if self.is_verbose():%0A self._tprint(self._generate_tag(),%0A msg,%0A colors.NORMAL)%0A%0A
def
|
b3b99ed11d6c86721e9e57441111e0c88461eb70 | Fix example state relation | examples/defining_new_state_relation.py | examples/defining_new_state_relation.py | import numpy as np
import matplotlib.pyplot as plt
from math import log
from rsfmodel import rsf
# This is really just the Ruina realtion, but let's pretend we invented it!
# We'll inherit attributes from rsf.StateRelation, but you wouldn't have to.
# It does provide velocity contribution calculation for us though!
... | Python | 0.998463 | @@ -419,17 +419,16 @@
def
-_
set_stea
@@ -533,97 +533,8 @@
m):%0A
- if self.state is None:%0A self.state = _set_steady_state(self, system)%0A%0A
|
dace2c628357dd6e50de62051e3d85fbb0c75666 | Use new naming scheme for transactions. | 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 os
import warnings
import logging
from flask import ... | Python | 0 | @@ -5790,27 +5790,19 @@
action(%22
-transaction
+web
.flask%22)
|
cdbf31d056f1991b5206a4f42f2ab129f800e7a7 | Add get_maximum_transfer_length function | letmecreate/core/spi.py | letmecreate/core/spi.py | #!/usr/bin/env python3
"""Python binding of SPI wrapper of LetMeCreate library."""
import ctypes
_LIB = ctypes.CDLL('libletmecreate_core.so')
# SPI_SPEED
SPI_680K = 680000
SPI_1M36 = 1360000
SPI_2M73 = 2730000
SPI_5M46 = 5460000
SPI_10M93 = 10930000
SPI_21M87 = 21870000
SPI_43M75 = 43750000
def init():
"""Init... | Python | 0 | @@ -2649,16 +2649,429 @@
gth)%5D%0A%0A%0A
+def get_maximum_tranfer_length():%0A %22%22%22Returns maximum length of a transfer in bytes.%0A%0A Note: An exception is thrown if it fails to find the limit.%0A %22%22%22%0A transfer_length_limit = ctypes.c_uint32(0)%0A ret = _LIB.spi_get_maximum_tranfer_lengt... |
abd3daed5cd0c70d76bf8fa1cfdda93efcda3e70 | Make the `now` helper timezone aware | knights/compat/django.py | knights/compat/django.py |
from django.core.urlresolvers import reverse
from django.utils.encoding import iri_to_uri
import datetime
from knights.library import Library
register = Library()
@register.helper
def now(fmt):
return datetime.datetime.now().strftime(fmt)
@register.helper
def url(name, *args, **kwargs):
try:
ret... | Python | 0.000001 | @@ -39,16 +39,50 @@
reverse%0A
+from django.utils import timezone%0A
from dja
@@ -242,24 +242,15 @@
urn
-datetime.datetim
+timezon
e.no
|
cbe4f5470fec966538f63ca9beb04838bfbf3aa3 | change to contentnode_1 and contentnode_2 for content relationship | kolibri/content/admin.py | kolibri/content/admin.py | from django.contrib import admin
from .models import PrerequisiteContentRelationship, RelatedContentRelationship
class PrerequisiteRelationshipInline1(admin.TabularInline):
model = PrerequisiteContentRelationship
fk_name = 'contentmetadata_1'
max = 20
extra = 0
class PrerequisiteRelationshipInline2(... | Python | 0.000001 | @@ -231,32 +231,28 @@
e = 'content
-metadata
+node
_1'%0A max
@@ -393,32 +393,28 @@
e = 'content
-metadata
+node
_2'%0A max
@@ -549,24 +549,20 @@
'content
-metadata
+node
_1'%0A
@@ -705,16 +705,12 @@
tent
-metadata
+node
_2'%0A
@@ -754,16 +754,12 @@
tent
-Metadata
+Node
Admi
|
d43657286f49271a6236499bdba288925fb23087 | update tests to v1.2.0 (#1307) | exercises/roman-numerals/roman_numerals_test.py | exercises/roman-numerals/roman_numerals_test.py | import unittest
import roman_numerals
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.0
class RomanTest(unittest.TestCase):
numerals = {
1: 'I',
2: 'II',
3: 'III',
4: 'IV',
5: 'V',
6: 'VI',
9: 'IX',
27: 'XXVII',
48... | Python | 0 | @@ -106,17 +106,17 @@
n%60 @ v1.
-0
+2
.0%0A%0Aclas
@@ -321,24 +321,44 @@
: 'XLVIII',%0A
+ 49: 'XLIX',%0A
59:
|
1c2c7eb9b14a8abaea22e644d8b6e4bd4a649fcb | move replacing img path holder logic to back-end because if we deal with it at front-end, we are dealing with a JS object | kolibri/content/views.py | kolibri/content/views.py | import datetime
import mimetypes
import os
import zipfile
from django.http import Http404
from django.http.response import FileResponse, HttpResponseNotModified
from django.utils.http import http_date
from django.views.generic.base import View
from .utils.paths import get_content_storage_file_path
class ZipContentV... | Python | 0 | @@ -486,32 +486,104 @@
e.%0A %22%22%22%0A%0A
+ # path placeholder%0A path_place_holder = %22($%7Baronsface%7D%22%0A%0A
# calcul
@@ -1706,24 +1706,200 @@
e zip file%0A
+ content = zf.open(info).read()%0A content_with_path = content.replace(path_place_holder, %22%5C%... |
34b2385d6a3bb7acdbcd3f894d30dfbc734bd52e | allow to set matplotlib backend from env MATPLOTLIB_BACKEND | ggplot/__init__.py | ggplot/__init__.py | from .ggplot import *
from .exampledata import *
| Python | 0.000001 | @@ -1,12 +1,331 @@
+# For testing purposes we might need to set mpl backend before any%0A# other import of matplotlib.%0Adef _set_mpl_backend():%0A import os%0A import matplotlib as mpl%0A%0A env_backend = os.environ.get('MATPLOTLIB_BACKEND')%0A if env_backend:%0A # we were instructed%0A mpl.u... |
4e9a530403dce47f322df471255a0fc40fd1071f | Change number of episodes to 60000 | examples/tic_ql_tabular_selfplay_all.py | examples/tic_ql_tabular_selfplay_all.py | '''
The Q-learning algorithm is used to learn the state-action values for all
Tic-Tac-Toe positions by playing games against itself (self-play).
'''
from capstone.game.games import TicTacToe
from capstone.game.players import RandPlayer
from capstone.rl import Environment, GameMDP
from capstone.rl.learners import QLearn... | Python | 0.999996 | @@ -845,17 +845,18 @@
pisodes=
-3
+60
000,%0A
|
f694b2a234216ae7ecc7b925799f43caca5e9a32 | add more debug output for config file | preprocess.py | preprocess.py | #!/usr/bin/env python3
# Copyright 2016 Curtis Sand <curtissand@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | Python | 0 | @@ -1347,16 +1347,324 @@
ction)))
+%0A dprint('Enabled Tasks: %25s' %25 config_file.enabled_tasks)%0A dprint('Copy Files Jobs:')%0A for cfj in list(config_file.copy_files_jobs):%0A dprint(%22%25s:%22 %25 cfj.name)%0A dprint(%22 sources: %25s%22 %25 ' '.join(cfj.value.sources.value))%0A d... |
292fd33a3d251b4c5773e96989e45d8e3d7c6c3b | Change tasks in settingfs | krunchr/settings/base.py | krunchr/settings/base.py | from socket import gethostname
HOSTNAME = gethostname()
HOSTNAME_SHORT = HOSTNAME.split('.')[0]
APPLICATION_ROOT = '/v1/krunchr'
DEBUG = True
RETHINKDB_HOST = 'batman.krunchr.net'
RETHINKDB_PORT = 28019
RETHINKDB_AUTH = ''
RETHINKDB_DB = 'krunchr'
BROKER_URL = 'redis://localhost:6379'
CELERY_RESULT_BACKEND = 'redi... | Python | 0.000001 | @@ -571,24 +571,8 @@
ks',
- 'map.jobs.sum',
'ut
|
9fa72e3df775d4848336bcb0965cfd6afeaf5953 | change cmi_and_test to invoke the targets 'all', 'tests' and 'run_tests' separately | scripts/devel/catkin_make_isolated_and_test.py | scripts/devel/catkin_make_isolated_and_test.py | #!/usr/bin/env python3
import argparse
import os
import sys
from ros_buildfarm.catkin_workspace import call_catkin_make_isolated
from ros_buildfarm.catkin_workspace import clean_workspace
from ros_buildfarm.catkin_workspace import ensure_workspace_exists
def main(argv=sys.argv[1:]):
parser = argparse.ArgumentPa... | Python | 0.000008 | @@ -1492,93 +1492,21 @@
-rc = call_catkin_make_isolated(%0A args.rosdistro_name, args.workspace_root,
+arguments = %5B
%0A
@@ -1514,17 +1514,16 @@
-%5B
'--cmake
@@ -1563,33 +1563,32 @@
1',%0A
-
'-DCATKIN_SKIP_T
@@ -1598,17 +1598,16 @@
ING=0',%0A
-
@@ -1669,25 +... |
2d391f9e6183f06c0785cbb2c57b7a4fcf703a80 | Bump version to 0.1a14 | chirptext/__version__.py | chirptext/__version__.py | # -*- coding: utf-8 -*-
# chirptext's package version information
__author__ = "Le Tuan Anh"
__email__ = "tuananh.ke@gmail.com"
__copyright__ = "Copyright (c) 2012, Le Tuan Anh"
__credits__ = []
__license__ = "MIT License"
__description__ = "ChirpText is a collection of text processing tools for Python."
__url__ = "ht... | Python | 0 | @@ -431,9 +431,9 @@
%7B%7Da1
-3
+4
%22.fo
|
6436a8adf4088f59c704a7d49e5f61c30d665058 | return true in ping cli | lacli/server/__init__.py | lacli/server/__init__.py | from lacli.decorators import command
from lacli.command import LaBaseCommand
from twisted.python.log import startLogging, msg
from twisted.internet import reactor
from thrift.transport import TTwisted
from thrift.protocol import TBinaryProtocol
from lacli.server.interface.ClientInterface import CLI
import sys
import z... | Python | 0.00219 | @@ -1230,8 +1230,28 @@
CLI()')%0A
+ return True%0A
|
af40e69bca873a7d0060aaf3391fb8feb91bf673 | Use correct format for custom payload keys | openprescribing/frontend/signals/handlers.py | openprescribing/frontend/signals/handlers.py | import logging
from allauth.account.signals import user_logged_in
from anymail.signals import tracking
from requests_futures.sessions import FuturesSession
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.conf import settings
... | Python | 0.000004 | @@ -1228,90 +1228,32 @@
-%7D%0A
- if event.metadata:%0A payload%5B
'dt'
-%5D =
+:
event.
-metadata%5B'
subject
-'%5D
+,
%0A
@@ -1265,40 +1265,20 @@
-payload%5B
'cn'
-%5D =
+:
event.
-metadata%5B'
camp
@@ -1286,18 +1286,17 @@
ign_name
-'%5D
+,
%0A
@@ -1304,40 +1304,20... |
52a6ea1e7dd4333b9db6a0bbd53b8ae0b39a1f6d | Add __doc__ to module functions | Designs/redundant.py | Designs/redundant.py | '''Due to the needs arising from completing the project on time, I have defined redundant.py
which will hold replacement modules as I migrate from file based application to lists only web application. This modules
so far will offer the capabilities of registration, creating a shopping list and adding items into
a shopp... | Python | 0.000025 | @@ -391,16 +391,44 @@
sword):%0A
+ '''registration list'''%0A
acco
@@ -444,24 +444,24 @@
d(username)%0A
-
account.
@@ -625,32 +625,79 @@
ate(list_name):%0A
+ '''container of names of shopping lists'''%0A
#list_na
@@ -846,16 +846,62 @@
,item):%0A
+ '''adding item to a given name of list''... |
965ac6a04871d45bcec25ccaabe80197b1c8e104 | Fix flake8 errors. | st2actions/st2actions/runners/actionchainrunner.py | st2actions/st2actions/runners/actionchainrunner.py | import ast
import eventlet
import jinja2
import json
import six
import uuid
from oslo.config import cfg
from st2actions.runners import ActionRunner
from st2common import log as logging
from st2common.exceptions import actionrunner as runnerexceptions
from st2common.models.api import action
from st2common.services imp... | Python | 0 | @@ -74,37 +74,8 @@
id%0A%0A
-from oslo.config import cfg%0A%0A
from
|
9f52714e696879e46ebf98164827ebf0cc4cd666 | Return to homepage after logout | opendebates/registration_urls.py | opendebates/registration_urls.py | """
URLconf for registration and activation, using django-registration's
one-step backend.
If the default behavior of these views is acceptable to you, simply
use a line like this in your root URLconf to set up the default URLs
for registration::
(r'^accounts/', include('registration.backends.simple.urls')),
Thi... | Python | 0.000001 | @@ -3108,24 +3108,265 @@
confirm'),%0A%0A
+ url(r'%5Elogout/$',%0A auth_views.logout,%0A %7B'template_name': 'registration/logout.html',%0A 'next_page': %22list_ideas%22%7D),%0A %0A
|
daf4cb0f7c273be107cef871e9a67f52f674495f | Fix test failure from e26de49a6104. | fixlib/engine.py | fixlib/engine.py | # Copyright (C) 2010 KenTyde BV
# All rights reserved.
#
# This software is licensed as described in the file LICENSE,
# which you should have received as part of this distribution.
from datetime import datetime
import fix42
import asyncore
class Engine(asyncore.dispatcher):
def __init__(self, sock):
asyncore.d... | Python | 0 | @@ -2925,16 +2925,34 @@
er = %5B%5D%0A
+%09%09self.hooks = %7B%7D%0A
%09%0A%09def l
|
111cdf1496074e25b764e042fa0ab1b7b0e2a2b7 | Add agriculture import to calendar registry | pandas_market_calendars/calendar_registry.py | pandas_market_calendars/calendar_registry.py | from .market_calendar import MarketCalendar
from .exchange_calendar_asx import ASXExchangeCalendar
from .exchange_calendar_bmf import BMFExchangeCalendar
from .exchange_calendar_cfe import CFEExchangeCalendar
from .exchange_calendar_cme import CMEExchangeCalendar
from .exchange_calendar_eurex import EUREXExchangeCalend... | Python | 0 | @@ -249,32 +249,110 @@
xchangeCalendar%0A
+from .exchange_calendar_cme_agriculture import CMEAgricultureExchangeCalendar%0A
from .exchange_c
|
1534c3c47fea71db2cf4f9f224c2e5ff5a8632e2 | Remove audio file after playing, not while | tests/test.py | tests/test.py | from time import sleep
import sys
import os
sys.path.insert(0, os.path.realpath("../../swood"))
import swood
def find_program(prog):
for path in os.environ["PATH"].split(os.pathsep):
vlc_location = os.path.join(path.strip('"'), prog)
if os.path.isfile(fpath):
return vlc_location, args
... | Python | 0.000001 | @@ -1515,21 +1515,28 @@
-os.remove(out
+running_player.wait(
)%0A
@@ -1537,32 +1537,42 @@
t()%0A
+os.remove(
running_player.w
@@ -1562,37 +1562,39 @@
(running_player.
-wait(
+args%5B1%5D
)%0A runnin
|
c9c27a51d8c4469f3167d6e5449b31723379241e | fix test for PY3 | tests/test.py | tests/test.py | from easyprocess import Proc
from nose.tools import eq_, ok_
from unittest import TestCase
import os.path
d = os.path.dirname(__file__)
example1_py = os.path.join(d, 'example1.py')
example2_py = os.path.join(d, 'example2.py')
example3_py = os.path.join(d, 'example3.py')
def test_1_call():
import example1
eq_... | Python | 0.000001 | @@ -98,16 +98,27 @@
os.path
+%0Aimport sys
%0A%0Ad = os
@@ -277,16 +277,47 @@
3.py')%0A%0A
+PY3 = sys.version_info%5B0%5D %3E= 3%0A
%0Adef tes
@@ -2035,32 +2035,113 @@
roc(cmd).call()%0A
+ if PY3:%0A eq_(p.stderr, '')%0A eq_(p.stdout, '3.2')%0A else:%0A
eq_(p.stdout
@@ -2138,32 +2138,... |
788d20dc049d0f14760e3ff1012d8b3e0edc041a | Use six.reraise | flubber/tasks.py | flubber/tasks.py | #
# This file is part of flubber. See the NOTICE for more information.
#
import flubber
from flubber.event import Event
from flubber._tasklet import tasklet, get_current, TaskletExit
__all__ = ['Task', 'TaskExit', 'spawn', 'sleep', 'task']
def sleep(seconds=0):
"""Yield control to another eligible coroutine un... | Python | 0.000132 | @@ -83,16 +83,40 @@
lubber%0A%0A
+from flubber import six%0A
from flu
@@ -3098,22 +3098,28 @@
+six.re
raise
-
+(
throw_ar
@@ -3153,16 +3153,17 @@
_args%5B2%5D
+)
%0A
|
aba93ed6b72fabcad1aeead10702dae40d72ac1c | Add docstring to reporting info | file_transfer/datamover/transporters.py | file_transfer/datamover/transporters.py |
import os
from datetime import datetime
from .connectors import FTPConnector, LocalConnector
from .s3enram import S3EnramHandler
class Porter:
def __init__(self):
""""""
self.transferred = []
self.stalled = []
def transfer(self):
raise 'Not implemented'
def log_transfe... | Python | 0 | @@ -909,16 +909,282 @@
ed files
+%0A%0A :param reset_file: if True, a new file is created and an existing%0A log file is deleted; if False, text appends%0A :param transfertype: Additional text to define the transfer type, %0A provided in the header of the transfer section%0A
%22%22... |
fda1544249585a9a65136af24f92b976a19938d7 | Fix bug when not using translation | cbpos/translator.py | cbpos/translator.py | import cbpos
import gettext
cbpos.config.set_default('locale', 'use', True)
cbpos.config.set_default('locale', 'languages', list())
cbpos.config.set_default('locale', 'fallback', True)
cbpos.config.set_default('locale', 'codeset', '')
class TranslatorBuilder(object):
"""
Helper class to create a GlobalTransla... | Python | 0 | @@ -3231,16 +3231,20 @@
%22%22%22%0A
+def
dummy_ge
@@ -3252,26 +3252,39 @@
text
- = lambda message:
+(self, message):%0A return
mes
|
f2350b4be2e88f282e7a49cafebb7e8e7c37efd9 | Bump version | YaDiskClient/__init__.py | YaDiskClient/__init__.py | """
Client for Yandex.Disk.
"""
__version__ = '0.5.1'
| Python | 0 | @@ -44,11 +44,11 @@
= '
-0.5
+1.0
.1'%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.