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 |
|---|---|---|---|---|---|---|---|
0a725db8e8d7f1e73a84fb0d0acc181603e706cb | Refactor to readability test | kboard/functional_test/test_post_delete.py | kboard/functional_test/test_post_delete.py | from .base import FunctionalTest, login_test_user_with_browser, NotFoundPostError
class DeletePostTest(FunctionalTest):
@login_test_user_with_browser
def test_delete_post(self):
# μ§νμ΄λ κ²μκΈμ μμ νλ κΈ°λ₯μ΄ μ λλ‘ λμνλμ§ νμΈνκΈ° μν΄ κΈ°λ³Έ κ²μνμΌλ‘ μ΄λνλ€.
self.move_to_default_board()
# 'django' λν κ²μκΈκ³Ό 'spri... | Python | 0.000004 | @@ -503,16 +503,20 @@
%EC%95%8A%EC%95%84%EC%84%9C %EC%82%AD%EC%A0%9C%EB%A5%BC
+%ED%95%98%EB%A0%A4%EA%B3%A0
%ED%95%9C%EB%8B%A4.%0A
@@ -557,22 +557,8 @@
%EB%8F%99%ED%95%9C %ED%9B%84
- '%EC%82%AD%EC%A0%9C' %EB%B2%84%ED%8A%BC%EC%9D%84 %EB%88%84%EB%A5%B8%EB%8B%A4.
%0A
@@ -727,28 +727,31 @@
-delete_post_bu... |
4f0657272afd693549d65b23ef9badbb59ae4395 | use File to record in db | plugins/feeds/public/hybdrid_analysis.py | plugins/feeds/public/hybdrid_analysis.py | import logging
from datetime import timedelta
from core.errors import ObservableValidationError
from core.feed import Feed
from core.observables import Hash, Hostname
class Hybrid_Analysis(Feed):
default_values = {
"frequency":
timedelta(minutes=5),
"name":
"Hybdrid-Analy... | Python | 0 | @@ -160,16 +160,22 @@
Hostname
+, File
%0A%0A%0Aclass
@@ -646,16 +646,93 @@
item):%0A
+ f_hyb = File.get_or_create(value='FILE: %7B%7D'.format(item%5B'sha256'%5D))%0A%0A
@@ -1737,22 +1737,21 @@
-sha256
+f_hyb
.add_con
@@ -1772,22 +1772,21 @@
-sha256
+f_hyb
.tag(tag
@@ -1845,61... |
fcf10e2a5a29bbe268c1405e1755b1e6aed1f417 | test rm unused imports for one file | rj_gameplay/stp/utils/fsm.py | rj_gameplay/stp/utils/fsm.py | import logging
from enum import Enum
from typing import (
Union,
Callable,
Dict,
Optional,
Iterable,
List,
Any,
TypedDict,
)
State = Enum
TransitionFunction = Callable[[], bool] # Takes no args, returns a bool
class Event(TypedDict):
condition: TransitionFunction
name: str
... | Python | 0 | @@ -104,41 +104,8 @@
al,%0A
- Iterable,%0A List,%0A Any,%0A
|
bbd7266a9e228ac111497b12d00ea71b3e0f4f5a | fix imports | edx_proctoring/management/commands/set_attempt_status.py | edx_proctoring/management/commands/set_attempt_status.py | """
Django management command to manually set the attempt status for a user in a proctored exam
"""
from optparse import make_option
from django.core.management.base import BaseCommand
from edx_proctoring.api import (
update_attempt_status,
get_exam_by_id
)
from edx_proctoring.models import ProctoredExamStu... | Python | 0.000002 | @@ -185,90 +185,8 @@
nd%0A%0A
-from edx_proctoring.api import (%0A update_attempt_status,%0A get_exam_by_id%0A)%0A%0A
from
@@ -686,24 +686,27 @@
dest='user
+_id
',%0A
@@ -1055,24 +1055,138 @@
%22%22%22%0A%0A
+ from edx_proctoring.api import (%0A update_attempt_status,%0A ... |
2c23fa4cf151964d7a170430efdd16a7471ac3bd | Version bump | mixins/__init__.py | mixins/__init__.py | __version__ = "0.0.2"
| Python | 0.000001 | @@ -16,7 +16,7 @@
0.0.
-2
+3
%22%0A
|
9c0d62d7b08d63b7daf338a16fc34896856aefb2 | Test code for encoding password in postgresql uri | controllers/lms.py | controllers/lms.py | import sys
import os
import subprocess
from gluon import current
import paramiko
from ednet.ad import AD
from ednet.canvas import Canvas
from ednet.appsettings import AppSettings
# Needed for remote connection?
auth.settings.allow_basic_login = True
#auth.settings.actions_disabled.append('login')
#auth.settings.al... | Python | 0 | @@ -32,16 +32,29 @@
process%0A
+import urllib
%0Afrom gl
@@ -415,16 +415,605 @@
page')%0A%0A
+@auth.requires_membership(%22Administrators%22)%0Adef test():%0A try:%0A canvas_db_pw = str(os.environ%5B%22IT_PW%22%5D) + %22%22%0A except KeyError as ex:%0A # IT_PW not set?%0A canvas_db_pw = %2... |
30eaa94cb788bc8eeb85aab7edc4bd544ce3e811 | Fix Chrome 46 window management | lg_common/src/lg_common/managed_browser.py | lg_common/src/lg_common/managed_browser.py | import sys
import rospy
import socket
import shutil
from lg_common import ManagedApplication, ManagedWindow
from tornado.websocket import websocket_connect
DEFAULT_BINARY = '/usr/bin/google-chrome'
DEFAULT_ARGS = [
'--no-first-run',
'--allow-file-access-from-files',
'--disable-default-apps',
'--disabl... | Python | 0 | @@ -2722,16 +2722,227 @@
nd('&')%0A
+ # In Chrome 46 the instance changes from%0A # Google-chrome (...) to%0A # google-chrome (...)%0A # Since all regex is escaped further down,%0A # just don't match the 'g' for now.%0A
@@ -2955,17 +2955,16 @@
ance = '
-G
oogle-ch
|
a619f703b2d259877e30d3e1ede11813c014f3ad | Fix the AvailableActionsPrinter to support the new multiplayer action spec. | pysc2/env/available_actions_printer.py | pysc2/env/available_actions_printer.py | # Copyright 2017 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 ... | Python | 0 | @@ -1062,16 +1062,19 @@
n_spec()
+%5B0%5D
%0A%0A def
|
e67dc6d0cb46bcce0750246f99c6f99cd3e1ccbc | fix tempita.py for distutils build | scipy/_build_utils/tempita.py | scipy/_build_utils/tempita.py | import sys
import os
import argparse
from Cython import Tempita as tempita
# XXX: If this import ever fails (does it really?), vendor either
# cython.tempita or numpy/npy_tempita.
def process_tempita(fromfile, outfile=None):
"""Process tempita templated file and write out the result.
The template file is ex... | Python | 0 | @@ -480,18 +480,16 @@
h a dist
-it
utils bu
@@ -543,100 +543,15 @@
ath.
-join(os.path.dirname(__file__),%0A os.path.splitext(os.path.
spli
+tex
t(fr
@@ -558,24 +558,18 @@
omfile)%5B
-1%5D)%5B0%5D)%0A
+0%5D
%0A%0A fr
|
c489157661b5738f37c5213f64736d7e88a0700b | Update application_filter.py | Data-Science-Tools/application_filter.py | Data-Science-Tools/application_filter.py | '''
Decision Tree V.1
Simple tool for a company to screen applications in the hiring process
Coded By: Tyler Linne
Date: 4/27/16
'''
#Import required packages
import numpy as np
import pandas as pd
import pydot
from sklearn import tree
from IPython.display import Image
from sklearn.externals.six import StringIO... | Python | 0.000001 | @@ -1067,17 +1067,17 @@
olumns%5B:
-7
+6
%5D)%0A%0A#Cre
|
8f1a446f3ddd00dd68206e3f66f7e4355aa56da1 | test cmd scan | bmd_test.py | bmd_test.py | import os
import bottle
from os import path
from unittest import TestCase
import bmd
import utils
class TestBMD(TestCase):
def setUp(self):
utils._G.scan_mode = False
@bmd.tpl_utils
def fakeview(self):
return dict()
def dirpath(self, dname):
return path.join(path.dirname(__f... | Python | 0.000001 | @@ -4052,19 +4052,16 @@
e()%0A%0A
- #~
def tes
@@ -4085,19 +4085,16 @@
%0A
- #~
argv =
@@ -4172,18 +4172,19 @@
-#~
+r =
bmd.cmd
@@ -4202,10 +4202,38 @@
-#~
+self.assertEqual(r, 0)%0A
sel
|
78856b3752dc1db113074c848a0c3f664c55fcd9 | fix rebooting after a partially interactive install | subiquity/server/controllers/reboot.py | subiquity/server/controllers/reboot.py | # Copyright 2020 Canonical, Ltd.
#
# 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 option) any later version.
#
# This program is distribute... | Python | 0.000001 | @@ -1469,24 +1469,88 @@
ent.wait()%0A%0A
+ def interactive(self):%0A return self.app.interactive%0A%0A
def star
|
bfa1a36d1c731f730cabbc914d52c51d5ddf61dc | Add token auth and session | api/evas_api/settings.py | api/evas_api/settings.py | import os
import dj_database_url
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
SECRET_KEY = '-@y4mtyhs=i-uc7q9b==ur(zhs%gu628wtku%q8d8$-vp1qbza'
DEBUG = bool(os.environ.get('DEBUG', False))
TEMPLATE_DEBUG = bool(os.environ.get('TEMPLATE_DEBUG', False))
DATABASES = {'default': dj_database_url.config(default... | Python | 0 | @@ -1191,16 +1191,208 @@
re',%0A)%0A%0A
+REST_FRAMEWORK = %7B%0A 'DEFAULT_AUTHENTICATION_CLASSES': (%0A 'rest_framework.authentication.BasicAuthentication',%0A 'rest_framework.authentication.SessionAuthentication',%0A )%0A%7D%0A%0A
LANGUAGE
|
d38a1fd25c9ffbfb8599c81e69617a1cb271c068 | Add timeout | certserver.py | certserver.py | #!/usr/bin/python3
import argparse
import json
from http import server
import socket
import ssl
import subprocess
parser = argparse.ArgumentParser(description='certserver')
parser.add_argument(
'--ca-cert',
dest='ca_cert',
action='store',
required=True)
parser.add_argument(
'--listen-host',
d... | Python | 0.000015 | @@ -2581,16 +2581,48 @@
SHA384')
+%0A self._httpd.settimeout(5.0)
%0A%0A def
|
130ce365a0d7c709004da5dedf0e0e35ff6ad3d0 | Fix reference error and add script for packing pypi package (#1172) | python/dllib/src/bigdl/utils/engine.py | python/dllib/src/bigdl/utils/engine.py | #
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | Python | 0 | @@ -991,16 +991,55 @@
ory%22%22%22)%0A
+ print(%22Using %25s%22 %25 spark_home)%0A
@@ -1104,32 +1104,32 @@
y4j-*.zip'))%5B0%5D%0A
-
pyspark
@@ -1301,34 +1301,8 @@
():%0A
- import bigdl.nn.layer%0A
@@ -1331,23 +1331,8 @@
ath(
-bigdl.nn.layer.
__fi
@@ -1543,16 +1543,84 @@
try:... |
b0a948e2036ff232c2026e742a42ab9e9c4fbc07 | Drop unused IndexTypeVar | cfgrib/abc.py | cfgrib/abc.py | """Abstract Base Classes for GRIB messsages and containers"""
import abc
import typing as T
MessageIdTypeVar = T.TypeVar("MessageIdTypeVar")
MessageTypeVar = T.TypeVar("MessageTypeVar", bound="Message")
IndexTypeVar = T.TypeVar("IndexTypeVar", bound="Index") # type: ignore
Message = T.Mapping[str, T.Any]
MutableMess... | Python | 0 | @@ -200,80 +200,8 @@
ge%22)
-%0AIndexTypeVar = T.TypeVar(%22IndexTypeVar%22, bound=%22Index%22) # type: ignore
%0A%0AMe
|
54f978c3ed960997b8a5fa9f0e443b17e702ec85 | Update build_flags to point to proper libdir | python/scannerpy/stdlib/build_flags.py | python/scannerpy/stdlib/build_flags.py | import os.path
import sys
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
def get_include():
return os.path.abspath(os.path.join(SCRIPT_DIR, '..', 'include'))
def print_include():
sys.stdout.write(get_include())
def get_lib():
return os.path.abspath(os.path.join(SCRIPT_DIR, '..'))
def print_li... | Python | 0 | @@ -297,16 +297,23 @@
IR, '..'
+, 'lib'
))%0A%0Adef
|
acf64bd5b91822e449427d3bab24995d1187526c | add fx stubs to account CLI | quantrocket/cli/subcommands/account.py | quantrocket/cli/subcommands/account.py | # Copyright 2017 QuantRocket - 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 ... | Python | 0 | @@ -3134,228 +3134,1368 @@
er(%22
-set-nickname%22, help=%22Set account nickname%22)%0A parser.add_argument(%22account%22, help=%22the account ID, e.g. U123456%22)%0A parser.add_argument(%22nickname%22, help=%22the nickname (letters, numbers, hyphens, and underscores only)
+default%22, help=%22view or set the de... |
1bf4ae32aa5f423b4124a89108df27f04dca8f71 | Include environment at lambda function qualifier | kappa/event_source/s3.py | kappa/event_source/s3.py | # -*- coding: utf-8 -*-
# Copyright (c) 2014, 2015 Mitch Garnaat
#
# 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 appl... | Python | 0 | @@ -1402,16 +1402,27 @@
onArn':
+'%25s:%25s' %25 (
function
@@ -1426,16 +1426,48 @@
ion.arn,
+ function._context.environment),
%0A
|
2027d3347a839ca30abbcb778b34b3f261b266ef | Update Naive Bayes classifier | mla/naive_bayes.py | mla/naive_bayes.py | import numpy as np
from mla.base import BaseEstimator
from mla.neuralnet.activations import softmax
class NaiveBayesClassifier(BaseEstimator):
"""Gaussian Naive Bayes."""
# Binary problem.
n_classes = 2
def fit(self, X, y=None):
self._setup_input(X, y)
# Check target labels
as... | Python | 0.000006 | @@ -1340,16 +1340,8 @@
r =
-np.sum(%5B
self
@@ -1353,46 +1353,15 @@
(y,
-d, x) for d in range(self.n_features)%5D
+x).sum(
)%0A
@@ -1494,19 +1494,8 @@
ass,
- n_feature,
x):
@@ -1520,65 +1520,43 @@
ate
-probability density function for normal distribution
+Gaussian PDF for each feature
.%22%22%22%0A
+%0A
... |
3fb860aa233f46046ef826360e10a467d3c9a866 | Version 0.0.2 | covimerage/__version__.py | covimerage/__version__.py | __version__ = '0.0.2.dev0'
| Python | 0.000001 | @@ -17,11 +17,6 @@
.0.2
-.dev0
'%0A
|
fd5c84a1272ded54afaa6323fc10c637474096a3 | Increment version to 0.2.5 | approvaltests/version.py | approvaltests/version.py | version_number = "0.2.4"
| Python | 0.998918 | @@ -19,7 +19,7 @@
0.2.
-4
+5
%22%0A
|
1c756d13efb874f075b9413722f042f0dbcc3721 | Use default settings | readthedocs/settings/docker_compose.py | readthedocs/settings/docker_compose.py | import os
from .dev import CommunityDevSettings
class DockerBaseSettings(CommunityDevSettings):
"""Settings for local development with Docker"""
DOCKER_ENABLE = True
RTD_DOCKER_COMPOSE = True
RTD_DOCKER_COMPOSE_VOLUME = 'community_build-user-builds'
RTD_DOCKER_USER = f'{os.geteuid()}:{os.getegid... | Python | 0.000002 | @@ -1671,108 +1671,8 @@
alse
-%0A ELASTICSEARCH_DSL = %7B%0A 'default': %7B%0A 'hosts': 'search:9200',%0A %7D,%0A %7D
%0A%0A
|
aa1772c013cad2fe423613cb88e37fbf1958bd82 | Update retrosign.py | retrosign/retrosign.py | retrosign/retrosign.py | import discord, aiohttp, re
from bs4 import BeautifulSoup as b_s
from io import BytesIO
from discord.ext import commands
import os
import random
from random import choice
import lxml
class retrosign:
def __init__(self, bot):
self.bot = bot
@commands.group()
async def retrosign(self, conten... | Python | 0 | @@ -2626,24 +2626,30 @@
a)%0A %0A
+async
def do_it(se
|
4569821be22e8b0818f6817fa908fb11c5158e85 | Improve cafferesnet compatibility to API | pretrainedmodels/models/cafferesnet.py | pretrainedmodels/models/cafferesnet.py | from __future__ import print_function, division, absolute_import
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.model_zoo as model_zoo
pretrained_settings = {
'cafferesnet101': {
'imagenet': {
'url': 'http://data.lip6.fr/cadene/pretrainedmodels... | Python | 0 | @@ -4312,38 +4312,39 @@
layers)%0A%0A def f
-orward
+eatures
(self, x):%0A x
@@ -4514,24 +4514,60 @@
f.layer4(x)%0A
+ return x%0A%0A def logits(self, x):
%0A x = sel
@@ -4633,24 +4633,109 @@
t_linear(x)%0A
+ return x%0A%0A def forward(self, x):%0A x = self.features(x)%0A x = self.logits(x)
%0... |
959dfe1dafb81523365fc30bfa4cd7e6c2b9eecb | CHANGE GcodeFile() function names | GcodeParser.py | GcodeParser.py | #!/usr/bin/env python
# coding=UTF-8
"""Module containing Gcode parsing functions"""
__author__ = "Dylan Armitage"
__email__ = "d.armitage89@gmail.com"
####---- Imports ----####
from pygcode import Line, GCodeLinearMove
class GcodeFile(object):
"""A file of gcode"""
def __init__(self, gcode_file=[]):
... | Python | 0.000001 | @@ -991,16 +991,23 @@
ding_box
+_coords
(self):%0A
@@ -2721,21 +2721,22 @@
def mid_
-g
co
-de
+ords
(min_xy,
|
ec2d66e85275313c206f760364724108f9508204 | Add execute permission | scripts/contrib/model_info.py | scripts/contrib/model_info.py | #!/usr/bin/env python3
import sys
import argparse
import numpy as np
import yaml
DESC = "Prints keys and values from model.npz file."
S2S_SPECIAL_NODE = "special:model.yml"
def main():
args = parse_args()
model = np.load(args.model)
if args.special:
if S2S_SPECIAL_NODE not in model:
... | Python | 0.000001 | |
fee8e6371c2884ba8cdc587ecae06093e5f6e4de | restructure python 2 to use a generator | 01-50/02/2.py | 01-50/02/2.py | a, b = 0, 1
total = 0
while b < 4000000:
a, b = b, a + b
if b % 2 == 0:
total += b
print total
| Python | 0.000486 | @@ -1,72 +1,162 @@
-a, b = 0, 1%0Atotal = 0%0Awhile b %3C 4000000:%0A a, b = b, a + b
+def fib():%0A a, b = 0, 1%0A while True:%0A yield b%0A a, b = b, a + b%0A%0Atotal = 0%0Ai = 0%0Afor i in fib():%0A if i %3E= 4000000:%0A break
%0A if
b %25
@@ -151,17 +151,17 @@
%0A if
-b
... |
0f7b1a82cc74b5b7238753a3e8d6ac53c5d64c9c | Create wallpost on new donation | apps/wallposts/models.py | apps/wallposts/models.py | from django.db import models
from django.utils.text import Truncator
from django.utils.translation import ugettext_lazy as _
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from django_extensions.db.fields import ModificationDateTimeField, CreationDateTimeField... | Python | 0 | @@ -22,16 +22,111 @@
models%0A
+from django.db.models.signals import post_save%0Afrom django.dispatch.dispatcher import receiver%0A
from dja
@@ -442,16 +442,72 @@
ettings%0A
+from apps.fund.models import Donation, DonationStatuses%0A
from pol
@@ -5667,20 +5667,795 @@
cator(s).words(10)%0A%0A
+%0A@receiver(post_sa... |
51fa99659a0b975175a0a33ace21021de7de4b45 | Add load_json | saau/sections/image_provider.py | saau/sections/image_provider.py | import json
import inspect
from os.path import join, exists
def not_implemented():
frame_info = inspect.currentframe().f_back
msg = ''
if 'self' in frame_info.f_locals:
self = frame_info.f_locals['self']
try:
msg += self.__name__ + '#' # for static/class methods
excep... | Python | 0.00001 | @@ -997,16 +997,132 @@
n True%0A%0A
+ def load_json(self, name):%0A with open(self.data_dir_join(name)) as fh:%0A return json.load(fh)%0A%0A
%0Aclass I
|
7907edc07b7607e1892a35a4ad49e8eb7340ed4e | Update __openerp__.py | sale_order_types/__openerp__.py | sale_order_types/__openerp__.py | # -*- encoding: utf-8 -*-
##############################################################################
# #
# OpenERP, Open Source Management Solution. #
# ... | Python | 0.000024 | @@ -1868,16 +1868,17 @@
%5B'sale',
+
'stock'%5D
|
ee50bea2810676ef655e7ea57565070f7e715741 | Validate quotation is non-empty before allowing conversion to template. | sale_template_quotation/sale.py | sale_template_quotation/sale.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Template Quotations
# Copyright (C) 2015 OpusVL (<http://opusvl.com/>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# p... | Python | 0 | @@ -1162,16 +1162,225 @@
(self):%0A
+ if not (self.quotation_ref and self.quotation_ref.strip()):%0A raise exceptions.Warning('Quotation Ref is blank.%5CnYou must set a Quotation Ref before you convert the quotation to a template')%0A
|
10862c50b52ad5da6de9a1bd076bf50c738c9a97 | Implement object serialization | salt/modules/inspectlib/fsdb.py | salt/modules/inspectlib/fsdb.py | # -*- coding: utf-8 -*-
#
# Copyright 2016 SUSE 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 agr... | Python | 0.000109 | @@ -790,24 +790,37 @@
rialize(self
+, description
):%0A '
@@ -871,39 +871,135 @@
CSV
-.%0A%0A :return:%0A '''
+ according to the table description.%0A%0A :return:%0A '''%0A return %5Bgetattr(self, attr) for attr in description%5D
%0A%0A%0Ac
|
01050a3a4e2c091d7141499fb4f8ca9eae83d4cc | disable swap for cassandra nodes (http://www.datastax.com/documentation/cassandra/2.0/cassandra/install/installRecommendSettings.html) | salvus/scripts/first_boot.py | salvus/scripts/first_boot.py | #!/usr/bin/env python
# This script is run by /etc/rc.local when booting up. It does special configuration
# depending on what images are mounted, etc.
import os, socket, sys
hostname = socket.gethostname()
if hostname == "salvus-base":
# no special config -- this is our template machine
sys.exit(0)
# Ena... | Python | 0 | @@ -357,17 +357,186 @@
/home/%22)
-:
+ and not hostname.startswith('cassandra'): # no swap on cassandra -- http://www.datastax.com/documentation/cassandra/2.0/cassandra/install/installRecommendSettings.html
%0A os.
|
a537f049bfb61488a056333d362d9983e8e9f88d | Fix minor issues in 2020.10.1 file | 2020/10/p1.py | 2020/10/p1.py | # Python 3.8.3
def get_input():
with open('input.txt', 'r') as f:
return set(int(i) for i in f.read().split())
def main():
puzzle = get_input()
last_joltage = 0
one_jolt = 0
three_jolts = 1 # this is bad lmao
while len(puzzle) != 0:
if last_joltage + 1 in puzzle:
... | Python | 0 | @@ -217,28 +217,8 @@
= 1
- # this is bad lmao
%0A
@@ -660,17 +660,16 @@
jolts%0A%0A%0A
-%0A
if __nam
|
43534d48a063693b4083af85ea5ad8c024491a8f | Fix decoder | scripts/decoder_functional.py | scripts/decoder_functional.py | import numpy as np
import matplotlib.pyplot as plt
import pll as PLL
j = (0 + 1j)
def apply_U(stream1, stream2, U, PLOT=True, title="Apply U.H"):
fixed1 = np.zeros(len(stream1), dtype=np.complex64)
fixed2 = np.zeros(len(stream2), dtype=np.complex64)
for idx, val1 in enumerate(stream1):
val2 = st... | Python | 0.000258 | @@ -4573,24 +4573,93 @@
LOT=False)%0A%0A
+ start1, start2 = 0, 0%0A end1, end2 = len(data_1), len(data_2)%0A%0A
bin1 = e
|
b51e51dc8b1ce66815980bf2e8424f6fe282af66 | test type declare with resolve | metaconfig/tests/test_simple.py | metaconfig/tests/test_simple.py | from nose.tools import *
from io import StringIO
from textwrap import dedent
from metaconfig import Config
def test_declare_empty():
source = """
--- !declare {}
...
"""
config = Config()
with StringIO(dedent(source)) as stream:
config.load(stream)
| Python | 0 | @@ -279,8 +279,586 @@
stream)%0A
+%0Adef test_declare_resolve():%0A%0A source = %22%22%22%0A --- !declare%0A type:%0A type: !resolve builtins.type%0A load: !resolve metaconfig.construct_from_sequence%0A ...%0A%0A --- !let%0A integer: !type %0A - 0%0A string: !type %0A -... |
52c6b6013c7904c5fcc142e7c69f9c53dd0815c3 | Fix broken foreign key in dashboard schema | lib/pegasus/python/Pegasus/netlogger/analysis/schema/stampede_dashboard_schema.py | lib/pegasus/python/Pegasus/netlogger/analysis/schema/stampede_dashboard_schema.py | """
Contains the code to create and map objects to the Stampede DB schema
via a SQLAlchemy interface.
"""
__author__ = "Monte Goode"
__author__ = "Karan Vahi"
import time
import warnings
import logging
from sqlalchemy import *
from sqlalchemy import orm, exc
from Pegasus.netlogger.analysis.schema._base import SABase... | Python | 0.000029 | @@ -3596,16 +3596,23 @@
ignKey('
+master_
workflow
|
ac0856d79fc948733e80347a6de09ed0ed26802d | Fix pylint error. | app/handlers/tests/test_batch_handler.py | app/handlers/tests/test_batch_handler.py | # 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 option) any later version.
#
# This program is distributed in the hope that it will be usefu... | Python | 0.000001 | @@ -1202,32 +1202,45 @@
en = mock.patch(
+%0A
%22handlers.base.B
|
8c2ac2e2af173c071f895879f078fa8cf4c39173 | Change the docstring indentation | bears/python/PEP8Bear.py | bears/python/PEP8Bear.py | import autopep8
import sys
from coalib.bearlib import deprecate_settings
from coalib.bearlib.spacing.SpacingHelper import SpacingHelper
from coalib.bears.LocalBear import LocalBear
from dependency_management.requirements.PipRequirement import PipRequirement
from coalib.results.Diff import Diff
from coalib.results.Resu... | Python | 0 | @@ -1216,16 +1216,26 @@
_length:
+%0A
Maxim
@@ -1270,38 +1270,16 @@
a line.%0A
-
@@ -1352,23 +1352,29 @@
nt_size:
+%0A
+
Number o
@@ -1431,24 +1431,26 @@
_ignore:
+%0A
A list o
@@ -1433,32 +1433,35 @@
gnore:%0A
+
A list of errors
... |
60b4fc88617f800208f00f24468db6798369fe2e | Add user-supplied arguments in log_handler | neutron/openstack/common/log_handler.py | neutron/openstack/common/log_handler.py | # Copyright 2013 IBM Corp.
#
# 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 t... | Python | 0.002685 | @@ -594,16 +594,17 @@
icense.%0A
+%0A
import l
@@ -1092,10 +1092,19 @@
ord.
-msg
+getMessage()
))%0A
|
f83a4b400a65b3cb63a4ca946103f25816909b62 | Remove accidental hard-coding of Firefox binary path in tests | conftest.py | conftest.py | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | Python | 0.000011 | @@ -2065,174 +2065,8 @@
x':%0A
- from selenium.webdriver.firefox.firefox_binary import FirefoxBinary%0A binary = FirefoxBinary('/Applications/Firefox 47.app/Contents/MacOS/firefox-bin')%0A
@@ -2101,29 +2101,16 @@
ties': %7B
-%0A
'marione
@@ -2124,38 +2124,8 @@
alse
-,%0A '... |
3202a561b79cf0ef30643671a9edd91ad67b999a | Fix wrong type hint in Schema constructor. | rororo/schemas/schema.py | rororo/schemas/schema.py | """
=====================
rororo.schemas.schema
=====================
Implement class for validating request and response data against JSON Schema.
"""
import logging
import types
from typing import Any, Callable, Optional, Type # noqa: F401
try:
from multidict import MultiDict, MultiDictProxy
except ImportEr... | Python | 0 | @@ -1083,29 +1083,16 @@
ss:
-Type%5BException%5D=Error
+Any=None
,%0A
@@ -3293,48 +3293,132 @@
-return (error_class or self.error_class)
+if error_class is None:%0A error_class = self.error_class if self.error_class else Error%0A return error_class
(mes
|
987a74ab34da1058e8abca2afb295fd50408401d | Remove unused local variable `ret`. It is always initialized in the inner `if` statements, so no need to declared in this outer scope | appdaemon/plugins/dummy/dummyplugin.py | appdaemon/plugins/dummy/dummyplugin.py | import yaml
import asyncio
import copy
from appdaemon.appdaemon import AppDaemon
from appdaemon.plugin_management import PluginBase
class DummyPlugin(PluginBase):
def __init__(self, ad: AppDaemon, name, args):
super().__init__(ad, name, args)
self.AD = ad
self.stopping = False
se... | Python | 0.000001 | @@ -2497,30 +2497,8 @@
ng:%0A
- ret = None
%0A
|
6dade12592e4ef9e5bfd236846882f1856789476 | Fix throwing exceptions. | routeros_api/base_api.py | routeros_api/base_api.py | import socket
from routeros_api import exceptions
LENGTH_MATRIX = [
(0x80, 0x0),
(0x40, 0x80),
(0x20, 0xC0),
(0x10, 0xE0),
(0x1, 0xF0),
]
OVER_MAX_LENGTH_MASK = 0xF8
class Connection(object):
def __init__(self, socket):
self.socket = socket
def send_sentence(self, words):
... | Python | 0 | @@ -506,32 +506,38 @@
e:%0A
+raise
exceptions.Route
@@ -708,24 +708,30 @@
+raise
exceptions.R
|
5e25e5c948242c5cbfa3e0bf1ba484ad11c70409 | Change qtile-top to use new command graph | libqtile/scripts/qtile_top.py | libqtile/scripts/qtile_top.py | # Copyright (c) 2015, Roger Duran
#
# 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, merge, publish, distri... | Python | 0 | @@ -1281,16 +1281,21 @@
command
+, ipc
%0A%0A%0Aclass
@@ -5800,37 +5800,136 @@
-client = command.Client(opts.
+if opts.socket is None:%0A socket = command.find_sockfile()%0A else:%0A socket = opts.socket%0A client = ipc.Client(
sock
|
c2f45dd632f1df3690af168d588bf6818219b14f | use boolean value | bulbs/content/tasks.py | bulbs/content/tasks.py | import time
from django.conf import settings
from django.template.loader import render_to_string
from django.template.base import TemplateDoesNotExist
from django.core.exceptions import ObjectDoesNotExist
from bulbs.utils import vault
from bulbs.instant_articles.renderer import InstantArticleRenderer
from bulbs.insta... | Python | 0.001299 | @@ -5237,27 +5237,28 @@
MENT_MODE',
-Non
+Fals
e) else 'fal
@@ -5338,19 +5338,20 @@
TICLE',
-Non
+Fals
e) else
|
0af36c8e43f0a7a633897ac3f0112f0d2b521a6e | Delete all ReviewFollowers and remove the entry in the ranker before deleting a StudentProposal. | app/soc/logic/models/student_proposal.py | app/soc/logic/models/student_proposal.py | #!/usr/bin/python2.5
#
# Copyright 2009 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | Python | 0 | @@ -3302,16 +3302,808 @@
name)%0A%0A
+ def delete(self, entity):%0A %22%22%22Removes Ranker entry and all ReviewFollowers before deleting the entity.%0A%0A Args:%0A entity: an existing entity in datastore%0A %22%22%22%0A%0A from soc.models.logic.review_follower import logic as review_follower_logic%... |
80176ae73fc9843f63aca68306523da822d0b258 | add "group" property to devices | samantha/plugins/plugin.py | samantha/plugins/plugin.py | """Contains a baseclass for plugins."""
###############################################################################
#
# TODO: [ ] default methods
#
###############################################################################
# standard library imports
import logging
# related third party imports
# applicati... | Python | 0 | @@ -445,17 +445,17 @@
= %221.4.
-0
+1
%22%0A%0A%0A# In
@@ -1952,16 +1952,28 @@
ath=None
+, group=None
):%0A
@@ -2171,16 +2171,43 @@
= None%0A
+ self.group = group%0A
|
586d5f34fc508d4a3eaa93bd39c5dc2b41e4878d | Migrate api7 to api8 | project_task_state/project_task_state.py | project_task_state/project_task_state.py | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Addons modules by CLEARCORP S.A.
# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>).
#
# This program is free software: you can redistribute... | Python | 0.000122 | @@ -1023,16 +1023,17 @@
#######%0A
+%0A
from ope
@@ -1040,20 +1040,16 @@
nerp
-.osv
import
osv,
@@ -1048,19 +1048,22 @@
ort
-osv
+models
, fields
%0Afro
@@ -1062,87 +1062,16 @@
elds
-%0Afrom dateutil.relativedelta import relativedelta%0Afrom datetime import datetime
+, api, _
%0A%0A_T
@@ -1125,16 +1125,31 ... |
6c60c588c694804930ea6e2312f80830f7b1fe8d | fix tests | nipype/interfaces/freesurfer/tests/test_preprocess.py | nipype/interfaces/freesurfer/tests/test_preprocess.py | # -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
import os
import pytest
from nipype.testing.fixtures import create_files_in_directory
import nipype.interfaces.freesurfer as freesurfer
@pytest.mark.skipif(freesurfer.no_freesurf... | Python | 0.000001 | @@ -4223,17 +4223,16 @@
s_output
-.
%25s' %25 (f
@@ -4770,17 +4770,16 @@
d_output
-.
%25s'%0A
|
c3d7e7fdcbea0fc34bfa6d9d517efc4d54dc0b15 | add file extension | scripts/generateQANotebook.py | scripts/generateQANotebook.py | import argparse
import os
parser = argparse.ArgumentParser()
parser.add_argument('repo', help='data repository')
parser.add_argument('--tract', type=int)
parser.add_argument('--filt', type=str)
parser.add_argument('--output', '-o', default='QA', help='output folder')
args = parser.parse_args()
from explorer.noteboo... | Python | 0.000002 | @@ -520,16 +520,22 @@
dd_%7B%7D_%7B%7D
+.ipynb
'.format
|
1f5bdf4ce98d55339bee0aad16f40439d8a99a33 | Upgrade to the most recent version of buildkit. | buildkit.py | buildkit.py | """
Common code used in my setup.py files.
"""
from __future__ import with_statement
import re
import os.path
import sys
def read(filename):
"""Read files relative to this file."""
full_path = os.path.join(os.path.dirname(sys.argv[0]), filename)
with open(full_path, 'r') as fh:
return fh.read()
... | Python | 0 | @@ -84,18 +84,8 @@
nt%0A%0A
-import re%0A
impo
@@ -117,24 +117,25 @@
ef read(
+*
filename
):%0A %22
@@ -126,16 +126,17 @@
filename
+s
):%0A %22
@@ -166,20 +166,75 @@
o th
-is file.%22%22%22%0A
+e executable.%22%22%22%0A files = %5B%5D%0A for filename in filenames:%0A
@@ -298,16 +298,20 @@
... |
4b248051b5a3521eaa5d1804961bd573a8ce04c7 | remove references to the axis argument | scipy/sparse/linalg/_norm.py | scipy/sparse/linalg/_norm.py | """Sparse matrix norms.
"""
from __future__ import division, print_function, absolute_import
import numpy as np
from scipy.sparse import issparse
from numpy.core import (
array, asarray, zeros, empty, empty_like, transpose, intc, single, double,
csingle, cdouble, inexact, complexfloating, newaxis, ravel, all... | Python | 0.000001 | @@ -777,73 +777,8 @@
rix.
- If %60axis%60 is None, %60x%60 must be 1-D or 2-D%0A sparse matrix.
%0A
@@ -3122,56 +3122,8 @@
m)%0A%0A
- # Normalize the %60axis%60 argument to a tuple.%0A
|
72eec77af653e5e43674a7a5c08083130a4a0770 | delete binary() | calour/transforming.py | calour/transforming.py | # ----------------------------------------------------------------------------
# Copyright (c) 2016--, Calour development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# -----------------------------------------------... | Python | 0.000007 | @@ -2147,36 +2147,39 @@
preprocessing.
-scal
+binariz
e(exp.data, thre
@@ -2671,412 +2671,8 @@
p%0A%0A%0A
-def binary(exp, threshold=0, inplace=False):%0A '''Binary transform the data%0A%0A Parameters%0A ----------%0A threshold : numeric, optional%0A positions are called present only if %3Ethreh... |
9d5e87cded6373b9d0ad6d4c94e227c0bf119749 | Use find instead of index on convert_data | ruuvitag_sensor/ruuvi.py | ruuvitag_sensor/ruuvi.py | import re
import sys
import os
import time
from ruuvitag_sensor.url_decoder import UrlDecoder
mac_regex = '[0-9a-f]{2}([:])[0-9a-f]{2}(\\1[0-9a-f]{2}){4}$'
if not sys.platform.startswith('linux') or os.environ.get('CI') == 'True':
# Use BleCommunicationDummy also for CI as it can't use gattlib
from ruuvitag_... | Python | 0.000001 | @@ -1933,21 +1933,20 @@
= data.
+f
ind
-ex
('ruu.vi
@@ -1953,12 +1953,8 @@
/#')
- + 8
%0A
@@ -1997,37 +1997,43 @@
return data%5B
+(
index
+ + 8)
:%5D%0A e
@@ -2070,23 +2070,18 @@
ata.
+f
ind
-ex
('r/')
- + 2
%0A
@@ -2140,21 +2140,27 @@
rn data%5B
+(
index
+ + 2)
:%5D%0A
@@ -363... |
28adc3fbce76a562e729aef3ae19bdefd3379586 | add taxonomy information to loaded sequences | scripts/load_into_database.py | scripts/load_into_database.py | #!/usr/bin/env python
import sys
import argparse
from BioSQL import BioSeqDatabase
from Bio import SeqIO
def load_gff(db, gff_file, fasta_file):
from BCBio.GFF import GFFParser
with open(fasta_file) as seq_handle:
seq_dict = SeqIO.to_dict(SeqIO.parse(seq_handle, "fasta"))
parser = GFFParser()
... | Python | 0.000001 | @@ -99,16 +99,108 @@
SeqIO%0A%0A
+def add_taxid(inIter, taxid):%0A inIter.annotations%5B'ncbi_taxid'%5D = taxid%0A yield inIter%0A
%0Adef loa
@@ -225,24 +225,58 @@
, fasta_file
+, fetch_taxonomy=False, taxid=None
):%0A from
@@ -518,20 +518,74 @@
db.load(
-recs
+add_taxid(recs, taxid), fetch_NCBI_taxonom... |
93b52ac533086bfa1747c2f3e10ca98d9e666197 | Stop sending stepFinished updates from the tryserver. | scripts/master/status_push.py | scripts/master/status_push.py | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
import urlparse
from buildbot.status import status_push
CR_PASSWORD_FILE = '.code_review_password'
class TryServerHttpStatus... | Python | 0.000003 | @@ -1111,17 +1111,16 @@
-#
'stepFin
|
3de06dc85c05303d2fdd4c5a24acb282de075143 | improve help message | beetsplug/fetchartist.py | beetsplug/fetchartist.py | """
Fetchartist plugin for beets.
"""
import os
import shutil
import pylast
import requests
from beets import config
from beets import plugins
from beets import ui
from beetsplug import util
CONTENT_TYPES = ["image/png", "image/jpeg"]
FILE_TYPES = ['png', 'jpg']
CONTENT_TYPE_TO_EXTENSION_MAP = {
"image/png": "p... | Python | 0.000009 | @@ -2558,44 +2558,46 @@
lp=%22
-re-download art when already present
+force overwrite existing artist covers
%22)%0A%0A
|
4748a68b6bde662245b85ecf2a52fbedffc4ffcb | Remove exception handling. | beetsplug/sonosupdate.py | beetsplug/sonosupdate.py | # -*- coding: utf-8 -*-
# This file is part of beets.
# Copyright 2018, Tobias Sauerwein.
#
# 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... | Python | 0 | @@ -1455,63 +1455,8 @@
')%0A%0A
- # Try to send update request.%0A try:%0A
@@ -1493,16 +1493,36 @@
y_soco()
+%0A%0A if device:
%0A
@@ -1570,17 +1570,16 @@
pdate()%0A
-%0A
@@ -1583,21 +1583,10 @@
e
-xcept NoneTyp
+ls
e:%0A
|
77ddff664ad1e10037a43c3ffabd816387c35e42 | Use a comprehension instead of a lambda function | rotational-cipher/rotational_cipher.py | rotational-cipher/rotational_cipher.py | import string
UPPER = string.ascii_uppercase
LOWER = string.ascii_lowercase
def rotate(s, n):
rules = shift_rules(n)
return "".join(map(lambda k: rules.get(k, k), s))
def shift_rules(n):
shifted = UPPER[n:] + UPPER[:n] + LOWER[n:] + LOWER[:n]
return {k:v for k,v in zip(UPPER+LOWER, shifted)}
| Python | 0.00054 | @@ -141,43 +141,38 @@
oin(
-map(lambda k: rules.get(k, k),
+rules.get(ch, ch) for ch in
s)
-)%0A
%0A%0Ade
|
25beb8ce9f21d5ef5255304700a76ed2d7aaa425 | Add initial solution | rotational-cipher/rotational_cipher.py | rotational-cipher/rotational_cipher.py | def rotate():
pass
| Python | 0.000001 | @@ -1,8 +1,88 @@
+import string%0A%0A%0AUPPER = string.ascii_uppercase%0ALOWER = string.ascii_lowercase%0A%0A%0A
def rota
@@ -88,16 +88,332 @@
ate(
+s, n
):%0A
-pass
+return %22%22.join(rot_gen(s,n))%0A%0A%0Adef shift_rules(n):%0A shifted = UPPER%5Bn:%5D + UPPER%5B:n%5D + LOWER%5Bn:%5D + LOWER%5B:n%5D%0A r... |
644f66a39fd59b1983eee6f127e13e1585a598cd | Fix breakages from girder-client v2.0 | script/upload-test-images.py | script/upload-test-images.py | import girder_client
import os
import sys
def main():
# Use the API key to authenticate.
key = os.environ.get("GIRDER_API_KEY")
if key is None:
print >>sys.stderr, "Environment variable GIRDER_API_KEY is blank. Cannot upload images."
return 1
gc = girder_client.GirderClient(host="data... | Python | 0 | @@ -331,18 +331,8 @@
om%22,
- port=443,
sch
@@ -733,36 +733,33 @@
er = gc.load
-_or_c
+OrC
reate
-_f
+F
older(%22Publi
@@ -799,36 +799,33 @@
er = gc.load
-_or_c
+OrC
reate
-_f
+F
older(%22Travi
@@ -877,36 +877,33 @@
er = gc.load
-_or_c
+OrC
reate
-_f
+F
older(travis
@@ -958,36 +958,33 @@
er = gc.load
-_or_... |
c71c82a8f1da678da740b726a66ab5bc9955b261 | work on digits_video.py | samples/python2/digits_video.py | samples/python2/digits_video.py | import numpy as np
import cv2
import digits
import os
import video
from common import mosaic
def main():
cap = video.create_capture()
classifier_fn = 'digits_svm.dat'
if not os.path.exists(classifier_fn):
print '"%s" not found, run digits.py first' % classifier_fn
return
... | Python | 0.000105 | @@ -862,18 +862,18 @@
if h %3C
-20
+16
or h %3E
@@ -1180,13 +1180,16 @@
s =
-1.1*h
+float(h)
/SZ%0D
@@ -1596,17 +1596,17 @@
.eye(2)*
-2
+s
%0D%0A
|
77a259b1cdc5b46cad8975ffd086c053a634381e | Use Mysql. | saskatoon/saskatoon/settings.py | saskatoon/saskatoon/settings.py | # coding: utf-8
"""
Django settings for saskatoon project.
Generated by 'django-admin startproject' using Django 1.9.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
... | Python | 0 | @@ -2606,83 +2606,40 @@
%0A%0A#
-Database%0A# https://docs.djangoproject.com/en/1.9/ref/settings/#database
+USE MySQL for your local test
s%0A%0A
-#
DATA
@@ -2648,17 +2648,16 @@
SES = %7B%0A
-#
'def
@@ -2665,17 +2665,16 @@
ult': %7B%0A
-#
@@ -2711,17 +2711,16 @@
mysql',%0A
-#
@@ -2732,21... |
9b0612b0a4d5c483013311d7c7814cc268609cb0 | Fix URL in setup.py | support/python/collins_client/setup.py | support/python/collins_client/setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(name="collins_client",
version="0.1.0",
description="The python interface to the collins api.",
author="John Bunting, Nick Thuesen, Nick Sauro, Will Richard",
author_email="opensourcesoftware@tumblr.com",
url="https:... | Python | 0.000002 | @@ -375,17 +375,17 @@
/collins
--
+_
client%22,
|
0577d536583fb85e6a4e9675115ce744f60679e7 | Update string module references | app/lib/text_handling.py | app/lib/text_handling.py | # -*- coding: utf-8 -*-
"""
Common string handling functions.
Usage:
$ python -m lib.text_handling
"""
from string import punctuation, whitespace
def flattenText(text, replacement=u" "):
r"""
Remove line breaks in a string.
Flatten a string from multi-line to a single line, using a specified
str... | Python | 0.000006 | @@ -105,50 +105,21 @@
%22%22%22%0A
-from string import punctuation, whitespace
+import string
%0A%0A%0Ad
@@ -2842,36 +2842,8 @@
rs.%0A
- wsToRemove = whitespace%0A
@@ -2881,23 +2881,29 @@
for
-ws
+c
in
-wsToRemov
+string.whitespac
e:%0A
@@ -2916,18 +2916,17 @@
if
-ws
+c
in outp
@@ -2978,18 +... |
e69f45ecc3ee23be203136be02e9648a4930a3e8 | Make test.py use difflib instead of filecmp. | test/test.py | test/test.py | # -*- coding: utf-8 -*-
import os
import sys
import filecmp
import tempfile
from subprocess import call
def run_test(fmt, sample, arg):
temp = tempfile.NamedTemporaryFile()
psdump = "../build/psdump -o {0} -f {1} {2}".format(temp.name, fmt, arg)
call(psdump.split())
if not filecmp.cmp(temp.name, samp... | Python | 0 | @@ -61,24 +61,23 @@
%0Aimport
-tempfile
+difflib
%0Afrom su
@@ -134,49 +134,8 @@
g):%0A
- temp = tempfile.NamedTemporaryFile()%0A
@@ -167,21 +167,22 @@
-o
-%7B0%7D
+temp
-f %7B
-1%7D %7B2
+0%7D %7B1
%7D%22.f
@@ -187,27 +187,16 @@
.format(
-temp.name,
fmt, arg
@@ -227,48 +227,353 @@
())%0A
+%0A
... |
80c5f94f3c2ed02c8603d3eecea23cdb4711ae79 | Use hanging indent | openfisca_france/tests/test_tax_rates.py | openfisca_france/tests/test_tax_rates.py | # -*- coding: utf-8 -*-
# OpenFisca -- A versatile microsimulation software
# By: OpenFisca Team <contact@openfisca.fr>
#
# Copyright (C) 2011, 2012, 2013, 2014 OpenFisca Team
# https://github.com/openfisca
#
# This file is part of OpenFisca.
#
# OpenFisca is free software; you can redistribute it and/or modify
# it ... | Python | 0.000001 | @@ -1389,35 +1389,43 @@
0,%0A
-),%0A
+ ),%0A
%5D,%0A
@@ -1943,35 +1943,43 @@
0,%0A
-),%0A
+ ),%0A
%5D,%0A
|
a6e609c44434bdeeb8ba4391ed3508d335a9a5e3 | Revert queries-hive `No JSON object could be decoded` commit (#2624) | apps/jobbrowser/src/jobbrowser/api2.py | apps/jobbrowser/src/jobbrowser/api2.py | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | Python | 0.000004 | @@ -2138,16 +2138,90 @@
e%0A %5D)%0A%0A
+ if interface == 'queries-hive':%0A filters = json.loads(request.body)%0A%0A
jobs =
@@ -2378,32 +2378,118 @@
%5B'status'%5D = 0%0A%0A
+ if interface == 'queries-hive':%0A return JsonResponse(response%5B'apps'%5D)%0A else:%0A
return JsonRes
@@ -2707,32 +2707,1... |
a26e3c604e735c69a105386a0d92168870ab7a0b | fix node artifacts upload path (#1601) | scenarios/kubernetes_kubelet.py | scenarios/kubernetes_kubelet.py | #!/usr/bin/env python
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | Python | 0 | @@ -2544,16 +2544,17 @@
rkspace/
+_
artifact
|
20e7453d143223ae1c95ad32ee49660ceeadf3f7 | Prepare for 1.1.0 | crudset/version.py | crudset/version.py | version = "1.0.0"
| Python | 0.000014 | @@ -10,9 +10,13 @@
%221.
-0
+1
.0
+-dev
%22%0A
|
4510db1e8f2fe3298de395a9d8b1e0783f92c758 | update revision | source/tyr/migrations/versions/1b59ffb421e4_change_max_nb_crowfly_by_mode_type.py | source/tyr/migrations/versions/1b59ffb421e4_change_max_nb_crowfly_by_mode_type.py | """change max_nb_crowfly_by_mode to JSONB and set server_default
Revision ID: 1b59ffb421e4
Revises: 483639f1f00
Create Date: 2018-08-30 12:42:21.089095
"""
# revision identifiers, used by Alembic.
revision = '1b59ffb421e4'
down_revision = '483639f1f00'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.... | Python | 0 | @@ -236,27 +236,28 @@
sion = '
-483639f1f00
+105823db902c
'%0A%0Afrom
|
0e1c2dad600da595403ee893b787a29bdc38e215 | Bump to 2.1.1 | crudset/version.py | crudset/version.py | version = "0.2.0-dev"
| Python | 0.000134 | @@ -8,15 +8,11 @@
= %22
-0.2.0-dev
+2.1.1
%22%0A
|
513c7a2f5c5fb5a8c47b3173a8d5854755f7928f | Use factories instead of creating instance from model | pylab/website/tests/test_about_page.py | pylab/website/tests/test_about_page.py | import datetime
from django_webtest import WebTest
from django.contrib.auth.models import User
from pylab.core.models import Event
class AboutPageTests(WebTest):
def setUp(self):
self.user = User.objects.create(username='u1')
def test_no_events_on_about_page(self):
resp = self.app.get('/ab... | Python | 0 | @@ -49,32 +49,24 @@
est%0A
+%0A
from
-django.contrib.auth
+pylab.core
.mod
@@ -80,13 +80,13 @@
ort
-User%0A
+Event
%0Afro
@@ -90,37 +90,40 @@
from pylab.core.
-model
+factorie
s import Event%0A%0A
@@ -120,16 +120,23 @@
rt Event
+Factory
%0A%0A%0Aclass
@@ -166,85 +166,8 @@
):%0A%0A
- def setUp(self):%0A ... |
244649b9908de64b97498d3d29d7718f487f84a3 | Fix test | test/command_line/tst_stills_process.py | test/command_line/tst_stills_process.py | from __future__ import division
from dials.array_family import flex # import dependency
class Test(object):
def __init__(self):
from os.path import join
import libtbx.load_env
try:
dials_regression = libtbx.env.dist_path('dials_regression')
except KeyError, e:
print 'SKIP: dials_regress... | Python | 0.000004 | @@ -2232,16 +2232,116 @@
kle%0A
+# Frame 1 no longer indexing after cctbx r25607 which made wavelengths be on a per-image basis%0A #
for resu
@@ -2410,24 +2410,25 @@
ickle%22,%0A
+#
@@ -2494,24 +2494,25 @@
ckle%22%5D,%0A
+#
@@ -2615,16 +2615,205 @@
erences%0A
+ for res... |
c9ba9b8796de0802f7b941245cc41eb7d59ce7c8 | Normalize output path to cp.py | build/cp.py | build/cp.py | #!/usr/bin/env python
# Copyright (c) 2012 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.
"""Copy a file.
This module works much like the cp posix command - it takes 2 arguments:
(src, dst) and copies the file with path ... | Python | 0.999758 | @@ -334,16 +334,26 @@
%7C.%0A%22%22%22%0A%0A
+import os%0A
import s
@@ -490,20 +490,38 @@
py(src,
+os.path.normpath(
dst)
+)
%0A%0A%0Aif __
|
55c00fd6684d6fb378326026475945aea59bfa0b | Fix iterator to list | pyosmo/end_conditions/step_coverage.py | pyosmo/end_conditions/step_coverage.py | from pyosmo.end_conditions.base import OsmoEndCondition
class StepCoverage(OsmoEndCondition):
"""
Stops testing when count is filled
"""
def __init__(self, coverage_percent):
if coverage_percent > 100 or coverage_percent < 0:
raise Exception(f"Coverage is {coverage_percent} and it... | Python | 0.000084 | @@ -516,32 +516,37 @@
all_steps =
+list(
model.all_steps%0A
@@ -536,32 +536,33 @@
(model.all_steps
+)
%0A steps_u
|
589a7803630c1e8809e917ff8d4c846fef3f86eb | Fix "invalid message size" test | test/functional/p2p_invalid_messages.py | test/functional/p2p_invalid_messages.py | #!/usr/bin/env python3
# Copyright (c) 2015-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test node responses to invalid network messages."""
import asyncio
import struct
from test_framework i... | Python | 0.000009 | @@ -280,22 +280,8 @@
ncio
-%0Aimport struct
%0A%0Afr
@@ -4325,202 +4325,121 @@
-msg = conn.build_message(msg_unrecognized(str_data=%22d%22))%0A cut_len = (%0A 4 + # magic%0A 12 # command%0A )%0A # modify len to MAX_SIZE
+# Create a message with ov... |
1a40afa75693f0c2ae3b2eaac62ff9ca6bb02488 | Add sqlite schema | synapse/storage/schema/delta/24/fts.py | synapse/storage/schema/delta/24/fts.py | # Copyright 2015 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | Python | 0.000005 | @@ -681,16 +681,45 @@
esEngine
+, Sqlite3Engine%0A%0Aimport ujson
%0A%0Alogger
@@ -1606,18 +1606,259 @@
nt_id);%0A
-%22%22
+CREATE INDEX event_search_ev_ridx ON event_search(room_id);%0A%22%22%22%0A%0A%0ASQLITE_TABLE = (%0A %22CREATE VIRTUAL TABLE event_search USING fts3 ( event_id, room_id, key, value)%22%0A)%0A... |
544782d2da7fa918133c70ea4e9d0ffe918dcdb4 | Fix documentation for eval and change default display to False | kindred/evalFunctions.py | kindred/evalFunctions.py |
import kindred
from collections import Counter
def evaluate(goldCorpus,testCorpus,metric='f1score',display=True):
""" Compares the gold corpus with the test corpus and calculate appropriate metrics.
:param goldCorpus: The gold standard set of data
:type goldCorpus: kindred.Corpus
:param testCorpus: The test set... | Python | 0.003999 | @@ -106,11 +106,12 @@
lay=
-Tru
+Fals
e):%0A
@@ -252,42 +252,8 @@
ata%0A
-%09:type goldCorpus: kindred.Corpus%0A
%09:pa
@@ -300,42 +300,8 @@
son%0A
-%09:type testCorpus: kindred.Corpus%0A
%09:pa
@@ -358,16 +358,214 @@
f1score)
+. 'all' will provide all three as a tuple%0A%09:param display: Whether to print (to s... |
04303628ff68a1fc6cc978dcd8ecb9286732a24b | Update sfp_azureblobstorage.py | modules/sfp_azureblobstorage.py | modules/sfp_azureblobstorage.py | # -*- coding: utf-8 -*-
# -------------------------------------------------------------------------------
# Name: sfp_azureblobstorage
# Purpose: SpiderFoot plug-in for identifying potential Azure blobs related
# to the target.
#
# Author: Steve Micallef <steve@binarypool.com>
#
# Create... | Python | 0.000001 | @@ -1178,23 +1178,29 @@
': %22
-COMMERCIAL_ONLY
+FREE_NOAUTH_UNLIMITED
%22,%0A
|
95768a09d0bf7f6f3576fc28568c3b7897467541 | Add license | src/python/tensorflow_cloud/core/tests/examples/multi_file_example/scale_model.py | src/python/tensorflow_cloud/core/tests/examples/multi_file_example/scale_model.py | import tensorflow_cloud as tfc
tfc.run(
entry_point="train_model.py",
requirements_txt="requirements.txt",
stream_logs=True,
)
| Python | 0 | @@ -1,8 +1,619 @@
+# Copyright 2020 Google LLC. All Rights Reserved.%0D%0A#%0D%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0D%0A# you may not use this file except in compliance with the License.%0D%0A# You may obtain a copy of the License at%0D%0A#%0D%0A# http://www.apache.org/licenses/L... |
6c2e00084fb11a6d37d55fed247d2e7b6a373823 | Fix dependencies. | partner_contact_nationality/__openerp__.py | partner_contact_nationality/__openerp__.py | # -*- encoding: utf-8 -*-
# Odoo, Open Source Management Solution
# Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es>
#
# 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 versio... | Python | 0 | @@ -1016,13 +1016,30 @@
%22
+partner_contact_
base%22
+,
%0A
|
fb0d099362086c99beaa08e9b8b5934a0534d1c5 | Revert "test_onroad: increase driverState timing to avoid random failures" | selfdrive/test/test_onroad.py | selfdrive/test/test_onroad.py | #!/usr/bin/env python3
import json
import os
import subprocess
import time
import numpy as np
import unittest
from collections import Counter
from pathlib import Path
import cereal.messaging as messaging
from cereal.services import service_list
from common.basedir import BASEDIR
from common.timeout import Timeout
from... | Python | 0 | @@ -5297,16 +5297,17 @@
0.0
-3
+25
, 0.02
-5
+1
)%5D%0A
|
86d604f69ac0e42fb05ec84c3b20da03c7d7d109 | Fix lint error | scripts/download_oai_harvest.py | scripts/download_oai_harvest.py | #!/usr/bin/env python3
# -*- encoding: utf-8 -*-
"""
Standalone script for downloading the OAI-PMH for Calm.
The final output is dumped into a JSON file ``calm_records.json``, which
can be useful for doing bulk analysis of the Calm data.
"""
import collections
import json
import re
from urllib.parse import unquote
i... | Python | 0.000035 | @@ -1658,13 +1658,8 @@
tion
- as e
:%0A
@@ -1935,17 +1935,27 @@
(f'%7Blen(
-d
+all_records
)%7D...')%0A
|
96b3904e64617d6c04b0e44506482cd264e28132 | use common method for permission checking | osmaxx-py/osmaxx/contrib/auth/frontend_permissions.py | osmaxx-py/osmaxx/contrib/auth/frontend_permissions.py | from django.conf import settings
from django.contrib.auth.decorators import login_required, user_passes_test
from django.core.urlresolvers import reverse_lazy
from django.utils.decorators import method_decorator
from rest_framework import permissions
FRONTEND_USER_GROUP = settings.OSMAXX_FRONTEND_USER_GROUP
def fron... | Python | 0 | @@ -305,16 +305,376 @@
GROUP%0A%0A%0A
+def _may_user_access_osmaxx_frontend(user):%0A %22%22%22%0A Actual test to check if the user is in the frontend user group,%0A to give access or deny it. Note: Admins have superpowers.%0A %22%22%22%0A return user.has_perm('excerptexport.add_extractionorder')%0A%0A%... |
fc4214c19fdbdee6118155e5b51d037028670300 | Remove get_events and get_cosine_graph | pygraphc/similarity/LogTextSimilarity.py | pygraphc/similarity/LogTextSimilarity.py | from pygraphc.preprocess.PreprocessLog import PreprocessLog
from pygraphc.similarity.StringSimilarity import StringSimilarity
from itertools import combinations
import networkx as nx
import csv
class LogTextSimilarity(object):
"""A class for calculating cosine similarity between a log pair. This class is intended... | Python | 0.000005 | @@ -3383,1192 +3383,4 @@
e()%0A
-%0A def get_events(self):%0A preprocess = PreprocessLog(self.logtype)%0A preprocess.preprocess_text(self.logs)%0A events = preprocess.events_text%0A%0A return events%0A%0A def get_cosine_graph(self):%0A if self.mode == 'text-graph':%0A ... |
e38e0b61b74316a171d49fa9390ecc736408694d | Simplify nanomsg sample | samples/nanomsg/hello_world_asyncio.py | samples/nanomsg/hello_world_asyncio.py | import asyncio
import sys
import nanomsg as nn
from nanomsg.asyncio import Socket
async def ping(url, barrier):
with Socket(protocol=nn.NN_PUSH) as sock, sock.connect(url):
await sock.send(b'Hello, World!')
# Shutdown the endpoint after the other side ack'ed; otherwise
# the message could... | Python | 0.000006 | @@ -90,39 +90,35 @@
c def ping(url,
-barrier
+ack
):%0A with Sock
@@ -325,39 +325,35 @@
.%0A await
-barrier
+ack
.wait()%0A%0A%0Aasync
@@ -366,23 +366,19 @@
ng(url,
-barrier
+ack
):%0A w
@@ -545,746 +545,219 @@
a
-wait barrier.wait()%0A%0A%0Aasync def close_loop(barrier):%0A await barrier.... |
f3b6771c43042c599e57d3a26fa678518e12455d | Update jupyterlab/tests/mock_packages/interop/consumer/setup.py | jupyterlab/tests/mock_packages/interop/consumer/setup.py | jupyterlab/tests/mock_packages/interop/consumer/setup.py | import json
from glob import glob
import os.path as osp
name = 'jlab_mock_consumer'
HERE = osp.abspath(osp.dirname(__file__))
with open(osp.join(HERE, 'package.json')) as fid:
data = json.load(fid)
from setuptools import setup
js_name = data['name']
setup(name=name,
version=data['version'],
py_modu... | Python | 0 | @@ -511,8 +511,9 @@
)%0A %5D)
+%0A
|
7c3d2f8afbc5c6d1dc7c719f97ca93ffb908d6ce | Add tests of tangential velocity. | test_SR1d.py | test_SR1d.py | import eos_defns
import SR1d
from numpy.testing import assert_allclose
def test_standard_sod():
"""
Relativistic Sod test.
Numbers are taken from the General Matlab code, so accuracy isn't perfect.
"""
eos = eos_defns.eos_gamma_law(5.0/3.0)
w_left = SR1d.State(1.0, 0.0, 0.0, 1.5, eos, labe... | Python | 0 | @@ -765,28 +765,1408 @@
ck_speed_matlab, rtol=1e-6)%0A
+%0Adef test_bench_3():%0A %22%22%22%0A Test Bench problem 3.%0A %0A Take from Marti & Muller's Living Review (section 6.3). See%0A http://computastrophys.livingreviews.org/Articles/lrca-2015-3%0A %0A Left and right states have been flipped so... |
f7b92034f258d2d2868bee5c79a4c3bbd4c5fa9a | Fix wallet_reorgsrestore functional test flakiness | test/functional/wallet_reorgsrestore.py | test/functional/wallet_reorgsrestore.py | #!/usr/bin/env python3
# Copyright (c) 2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test tx status in case of reorgs while wallet being shutdown.
Wallet txn status rely on block connection/d... | Python | 0.001715 | @@ -933,16 +933,82 @@
odes = 3
+%0A self.extra_args = %5B%5B%22-noparkdeepreorg%22%5D%5D * self.num_nodes
%0A%0A de
|
a6b86330938f813eec534eac22bd917d64ff6896 | remove unused argument from run proxy script | pixelated/pixelated_dispatcher/__init__.py | pixelated/pixelated_dispatcher/__init__.py | #
# Copyright (c) 2014 ThoughtWorks Deutschland GmbH
#
# Pixelated 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 option) any later version.
#
# Pixelated... | Python | 0.000001 | @@ -4452,88 +4452,8 @@
r()%0A
- parser.add_argument('-p', '--port', help='The port the dispatcher runs on')%0A
|
9776615477bc9411dc6e0014396646d405dd0bb0 | print the pin name when complaining about missing description | scripts/generate-constraints.py | scripts/generate-constraints.py | #!/usr/bin/python
# Copyright (c) 2013 Quanta Research Cambridge, Inc.
#
# 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,... | Python | 0.000803 | @@ -4198,32 +4198,37 @@
escription for',
+ pin,
pinName, projec
@@ -4487,24 +4487,29 @@
iption for',
+ pin,
pinName, pr
|
1794185db5411c2d02ec1300bfa9e079a48b7a9d | Fix broken ETW dependency. | syzygy/scripts/benchmark/benchmark.gyp | syzygy/scripts/benchmark/benchmark.gyp | # Copyright 2012 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 ... | Python | 0.00015 | @@ -4667,38 +4667,31 @@
rc)/
-third_party/sawbuck
+syzygy
/py/etw
+_db
/etw
+_db
.gyp
|
a9cb12b48976cde0973966488c6957e606036d26 | clean up | krbroast-pcap2hashcat.py | krbroast-pcap2hashcat.py | #!/usr/bin/env python3 -tt
from scapy.all import *
import struct
import codecs
from pyasn1.codec.ber import encoder, decoder
MESSAGETYPEOFFSETUDP = 17
MESSAGETYPEOFFSETTCP = 21
DEBUG = True
TGS_REP = 13
def findkerbpayloads(packets, verbose=False):
kploads = []
i = 1
unfinished = {}
for p in packets:
# UDP
... | Python | 0.000001 | @@ -761,27 +761,8 @@
ue%0A%0A
-%09%09%09print(payload)%0A%0A
%09%09%09i
@@ -3071,17 +3071,4 @@
out)
-%0A%09%09sys.exit()
|
1786702388abc4fe737ee73d64ef5864f42f0c3d | Fix missing offset for Query | chat/query.py | chat/query.py | # Copyright 2017 Oursky Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | Python | 0.00002 | @@ -991,20 +991,22 @@
ffset =
-None
+offset
%0A
|
c637eb216e9dc148a588019d22bc96db3565b3fc | Correct breakpoints | cmsplugin_bs4forcascade/bootstrap4/settings.py | cmsplugin_bs4forcascade/bootstrap4/settings.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.translation import ugettext_lazy as _
from cmsplugin_cascade.extra_fields.config import PluginExtraFieldsConfig
CASCADE_PLUGINS = getat... | Python | 0.000193 | @@ -722,17 +722,19 @@
('xs', (
-0
+575
, 'mobil
@@ -761,14 +761,16 @@
%22),
+56
0, 5
-42
+75
)),%0A
@@ -825,10 +825,10 @@
), 5
-44
+76
, 76
@@ -1029,16 +1029,17 @@
80)),))%0A
+%0A
for
|
342f523fc92834e454eef29dfb1bab825d6a552f | correct the output log message | btsprice/exchanges.py | btsprice/exchanges.py | # -*- coding: utf-8 -*-
import requests
import json
import logging
from btsprice.misc import get_median
from btsprice.yahoo import Yahoo
class Exchanges():
# ------------------------------------------------------------------------
# Init
# ------------------------------------------------------------------... | Python | 0.999999 | @@ -3894,36 +3894,40 @@
ng results from
-bter
+poloniex
!%22)%0A
|
2683219a40382687f2bd09f14aab763afe6d97a6 | Update bb-runtime branch for GNAT Community 2019 | scripts/install_dependencies.py | scripts/install_dependencies.py | #! /usr/bin/env python2
import argparse
import os
import os.path
import subprocess
import sys
ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))
def run_program(argv, cwd=os.path.dirname(os.path.realpath(__file__))):
print "$ %s" % " ".join(argv)
p = subprocess.Popen(
argv,
... | Python | 0 | @@ -1215,32 +1215,33 @@
r = run_program(
+%5B
%0A 'gi
@@ -1299,16 +1299,17 @@
+ branch
+%5D
)%0A
@@ -1724,12 +1724,24 @@
-None
+%22community-2019%22
,%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.