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 |
|---|---|---|---|---|---|---|---|
1e26e986ed1f5fa2050e7a04363939a8c83c1043 | fix test of SSD.predict | tests/links_tests/model_tests/ssd_tests/test_ssd.py | tests/links_tests/model_tests/ssd_tests/test_ssd.py | import numpy as np
import unittest
import chainer
from chainer import testing
from chainer.testing import attr
from chainercv.links.model.ssd import Multibox
from chainercv.links.model.ssd import SSD
def _random_array(xp, shape):
return xp.array(
np.random.uniform(-1, 1, size=shape), dtype=np.float32)
... | Python | 0.000009 | @@ -4757,35 +4757,25 @@
andom_array(
-self.link.x
+n
p, (3, 640,
@@ -4803,35 +4803,25 @@
andom_array(
-self.link.x
+n
p, (3, 320,
|
18b3c099feedb1eb10eeb6e8c358c77e5e7dd264 | Add probability output to logistic regression | ML/regression.py | ML/regression.py | """
Linear and logistic regression including regularization.
Currently, only L2 regularization is available.
Includes closed form, gradient descent, and SGD solvers.
"""
import numpy as np
from descentmethods import gradientdescent
class BaseRegression:
"""Base Class for implimenting Linear Regression"""
def... | Python | 0.999999 | @@ -886,16 +886,17 @@
value%0A%0A
+%0A
class Li
@@ -4659,32 +4659,51 @@
predict(self, X
+, probability=False
):%0A %22%22%22%0A
@@ -4780,32 +4780,146 @@
les, n_features%5D
+%0A probability (bool): If True, return probabilities%0A If False, return class predictions.
%0A%0A ... |
b9c953cffd0c9961c22c0c671648f5e5a3e4426c | Update server | alchemy_server.py | alchemy_server.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 30 01:14:12 2017
@author: colm
"""
from flask import Flask, jsonify
import os
from models import Charity, Logo, Description
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
import pandas as pd
app = Flask(__name__)
app... | Python | 0.000001 | @@ -440,20 +440,16 @@
session%0A
-
%0A que
@@ -474,24 +474,79 @@
(Charity
+, Description.description, Logo.logo_url, Logo.has_face
)%5C%0A .
leftjoin
@@ -533,28 +533,24 @@
face)%5C%0A .
-left
join(Logo, C
@@ -585,12 +585,8 @@
.
-left
join
@@ -633,20 +633,16 @@
n.name)%0A
-
%0A cha
@@ -... |
bdfcbe357950106e369a3e5fd25b2bdba7cc7f7c | add missing coverage | test_log_utils.py | test_log_utils.py | '''
Created on Oct 1, 2015
@author: kashefy
'''
import os
import sys
import shutil
import tempfile
from nose.tools import assert_equal, assert_false, \
assert_is_instance, assert_is_none, assert_less, assert_true
import log_utils as lu
CURRENT_MODULE_PATH = os.path.abspath(sys.modules[__name__].__file__)
TEST_DAT... | Python | 0.000005 | @@ -143,16 +143,31 @@
t_false,
+ assert_raises,
%5C%0A a
@@ -2718,32 +2718,530 @@
r)%0A %0A
+ def test_read_pid_invalid(self):%0A %0A path_temp_dir = tempfile.mkdtemp()%0A fpath = os.path.join(path_temp_dir, TEST_LOG_FILENAME)%0A %0A with open(fpath, 'w') as f:%0A... |
434e459059bba2a1e52e953813caae532a3cb16b | Update test_consume_4 | test_wordcount.py | test_wordcount.py | import os.path
import tempfile
import wordcount_lib
def _make_testfile(filename, data):
"Make a temp file containing the given data; return full path to file."
tempdir = tempfile.mkdtemp(prefix='wordcounttest_')
testfile = os.path.join(tempdir, filename)
with open(testfile, 'wt') as fp:
... | Python | 0.000003 | @@ -1502,9 +1502,10 @@
==
-9
+10
|
2fa092add3508b774c58e880089c18c3275df840 | Set block_align on target population if given | backend/populate_targets.py | backend/populate_targets.py | import django
import os
import yaml
from backend.settings import BASE_DIR
from django.db import IntegrityError
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')
django.setup()
from breach.models import Target
def create_target(target):
method = ''
for m in Target.METHOD_CHOICES:
if... | Python | 0.000001 | @@ -1024,16 +1024,107 @@
length'%5D
+%0A if 'block_align' in target:%0A target_args%5B'block_align'%5D = target%5B'block_align'%5D
%0A%0A t
|
829941e9d4675645752fa207c461dd596da6264c | refactor html template selection | satchmo/apps/satchmo_store/mail.py | satchmo/apps/satchmo_store/mail.py | from django.conf import settings
from django.template import loader, Context, TemplateDoesNotExist
from livesettings import config_value
import os.path
from socket import error as SocketError
import logging
log = logging.getLogger('satchmo_store.mail')
if "mailer" in settings.INSTALLED_APPS:
from mailer import s... | Python | 0 | @@ -1767,70 +1767,8 @@
t)%0A%0A
- t = loader.get_template(template)%0A body = t.render(c)%0A%0A
@@ -1773,32 +1773,32 @@
if send_html:%0A
+
base_dir
@@ -2037,21 +2037,16 @@
-html_
t = load
@@ -2104,49 +2104,8 @@
e))%0A
- html_body = html_t.render(c)%0A
@@ -2304,16 +2... |
e2b28182e60f5a8fda474ac27e4dbcdaab12c016 | Add default Sentry site so we can tell diff between prod and staging | config/settings/production.py | config/settings/production.py | # -*- coding: utf-8 -*-
from .base import *
import dj_database_url
#######################
# DEBUG CONFIGURATION #
#######################
# https://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-DEBUG
DEBUG = env('DJANGO_DEBUG', False)
##########################
# DATABASE CONFIGURATION #
###############... | Python | 0 | @@ -4446,16 +4446,65 @@
_DSN'),%0A
+ 'site': env('SENTRY_SITE', 'Public Schools')%0A
%7D%0A%0AINSTA
|
3e141b9352a153757604a323b385719f445639c6 | add feature | tierpsy/analysis/vid_subsample/createSampleVideo.py | tierpsy/analysis/vid_subsample/createSampleVideo.py | # -*- coding: utf-8 -*-
"""
Created on Wed May 18 18:22:12 2016
@author: ajaver
"""
import os
import cv2
import h5py
import numpy as np
from tierpsy.helper.params import read_fps
from tierpsy.helper.misc import TimeCounter, print_flush
def getSubSampleVidName(masked_image_file):
#used by AnalysisPoints.py and ... | Python | 0 | @@ -1467,16 +1467,37 @@
e_file,
+%0A
sample_v
@@ -1512,16 +1512,37 @@
e = '',
+%0A
time_fac
@@ -1571,17 +1571,16 @@
-
size_fac
@@ -1591,36 +1591,236 @@
= 5,
- dflt_fps=30, codec='MPEG'):
+%0A skip_factor = 2, %0A dflt_fps=3... |
abd2ad6098cb0bc827a8bebf12f21f1131dc83fa | Change version number | fluxghost/__init__.py | fluxghost/__init__.py | __version__ = "0.8.0"
DEBUG = False
| Python | 0.000009 | @@ -12,17 +12,17 @@
= %220.8.
-0
+1
%22%0ADEBUG
|
52eed6f6d771045b2c06a941db17665785e90b23 | return an error exit code if tests failed | tests/__init__.py | tests/__init__.py | import unittest
import parse
import extent
def load_tests():
return unittest.TestSuite([parse.load_tests(), extent.load_tests()])
if __name__ == "__main__":
unittest.TextTestRunner(verbosity=2).run(load_tests())
| Python | 0.001138 | @@ -1,12 +1,23 @@
+import sys%0A
import unitt
@@ -171,16 +171,25 @@
__%22:%0A
+ result =
unittes
@@ -236,8 +236,63 @@
ests())%0A
+ if not result.wasSuccessful():%0A sys.exit(1)%0A
|
a0d8be58248eaa3d314c624cd4150afc1d3dd203 | Fix DereferrablePanelTestCase.tearDownClass | tests/__init__.py | tests/__init__.py | import sublime
from textwrap import dedent
from unittesting import DeferrableTestCase
class DereferrablePanelTestCase(DeferrableTestCase):
@classmethod
def setUpClass(cls):
"""
Set up global test environment once for all tests owned by this class.
"""
cls.window = sublime.act... | Python | 0.000001 | @@ -1075,35 +1075,24 @@
%22%22%22%0A
- cls.view =
cls.window.
|
37ea71485ed8b1b1130a3cff06ba3081dae75e39 | Switch to BytesIO where possible, use StringIO.StringIO elsewhere. | tests/__init__.py | tests/__init__.py | """Testing helpers and base classes for better isolation."""
from contextlib import contextmanager
import datetime
import errno
import logging
import os
import StringIO
import subprocess
from tempfile import NamedTemporaryFile
import unittest
from mock import patch
import yaml
import utility
@contextmanager
def st... | Python | 0 | @@ -147,16 +147,97 @@
port os%0A
+import io%0Atry:%0A from StringIO import StringIO%0Aexcept ImportError:%0A from io
import S
@@ -421,31 +421,24 @@
tdout =
-StringIO.String
+io.Bytes
IO()%0A
@@ -3504,25 +3504,16 @@
tream =
-StringIO.
StringIO
@@ -3902,23 +3902,16 @@
r =
-StringIO.String
+io.Bytes
I... |
175ce2f3b7fe5932166c6bd2ef3596517d71a9f8 | Work around weird API results | foomodules/Lichess.py | foomodules/Lichess.py | import requests
import time
from datetime import timedelta, datetime
import babel.dates
import foomodules.Base as Base
_LAST_REQUEST = None
def check_and_set_ratelimit():
global _LAST_REQUEST
if _LAST_REQUEST is None:
return True
now = time.monotonic()
if now - _LAST_REQUEST < 0.8:
... | Python | 0 | @@ -3043,24 +3043,26 @@
%0A
+ #
if game%5B%22co
@@ -3082,32 +3082,34 @@
te%22:%0A
+ #
vs = %22%7B%7D vs
@@ -3147,32 +3147,34 @@
ACK)%0A
+ #
else:%0A
@@ -3171,24 +3171,26 @@
%0A
+ #
vs = %22%7B
@@ -3230,16 +3230,131 @@
WHITE)%0A%0A
+ vs... |
7c2f34990dc3bf5b4736541a6e9faf88a07581fa | remove useless import | tests/__init__.py | tests/__init__.py | import asyncio
import asynctest
import logging
import os
from functools import wraps
import shortuuid
from typing import Generator, Any
from yarl import URL
from aio_pika import Connection, connect, Channel, Queue, Exchange
log = logging.getLogger(__name__)
for logger_name in ('pika.channel', 'pika.callback', 'pi... | Python | 0.000004 | @@ -1,19 +1,4 @@
-import asyncio%0A
impo
|
1858b0ae7f70798f3d11ecca1af55719a52def49 | Fix downgrade in migration | neutron/db/migration/alembic_migrations/versions/2a6d0b51f4bb_cisco_plugin_cleanup.py | neutron/db/migration/alembic_migrations/versions/2a6d0b51f4bb_cisco_plugin_cleanup.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2013 OpenStack Foundation
#
# 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... | Python | 0.00003 | @@ -2735,32 +2735,34 @@
ort_id', sa.
-Integer(
+String(255
), nullable=
@@ -2853,38 +2853,31 @@
sa.Column(u'
-portprofile_id
+default
', sa.Boolea
@@ -3014,17 +3014,19 @@
t(%5B'port
-s
+_id
'%5D, %5B'po
|
bb94d126ae9ff86efc00cfbda5f3fff375490e16 | Add missing import to tests/__init__.py. | tests/__init__.py | tests/__init__.py | # -*- coding: utf-8 -*-
# Copyright (c) 2010-2011, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenQuake is distributed in the hope that it will be ... | Python | 0.999554 | @@ -1238,24 +1238,58 @@
st import *%0A
+from input_risk_unittest import *%0A
from java_un
|
51e26f24d224978b58c21ab3e083960356429f23 | Add tests for BCS operators without subscripts | tests/bcs_test.py | tests/bcs_test.py | """Test for the reduced BCS Hamiltonian."""
import pytest
from sympy import KroneckerDelta
from drudge import ReducedBCSDrudge
@pytest.fixture(scope='module')
def rbcs(spark_ctx):
"""Initialize the environment for a reduced BCS problem."""
return ReducedBCSDrudge(spark_ctx)
def test_rbcs_has_basic_commuta... | Python | 0 | @@ -613,16 +613,244 @@
is p.P%0A%0A
+ # Test commutation without subscripts.%0A comm = dr.simplify(n_ %7C pdag_)%0A assert comm == 2 * pdag_%0A comm = dr.simplify(n_ %7C p_)%0A assert comm == -2 * p_%0A comm = dr.simplify(p_ %7C pdag_)%0A assert comm == 1 - n_%0A%0A
# Te
|
3225abc4006378d0b9f1e861116aac8116d47ec0 | fix wrong indent | monasca_notification/plugins/slack_notifier.py | monasca_notification/plugins/slack_notifier.py | # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Python | 0.984856 | @@ -3382,36 +3382,8 @@
.%22)%0A
- return True%0A
@@ -3578,32 +3578,36 @@
l))%0A
+
return False%0A
@@ -3603,16 +3603,40 @@
n False%0A
+ return True%0A
|
4bafa90acca39a3d3fa5df0303d885c810244700 | Add URL | lc034_find_first_and_last_position_of_element_in_sorted_array.py | lc034_find_first_and_last_position_of_element_in_sorted_array.py | """Leetcode 34. Find First and Last Position of Element in Sorted Array
Medium
Given an array of integers nums sorted in ascending order,
find the starting and ending position of a given target value.
Your algorithm's runtime complexity must be in the order of O(log n).
If the target is not found in the array, retu... | Python | 0.000001 | @@ -73,16 +73,108 @@
Medium%0A%0A
+URL: https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array%0A%0A
Given an
|
89ec39a1479bf532a5fc2ef7b2f9a4afdfde075f | Use Pattern from typing | src/python/m5/ext/pystats/group.py | src/python/m5/ext/pystats/group.py | # Copyright (c) 2021 The Regents of The University of California
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this lis... | Python | 0 | @@ -1613,16 +1613,25 @@
ptional,
+ Pattern,
Union%0A%0A
@@ -4324,19 +4324,16 @@
on%5Bstr,
-re.
Pattern%5D
|
f2dcee8364087209b7f160806a023ce2dc198466 | Remove hidden keys | bdp/platform/frontend/src/bdp_fe/jobconf/views_util.py | bdp/platform/frontend/src/bdp_fe/jobconf/views_util.py | """
Utility functions for controllers.
"""
from random import choice
from django.conf import settings
from django.http import HttpResponseNotFound
from django.shortcuts import get_object_or_404
from models import CustomJobModel
from pymongo import Connection
from pymongo.errors import AutoReconnect, ConnectionFailure... | Python | 0.000002 | @@ -414,23 +414,8 @@
= %5B
-'_id', 'job_id'
%5D%0A%0Ac
|
49c64731fab1de1fc08b61a70190930b829d70d3 | Remove import for random | src/python/m5/internal/__init__.py | src/python/m5/internal/__init__.py | # Copyright (c) 2006 The Regents of The University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this list ... | Python | 0.000003 | @@ -1611,22 +1611,8 @@
ent%0A
-import random%0A
impo
|
f3c7f0d488bcd41ed3fb19d83e78fa1436315a08 | Add test for improved pretty printing behaviour | bindings/pyroot/pythonizations/test/pretty_printing.py | bindings/pyroot/pythonizations/test/pretty_printing.py | import unittest
import ROOT
class PrettyPrinting(unittest.TestCase):
# Helpers
def _print(self, obj):
print("print({}) -> {}".format(repr(obj), obj))
# Tests
def test_RVec(self):
x = ROOT.ROOT.VecOps.RVec("float")(4)
for i in range(x.size()):
x[i] = i
self.... | Python | 0 | @@ -1960,16 +1960,749 @@
(s, r)%0A%0A
+ def test_user_class_with_str(self):%0A # ROOT-10967: Respect existing __str__ method defined in C++%0A ROOT.gInterpreter.Declare('struct MyClassWithStr %7B std::string __str__() %7B return %22foo%22; %7D %7D;')%0A x = ROOT.MyClassWithStr()%0A self.... |
01c88b514c64f001fc7824a30b8609a425d646ef | Set defaults for CI and DETERMINISTIC_TESTS. (#653) | tests/conftest.py | tests/conftest.py | # -*- coding: utf-8 -*-
'''
General-purpose fixtures for vdirsyncer's testsuite.
'''
import logging
import os
import click_log
from hypothesis import HealthCheck, Verbosity, settings
import pytest
@pytest.fixture(autouse=True)
def setup_logging():
click_log.basic_config('vdirsyncer').setLevel(logging.DEBUG)
... | Python | 0 | @@ -719,17 +719,21 @@
.environ
-%5B
+.get(
'DETERMI
@@ -745,17 +745,26 @@
C_TESTS'
-%5D
+, 'false')
.lower()
@@ -837,14 +837,27 @@
iron
-%5B'CI'%5D
+.get('CI', 'false')
.low
|
88bba8a6145f67fd65e4062123db295601c92000 | Fix lint errors | tests/conftest.py | tests/conftest.py | # -*- encoding: utf-8
import os
from hotchocolate import Site
import hotchocolate.cli as hcli
# TODO: Tidy this up, and don't duplicate code from cli.py
curdir = os.path.abspath(os.curdir)
os.chdir('tests/examplesite')
site = Site.from_folder('content')
site.build()
os.chdir(curdir)
| Python | 0.000396 | @@ -61,40 +61,8 @@
ite%0A
-import hotchocolate.cli as hcli%0A
%0A%0A#
|
34fcbd340f1e045dc39e0468c9126d7ab13cc94d | Fix npm install during tests | tests/conftest.py | tests/conftest.py | import os
import os.path
import json
from pathlib import Path
import subprocess
import tarfile
import pytest
import py
def pytest_addoption(parser):
parser.addoption("--elm-version", default='0.19.1',
help="specify the version of Elm to test")
def pytest_generate_tests(metafunc):
if 'e... | Python | 0.000006 | @@ -1326,16 +1326,38 @@
return
+'latest-%7Bv%7D'.format(v=
elm_vers
@@ -1359,16 +1359,17 @@
_version
+)
%0A min
|
8dc79a0a1b99d1742ae297db7da26a0404e5ec33 | Fix pep8 | tests/conftest.py | tests/conftest.py | import pytest
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from models import Base
from config import create_new_sqla
from helpers import get_video_douban_ids
test_database_url = 'sqlite:///test.db'
@pytest.fixture(scope='session')
def session(request):
sqla = create_new_sqla(test... | Python | 0.000001 | @@ -554,16 +554,17 @@
ession%0A%0A
+%0A
@pytest.
|
195cabda3d599f5d6f2a7d0e5090f1c2f057ff0c | fix appveyor env variable | tests/fixtures.py | tests/fixtures.py | import pytest
from lcopt import LcoptModel
from lcopt.interact import FlaskSandbox
from lcopt.utils import DEFAULT_DB_NAME, check_for_config
import os
import brightway2 as bw2
MODEL_NAME = 'modelName'
PARAMETER_DATA = '[{"id":"p_3_2","Name":"Tea leaves","Unit":"kg","Normal tea":"0.01","Black tea":"0.01"},{"id":"p_0_2... | Python | 0.000001 | @@ -1478,16 +1478,55 @@
.environ
+%0AIS_APPVEYOR = 'APPVEYOR' in os.environ
%0A%0Aif IS_
@@ -1535,16 +1535,19 @@
AVIS or
+IS_
APPVEYOR
|
74cfff61731e19d115566741a4f3a1af68431141 | Add extensions for `gyp` | identify/extensions.py | identify/extensions.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
EXTENSIONS = {
'apinotes': {'text', 'apinotes'},
'asar': {'binary', 'asar'},
'bash': {'text', 'shell', 'bash'},
'bat': {'text', 'batch'},
'bmp': {'binary', 'image', 'bitmap'},
'bz2': {'binary... | Python | 0 | @@ -1137,24 +1137,101 @@
t', 'gyb'%7D,%0A
+ 'gyp': %7B'text', 'gyp', 'python'%7D,%0A 'gypi': %7B'text', 'gyp', 'python'%7D,%0A
'gz': %7B'
|
ab81767d7504bc3016786780902d8c3997e37f64 | Add option to use proxies in JiraHook | airflow/contrib/hooks/jira_hook.py | airflow/contrib/hooks/jira_hook.py | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | Python | 0 | @@ -1301,16 +1301,47 @@
default'
+,%0A proxies=None
):%0A
@@ -1429,16 +1429,47 @@
conn_id%0A
+ self.proxies = proxies%0A
@@ -3065,16 +3065,77 @@
validate
+,%0A proxies=self.proxies
)%0A
|
423ec9d9b38be990ab7dca027877e1c12f3d07fe | add in django-registration update media url | imagr_site/settings.py | imagr_site/settings.py | """
Django settings for imagr_site project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)... | Python | 0 | @@ -1100,16 +1100,36 @@
south',%0A
+ 'registration',%0A
)%0A%0AMIDDL
@@ -2110,29 +2110,8 @@
= '
-http://localhost:8000
/med
|
1675252b3442ff4e32881ce1c28f1753c521fb3f | Remove the main from the new file | code/spearmint-configs/dbnmnist/mnistdbn.py | code/spearmint-configs/dbnmnist/mnistdbn.py | """Spearmint for the DBN module in pydeeplearn."""
__author__ = "Mihaela Rosca"
__contact__ = "mihaela.c.rosca@gmail.com"
import argparse
from lib import deepbelief as db
from lib.common import *
from lib.activationfunctions import *
from read import readmnist
parser = argparse.ArgumentParser(description='digit re... | Python | 0.000002 | @@ -3452,261 +3452,4 @@
%5D)%0A%0A
-if __name__ == '__main__':%0A params = %7B%0A 'unsupervisedLearningRate': %5B0%5D,%0A 'supervisedLearningRate': %5B0%5D,%0A 'visibleDropout': %5B0%5D,%0A 'hiddenDropout': %5B0%5D,%0A 'miniBatchSize': %5B0%5D,%0A 'momentumMax': %5B0%5D,%0A 'maxEpochs': %5B0%5D%0... |
ac754a6a711edc9b3628499ae18e74892efd7f98 | Add recording interaction print statements | src/tdl/runner/recording_system.py | src/tdl/runner/recording_system.py | import unirest
RECORDING_SYSTEM_ENDPOINT = "http://localhost:41375"
class RecordingEvent:
def __init__(self):
pass
ROUND_START = 'new'
ROUND_SOLUTION_DEPLOY = 'deploy'
ROUND_COMPLETED = 'done'
class RecordingSystem:
def __init__(self, recording_required):
self._recording_requi... | Python | 0.000004 | @@ -873,16 +873,92 @@
_name):%0A
+ print('Notify round %22%7B%7D%22, event %22%7B%7D%22'.format(round_id, event_name))%0A
@@ -1034,32 +1034,75 @@
_to_stop(self):%0A
+ print('Stopping recording system')%0A
self._se
|
0b3247c23d37c372d3f3984391b976fa904d00c6 | bump to v1.4.0 (#5975) | var/spack/repos/builtin/packages/miniamr/package.py | var/spack/repos/builtin/packages/miniamr/package.py | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | Python | 0 | @@ -1432,83 +1432,56 @@
http
+s
://
-mantevo.org/downloads/releaseTarballs/miniapps/MiniAMR/miniAMR_1.0_all.t
+github.com/Mantevo/miniAMR/archive/v1.4.tar.
gz%22%0A
@@ -1543,45 +1543,47 @@
('1.
+4.
0', '
-812e5aaaab99689a4e9381a3bbd718a6
+3aab0247047a94e343709cf2e51cc46e
')%0A%0A
@@ -1888,17 +1888,44 @@
('LD
-LI... |
c982b49e8091972a54e18233c95b21c594687200 | fix package references | xcloud/xcloud.py | xcloud/xcloud.py | #!/usr/bin/env python
# coding: utf-8
import argparse
import logging
import os
from fnmatch import fnmatch
import yaml
import utils
import cloudoptions.CloudOptions
_log = logging.getLogger(__name__)
def main():
try:
options = {}
config_file = os.path.expanduser('~/.xcloud')
if os.pa... | Python | 0 | @@ -128,24 +128,59 @@
t utils%0A
-%0Aimport
+from xcloud.cloud import Cloud%0Afrom xcloud.
cloudopt
@@ -183,17 +183,24 @@
doptions
-.
+ import
CloudOpt
|
7b2b2fb96957b9ea94ddb0656fd047724564f31d | add v1.1 (#9289) | var/spack/repos/builtin/packages/sw4lite/package.py | var/spack/repos/builtin/packages/sw4lite/package.py | ##############################################################################
# Copyright (c) 2017, Los Alamos National Security, LLC
# Produced at the Los Alamos National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, ... | Python | 0 | @@ -1692,16 +1692,110 @@
aster')%0A
+ version('1.1', sha256='34b5f7b56f9e40474c14abebcaa024192de018de6beb6dafee53d3db5b07c6d3')%0A
vers
|
779393e6c18539c97ff3bdaeb471253170645bc2 | Update group.py | web-app/numeter_webapp/configuration/forms/group.py | web-app/numeter_webapp/configuration/forms/group.py | """
Group Form module.
"""
from django import forms
from django.utils.translation import ugettext_lazy as _
from djangular.forms.angular_model import NgModelFormMixin
from core.models import Group
class Group_Form(forms.ModelForm):
"""Simple Group Form"""
class Meta:
model = Group
widgets = {... | Python | 0 | @@ -106,67 +106,8 @@
s _%0A
-from djangular.forms.angular_model import NgModelFormMixin%0A
from
|
7ca6dd5cd84222845db331afd97fc2f314999cff | fix yaspin.compat module docstring | yaspin/compat.py | yaspin/compat.py | # -*- coding: utf-8 -*-
"""
tests.compat
~~~~~~~~~~~~~
Compatibility layer.
"""
import sys
PY2 = sys.version_info[0] == 2
if PY2:
builtin_str = str
bytes = str
str = unicode # noqa
def iteritems(dct):
return dct.iteritems()
else:
builtin_str = str
bytes = bytes
... | Python | 0 | @@ -26,13 +26,14 @@
%22%22%22%0A
-tests
+yaspin
.com
|
9a15095217b0f1f1ed154ccba7950c041ff01260 | FIX default event type to avoid null values error | website_event_compassion/models/event_compassion.py | website_event_compassion/models/event_compassion.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2018 Compassion CH (http://www.compassion.ch)
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py
#
#################################################... | Python | 0 | @@ -1209,16 +1209,25 @@
lection(
+%0A
compute=
@@ -1248,16 +1248,35 @@
t_type',
+ default='meeting',
store=T
|
739f72ae0bd873ac8d51789e90988d609b08a803 | Add typos and nonsense to pass distribution plan | inpassing/pass_util.py | inpassing/pass_util.py | # Copyright (c) 2016 Luke San Antonio Bialecki
# All rights reserved.
from sqlalchemy.sql import and_, or_
from .models import Pass, PassRequest, db
def get_user_passes(user_id):
"""Returns all owned, borrowed and requested passes of a user."""
# Find pending and successfull requests
pending_requests = d... | Python | 0 | @@ -2193,16 +2193,17 @@
by score
+.
%0A 3.
@@ -2220,16 +2220,64 @@
to t
-op
+he
user
-.
+ with the highest score.%0A 4. ???%0A 5. Profit
%0A%0A
@@ -2367,15 +2367,17 @@
dom
+(
seeking
+)
ind
@@ -2470,14 +2470,16 @@
ss.
+*
Always
+*
.%0A%0A
@@ -2586,14 +2586,17 @@
1.
-Pay to
+Users pay
fo... |
b9fc0685b3adb05a5049cfa9b68676e00878d48a | Add .fillna(0) | instagram_collector.py | instagram_collector.py | import sys
from settings import instgram_access_token
from api import InstagramAPI, Alchemy
import pandas as pd
def following_users(api, user_name):
instgram_user_id = api.user_id(user_name=user_name)
following_users = api.follows_list(user_id=instgram_user_id)
return following_users
def userinfo_list(... | Python | 0.000001 | @@ -1410,16 +1410,26 @@
fo_list)
+.fillna(0)
%0A use
|
1483b7946f929ee6dc8d5a8e972c712af35d4aea | Add capacity to save parsed objects to models in management command "process_xslt" | xml_json_import/management/commands/process_xslt.py | xml_json_import/management/commands/process_xslt.py | from django.core.management.base import BaseCommand
from lxml import etree, html
import urllib2
from os import path
class Command(BaseCommand):
help = 'Processes XSLT transformation on a fetched by URL resource and outputs the result'
def add_arguments(self, parser):
parser.add_argument('url'... | Python | 0 | @@ -112,16 +112,34 @@
rt path%0D
+%0Aimport importlib%0D
%0A%0D%0Aclass
@@ -944,16 +944,443 @@
s set')%0D
+%0A parser.add_argument('--save', action='store_true', %0D%0A help='Save data to the model. Successful validation against Relax NG '%0D%0A 'sc... |
c1d8cf4a2aea0ece6bc301c30fa9dde36d9d9cc6 | Version bump [ci skip] | bulbs/__init__.py | bulbs/__init__.py | __version__ = "0.3.4"
| Python | 0 | @@ -16,7 +16,7 @@
0.3.
-4
+5
%22%0A
|
5ac7bba7ba8f411ed8daaf2055fde56eda152b6c | Add missing context processor to test app | tests/runtests.py | tests/runtests.py | #!/usr/bin/env python
import os
import sys
from optparse import OptionParser
AVAILABLE_DATABASES = {
'psql': {'ENGINE': 'django.db.backends.postgresql_psycopg2'},
'mysql': {'ENGINE': 'django.db.backends.mysql'},
'sqlite': {'ENGINE': 'django.db.backends.sqlite3'},
}
def main():
# Parse the command-lin... | Python | 0.000001 | @@ -3380,16 +3380,112 @@
ates'%5D,%0A
+ 'OPTIONS': %7B'context_processors': %5B'django.contrib.auth.context_processors.auth'%5D%7D,%0A
|
d4d57718674e078a71c860d53b7157f4e75dfec2 | Fix mistakes with message printing in tester and tidy up output a little bit. | tests/runtests.py | tests/runtests.py | #!/usr/bin/env python
"""
Simple script to run test OpenCL programs
"""
import argparse
try:
# Python 3
import configparser as cp
except ImportError:
# Python 2.x
import ConfigParser as cp
import copy
import glob
import logging
import os
import re
import subprocess
import shutil
import sys
def printE... | Python | 0 | @@ -318,21 +318,98 @@
ntError(
-strin
+msg):%0A logging.error('%5C033%5B0;31m*** %7B%7D ***%5C033%5B0m'.format(msg))%0A%0Adef printOk(ms
g):%0A
@@ -462,18 +462,16 @@
mat(
+m
s
-trin
g))%0A%0A
+%0A
clas
@@ -1083,63 +1083,34 @@
-logging.error('%5C033%5B0;31m*** %7B%7D failed ***%5C033%5B0m
+printError(... |
84cdde09d574d2a52446bd751445747407733b22 | Remove print statement | tests/settings.py | tests/settings.py | import uuid
import os.path
from django.conf import global_settings, settings
from oscar import OSCAR_MAIN_TEMPLATE_DIR, get_core_apps
from oscar.defaults import * # noqa
from accounts import TEMPLATE_DIR as ACCOUNTS_TEMPLATE_DIR
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
}
... | Python | 0.007015 | @@ -1904,29 +1904,8 @@
%0A)%0A%0A
-print TEMPLATE_DIRS%0A%0A
STAT
|
3612a418a443b724332aa6759e30eefd8122df3e | Update expected package name and version | tests/test_cli.py | tests/test_cli.py | import pytest
import json
import os.path
from click.testing import CliRunner
from elm_doc import cli
@pytest.fixture
def runner():
return CliRunner()
def test_cli_missing_arg(tmpdir, runner):
with tmpdir.as_cwd():
result = runner.invoke(cli.main)
assert result.exception
assert result... | Python | 0 | @@ -2667,13 +2667,8 @@
'elm
--lang
', '
@@ -2675,17 +2675,17 @@
html', '
-2
+1
.0.0', '
|
26116bb984f7a970c67bcdc01ff026a3fc5f0905 | create secondary parses | tests/test_ddl.py | tests/test_ddl.py | from pytest import fixture
from cdm.ddl import parse_line, create_vertex, create_vertex_index,\
CreateVertex, \
CreateEdge, CreateProperty, CreateIndex, CreateGraph
def test_create_graph():
s = "CREATE GRAPH jon"
parsed = parse_line(s)
assert isinstance(parsed, Crea... | Python | 0.000281 | @@ -1798,16 +1798,137 @@
ring(s)%0A
+ s = %22CREATE secondary INDEX movie_title_idx ON VERTEX movie(title )%22%0A result = create_vertex_index.parseString(s)%0A
%0A%0A#
|
8802611f515df7b123f907efb6f7ffac9f11a42f | create mock ami and add test for ami list. | tests/test_ec2.py | tests/test_ec2.py | from __future__ import (absolute_import, print_function, unicode_literals)
from acli.output.ec2 import (output_ec2_list, output_ec2_info)
from acli.services.ec2 import (ec2_list, ec2_info, ec2_summary)
from acli.config import Config
from moto import mock_ec2
import pytest
from boto3.session import Session
session = Ses... | Python | 0 | @@ -193,18 +193,28 @@
_summary
+, ami_list
)%0A
-
from acl
@@ -1033,16 +1033,550 @@
top()%0A%0A%0A
+@pytest.yield_fixture(scope='function')%0Adef amis():%0A %22%22%22AMI mock service%22%22%22%0A mock = mock_ec2()%0A mock.start()%0A client = session.client('ec2')%0A reservation = client.run_instances(... |
581eb398360cff5de1488fa06890195c808f8d10 | fix make requests test | tests/test_run.py | tests/test_run.py | # coding=utf-8
from os.path import join
import pytest
from xpaw.spider import Spider
from xpaw.cmdline import main
from xpaw.run import run_crawler, run_spider, make_requests
from xpaw.http import HttpRequest, HttpResponse
from xpaw.errors import ClientError, HttpError
def test_run_crawler(tmpdir):
proj_name =... | Python | 0.000002 | @@ -1231,22 +1231,15 @@
p://
-localhost:8080
+unknonw
',%0A
|
4ba0a99a626e54cd7ca68692c5135bcd6b2f8d3a | Add test for STL vertex order | tests/test_stl.py | tests/test_stl.py | """
Check things related to STL files
"""
try:
from . import generic as g
except BaseException:
import generic as g
class STLTests(g.unittest.TestCase):
def test_header(self):
m = g.get_mesh('featuretype.STL')
# make sure we have the right mesh
assert g.np.isclose(m.volume, 11.627... | Python | 0 | @@ -3198,16 +3198,664 @@
enes!%22)%0A
+ %0A def test_vertex_order(self):%0A # removing doubles should respect the vertex order%0A m_raw = g.get_mesh('featuretype.STL', process=False)%0A m_proc = g.get_mesh('featuretype.STL', process=True)%0A%0A verts_raw = g.trimesh.grouping.hashable_... |
f30b658275a62294593d31175e1e13118140abb7 | Fix flake8 in test_vcs.py | tests/test_vcs.py | tests/test_vcs.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_vcs
------------
Tests for `cookiecutter.vcs` module.
"""
import locale
import os
import pytest
import subprocess
import unittest
from cookiecutter.compat import patch
from cookiecutter import exceptions, utils, vcs
from tests.skipif_markers import skipif_no_ne... | Python | 0.000001 | @@ -186,46 +186,8 @@
st%0A%0A
-from cookiecutter.compat import patch%0A
from
@@ -424,16 +424,17 @@
e()%5B1%5D%0A%0A
+%0A
@skipif_
@@ -2519,16 +2519,17 @@
dule')%0A%0A
+%0A
@skipif_
|
e5fb49914cb8ff5bd336ad7362e409d3b34eb534 | make -a short for --archive | teuthology/run.py | teuthology/run.py | import argparse
import os
import yaml
def config_file(string):
config = {}
try:
with file(string) as f:
g = yaml.safe_load_all(f)
for new in g:
config.update(new)
except IOError, e:
raise argparse.ArgumentTypeError(str(e))
return config
class Mer... | Python | 0.000871 | @@ -1041,24 +1041,30 @@
ent(%0A
+ '-a',
'--archive'
|
40c8bec919f2e04befb021d51706f39793eb77a2 | Fix typo | tfyarn/factory.py | tfyarn/factory.py | from __future__ import print_function
from tfyarn.clusterspecgen_client import ClusterSpecGenClient
import os
import socket
import tensorflow
import time
def createClusterSpec(job_name, task_index, application_id=None, container_id=None, am_address=None):
if application_id is None:
application_id = os.en... | Python | 0.999999 | @@ -1216,25 +1216,28 @@
orker_task_i
-d
+ndex
= -1%0A la
@@ -1248,17 +1248,20 @@
s_task_i
-d
+ndex
= -1%0A
@@ -1396,25 +1396,28 @@
orker_task_i
-d
+ndex
+ 1%0A
@@ -1435,25 +1435,28 @@
orker_task_i
-d
+ndex
= container
@@ -1631,17 +1631,20 @@
s_task_i
-d
+ndex
+ 1%0A
@@ -1666,17 +1666,20 @@... |
4663589ae44437344ec88dc96dc2ca9bdf55b581 | add metric AUC | tgboost/metric.py | tgboost/metric.py | import numpy as np
def accuracy(preds, labels):
return np.mean(labels == preds.round())
def error(preds, labels):
return 1.0 - accuracy(preds,labels)
def mean_square_error(preds, labels):
return np.mean(np.square(preds - labels))
def mean_absolute_error(preds, labels):
return np.mean(np.abs(pred... | Python | 0.999999 | @@ -327,16 +327,961 @@
bels))%0A%0A
+%0Adef tied_rank(x):%0A sorted_x = sorted(zip(x,range(len(x))))%0A r = %5B0 for k in x%5D%0A cur_val = sorted_x%5B0%5D%5B0%5D%0A last_rank = 0%0A for i in range(len(sorted_x)):%0A if cur_val != sorted_x%5Bi%5D%5B0%5D:%0A cur_val = sorted_x%5Bi%5D%5B... |
d0c921f2397e8f5d324f83e11b2bc51cfed3c4ea | Rename variable inside MutableHeaders implementation | starlette/datastructures.py | starlette/datastructures.py | import typing
from urllib.parse import parse_qsl, urlparse
class URL(str):
@property
def components(self):
if not hasattr(self, "_components"):
self._components = urlparse(self)
return self._components
@property
def scheme(self):
return self.components.scheme
... | Python | 0 | @@ -5200,35 +5200,37 @@
in-1%22)%0A%0A
-pop
+found
_indexes = %5B%5D%0A
@@ -5337,35 +5337,37 @@
-pop
+found
_indexes.append(
@@ -5392,35 +5392,37 @@
idx in reversed(
-pop
+found
_indexes%5B1:%5D):%0A
@@ -5464,19 +5464,21 @@
if
-pop
+found
_indexes
@@ -5497,19 +5497,21 @@
idx... |
00140b48d7473c0f6738e5bc7894370baee9ef30 | Remove debugging | IATISimpleTester/lib/helpers.py | IATISimpleTester/lib/helpers.py | from collections import defaultdict
import re
from lxml import etree
from IATISimpleTester import app
# given an expression list and the name of an expression,
# select it,
def select_expression(expression_list, expression_name, default_expression_name=None):
expression_dicts = {x["id"]: x for x in expression_l... | Python | 0.000005 | @@ -572,31 +572,8 @@
n):%0A
- print(explanation)%0A
|
c7abba5e48eb243e9174c72a374c3c60a9d12fc6 | fix limiter init signature | thetis/limiter.py | thetis/limiter.py | """
Slope limiter implementation.
Tuomas Karna 2015-08-26
"""
from __future__ import absolute_import
from .utility import *
from .firedrake import VertexBasedLimiter
import ufl
from pyop2.profiling import timed_region, timed_function, timed_stage # NOQA
def assert_function_space(fs, family, degree):
"""
Che... | Python | 0 | @@ -1965,30 +1965,8 @@
pace
-, p1cg_space, p0_space
):%0A
|
979782d1cfc492d8c609cf02eea0d449bc9abe3f | Fix path for windows platfrom (#742) | caravel/config.py | caravel/config.py | """The main config file for Caravel
All configuration in this file can be overridden by providing a caravel_config
in your PYTHONPATH as there is a ``from caravel_config import *``
at the end of this file.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
... | Python | 0.000001 | @@ -1009,16 +1009,188 @@
vel.db'%0A
+# this is for platform specific: %22nt%22 is for windows, %22posix%22 is *nix (including Mac)%0Aif os.name == %22nt%22:%0A SQLALCHEMY_DATABASE_URI = 'sqlite:///c:%5C%5Ctmp%5C%5Ccaravel.db' %0A
# SQLALC
|
303a8c149c30d4dd1d9c833c6716d5ab0da88e04 | Change version number to 1.2. | cbclib/version.py | cbclib/version.py | """a cbclib version storage module."""
version_tuple = (1, 1, 1)
full_version = "%d.%d.%d" % version_tuple
| Python | 0.999741 | @@ -53,20 +53,20 @@
e = (1,
-1, 1
+2, 0
)%0Afull_v
|
994b50c3856e01d3cec712515efe11c0f286781e | Remove deprecated alias | ipywidgets/__init__.py | ipywidgets/__init__.py | # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
"""Interactive widgets for the Jupyter notebook.
Provide simple interactive controls in the notebook.
Each Widget corresponds to an object in Python and Javascript,
with controls on the page.
To put a Widget on the p... | Python | 0.000003 | @@ -828,17 +828,16 @@
dlink%0A%0A
-%0A
def load
@@ -992,17 +992,16 @@
ernel)%0A%0A
-%0A
def regi
@@ -1232,65 +1232,8 @@
d)%0A%0A
-# deprecated alias%0Ahandle_kernel = register_comm_target%0A%0A
def
|
d152332a72ada99f20106b613531a1046786480f | fix jupyter notebook import warning | lightning/visualization.py | lightning/visualization.py | import requests
import json
import webbrowser
import random
import string
class Visualization(object):
def __init__(self, session=None, json=None, auth=None):
self.session = session
self.id = json.get('id')
self.auth = auth
if self.session.lgn.ipython_enabled:
from IP... | Python | 0.000001 | @@ -311,24 +311,19 @@
from
-IPython.
+ipy
kernel.c
|
8d5d8cc8d61596a62513039d79abb57f274333ef | Set version as 0.9.0 | alignak_backend_client/__init__.py | alignak_backend_client/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend client library
This module is a Python library used for the REST API of the Alignak backend
"""
# Application version and manifest
VERSION = (0, 7, 0)
__application__ = u"Alignak Backend client"
__short_version__ = '.'.join((str(each) f... | Python | 0.999418 | @@ -221,17 +221,17 @@
N = (0,
-7
+9
, 0)%0A%0A__
|
4317960a50c06dea0521d08266057825b3e4bcde | Fix the makefile issue under Windows. | tools/makefile.py | tools/makefile.py | import os
import sys
from utils import *
from utils import _make_path_relative
import rtconfig
makefile = '''phony := all
all:
include config.mk
ifneq ($(MAKE_LIB),1)
TARGET := rtthread.elf
include src.mk
endif
$(if $(strip $(RTT_ROOT)),,$(error RTT_ROOT not defined))
include $(RTT_ROOT)/tools/rtthread.mk
'''
de... | Python | 0 | @@ -639,36 +639,33 @@
.replace('%5C%5C', '
-%5C%5C%5C%5C
+/
'))%0A make.wri
@@ -704,36 +704,33 @@
.replace('%5C%5C', '
-%5C%5C%5C%5C
+/
'))%0A make.wri
@@ -3228,16 +3228,35 @@
' %25 item
+.replace('%5C%5C', '/')
)%0A%0A m
|
a482b8136cacc4a498b59978c41b84d2e551becc | Copy the .msi as output by virgo-base | tools/pkgutils.py | tools/pkgutils.py | #!/usr/bin/env python
import os
import errno
import platform
import sys
import subprocess
# Figure out what type of package to build based on platform info
#
# TODO: Windows does MSI?
deb = ['debian', 'ubuntu']
rpm = ['redhat', 'fedora', 'suse', 'opensuse', 'centos']
dist = platform.dist()[0].lower()
def pkg_type(... | Python | 0.000001 | @@ -2150,34 +2150,13 @@
rn '
-rackspace-monitoring-agent
+virgo
.msi
@@ -4368,16 +4368,22 @@
ePath, '
+base%5C%5C
Release'
|
26d93980bcf2e8463c8fc390059563d74b189418 | Create commit_zero (was forgotten) in repoinit.py | tools/repoinit.py | tools/repoinit.py | #!/usr/bin/env python3
# Copyright 2015 The Meson development team
# 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.000001 | @@ -2517,24 +2517,33 @@
build'%5D)%0A
+ commit =
repo.index.
@@ -2590,32 +2590,81 @@
s.' %25 reponame)%0A
+ tag = repo.create_tag('commit_zero', commit)%0A
origin = rep
@@ -2732,24 +2732,24 @@
%25 reponame)%0A
-
origin.p
@@ -2768,24 +2768,45 @@
d.ref.name)%0A
+ origin.push(tag)%0A
shutil.r... |
298553d4caae67c9a8deeb2288b320689f1e4014 | return List instead of ES response object (#458) | analytics_data_api/v0/documents.py | analytics_data_api/v0/documents.py |
from django.conf import settings
from elasticsearch_dsl import Date, Document, Float, Integer, Keyword, Q
from analytics_data_api.constants import learner
class RosterUpdate(Document):
"""
Index which store last update date of passed index.
"""
date = Date()
target_index = Keyword()
class ... | Python | 0.000012 | @@ -1,12 +1,27 @@
+import logging%0A
%0Afrom django
@@ -166,16 +166,54 @@
earner%0A%0A
+logger = logging.getLogger(__name__)%0A%0A
%0Aclass R
@@ -5823,20 +5823,19 @@
re
-turn
+s =
search_
@@ -5843,32 +5843,257 @@
equest.execute()
+%0A # debugging, to be removed%0A logger.warning(res.__class__... |
d2ebde1d3fbee6b5f6856768e0fee6f7273e9a55 | Fix inconsistent field name | accelerator_abstract/models/base_mentor_program_office_hour.py | accelerator_abstract/models/base_mentor_program_office_hour.py | # MIT License
# Copyright (c) 2017 MassChallenge, Inc.
from __future__ import unicode_literals
import swapper
from django.conf import settings
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from accelerator_abstract.models.accelerator_model import AcceleratorModel
HOUR_IS... | Python | 0.000022 | @@ -2014,36 +2014,65 @@
models.
-Text
+Char
Field(
-blank=True
+max_length=2000, blank=True, default=%22%22
)%0A me
|
2c42b84a5ffd7ce42295488271781c08ab372bd3 | add website_multi_company_portal to demo addons | website_multi_company/__manifest__.py | website_multi_company/__manifest__.py | # -*- coding: utf-8 -*-
{
"name": """Real Multi Website""",
"summary": """Yes, you can set up multi-company, multi-website, multi-theme, multi-eCommerce on a single database!""",
"category": "eCommerce",
"live_test_url": "http://apps.it-projects.info/shop/product/website-multi-company?version=10.0",
... | Python | 0 | @@ -1328,24 +1328,64 @@
pany_sale%22,%0A
+ %22website_multi_company_portal%22,%0A
%5D,%0A %22
|
08300a23fc06b9fa46435cf83e62778064b95424 | Fix support for xarray < 0.11 until it is released. | cfgrib/cfgrib_.py | cfgrib/cfgrib_.py | #
# Copyright 2017-2018 European Centre for Medium-Range Weather Forecasts (ECMWF).
#
# 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 | @@ -956,16 +956,25 @@
ndArray%0A
+try:%0A
from xar
@@ -1029,16 +1029,276 @@
bleLock%0A
+except ImportError:%0A # no locking for xarray %3C= 0.11%0A def ensure_lock(lock):%0A return lock%0A%0A class SerializableLock(object):%0A def __enter__(self):%0A pass%0A%0A def __exit... |
51da6fd489d6a35e4b74d1813861e305e04e1eeb | Bring up to speed with project architecture changes. | scripts/99-create-group-project.py | scripts/99-create-group-project.py | #!/usr/bin/python3
import argparse
import csv
import fnmatch
import os
import shutil
parser = argparse.ArgumentParser(description='Create an group project.')
parser.add_argument('--project', required=True, help='Directory with a set of aerial images.')
parser.add_argument('source', metavar='source-projects', nargs='+'... | Python | 0 | @@ -566,16 +566,112 @@
models%22)
+%0Astate_dir = os.path.join(analysis_dir, %22state%22)%0Acache_dir = os.path.join(analysis_dir, %22cache%22)
%0A%0Aif not
@@ -918,16 +918,138 @@
s_dir)%0A%0A
+if not os.path.isdir(state_dir):%0A os.makedirs(state_dir)%0A%0Aif not os.path.isdir(cache_dir):%0A os.makedirs(cache... |
b671d67aaf80df9297213973659c59a4ebd72e08 | test file changed | pycqed/tests/analysis_v2/test_Two_state_T1_analysis.py | pycqed/tests/analysis_v2/test_Two_state_T1_analysis.py | import unittest
import pycqed as pq
import os
from pycqed.analysis_v2 import measurement_analysis as ma
from pycqed.analysis_v2 import Two_state_T1_analysis as Ta
class Test_efT1_analysis(unittest.TestCase):
@classmethod
def setUpClass(self):
self.datadir = os.path.join(pq.__path__[0], 'tests', 'test... | Python | 0.000001 | @@ -492,8 +492,64 @@
=False)%0A
+ self.fit_res%5B'fit_res_P0'%5D.params%5B'tau1'%5D.value%0A
|
196b9547b4dbcbfbf4891c7fd3ea3b9944018430 | Revert "Revert "Added script for cron job to load surveys to database."" | scripts/cronRefreshEdxQualtrics.py | scripts/cronRefreshEdxQualtrics.py | from surveyextractor import QualtricsExtractor
import getopt, sys
# Script for scheduling regular EdxQualtrics updates
# Usage for cron should be "cronRefreshEdxQualtrics.py -m -s -r"
qe = QualtricsExtractor()
opts, args = getopt.getopt(sys.argv[1:], 'amsr', ['--reset', '--loadmeta', '--loadsurveys', '--loadresponses... | Python | 0 | @@ -57,15 +57,23 @@
topt
-,
+%0Aimport
sys%0A%0A
+##
# Sc
@@ -121,16 +121,18 @@
updates%0A
+##
# Usage
@@ -189,16 +189,138 @@
-s -r%22%0A%0A
+# Append directory for dependencies to PYTHONPATH%0Asys.path.append(%22/home/dataman/Code/qualtrics_etl/src/qualtrics_etl/%22)%0A%0A
qe = Qua
|
adfdfb46d9264f5733926d9ed5a95aece3326921 | fix failing api_encode test for python3 | janrain/capture/api.py | janrain/capture/api.py | """ Base class for making API calls to the Janrain API. """
# pylint: disable=E0611
from janrain.capture.exceptions import ApiResponseError
from janrain.utils import utf8_encode
from json import dumps as to_json
from contextlib import closing
from base64 import b64encode
from hashlib import sha1
import hmac
import time... | Python | 0.000004 | @@ -1076,16 +1076,32 @@
n 'true'
+.encode('utf-8')
%0A if
@@ -1138,16 +1138,32 @@
'false'
+.encode('utf-8')
%0A try
|
c047f33561f304a9932c1d43284c59ae51035c69 | update client | chat/consumers.py | chat/consumers.py | import re
import json
import logging
from channels import Group
from channels.sessions import channel_session
from .models import Room
from .models import Player
log = logging.getLogger(__name__)
@channel_session
def ws_connect(message):
# Extract the room from the message. This expects message.path to be of the
... | Python | 0.000001 | @@ -3157,24 +3157,211 @@
ly_channel)%0A
+ player = room.player.filter(address=message.reply_channel.name).first()%0A if player is not None:%0A room.player.filter(address=message.reply_channel.name).delete()%0A
except (
|
f1111b6d7eb387e7287497c1853addd003a81f39 | Add a length limit | chatterbox/irc.py | chatterbox/irc.py | import time
import random
import irc.bot
class Bot(irc.bot.SingleServerIRCBot):
def __init__(self, generator, channels, nickname, server, port=6667):
super().__init__([(server, port)], nickname, nickname)
self.generator = generator
self.channels_to_join = channels
self.nick = nick... | Python | 0.998833 | @@ -611,32 +611,38 @@
erate_sentence()
+%5B:450%5D
%0A time.sl
@@ -864,16 +864,22 @@
ntence()
+%5B:450%5D
%0A
|
7e4554b98c4bd431431e5c22845a18ba842349e8 | fix pol append logic error | scripts/mc_log_autocorrelations.py | scripts/mc_log_autocorrelations.py | #! /usr/bin/env python
# -*- mode: python; coding: utf-8 -*-
# Copyright 2016 the HERA Collaboration
# Licensed under the 2-clause BSD license.
"""Record information about antenna autocorrelations, as logged into the Redis
server by the correlator software.
"""
from __future__ import absolute_import, division, print_... | Python | 0.000003 | @@ -2195,17 +2195,16 @@
pend(pol
-s
)%0A
|
58483cbd70f1ae5e55656b01238f26bd6da6f903 | Change format | captain_hook/services/telegram/commands/base/base_command.py | captain_hook/services/telegram/commands/base/base_command.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import telegram
class BaseCommand:
def __init__(self, config):
self.config = config
self.telegram_bot = telegram.Bot(self.config["token"])
self.bot_info = self.telegram_bot.getMe()
def run(self, messageObj, config):
... | Python | 0.000004 | @@ -767,32 +767,17 @@
Message(
-chat_id,%0A
+%0A
@@ -776,35 +776,41 @@
-
+chat_id,%0A
@@ -819,34 +819,8 @@
xt,%0A
-
@@ -847,34 +847,8 @@
de,%0A
-
@@ -905,34 +905,8 @@
-
- ... |
a59e30b87310ad2727844a5f01cdc566ab436b88 | handle json load failure on response body from graphite | check_graphite.py | check_graphite.py | #!/usr/bin/env python
"""
check_graphite.py
~~~~~~~
:copyright: (c) 2012 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
import json
import optparse
import urllib
import urllib2
import sys
NAGIOS_STATUSES = {
'OK': 0,
'WARNING': 1,
'CRITICAL': 2,
'UNKNOWN': 3
}
class Graphite... | Python | 0 | @@ -1366,24 +1366,35 @@
ib2.URLError
+, TypeError
:%0A
|
6f03120a57d40491e7d8245e10989a3e03b9481d | Set up task list for cook robot | se306/src/package1/scripts/cook.py | se306/src/package1/scripts/cook.py | #!/usr/bin/env python
import roslib
import rospy
import std_msgs.msg
import navigation
from std_msgs.msg import String
class Cook(navigation.Navigation):
''' When a message is passed out from the scheduler, determine whether it is
relevant to this object. If so, take the neccessary action
'''
def process_event(... | Python | 0.999988 | @@ -410,16 +410,142 @@
essage):
+%0A%0A%09%09%09self.task_list.append(message)%0A%09%09%09%0A%0A%0A%09def perform_task(self, task):%0A%0A%09%09self.status = %22active%22 %0A%0A%09%09if task ==%22Cook.cook_%22:
%0A%09%09%09self
@@ -662,16 +662,20 @@
pop(0)%0A%0A
+%0A%09%0A%0A
%09def __i
@@ -716,16 +716,61 @@
ate(20... |
da55338b1bfc82bd303a3003fef881ceb3605b28 | Make views time-centric, not date-centric | tracking/views.py | tracking/views.py | import logging
from datetime import timedelta
from django import forms
from django.shortcuts import render
from django.contrib.auth.decorators import permission_required
from django.utils.timezone import now
from tracking.models import Visitor, Pageview
from tracking.settings import TRACK_PAGEVIEWS
log = logging.ge... | Python | 0.999068 | @@ -1648,75 +1648,8 @@
ow)%0A
- start_date = start_time.date()%0A end_date = end_time.date()%0A%0A
@@ -1690,37 +1690,37 @@
stats(start_
-dat
+tim
e, end_
-dat
+tim
e)%0A visit
@@ -1754,37 +1754,37 @@
stats(start_
-dat
+tim
e, end_
-dat
+tim
e)%0A if TR
@@ -1856,21 +1856,21 @@
art_
-dat
+tim
e... |
419ab74f1bb0c0d46a1547cb1d3bc9ab16d5b925 | Update cindy/setting.py | cindy/settings.py | cindy/settings.py | """
Django settings for cindy project.
Generated by 'django-admin startproject' using Django 1.11.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os
... | Python | 0 | @@ -457,17 +457,16 @@
e__)))%0A%0A
-%0A
# Quick-
@@ -825,18 +825,86 @@
OSTS = %5B
-%5D
%0A
+ 'localhost',%0A '127.0.0.1',%0A 'heyrict.pythonanywhere.com',%0A%5D
%0A%0A# Appl
@@ -2104,17 +2104,16 @@
ation'%0A%0A
-%0A
# Databa
@@ -2323,17 +2323,16 @@
%7D%0A%7D%0A%0A
-%0A
# Passwo
@@ -2468,32 +2468,40... |
2de8b9c95d5b0cbe9f990a0c6e82ae315c6aa21b | Add fp.sort property | claripy/ast/fp.py | claripy/ast/fp.py | from .bits import Bits
from ..ast.base import Base, _make_name
class FP(Bits):
def to_fp(self, rm, sort):
if rm is None:
rm = fp.RM.default()
return fpToFP(rm, self, sort)
def raw_to_fp(self):
return self
def to_bv(self):
return fpToIEEEBV(self)
def FPI(model... | Python | 0.000001 | @@ -300,16 +300,98 @@
(self)%0A%0A
+ @property%0A def sort(self):%0A return fp.FSort.from_size(self.length)%0A%0A
def FPI(
|
d19b72f42801dde328ae1e1d935c5df3a5797d4e | update manage.py for refactored appstate/config modules | app/manage.py | app/manage.py | import os
import sys
import scriptine
from scriptine.shell import sh
from geobox.web import create_app
def babel_init_lang_command(lang):
"Initialize new language."
sh('pybabel init -i geobox/web/translations/messages.pot -d geobox/web/translations -l %s' % (lang,))
def babel_refresh_command():
"Extract ... | Python | 0 | @@ -918,38 +918,40 @@
from geobox.
-config
+appstate
import GeoBoxSt
@@ -1298,38 +1298,40 @@
from geobox.
-config
+appstate
import GeoBoxSt
@@ -1682,22 +1682,24 @@
geobox.
-config
+appstate
import
@@ -1708,27 +1708,59 @@
oBox
-Config, GeoBoxState
+State%0A from geobox.defaults import GeoBoxConfig... |
0b77e09ac16006d1baa6a5f4093b51c1a13863e9 | Add as_dict method to Digit model | app/models.py | app/models.py | from app import db
class Digit(db.Model):
id = db.Column(db.INTEGER, primary_key=True)
label = db.Column(db.INTEGER)
tsne_x = db.Column(db.REAL)
tsne_y = db.Column(db.REAL)
tsne_z = db.Column(db.REAL)
array = db.Column(db.String)
image = db.Column(db.BLOB)
def __repr__(self):
r... | Python | 0.000004 | @@ -36,16 +36,46 @@
Model):%0A
+ __tablename__ = 'digits'%0A%0A
id =
@@ -281,39 +281,8 @@
ing)
-%0A image = db.Column(db.BLOB)
%0A%0A
@@ -358,8 +358,222 @@
.label)%0A
+%0A def as_dict(self, fields=None):%0A if not fields:%0A return %7Bc.name: getattr(self, c.name) for c in self.__t... |
0929935874570fce5b64f3abbece781a4133b565 | Disable flaky NaCl SRPC integration tests. | chrome/test/nacl_test_injection/buildbot_nacl_integration.py | chrome/test/nacl_test_injection/buildbot_nacl_integration.py | #!/usr/bin/python
# 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 os
import subprocess
import sys
def Main(args):
pwd = os.environ.get('PWD', '')
is_integration_bot = 'nacl-chrome' in pwd
... | Python | 0.000069 | @@ -1701,16 +1701,514 @@
test')%0A%0A
+ # TODO(ncbray) why did these tests flake?%0A # http://code.google.com/p/nativeclient/issues/detail?id=2230%0A tests_to_disable.extend(%5B%0A 'run_pm_manifest_file_chrome_browser_test',%0A 'run_srpc_basic_chrome_browser_test',%0A 'run_srpc_hw_data_ch... |
58c2913d14a18e24761c50f16a2de09f452f9120 | Fix Cleverbot.reset erroring without conversations | cleverbot/base.py | cleverbot/base.py | import pickle
from .utils import (GenericUnpickler, convo_property, ensure_file,
error_on_kwarg, get_slots)
class AttributeMixin(object):
__slots__ = ()
url = 'https://www.cleverbot.com/getreply'
def __getattr__(self, attr):
"""Allow access to the stored data through attrib... | Python | 0.000001 | @@ -2495,28 +2495,24 @@
-for
convo
- in
+s =
self.co
@@ -2526,53 +2526,83 @@
ions
-:%0A if isinstance(self.conversation
+%0A if convos is None:%0A return%0A%0A if isinstance(convo
s, d
@@ -2623,45 +2623,61 @@
-
convo
+s
=
-self.conversations%5B
+convos.v... |
73f8895ae00f3d076c73bc49a03b870abb2a30cc | Fix typo | app/models.py | app/models.py | from django.db import models
import mongoengine
from mongoengine import Document, EmbeddedDocument
from mongoengine.fields import *
import os
# Create your models here.
class Greeting(models.Model):
when = models.DateTimeField('date created', auto_now_add=True)
USER = os.getenv('DATABASE_USER')
PASWORD = os.gete... | Python | 0.999999 | @@ -299,16 +299,17 @@
ER')%0APAS
+S
WORD = o
@@ -372,13 +372,37 @@
v://
-%7B%7D:%7B%7D
+%22 + USER + %22:%22 + PASSWORD + %22
@fik
|
4ea456e991e64d00122d85030fa2161cca22b4a3 | Remove dead import | appy/views.py | appy/views.py | from collections import defaultdict
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core.context_processors import csrf
from django.http import JsonResponse
from django.shortcuts import redirec... | Python | 0.000001 | @@ -196,56 +196,8 @@
ser%0A
-from django.core.context_processors import csrf%0A
from
|
f181ef90e1a7a8e1c5676a4ffaf50ee8469305eb | Tweak armdecomp3.py | armdecomp3.py | armdecomp3.py | #!/usr/bin/env python3
import sys
from sys import argv, stdout
from os import SEEK_SET, SEEK_CUR, SEEK_END
from errno import EPIPE
from struct import pack, unpack
def bits(byte):
return ((byte >> 7) & 1,
(byte >> 6) & 1,
(byte >> 5) & 1,
(byte >> 4) & 1,
(byte >> 3)... | Python | 0 | @@ -419,24 +419,43 @@
press(indata
+, decompressed_size
):%0A %22%22%22De
@@ -813,145 +813,8 @@
))%0A%0A
- header = bytes(next(it) for _ in range(4))%0A assert header%5B0%5D == 0x10%0A decompressed_size, = unpack(%22%3CL%22, header%5B1:%5D + b%22%5Cx00%22)%0A%0A
@@ -2366,65 +2366,8 @@
T)%0A%0A
- ... |
a41c66089005388362a51edb5967f32b3a42c4ac | added error message in case input FMx is empty | commands/feature_matrix_construction/main/addDiscreteFeat.py | commands/feature_matrix_construction/main/addDiscreteFeat.py | # -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
import sys
import addIndicators
import miscIO
import miscTCGA
import tsvIO
# -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
NA_VALUE = -999999
# -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-... | Python | 0.999045 | @@ -5063,24 +5063,132 @@
SV(inFile)%0A%0A
+ if (len(tmpD) == 0):%0A print %22 in addDiscreteFeat ... no input data ... nothing to do here ... %22%0A%0A
# loop o
|
3fce35932346eaf74db97a5325518b2d13575b4f | debug and kee ids as list | xmlrpc_operation_invoice/operation.py | xmlrpc_operation_invoice/operation.py | # -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | Python | 0 | @@ -8002,16 +8002,60 @@
('OK'):%0A
+ import pdb; pdb.set_trace()%0A
@@ -8161,19 +8161,16 @@
uid, ids
-%5B0%5D
, %7B%0A
@@ -8580,25 +8580,16 @@
%7D
-%0A
%0A%0A# vim:
|
69d9a36eb9d4536d9999395016759ec0ba23ad82 | Fix playlist preview function | zou/app/services/playlists_service.py | zou/app/services/playlists_service.py | from zou.app.models.playlist import Playlist
from zou.app.models.preview_file import PreviewFile
from zou.app.utils import fields
from zou.app.services import shots_service, tasks_service
from zou.app.services.exception import PlaylistNotFoundException
def all_playlists_for_project(project_id):
return fields.s... | Python | 0.000019 | @@ -737,22 +737,8 @@
%5D =
-shots_service.
get_
|
eb0dda4cc79ac9383038095f648ef8c16e374611 | Fix bug | storjreports/send_storj_reports.py | storjreports/send_storj_reports.py | #!/usr/bin/env python3
import requests
import json
import os
import re
import uuid
import subprocess
import pkg_resources
import multiprocessing
from os import scandir
SERVER_UUID = None
STORJSHARE_PATH = None
STORJ_WINDOWS_VERSION = '0.2.0'
def examine_configs(path, windows=False):
if windows == False:
... | Python | 0.000001 | @@ -3967,25 +3967,25 @@
config_file
-.
+_
name)%0A
|
75f28330cd5cf0eea2ec99d8c3f9bf53de18d46c | correct typo | aot/config.py | aot/config.py | import logging
import toml
from os.path import exists
class Config:
CONF_FILE_TEMPLATE = 'config/config.{type}.toml'
def __init__(self):
self._config = None
def __getitem__(self, key):
if self._config is None:
raise RuntimeError(
'Configuration is not loaded.... | Python | 0.000888 | @@ -384,16 +384,17 @@
the con
+f
iguratio
|
f2b49f524319cc6df2f6fcaabff114cc9156faf7 | make 'urls' to be consistent. | OIPA/api/dataset/serializers.py | OIPA/api/dataset/serializers.py | from django.urls import reverse
from rest_framework.serializers import (
HyperlinkedIdentityField, HyperlinkedRelatedField, ModelSerializer,
SerializerMethodField
)
from api.generics.serializers import DynamicFieldsModelSerializer
from iati.models import Activity
from iati_synchroniser.models import Dataset, D... | Python | 0.000002 | @@ -3109,43 +3109,257 @@
re
-turn url + '?dataset=' + str(obj.id
+quest_format = self.context.get('request').query_params.get('format')%0A return url + '?dataset=' + str(obj.id) + '&format=%7B' %5C%0A 'request_format%7D'.format(%0A request_format=requ... |
fa6c7b32284bc4159e95b7bc339dab7517b2c255 | add sql example | client/ReadAir.py | client/ReadAir.py | # -*- coding: utf-8 -*-
import serial, time, MySQLdb, re
from socketIO_client import SocketIO, LoggingNamespace
# open a mysql connection
conn=MySQLdb.connect(host="localhost",user="airnow",passwd="password",db="airnow",charset="utf8")
''' SQL to create table:
CREATE TABLE IF NOT EXISTS `air_logs` (
`id` int(1... | Python | 0.000243 | @@ -114,131 +114,131 @@
ce%0A%0A
-# open a mysql connection%0Aconn=MySQLdb.connect(host=%22localhost%22,user=%22airnow%22,passwd=%22password%22,db=%22airnow%22,charset=%22utf8%22)
+%0A''' SQL to create database:%0ACREATE DATABASE IF NOT EXISTS %60airnow%60 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;%0A'''
%0A... |
2f2861f153d0ba0d088ffe95b196b4154b59ce31 | Replace constants with literal value. | seqr/management/commands/check_bam_cram_paths_tests.py | seqr/management/commands/check_bam_cram_paths_tests.py | import mock
from io import BytesIO
from django.core.management import call_command
from django.test import TestCase
EXPECTED_EXCEPTION_MSG = 'Error at /readviz/NA19675.cram (Individual: NA19675_1): Error accessing "/readviz/NA19675.cram" \n---- DONE ----\nChecked 1 samples\n1 failed samples: NA19675_1\n'
EXPECTED_NORM... | Python | 0.000003 | @@ -114,385 +114,8 @@
ase%0A
-EXPECTED_EXCEPTION_MSG = 'Error at /readviz/NA19675.cram (Individual: NA19675_1): Error accessing %22/readviz/NA19675.cram%22 %5Cn---- DONE ----%5CnChecked 1 samples%5Cn1 failed samples: NA19675_1%5Cn'%0AEXPECTED_NORMAL_MSG = 'Error at /readviz/NA19675.cram (Individual: NA19675_1): Error ... |
66f2e9cc8085f51348c797d5a6a2b011370e4c2f | Edit method for pages | fudcon/ui/backend/views.py | fudcon/ui/backend/views.py | # -*- coding: utf-8 -*-
from flask import (Blueprint,
redirect, render_template,
url_for, flash)
from fudcon.app import is_fudcon_admin, app
from fudcon.database import db
from fudcon.modules.contents.forms import AddPage
from fudcon.modules.contents.models import Content
bp = Blu... | Python | 0.000001 | @@ -408,16 +408,17 @@
PAGE'%5D%0A%0A
+%0A
@bp.rout
@@ -669,16 +669,17 @@
=%5B'GET',
+
'POST'%5D)
@@ -836,17 +836,16 @@
eryset =
-
Content
@@ -882,13 +882,8 @@
ms)%0A
- %0A
@@ -1792,16 +1792,16 @@
m=form,%0A
-
@@ -1879,8 +1879,649 @@
action)%0A
+%0A%0A@bp.route('/pages/edit/%3Cint:page_id%... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.