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
7310c2ce4b8ccd69374a85877c2df97a2b6ade70
Add _fields cache Change _update to _apply and add option for non-required fields
nap/dataviews/views.py
nap/dataviews/views.py
from collections import defaultdict from inspect import classify_class_attrs from django.forms import ValidationError from django.utils.functional import cached_property from .fields import field from .utils import DictObject class DataView(object): def __init__(self, obj=None, **kwargs): if obj is No...
Python
0.000001
@@ -438,21 +438,16 @@ f _field -_name s(self): @@ -466,14 +466,9 @@ urn -tuple( +%7B %0A @@ -480,16 +480,22 @@ name +: prop %0A @@ -612,16 +612,108 @@ +%7D%0A%0A @cached_property%0A def _field_names(self):%0A return tuple(self._fields.keys() )%0A%0A d @@ -955,14 +955,13 @...
60da695896aafa8147f95accfe3860478d54bb19
Fix pdf report naming.
django_project/event_mapper/tasks/daily_pdf_report.py
django_project/event_mapper/tasks/daily_pdf_report.py
# coding=utf-8 """Docstring for this file.""" __author__ = 'ismailsunni' __project_name = 'watchkeeper' __filename = 'daily_pdf_report' __date__ = '8/3/15' __copyright__ = 'imajimatika@gmail.com' __doc__ = '' import os import cStringIO as StringIO from xhtml2pdf import pisa from datetime import datetime, timedelta fr...
Python
0
@@ -2968,27 +2968,29 @@ filename = -end +start _time.strfti @@ -3477,19 +3477,21 @@ %25s' %25 ( -end +start _time.st @@ -3596,19 +3596,21 @@ %25s' %25 -end +start _time.st
7064c338f15ecfbf77b0d2d68ab8ce30beb77cb2
improve error message when JVpp JARS are missing
test/test_jvpp.py
test/test_jvpp.py
#!/usr/bin/env python import os import subprocess from framework import VppTestCase # Api files path API_FILES_PATH = "vpp/vpp-api/java" # Registry jar file name prefix REGISTRY_JAR_PREFIX = "jvpp-registry" class TestJVpp(VppTestCase): """ JVPP Core Test Case """ def invoke_for_jvpp_core(self, api_jar_na...
Python
0.000007
@@ -4894,126 +4894,459 @@ h))%0A -%0A api_jar_path = self.full_jar_name(install_dir, api_jar_name, version)%0A self.logger.info(%22Api jar path + if (not os.path.isfile(registry_jar_path)):%0A raise Exception(%0A %22JVpp Registry jar has not been found: %7B0%7D%22%0A ...
1c77ebad7655c20dee72d8263cab985526b2062b
Fix missing variable in format string
atomic_reactor/plugins/post_compare_components.py
atomic_reactor/plugins/post_compare_components.py
""" Copyright (c) 2017 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from atomic_reactor.plugin import PostBuildPlugin from atomic_reactor.plugins.pre_reactor_config import get_package_comparison_exceptions from...
Python
0.999999
@@ -3705,16 +3705,20 @@ pported%22 + %25 t )%0A%0A
9529abb7e9b923ce97ee83865409f8071455969f
Add repr() to Bank and BankAccount
nbs/models/supplier.py
nbs/models/supplier.py
# -*- coding: utf-8 -*- from sqlalchemy.ext.associationproxy import association_proxy from nbs.models import db from nbs.models.entity import Entity class Supplier(Entity): __tablename__ = 'supplier' __mapper_args__ = {'polymorphic_identity': u'supplier'} FREIGHT_SUPPLIER = 'FREIGHT_SUPPLIER' FREIG...
Python
0.000001
@@ -4419,16 +4419,88 @@ entify%0A%0A + def __repr__(self):%0A return %22%3CBank '%7B%7D'%3E%22.format(self.name)%0A%0A %0Aclass B @@ -5700,16 +5700,214 @@ f.account_type%5D%0A +%0A def __repr__(self):%0A return %22%3CBankAccount '%7B%7D, %7B%7D: %7B%7D' of '%7B%7D'%3E%22.format(%0A sel...
5cf3a26cfb4bd47e95313a67dfb16273fbc53f89
update test
ndmg/utils/s3_utils.py
ndmg/utils/s3_utils.py
import subprocess from configparser import ConfigParser import os import sys import boto3 def get_credentials(): try: config = ConfigParser() config.read(os.getenv("HOME") + "/.aws/credentials") return ( config.get("default", "aws_access_key_id"), config.get("defau...
Python
0.000001
@@ -109,16 +109,54 @@ ials():%0A + # add option to pass profile name%0A try: @@ -849,24 +849,37 @@ s.%0A %22%22%22%0A%0A + try:%0A ACCESS, @@ -905,16 +905,80 @@ tials()%0A + except AttributeError:%0A return boto3.client(service)%0A retu
ee60d49f57c450a56579f8bbe2c4382a93f60f38
Fix test_utf8 for Python 3.
test/test_utf8.py
test/test_utf8.py
# -*- coding: utf-8 -*- # Monary - Copyright 2011-2014 David J. C. Beach # Please see the included LICENSE.TXT and NOTICE.TXT for licensing information. import pymongo import monary expected = ["aあ".decode('utf-8'), "âéÇ".decode('utf-8'), "αλΩ".decode('utf-8'), "眥¨≠".decode('ut...
Python
0.000006
@@ -147,16 +147,28 @@ ation.%0A%0A +import sys%0A%0A import p @@ -211,131 +211,157 @@ %22a%E3%81%82%22 -.decode('utf-8'),%0A %22%C3%A2%C3%A9%C3%87%22.decode('utf-8'),%0A %22%CE%B1%CE%BB%CE%A9%22.decode('utf-8'),%0A %22%C3%A7%C5%93%C2%A5%C2%A8%E2%89%A0%22.decode('utf-8') +, %22%C3%A2%...
aeee94f34f07d745802c5ae1c6f422f1eed4adbd
Fix static program page having header+footer
indico/modules/events/tracks/controllers.py
indico/modules/events/tracks/controllers.py
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from io import BytesIO from operator import attrgetter, itemgetter from flask import flash, request from...
Python
0.00007
@@ -5369,32 +5369,66 @@ playEventBase):%0A + view_class = WPDisplayTracks%0A%0A def _process @@ -5903,30 +5903,30 @@ return -WPDisplayTrack +self.view_clas s.render
2f5918a02f7c1a4d6ccb3db01cf6d79d6aebeb76
test on template - old way of testing home page removed
tdd-python/from_videos/superlists/lists/tests.py
tdd-python/from_videos/superlists/lists/tests.py
from django.http import HttpRequest from django.test import TestCase from lists.views import home_page # Create your tests here. class HomePageTet(TestCase): def test_home_page_is_about_todo_lists(self): request = HttpRequest() response = home_page(request) self.assertTrue(response.conte...
Python
0
@@ -279,215 +279,8 @@ st)%0A - self.assertTrue(response.content.startswith(b'%3Chtml%3E'))%0A self.assertIn(b'%3Ctitle%3ETo-Do Lists%3C/title%3E', response.content)%0A self.assertTrue(response.content.strip().endswith(b'%3C/html%3E'))%0A%0A @@ -368,17 +368,16 @@ .read()%0A -%0A
6e315181b270ec33887647c68e46251275883361
Enable more benchmark_smoke_unittest coverage (Reland)
telemetry/telemetry/user_story/user_story_set.py
telemetry/telemetry/user_story/user_story_set.py
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import inspect import os from telemetry import user_story as user_story_module from telemetry.util import cloud_storage from telemetry.wpr import archive_in...
Python
0.00035
@@ -1652,21 +1652,10 @@ or(' -Must provide +In vali @@ -1671,19 +1671,18 @@ ry path +o f -or base_di @@ -1682,18 +1682,32 @@ base_dir -.' +: %25s' %25 base_dir )%0A
5e5affd62d9774eb6af23e5f5fa63e9aeb0f817f
fix attention flop
benchmarker/modules/problems/attention/pytorch.py
benchmarker/modules/problems/attention/pytorch.py
import torch.nn as nn class Net(nn.MultiheadAttention): def forward(self, data): super().forward(data, data, data) def get_kernel(params): assert params["mode"] == "inference" cnt_samples = params["problem"]["size"][0] len_seq = params["problem"]["size"][1] embed_dim = params["problem"][...
Python
0.000021
@@ -348,24 +348,25 @@ ons = 4%0A +# ops_proj = 2 @@ -420,16 +420,99 @@ ections%0A + ops_proj = 2 * cnt_samples * len_seq * embed_dim * embed_dim * cnt_projections%0A ops_
e7c661ef81e306c12d1aba11f339e26498721fc5
modify to recognize merges for renamed task directories
bigbench/benchmark_tasks/generate_task_headers.py
bigbench/benchmark_tasks/generate_task_headers.py
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
0
@@ -2970,14 +2970,14 @@ g -- -merges +follow --f @@ -3307,446 +3307,74 @@ %5D%7D%22%0A - else:%0A print(%0A f%22git log query%5Cn%7Bquery%7D%5Cnreturned%5Cn%7Bre%7D%5Cnwhich contained no pull requests matching regex.%22%0A )%0A else:%0A print(f%22git log query%5...
64ead1438215eed986096f67dc45e21d60c27754
Remove last hard-coded reference to flash: filesystem
netmiko/scp_handler.py
netmiko/scp_handler.py
''' Create a SCP side-channel to transfer a file to remote network device. SCP requires a separate SSH connection. Currently only supports Cisco IOS. ''' from __future__ import print_function from __future__ import unicode_literals import re import os import hashlib import paramiko import scp class SCPConn(objec...
Python
0.001674
@@ -3470,17 +3470,14 @@ dir -flash:/%7B0 +%7B0%7D/%7B1 %7D%22.f @@ -3474,32 +3474,50 @@ %7B0%7D/%7B1%7D%22.format( +self.file_system, self.dest_file)%0A
b52123473454487df5c617dd354fafeb500668b0
Reformat codesearch/__init__.py
codesearch/__init__.py
codesearch/__init__.py
# Copyright 2017 The Chromium Authors. # # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file or at # https://developers.google.com/open-source/licenses/bsd. from __future__ import absolute_import from .client_api import CodeSearch, XrefNode, ServerError, NoFileSpecErro...
Python
0.000007
@@ -264,16 +264,22 @@ import +%5C%0A CodeSear @@ -286,30 +286,13 @@ ch, -XrefNode, ServerError, +%5C%0A NoF @@ -303,28 +303,24 @@ pecError, %5C%0A - NotFound @@ -328,61 +328,93 @@ rror -%0A%0Afrom .messages import Message, AnnotationTypeValue, +, %5C%0A ServerError, %5C%0A XrefNode%0A%0A...
6c7188b98fbba02b359bef1efd7143546a3195d5
Fix InspectorPage.CollectGarbage to actually collect garbage.
telemetry/telemetry/core/backends/chrome_inspector/inspector_page.py
telemetry/telemetry/core/backends/chrome_inspector/inspector_page.py
# Copyright 2013 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 sys import time from telemetry.core import util from telemetry.image_processing import image_util class InspectorPage(object): def __init__(self, ...
Python
0.000001
@@ -5816,17 +5816,17 @@ rofiler. -C +c ollectGa @@ -5841,24 +5841,30 @@ %7D%0A + res = self._inspe @@ -5888,28 +5888,55 @@ ncRequest(request, timeout)%0A + assert 'result' in res%0A
68677d2adb9ea4272f9e3b5faa528e4c356b273f
Update lastfm description
commands/cmd_lastfm.py
commands/cmd_lastfm.py
import pylast from lib.command import Command from lib.utils import escape_telegram_html ADD_STRINGS = [ "-a", "-add", "--add", "-s", "-set", "--set" ] class LastFMCommand(Command): name = 'lastfm' aliases = ['np', 'nowplaying'] description = 'Post your currently playing song (Telegram username m...
Python
0
@@ -296,65 +296,8 @@ song - (Telegram username must be the same as last.fm username) .'%0A
d7af4f13a5ee6f1372aaa423f8d7890e7c647b7f
Remove test from the test for NegativeSampling link
tests/chainer_tests/links_tests/loss_tests/test_negative_sampling.py
tests/chainer_tests/links_tests/loss_tests/test_negative_sampling.py
import unittest import numpy import chainer from chainer import cuda from chainer.functions.loss import negative_sampling from chainer import gradient_check from chainer import links from chainer import testing from chainer.testing import attr @testing.parameterize(*testing.product({ 't': [[0, 2], [-1, 1, 2]], ...
Python
0
@@ -2057,1854 +2057,200 @@ -def check_backward(self, x_data, t_data, w_data, sample, y_grad):%0A t = chainer.Variable(t_data)%0A # %60__call__%60 method of %60NegativeSampling%60 link cannot be tested with%0A # %60check_backward%60 because the link makes different samples on each%0A # ...
f9bfdec5997026b8fd04acccd62c2ac6e2e6b3b0
Use parameterized test
tests/chainer_tests/links_tests/loss_tests/test_negative_sampling.py
tests/chainer_tests/links_tests/loss_tests/test_negative_sampling.py
import unittest import numpy import chainer from chainer import cuda from chainer.functions.loss import negative_sampling from chainer import gradient_check from chainer import links from chainer import testing from chainer.testing import attr from chainer.testing import condition class TestNegativeSampling(unittes...
Python
0.000001
@@ -279,16 +279,83 @@ ition%0A%0A%0A +@testing.parameterize(%0A %7B't': %5B0, 2%5D%7D,%0A %7B't': %5B-1, 1, 2%5D%7D,%0A)%0A class Te @@ -390,24 +390,60 @@ TestCase):%0A%0A + in_size = 3%0A sample_size = 2%0A reduce = @@ -463,32 +463,100 @@ ef setUp(self):%0A + batch = len(self.t)%0A x...
206332c426f0ffedd6a50445198bbd240ddfab04
test tohtml with css styles
petl/test/io/test_html.py
petl/test/io/test_html.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division from tempfile import NamedTemporaryFile import io from petl.test.helpers import eq_ from petl.io.html import tohtml def test_tohtml(): # exercise function table = (('foo', 'bar'), ('a', 1), ...
Python
0.000001
@@ -2231,28 +2231,946 @@ eq_(expect, actual)%0A +%0A%0Adef test_tohtml_with_style():%0A%0A # exercise function%0A table = (('foo', 'bar'),%0A ('a', 1))%0A%0A f = NamedTemporaryFile(delete=False)%0A tohtml(table, f.name, encoding='ascii', lineterminator='%5Cn',%0A tr_style='text-a...
2adbbe6c7291dd79784bd3a1e5702945435fa436
Put Synchrophasor in a seperate file
phasortoolbox/__init__.py
phasortoolbox/__init__.py
#!/usr/bin/env python3 import asyncio from .parser import Parser, PcapParser from .client import Client from .pdc import PDC import logging logging.getLogger(__name__).addHandler(logging.NullHandler())
Python
0
@@ -31,16 +31,57 @@ asyncio%0A +from .synchrophasor import Synchrophasor%0A from .pa
1e922109207536649bfb761f606da0b301b1d63c
add missing newline
conda_build/windows.py
conda_build/windows.py
from __future__ import absolute_import, division, print_function import os import sys import shutil from os.path import dirname, isdir, isfile, join, exists import conda.config as cc from conda.compat import iteritems from conda_build.config import config from conda_build import environ from conda_build import sourc...
Python
0.984306
@@ -3973,16 +3973,55 @@ None)))%0A + fo.write('%5Cn')%0A %0A
20864b583a5411ffe4808352b9399cba03668365
Fix transcriptome test
workers/data_refinery_workers/processors/test_transcriptome_index.py
workers/data_refinery_workers/processors/test_transcriptome_index.py
import os import shutil from django.test import TestCase, tag from unittest.mock import patch from data_refinery_common.models import ( SurveyJob, Organism, Sample, OriginalFile, OriginalFileSampleAssociation, ProcessorJobOriginalFileAssociation, ProcessorJob ) from data_refinery_workers.pro...
Python
0.00003
@@ -166,24 +166,39 @@ Sample,%0A + Processor,%0A Original
05e8d1b4e162b55321f802bdba8a9eb7bdffd971
remove object_id during conversion
pliers/converters/misc.py
pliers/converters/misc.py
"""Miscellaneous conversion classes.""" from pliers.extractors import ExtractorResult from pliers.stimuli import SeriesStim from .base import Converter class ExtractorResultToSeriesConverter(Converter): """Converts an ExtractorResult instance to a list of SeriesStims.""" _input_type = ExtractorResult _o...
Python
0.000005
@@ -443,16 +443,102 @@ =False)%0A + if 'object_id' in df.columns:%0A df = df.drop(%5B'object_id'%5D, axis=1)%0A
d379bbbc8295055a1fbd97764eb16b5b8a368406
replaced sender.nick with sender.name, woo
plugins/spin_the_wheel.py
plugins/spin_the_wheel.py
import datetime import requests import random from will.plugin import WillPlugin from will.decorators import respond_to, periodic, hear, randomly, route, rendered_template class SpinTheWheelPlugin(WillPlugin): def __init__(self): self.random = random.Random() def get_temp(self, message): ci...
Python
0.999922
@@ -1046,56 +1046,8 @@ e):%0A - print self.is_it_warm_outside(message)%0A%0A @@ -1058,24 +1058,24 @@ options = %5B%0A + @@ -1229,35 +1229,35 @@ message.sender.n -ick +ame ):%0A o @@ -2136,35 +2136,35 @@ message.sender.n -ick +ame ):%0A o @@ -2661,35 +2661,35 @@ me...
f1470796ec617a284888f7fb1636f0c1122b929a
Decode the querystring as given to OpenURL
portality/view/openurl.py
portality/view/openurl.py
import re from flask import Blueprint, request, redirect, url_for, render_template, abort from portality.models import OpenURLRequest from portality.lib import analytics from portality.core import app from urllib.parse import unquote blueprint = Blueprint('openurl', __name__) @blueprint.route("/openurl", methods=["G...
Python
0.999999
@@ -447,24 +447,148 @@ abort(404)%0A%0A + # Decode and unquote the query string, which comes in as bytes.%0A qs = unquote(request.query_string.decode('utf-8'))%0A%0A # Valida @@ -695,37 +695,10 @@ ery= -unquote(request.query_string) +qs , re @@ -1225,37 +1225,10 @@ bel= -unquote(request.query_string) +qs...
f371f8eff785cd117880466899a14a0d6ee70655
update websiteUrl for news data
preprocess/news2eumssi.py
preprocess/news2eumssi.py
#!/usr/bin/env python import pymongo import time import datetime from eumssi_converter import EumssiConverter def transf_date(x): if x=="": #no date information x= "1900-01-01 00:00:00.0" #fake date for empty-location, should be aware of that when using if x.__class__==datetime.datetime: retur...
Python
0
@@ -1064,14 +1064,16 @@ ', ' -mediau +websiteU rl',
1bbc1fab976dd63e6a2f05aa35117dc74db40652
Use ModelSelectField. Javascript still broken for some reason.
private_messages/forms.py
private_messages/forms.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from django.utils.translation import ugettext_lazy as _ from django_select2.fields import HeavySelect2MultipleChoiceField from pybb import util from private_messages.models import PrivateMessage class MessageForm(forms.ModelFo...
Python
0
@@ -83,16 +83,63 @@ t forms%0A +from django.contrib.auth import get_user_model%0A from dja @@ -222,24 +222,29 @@ import Heavy +Model Select2Multi @@ -333,16 +333,41 @@ essage%0A%0A +User = get_user_model()%0A%0A %0Aclass M @@ -488,16 +488,21 @@ = Heavy +Model Select2M @@ -520,16 +520,25 @@ ceField( +%0A ...
790142d9b5f04700f5dcecee1816f6cf415886b1
Remove print statement
project/apps/api/views.py
project/apps/api/views.py
import logging log = logging.getLogger(__name__) import watson from rest_framework import ( mixins, viewsets, # filters, ) from .models import ( Convention, Chorus, Quartet, ) from .serializers import ( ConventionSerializer, ChorusSerializer, QuartetSerializer, SearchSerializ...
Python
0.007015
@@ -656,31 +656,8 @@ one%0A - print queryset%0A
112ddadcb1387eb6016d6340aef292ea32fa5b2f
Fix bug in getting linter version #
proselint/command_line.py
proselint/command_line.py
#!/usr/bin/python # -*- coding: utf-8 -*- """Command line utility for proselint.""" import click import os from proselint.tools import line_and_column import proselint.checks as pl import pkgutil import codecs import subprocess base_url = "prose.lifelinter.com/" proselint_path = os.path.dirname(os.path.realpath(__f...
Python
0
@@ -814,19 +814,20 @@ default= -Non +Fals e)%0Adef p @@ -839,16 +839,21 @@ int(file +=None , versio @@ -853,16 +853,21 @@ version +=None , initia @@ -874,15 +874,25 @@ lize +=None , debug +=None ):%0A @@ -1230,33 +1230,8 @@ rue) -%0A print %22got here%22 %0A%0A
530d65da98699189f7cd8d55cb883da843e8712a
Remove check for book proposal
pyBuchaktion/cms_menus.py
pyBuchaktion/cms_menus.py
from cms.menu_bases import CMSAttachMenu from menus.base import NavigationNode, Modifier from menus.menu_pool import menu_pool from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse from pyBuchaktion.models import Book, Module, Order class PyBuchaktionMenu(CMSAttachMenu): ...
Python
0
@@ -475,11 +475,29 @@ n -2 = +odes += %5B%0A Nav @@ -552,24 +552,25 @@ oks'), 5001) +, %0A n3 @@ -570,12 +570,11 @@ -n3 = + Nav @@ -647,16 +647,17 @@ 2, 5001) +, %0A @@ -661,12 +661,11 @@ -n4 = + Nav @@ -724,24 +724,25 @@ les'), 5004) +, %0A n5 @@ -742...
ed0b1934eb1b5728f6e1a4bc0b5a421a5d30d5fc
Fix wrong input args
pyactors/inbox/redismq.py
pyactors/inbox/redismq.py
#!/usr/bin/env python # -*- coding: utf8 -*- from redis import StrictRedis from logging import getLogger try: from ujson import loads, dumps except ImportError: from json import loads, dumps from .exceptions import EmptyInboxException, QueueConnectionError __all__ = ['RedisInbox'] class RedisQueue(object):...
Python
0.999383
@@ -2777,24 +2777,33 @@ self.put_in( +message, self.put_que
f6ea9424b958d8d0056bc3912f9830bd2ca74caf
Add missing MAX.
pyasn1_modules/rfc2437.py
pyasn1_modules/rfc2437.py
# # This file is part of pyasn1-modules software. # # Copyright (c) 2005-2017, Ilya Etingof <etingof@gmail.com> # License: http://pyasn1.sf.net/license.html # # PKCS#1 syntax # # ASN.1 source from: # ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2.asn # # Sample captures could be obtained with "openssl genrsa" comma...
Python
0.000036
@@ -1110,16 +1110,36 @@ 2.26')%0A%0A +MAX = float('inf')%0A%0A %0Aclass V
c17f3e02ea18382dffff46eb767bed8bc5510fb6
Remove unused imports
pybossa/model/__init__.py
pybossa/model/__init__.py
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2013 SF Isle of Man Limited # # PyBossa 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...
Python
0.000001
@@ -852,31 +852,8 @@ port - relationship, backref, cla @@ -951,202 +951,8 @@ ator -%0Afrom sqlalchemy import event%0Afrom sqlalchemy.engine import reflection%0Afrom sqlalchemy.schema import (%0A MetaData,%0A Table,%0A DropTable,%0A ForeignKeyConstraint,%0A DropConstraint,%0A ) %0A%0Aim
0ff8623c34e9123c554875503d2f9e8327f41a74
allow more than once space around operators, bygroups around includes, variables
pygments/lexers/puppet.py
pygments/lexers/puppet.py
# -*- coding: utf-8 -*- """ pygments.lexers.puppet ~~~~~~~~~~~~~~~~~~~~~~ Lexer for the Puppet DSL. :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, bygroups from pygments.token import * __all__ ...
Python
0
@@ -589,16 +589,17 @@ (r'%5Cs +* (%5C?%7C%3C%7C%3E%7C @@ -620,16 +620,17 @@ %7C!%7C%5C%7C)%5Cs +* ', Opera @@ -726,24 +726,113 @@ ctuation),%0A%0A + (r'(.*)(include)(%5Cs*)(.*)$', bygroups(Text, Keyword, Text, Name.Variable)),%0A%0A @@ -934,16 +934,8 @@ ode%7C -include%7C real @@ -957...
9847886f060483fb38ea6c00ddaba317fadaea29
Apply isort
pytablereader/__init__.py
pytablereader/__init__.py
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import from tabledata import ( SQLiteTableDataSanitizer, TableData, TableDataSanitizer, InvalidTableNameError, InvalidHeaderNameError, InvalidDataError, EmptyDataErro...
Python
0.000001
@@ -157,171 +157,148 @@ -SQLiteTableDataSanitizer,%0A TableData,%0A TableDataSanitizer,%0A%0A InvalidTableNameError,%0A InvalidHeaderNameError,%0A InvalidDataError,%0A EmptyDataError,%0A +EmptyDataError, InvalidDataError, InvalidHeaderNameError, InvalidTableNameError,%0A SQLiteTableDataSaniti...
dab54ff92da91f7971e2701d2cf20d03a577664b
Fix crash when CIRCLE_NODE_TOTAL exists but is empty
pytest_circleci/plugin.py
pytest_circleci/plugin.py
import os, hashlib class CircleCIError(Exception): """Raised for problems running the CirleCI py.test plugin""" def read_circleci_env_variables(): """Read and convert CIRCLE_* environment variables""" circle_node_total = int(os.environ.get("CIRCLE_NODE_TOTAL", "1").strip()) circle_node_index = int(...
Python
0.000124
@@ -273,13 +273,8 @@ TAL%22 -, %221%22 ).st @@ -278,16 +278,23 @@ .strip() + or %221%22 )%0A ci @@ -353,13 +353,8 @@ DEX%22 -, %220%22 ).st @@ -358,16 +358,23 @@ .strip() + or %220%22 )%0A%0A i
f6ab612ca7caa78ddbdd3496ce6b75e10da310ec
update test stage
python/test/test_stage.py
python/test/test_stage.py
from pycap import PropertyTree,EnergyStorageDevice,Stage,initialize_data import unittest device_database=PropertyTree() device_database.parse_xml('device.xml') device=EnergyStorageDevice(device_database) class capStageTestCase(unittest.TestCase): def test_nothing(self): ptree=PropertyTree() ptree....
Python
0.000001
@@ -259,15 +259,46 @@ est_ -nothing +constant_current_charge_for_given_time (sel @@ -560,42 +560,8 @@ .1)%0A - print 'this should throw'%0A @@ -680,117 +680,683 @@ ual( -data%5B'time'%5D%5B-1%5D,15.0)%0A self.assertEqual(steps,150)%0A self.assertEqual(device.get_current(),5e-3 +steps,150)...
84673072396650520e24b5a770c11aa777f69557
Fix testcase for unicode.
python/test3/test_case.py
python/test3/test_case.py
#!/usr/bin/env python # coding: utf-8 from nose import main from nose.tools import * from msgpack import packs, unpacks def check(length, obj): v = packs(obj) assert_equal(len(v), length, "%r length should be %r but get %r" % (obj, length, len(v))) assert_equal(unpacks(v), obj) def test_1(): for o i...
Python
0.000003
@@ -2576,16 +2576,91 @@ (v, p)%0A%0A +def test_unicode():%0A assert_equal(b'foobar', unpacks(packs('foobar')))%0A%0A if __nam
20fe9ec286f4040e8b10cdfbe300124e781ebf7c
change hr.analytic.timesheet instead of account.analytic.line when associated line to invoice
project_billing_utils/wizard/associate_aal.py
project_billing_utils/wizard/associate_aal.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: Joël Grand-Guillaume # Copyright 2010 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
Python
0
@@ -1356,23 +1356,18 @@ ol.get(' -account +hr .analyti @@ -1372,12 +1372,17 @@ tic. -line +timesheet ')%0A
a3bccec6ad7964cc17a511e00477525503983438
change ABCMeta to ABC
micronota/bfillings/_base.py
micronota/bfillings/_base.py
# ---------------------------------------------------------------------------- # Copyright (c) 2015--, micronota 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.999999
@@ -389,20 +389,16 @@ port ABC -Meta , abstra @@ -881,33 +881,19 @@ ataPred( -metaclass=ABCMeta +ABC ):%0A ' @@ -3018,25 +3018,11 @@ red( -metaclass=ABCMeta +ABC ):%0A
2805243103822c0dbf99aa0d0f9e0a61ff3e0e98
Fix the doc config
doc/build.py
doc/build.py
#!/usr/bin/env python # Build the documentation. from __future__ import print_function import errno, os, shutil, sys, tempfile from subprocess import check_call, check_output, CalledProcessError, Popen, PIPE from distutils.version import LooseVersion versions = ['1.0.0', '1.1.0', '2.0.0', '3.0.2', '4.0.0', '4.1.0', '...
Python
0.000083
@@ -2426,16 +2426,90 @@ Breathe. + Require the exact version of Sphinx which is%0A # compatible with Breathe. %0A pip_i @@ -2582,55 +2582,8 @@ 9ee' -,%0A min_version='1.4.1.dev20160531' )%0A @@ -3298,16 +3298,29 @@ = + %7B0%7D/chrono.h %7B0%7D/col @@ -3353,21 +3353,8 @@ e.h -%7B0%7D/for...
07289516bf3783c64344016c5a96e6c83c7c6230
remove unnecessary import
_doc/sphinxdoc/source/conf.py
_doc/sphinxdoc/source/conf.py
# -*- coding: utf-8 -*- import sys import os import datetime import re # import sphinx_clatex # import hbp_sphinx_theme as sphtheme choice = "bootstrap" if choice == "sphtheme": import sphinx_theme_pd as sphtheme html_theme = sphtheme.__name__ html_theme_path = [sphtheme.get_html_theme_path()] elif choice...
Python
0.000037
@@ -41,95 +41,8 @@ t os -%0Aimport datetime%0Aimport re%0A# import sphinx_clatex%0A# import hbp_sphinx_theme as sphtheme %0A%0Ach
97c50d9fa6139e71cc291bad833ba7b63de9bf05
fix agent.py timeout error.
modules/auxiliary/sniffer.py
modules/auxiliary/sniffer.py
# Copyright (C) 2010-2013 Claudio Guarnieri. # Copyright (C) 2014-2016 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import getpass import logging import subprocess from lib.cuckoo.common.abstracts import Auxilia...
Python
0
@@ -3093,16 +3093,32 @@ ess.PIPE +, close_fds=True %0A
7c1ab84e5a7acfc439b3b34950a31b933c22d679
fix migrations
migrations/versions/65f28fd897d_.py
migrations/versions/65f28fd897d_.py
"""empty message Revision ID: 65f28fd897d Revises: 11288927b825 Create Date: 2015-09-23 14:44:44.824420 """ # revision identifiers, used by Alembic. revision = '65f28fd897d' down_revision = '11288927b825' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - pl...
Python
0.000002
@@ -187,28 +187,28 @@ sion = ' -11288927b825 +3f1fecf4ecc8 '%0A%0Afrom
5aba8a6a3689bf9282d430d9407bcb1db6d40243
update to new API
modules/contrib/bluetooth.py
modules/contrib/bluetooth.py
"""Displays bluetooth status (Bluez). Left mouse click launches manager app, right click toggles bluetooth. Needs dbus-send to toggle bluetooth state. Parameters: * bluetooth.device : the device to read state from (default is hci0) * bluetooth.manager : application to launch on click (blueman-manager) * bl...
Python
0
@@ -598,434 +598,260 @@ ort -bumblebee.input%0Aimport bumblebee.output%0Aimport bumblebee.engine%0Aimport bumblebee.util%0Aimport bumblebee.popup%0Aimport logging%0A%0A%0Aclass Module(bumblebee.engine.M +logging%0A%0Aimport core.module%0Aimport core.widget%0Aimport core.input%0A%0Aimport util.cli%0Aimport util.format...
22b4774372583050d5f2b45bf8cba29a08355efe
move prepare method / in case there are some loose changes exit on resume
migration.py
migration.py
import os import sys from rtcFunctions import ImportHandler from rtcFunctions import WorkspaceHandler from rtcFunctions import RTCInitializer from gitFunctions import Initializer from gitFunctions import Commiter import configuration import shouter def initialize(config): directory = config.workDirectory if ...
Python
0
@@ -737,24 +737,173 @@ itRepoName)%0A + if not ImportHandler(config).is_reloading_necessary():%0A sys.exit(%22Directory is not clean, please commit untracked files or revert them%22)%0A%0A RTCIniti @@ -950,20 +950,16 @@ %0A if -not config.p @@ -980,79 +980,42 @@ ame: +%0A -# in case previous...
b715ccf53e82b7eb9c26a00bc8965506e2beaef8
Fix smartfees test for change to relay policy
qa/rpc-tests/smartfees.py
qa/rpc-tests/smartfees.py
#!/usr/bin/env python2 # Copyright (c) 2014 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 fee estimation code # from test_framework import BitcoinTestFramework from bitcoinrpc.authproxy impo...
Python
0
@@ -590,32 +590,52 @@ bug=estimatefee%22 +, %22-relaypriority=0%22 %5D))%0A # No @@ -1108,16 +1108,36 @@ matefee%22 +, %22-relaypriority=0%22 %5D))%0A @@ -1415,16 +1415,36 @@ matefee%22 +, %22-relaypriority=0%22 %5D%0A
3a35df2f8d46406bce9f60421ec583ee8dd4dfb3
fix linting issues
sdcm/cdclog_reader_thread.py
sdcm/cdclog_reader_thread.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.000002
@@ -3384,16 +3384,48 @@ as exc: + # pylint: disable=broad-except %0A @@ -3735,24 +3735,44 @@ d).publish() +%0A return None %0A%0A @stati
04ea2096ade2cf323312cb1a1ff008c667994e24
Use tf.lite as the py_module name. Made the necessary changes to the api generator to accomodate for `dots` in the py_module name
tensorflow/lite/g3doc/tools/build_py_api_docs.py
tensorflow/lite/g3doc/tools/build_py_api_docs.py
# Lint as: python3 # Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
Python
0.000002
@@ -1713,16 +1713,19 @@ ules=%5B(' +tf. lite', t
23c25516765bb9290fcd59159114b2815c4c60c3
add unit test for pytables._update_or_append()
test/usgs_test.py
test/usgs_test.py
import os import tables import pyhis TEST_FILE_PATH = '/tmp/pyhis_test.h5' def test_init(): os.remove(TEST_FILE_PATH) assert not os.path.exists(TEST_FILE_PATH) pyhis.usgs.pytables.init_h5(TEST_FILE_PATH) assert os.path.exists(TEST_FILE_PATH) def test_parse_get_sites(): site_files = ['RI_dail...
Python
0.000001
@@ -4,11 +4,42 @@ ort -os%0A +datetime%0Aimport os%0A%0Aimport isodate %0Aimp @@ -613,30 +613,42 @@ sert _count_ +rows('/usgs/ sites -( +' ) == 0%0A s @@ -761,22 +761,34 @@ _count_ +rows('/usgs/ sites -( +' ) == 63%0A @@ -916,23 +916,925 @@ def -_count_sites(): +test_update_or_append():%0A h5file = ta...
d0c619a15600b1cb6a5de2d834e65889e00b98fd
Update line property docstring in SchematronError class
sdv/validators/schematron.py
sdv/validators/schematron.py
# Copyright (c) 2014, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. from lxml import isoschematron from collections import defaultdict from sdv.validators import (ValidationError, ValidationResults) import sdv.utils as utils NS_SVRL = "http://purl.oclc.org/dsdl/svrl" NS_SCHEMATRON...
Python
0
@@ -1699,48 +1699,276 @@ ber -for non-conformant element or attribute. +in the input document associated with this%0A error.%0A%0A This property is lazily evaluated, meaning the line number isn't known%0A until the first time this property is accessed. Each subsequent call%0A will return t...
5f5de20f2eac8f8eae3c8cc419fe7a0c8ad792b6
Move loading code to refresh
mopidy/backends/gstreamer.py
mopidy/backends/gstreamer.py
import gobject gobject.threads_init() # FIXME make sure we don't get hit by # http://jameswestby.net/weblog/tech/14-caution-python-multiprocessing-and-glib-dont-mix.html import pygst pygst.require('0.10') import gst import logging import os import glob import shutil import threading from mopidy.backends import * fr...
Python
0
@@ -3401,16 +3401,86 @@ _FOLDER) +%0A self.refresh()%0A%0A def refresh(self):%0A playlists = %5B%5D %0A%0A @@ -3818,38 +3818,32 @@ ng%0A%0A -self._ playlists.append @@ -3850,24 +3850,60 @@ (playlist)%0A%0A + self.playlists = playlists%0A%0A def crea
5384deb82aeddfb6f02c7e198c372dc1b06cd861
Add purchase suppliers dataset
serenata_toolbox/datasets.py
serenata_toolbox/datasets.py
import os from urllib.request import urlretrieve def fetch(filename, destination_path, aws_bucket='serenata-de-amor-data', aws_region='s3-sa-east-1'): url = 'https://{}.amazonaws.com/{}/{}'.format(aws_region, aws_bucket, ...
Python
0
@@ -1632,16 +1632,60 @@ ents.xz' +,%0A '2017-03-20-purchase-suppliers.xz' %0A )%0A
b61c51798ce2f1fde3d8777d36d809b209741984
Fix compatibility with Python2
tests/chainer_tests/utils_tests/test_argument.py
tests/chainer_tests/utils_tests/test_argument.py
import unittest from chainer import testing from chainer.utils.argument import parse_kwargs class TestArgument(unittest.TestCase): def test_parse_kwargs(self): def test(**kwargs): return parse_kwargs(kwargs, ('foo', 1), ('bar', 2)) self.assertEqual(test(), (1, 2)) self.asse...
Python
0.000041
@@ -10,16 +10,28 @@ ittest%0A%0A +import six%0A%0A from cha @@ -376,19 +376,18 @@ with s -elf +ix .assertR
84e0f37ef0ecb107a0a367ed8f876d681e8e8bbb
fix missing multi_gpu annotation
tests/cupyx_tests/distributed_tests/test_comm.py
tests/cupyx_tests/distributed_tests/test_comm.py
import pathlib import subprocess import sys import unittest import numpy import pytest from cupy.cuda import nccl from cupy import testing from cupyx.distributed import init_process_group nccl_available = nccl.available N_WORKERS = 2 def _run_test(test_name, dtype=None): # subprocess is required not to inte...
Python
0.000443
@@ -223,24 +223,8 @@ e%0A%0A%0A -N_WORKERS = 2%0A%0A%0A def @@ -901,32 +901,54 @@ not installed')%0A +@testing.multi_gpu(2)%0A class TestNCCLBa @@ -2310,16 +2310,42 @@ Case):%0A%0A + @testing.multi_gpu(2)%0A def
58cff1d5dd1405dcb77426c971eebf510ba4a046
test fix: East US 2 -> East US, Standard_G1 -> Standard_D2
tests/integration/azure_disk_integration_test.py
tests/integration/azure_disk_integration_test.py
# Copyright 2015 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
Python
0.000008
@@ -1483,34 +1483,32 @@ 'zone': 'East US - 2 '%0A @@ -2283,34 +2283,32 @@ 'zone': 'East US - 2 '%0A @@ -2880,17 +2880,17 @@ tandard_ -G +D 1',%0A @@ -2925,18 +2925,16 @@ 'East US - 2 '%0A
8a6ebe6562821ea07f4582ca79022b73d1460b63
FIX move lines preparation for bank statement reconciliation Without this, in multi currency environment, the amount shown in reconciliation widget would be incoherent: base currency and foreign currency would be mixed
account_reconcile_payment_order/models/account_bank_statement_line.py
account_reconcile_payment_order/models/account_bank_statement_line.py
# -*- coding: utf-8 -*- ############################################################################## # # This module copyright (C) 2015 Therp BV (<http://therp.nl>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
Python
0.003399
@@ -2231,16 +2231,156 @@ ders%5B0%5D%0A + target_currency = (%0A this.currency_id or this.journal_id.currency or%0A this.journal_id.company_id.currency_id)%0A @@ -2770,31 +2770,120 @@ _widget( -move_lines_list +%0A move_lines_list, target_currency=target_currency,...
5d3646a8fc4c05a2902b2f3ca60321204e87f355
Fix handling of user details
social_core/backends/asana.py
social_core/backends/asana.py
import datetime from .oauth import BaseOAuth2 class AsanaOAuth2(BaseOAuth2): name = 'asana' AUTHORIZATION_URL = 'https://app.asana.com/-/oauth_authorize' ACCESS_TOKEN_METHOD = 'POST' ACCESS_TOKEN_URL = 'https://app.asana.com/-/oauth_token' REFRESH_TOKEN_URL = 'https://app.asana.com/-/oauth_token'...
Python
0.000004
@@ -575,16 +575,48 @@ ponse):%0A + data = response%5B'data'%5D%0A @@ -669,24 +669,20 @@ r_names( -response +data %5B'name'%5D @@ -708,24 +708,20 @@ email': -response +data %5B'email' @@ -751,24 +751,20 @@ rname': -response +data %5B'email'
cab94280c7dbb6bbb559f7eaaf09d849c6c2acf2
improve url plugin
modules/bibcheck/lib/plugins/url.py
modules/bibcheck/lib/plugins/url.py
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2013 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) a...
Python
0
@@ -1034,16 +1034,78 @@ False%0A%0A +from invenio.config import CFG_SITE_URL, CFG_SITE_SECURE_URL%0A%0A DOMAIN_R @@ -2401,16 +2401,157 @@ QUESTS:%0A + try:%0A if any(url in url_cleaned for url in %5BCFG_SITE_URL, CFG_SITE_SECURE_URL%5D):%0A continue%0A @@ -...
6680e435a7983c3691f2bb9399e675cc5dc632db
Update merge_insertion_sort.py (#5833)
sorts/merge_insertion_sort.py
sorts/merge_insertion_sort.py
""" This is a pure Python implementation of the merge-insertion sort algorithm Source: https://en.wikipedia.org/wiki/Merge-insertion_sort For doctests run following command: python3 -m doctest -v merge_insertion_sort.py or python -m doctest -v merge_insertion_sort.py For manual testing run: python3 merge_insertion_so...
Python
0.000001
@@ -839,16 +839,247 @@ -5, -2%5D +%0A%0A Testing with all permutations on range(0,5):%0A %3E%3E%3E import itertools%0A %3E%3E%3E permutations = list(itertools.permutations(%5B0, 1, 2, 3, 4%5D))%0A %3E%3E%3E all(merge_insertion_sort(p) == %5B0, 1, 2, 3, 4%5D for p in permutations)%0A True %0A %22%22...
82d463a92746e7f0c3d1498b8fbfdaa0a098f7a1
add docstring
mpf/devices/state_machine.py
mpf/devices/state_machine.py
"""A generic state machine.""" from mpf.core.device_monitor import DeviceMonitor from mpf.core.mode import Mode from mpf.core.player import Player from mpf.core.mode_device import ModeDevice from mpf.core.system_wide_device import SystemWideDevice @DeviceMonitor("state") class StateMachine(SystemWideDevice, ModeDevi...
Python
0.000005
@@ -1161,24 +1161,60 @@ tr = None):%0A + %22%22%22Validate transitions.%22%22%22%0A resu
565bb12ca79a159b34ec0e03385a038a05db93c2
Remove example from docstring
mpf/processors/difference.py
mpf/processors/difference.py
class Difference: """ TODO """ def __init__(self): pass def work(self, data): """Process the difference between an element in the `data` list and the next one. :param data: the data to be processed :type data: list :ret...
Python
0.000008
@@ -22,26 +22,12 @@ %22%22%22 -%0A TODO%0A +TODO %22%22%22%0A
aa5f37d888b4e4bfeaa4d7bf17b1ca7f7035314b
Update cluster.py
msmexplorer/plots/cluster.py
msmexplorer/plots/cluster.py
import numpy as np from matplotlib import pyplot as pp from scipy.spatial import Voronoi from ..utils import msme_colors from ..palettes import msme_rgb __all__ = ['plot_voronoi'] @msme_colors def plot_voronoi(kmeans, ax=None, obs=(0, 1), cluster_centers=True, radius=None, color_palette=None, xlabe...
Python
0.000001
@@ -3966,24 +3966,49 @@ we_made_ax:%0A + ax.axis('equal')%0A ax.s
52747c09262d5fa835d15f445ef9a3fccd4dba4d
update example
SimPEG/Examples/EM_FDEM_1D_Inversion.py
SimPEG/Examples/EM_FDEM_1D_Inversion.py
from SimPEG import * import SimPEG.EM as EM from SimPEG.EM import mu_0 def run(plotIt=True): """ EM: FDEM: 1D: Inversion ======================= Here we will create and run a FDEM 1D inversion. """ cs, ncx, ncz, npad = 5., 25, 15, 15 hx = [(cs,ncx), (cs,npad,1.3)] hz = [...
Python
0.000001
@@ -1277,17 +1277,16 @@ fset=10. - %0A bzi @@ -1589,16 +1589,18 @@ .Problem +3D _b(mesh,
6350ad4912c0cf62053afb4ecbdf555c20a7ce55
resolve database inconsistencies with the creation of this webuser for tests
corehq/apps/unicel/tests/test_create_from_request.py
corehq/apps/unicel/tests/test_create_from_request.py
from datetime import datetime, timedelta from django.test import TestCase from django.test.client import Client from corehq.apps.sms.models import SMSLog, INCOMING from corehq.apps.users.models import CouchUser, WebUser from corehq.apps.unicel.api import InboundParams, DATE_FORMAT, convert_timestamp import json class ...
Python
0.000001
@@ -34,16 +34,52 @@ medelta%0A +from django.db import DatabaseError%0A from dja @@ -620,16 +620,23 @@ username +-unicel '%0A @@ -697,16 +697,33 @@ 5551234%0A + try:%0A @@ -794,16 +794,118 @@ ssword)%0A + except WebUser.Inconsistent:%0A self.couch_user = WebUser.get_by_...
10a37cc441cd473a342b5c8de9853215d8251817
rename cli arg, and change default
transaction_downloader/transaction_downloader.py
transaction_downloader/transaction_downloader.py
"""Transaction Downloader. Usage: transaction-downloader auth --account=<account-name> [--verbose] transaction-downloader download --account=<account-name> --account-type=<type> --from=<from-date> --to=<to-date> --output=<output> [--verbose] transaction-downloader -h | --help transaction-downloader --version ...
Python
0
@@ -218,23 +218,30 @@ --output -=%3Coutpu +-format=%3Cforma t%3E %5B--ve @@ -635,27 +635,27 @@ -out -=%3Coutput%3E +put-format=%3Cformat%3E Ou @@ -699,19 +699,19 @@ efault: -csv +qif %5D%0A --ve @@ -4739,16 +4739,23 @@ --output +-format '%5D)%0A%0Aif
9a903f9f003d743242d4ac41b4a4045559f1ff4c
add MIT License copyright header to zmq_sub.py
contrib/zmq/zmq_sub.py
contrib/zmq/zmq_sub.py
#!/usr/bin/env python2 import array import binascii import zmq import struct port = 28332 zmqContext = zmq.Context() zmqSubSocket = zmqContext.socket(zmq.SUB) zmqSubSocket.setsockopt(zmq.SUBSCRIBE, "hashblock") zmqSubSocket.setsockopt(zmq.SUBSCRIBE, "hashtx") zmqSubSocket.setsockopt(zmq.SUBSCRIBE, "rawblock") zmqSub...
Python
0
@@ -15,16 +15,207 @@ python2 +%0A# Copyright (c) 2014-2016 The Bitcoin Core developers%0A# Distributed under the MIT software license, see the accompanying%0A# file COPYING or http://www.opensource.org/licenses/mit-license.php. %0A%0Aimport
2fdac02fe93f4aa4f25c9ae4dadfb7325e7f7bc6
Resolve flask-wtf deprecation warning
controller/__init__.py
controller/__init__.py
#!/usr/bin/python from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_wtf import CsrfProtect c3bottles = Flask(__name__, static_folder="../static", template_folder="../templates" ) # We need to set this here to prevent the depreciation warning c3bot...
Python
0
@@ -136,19 +136,19 @@ import C -srf +SRF Protect%0A @@ -497,19 +497,19 @@ csrf = C -srf +SRF Protect(
1909a4bfff5e972b88d745d6b948482f45e47fee
remove file existence checking because they are not created until workflow is underway
utilities/dockered_pipelines/alignments/align.py
utilities/dockered_pipelines/alignments/align.py
#!/usr/bin/env python3 import sys, argparse, os, re import subprocess import uuid from pathlib import Path from datetime import datetime import utilities.dockered_pipelines.container_option as container from somaticseq._version import __version__ as VERSION ts = re.sub(r'[:-]', '.', datetime.now().isoformat(sep='.', ...
Python
0
@@ -1024,134 +1024,8 @@ ' ): -%0A%0A assert os.path.exists( input_parameters%5B'in_fastq1'%5D )%0A assert os.path.exists( input_parameters%5B'genome_reference'%5D ) %0A
36cb8fc0cba9dcddc9f8ebf136f25ef345a15e9d
Remove hard coded latex table
nalaf/learning/evaluators.py
nalaf/learning/evaluators.py
import abc from nalaf.structures.data import Entity from nalaf import print_verbose, print_debug class Evaluator: """ Calculates precision, recall and subsequently F1 measure based on the original and the predicted mention to evaluate the performance of a model. Different implementations are possible...
Python
0.000002
@@ -1053,32 +1053,8 @@ alse -, print_latex_table=None ):%0A
c131a725af7e27fd8b80683e6af1ddfc986ca2c4
Add mpfr 4.0.2 (#13091)
var/spack/repos/builtin/packages/mpfr/package.py
var/spack/repos/builtin/packages/mpfr/package.py
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Mpfr(AutotoolsPackage): """The MPFR library is a C library for multiple-precision f...
Python
0
@@ -383,24 +383,25 @@ page = %22http +s ://www.mpfr. @@ -403,16 +403,17 @@ mpfr.org +/ %22%0A ur @@ -462,17 +462,17 @@ pfr-4.0. -1 +2 .tar.bz2 @@ -474,16 +474,112 @@ r.bz2%22%0A%0A + version('4.0.2', sha256='c05e3f02d09e0e9019384cdd58e0f19c64e6db1fd6f5ecf77b4b1c61ca253acc')%0A vers @@ -1117,32 +1117,3...
677c7e6a840dbfe1d52a22a2e55f4186900e9cd6
Fix to SSLErroor uncaught in rtwo/linktest
core/tasks/instance.py
core/tasks/instance.py
from datetime import datetime from django.conf import settings from celery.decorators import periodic_task from celery.task.schedules import crontab from threepio import logger @periodic_task(run_every=crontab(hour='*', minute='*/15', day_of_week='*'), time_limit=120, retry=1) # 2min timeout def t...
Python
0
@@ -1959,16 +1959,29 @@ L, uri)%0A + try:%0A shel @@ -2013,24 +2013,145 @@ ll_address)%0A + except Exception, e:%0A logger.exception(%22Bad shell address: %25s%22 %25 shell_address)%0A shell_success = False%0A vnc_addr @@ -2179,16 +2179,29 @@ ' %25 uri%0A + try:%0A vnc_ ...
6fd8c2b1c1ee59820ce26474c9504b514d325106
Update scanopy.py
Scanopy/scanopy.py
Scanopy/scanopy.py
from gui import * from scanner import * if __name__ == '__main__': scanner = Scanner() gui_thread = Gui(scanner) gui_thread.start()
Python
0
@@ -134,11 +134,10 @@ ead. -start +run () +%0A
24539ba9c2940629ca89ac8cff51eac705edaa03
Refactor to remove global outfile
librisxl-tools/blazegraph/lddb-to-import.py
librisxl-tools/blazegraph/lddb-to-import.py
from __future__ import unicode_literals, print_function import sys import os import re outfile = None def next_outfile(basepath, i): global outfile fpath = "{}-{}.jsonld".format(basepath, i) dirname = os.path.dirname(fpath) if not os.path.exists(dirname): os.makedirs(dirname) outfile = op...
Python
0
@@ -86,255 +86,8 @@ e%0A%0A%0A -outfile = None%0A%0Adef next_outfile(basepath, i):%0A global outfile%0A fpath = %22%7B%7D-%7B%7D.jsonld%22.format(basepath, i)%0A dirname = os.path.dirname(fpath)%0A if not os.path.exists(dirname):%0A os.makedirs(dirname)%0A outfile = open(fpath, 'w')%0A%0A def @...
e5d665c6691c5c269b382600b151ede9bc47546b
Update test_code_style.py
_unittests/ut_module/test_code_style.py
_unittests/ut_module/test_code_style.py
""" @brief test log(time=0s) """ import os import unittest from pyquickhelper.loghelper import fLOG from pyquickhelper.pycode import check_pep8, ExtTestCase class TestCodeStyle(ExtTestCase): """Test style.""" def test_style_src(self): thi = os.path.abspath(os.path.dirname(__file__)) src_...
Python
0.000004
@@ -1919,327 +1919,8 @@ ip=%5B -%22src' imported but unused%22,%0A %22skip_' imported but unused%22,%0A %22skip__' imported but unused%22,%0A %22skip___' imported but unused%22,%0A %22Unused variable 'skip_'%22,%0A ...
35df1104c0df6a89e083b77a82cca44b7ecbbfd9
Print a log message every 1000 inserted URLs
mediacloud/mediawords/util/sitemap/media.py
mediacloud/mediawords/util/sitemap/media.py
from mediawords.db import DatabaseHandler from mediawords.util.log import create_logger from mediawords.util.sitemap.tree import sitemap_tree_for_homepage log = create_logger(__name__) # FIXME add test for this function def fetch_sitemap_pages_for_media_id(db: DatabaseHandler, media_id: int) -> None: """Fetch an...
Python
0.000571
@@ -956,24 +956,47 @@ edia_url))%0A%0A + insert_counter = 0%0A for page @@ -1899,16 +1899,168 @@ %7D)%0A%0A + insert_counter += 1%0A if insert_counter %25 1000 == 0:%0A log.info(%22Inserted %7B%7D / %7B%7D URLs...%22.format(insert_counter, len(pages)))%0A%0A log.
7ec4f2d6f5e5974f9e16b60fde305477668a39d3
# Days to Close
addons/project/report/project_report.py
addons/project/report/project_report.py
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models, tools class ReportProjectTaskUser(models.Model): _name = "report.project.task.user" _description = "Tasks by user and project" _order = 'name desc, project_id' _auto = F...
Python
0.999971
@@ -2818,32 +2818,51 @@ t('epoch' from ( +NULLIF(t.date_end, t.write_date-t.c @@ -2857,16 +2857,17 @@ ite_date +) -t.creat
ab3162179f1f9b560b2808f97dc9b33bbc915410
Improve API documentation
alignak_app/qobjects/alignak/alignak.py
alignak_app/qobjects/alignak/alignak.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2018: # Matthieu Estrada, ttamalfor@gmail.com # # This file is part of (AlignakApp). # # (AlignakApp) 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 Sof...
Python
0.000003
@@ -878,16 +878,24 @@ ets for +general Alignak @@ -898,16 +898,22 @@ nak data +, like :%0A%0A * @@ -913,25 +913,19 @@ %0A%0A * -Alignak d +**D aemons s @@ -930,16 +930,18 @@ status: +** status @@ -959,24 +959,112 @@ mons + ( %0A -* Alignak b + see :class:%60StatusQDialog %3Calignak_app.qobje...
54a193bab1279c05ccd165a3d88a33634fd7944f
Fix songs import without bpm or time
api/management/commands/import_songs.py
api/management/commands/import_songs.py
# -*- coding: utf-8 -*- from api.management.commands.importbasics import * def import_songs(): events = models.Event.objects.exclude(japanese_name__contains='Score Match').exclude(japanese_name__contains='Medley Festival').exclude(japanese_name__contains='again').order_by('beginning') print '### Import songs' ...
Python
0.000655
@@ -1917,16 +1917,41 @@ ')%5B-1%5D%5D%0A + try:%0A @@ -2027,24 +2027,109 @@ bpm', '0'))%0A + except:%0A song%5B'BPM'%5D = 0%0A try:%0A @@ -2170,24 +2170,28 @@ + + song%5B'time'%5D @@ -2230,16 +2230,80 @@...
64313aabb821719f86f331b3f83cdf158344f5c7
Improve documentation
bears/configfiles/DockerfileLintBear.py
bears/configfiles/DockerfileLintBear.py
import json from coalib.bearlib.abstractions.Linter import linter from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY from coalib.results.Result import Result @linter(executable='dockerfile_lint') class DockerfileLintBear: """ Checks the given file with ``dockerfile_lint``. """ severity_map =...
Python
0
@@ -247,49 +247,294 @@ heck -s the given file with %60%60dockerfile_lint%60%60 + file syntax as well as arbitrary semantic and best practice%0A in Dockerfiles. it also checks LABEL rules against docker images.%0A%0A Uses %60%60dockerfile_lint%60%60 to provide the analysis.%0A See %3Chttps://github.com/project...
5cb4e401cb50e49ca03905b9ac96304048fb77f4
Make one assert more meaningful
category_encoders/tests/test_one_hot.py
category_encoders/tests/test_one_hot.py
import pandas as pd from unittest import TestCase # or `from unittest import ...` if on Python 3.4+ import numpy as np import category_encoders.tests.test_utils as tu import category_encoders as encoders np_X = tu.create_array(n_rows=100) np_X_t = tu.create_array(n_rows=50, extras=True) np_y = np.random.randn(np_X...
Python
0.999441
@@ -766,31 +766,8 @@ rm(X -_t%5BX_t%5B'extra'%5D != 'A'%5D ).sh @@ -840,16 +840,52 @@ columns + despite the presence of a new value ')%0A%0A
7184608d5718267e3c969125787f28a9a959e97b
Fix process_count tests on chromeos
chrome/test/functional/process_count.py
chrome/test/functional/process_count.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 pyauto_functional import pyauto class ProcessCountTest(pyauto.PyUITest): """Tests to ensure the number of Chrome-...
Python
0.000002
@@ -550,17 +550,17 @@ omeos': -5 +4 , # Pro @@ -607,13 +607,8 @@ gote -, GPU .%0A @@ -2223,53 +2223,209 @@ -num_actual = len(browser_info%5B0%5D%5B'processes'%5D +# Utility processes may show up any time. Ignore them.%0A processes = %5Bx for x in browser_info%5B0%5D%5B'processes'%5D%0A ...
fd4d9526048b2caef4aa11e437abdd964b009043
Fix djstripe_sync_models for classes with arguments already
djstripe/management/commands/djstripe_sync_models.py
djstripe/management/commands/djstripe_sync_models.py
from typing import List from django.apps import apps from django.core.management.base import BaseCommand, CommandError from ... import models, settings class Command(BaseCommand): """Sync models from stripe.""" help = "Sync models from stripe." def add_arguments(self, parser): parser.add_argum...
Python
0
@@ -4689,34 +4689,54 @@ )%0A el +if not all_list_kwarg s -e :%0A al
8cd945d945168a38a5ea4beaf6c7dcd26ce639e2
Learning func-23-1-7 ./test/criticalpracticalreason.c2-3200 none
model_def.py
model_def.py
import keras as keras from keras.models import Sequential, Model from keras.layers import Dense, Activation, Dropout, TimeDistributed, Concatenate, Input from keras.layers import GRU, LSTM, Conv2D, Conv1D, Reshape, Flatten, Permute, AveragePooling2D, MaxPooling2D, RepeatVector import keras.optimizers as optimizers fro...
Python
0.99324
@@ -2535,36 +2535,60 @@ pe=( -short_input_len, conv_count) +, conv_count), dtype='float32', name=%22decoder_input%22 )%0A%0A
3b6c6be8118b484c982ff6a20f50dea5424328ee
version bump to 1.0.3
namebench.py
namebench.py
#!/usr/bin/env python # Copyright 2009 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...
Python
0
@@ -734,17 +734,17 @@ = '1.0. -2 +3 '%0A%0Aimpor
47e1ae213be87316dfb01860577046bbd15f64b7
version bump to 0.6.3
namebench.py
namebench.py
#!/usr/bin/env python # Copyright 2009 Google Inc. All Rights Reserved. """Simple DNS server comparison benchmarking tool. Designed to assist system administrators in selection and prioritization. """ __author__ = 'tstromberg@google.com (Thomas Stromberg)' import ConfigParser import optparse import sys import tempf...
Python
0
@@ -545,17 +545,17 @@ = '0.6. -2 +3 '%0A%0Aif __
b34abff63baffdf96f2175db1c5d184286193c29
Add exception information to critical logs
sipa/model/pycroft/userdb.py
sipa/model/pycroft/userdb.py
import logging from ipaddress import IPv4Address, AddressValueError from flask import current_app from sqlalchemy import create_engine from sqlalchemy.exc import OperationalError from sipa.model.user import BaseUserDB from sipa.backends.exceptions import InvalidConfiguration logger = logging.getLogger(__name__) cl...
Python
0
@@ -1919,16 +1919,59 @@ b_name() +,%0A exc_info=True )%0A
da23d43d1b3a442988b4eaf1d56d47730a4aa680
fix describe instance command for connectors
client/src/main/python/slipstream/command/DescribeInstancesCommand.py
client/src/main/python/slipstream/command/DescribeInstancesCommand.py
""" SlipStream Client ===== Copyright (C) 2014 SixSq Sarl (sixsq.com) ===== Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required ...
Python
0.000001
@@ -1035,33 +1035,33 @@ r -aise NotImplementedError( +eturn cc._vm_get_state(vm )%0A%0A
4cfb62e1cdb8e044d61b923e8544e0cc47400231
Add the option for sound-only nightcorification
nightcore.py
nightcore.py
# !/usr/bin/python # -*- coding: utf-8 -*- import numpy as np from moviepy.audio.AudioClip import AudioArrayClip from moviepy.audio.io.AudioFileClip import AudioFileClip from moviepy.video.VideoClip import TextClip, ImageClip from moviepy.video.compositing.CompositeVideoClip import CompositeVideoClip from random imp...
Python
0.000077
@@ -3445,32 +3445,44 @@ ext, devil=False +, video=True ):%0A %22%22%22%0A C @@ -3716,16 +3716,34 @@ devil)%0A%0A + if video:%0A # Cr @@ -3811,17 +3811,21 @@ tion - to%0A +%0A # + to the @@ -3856,16 +3856,20 @@ audio.%0A + imag @@ -3909,24 +3909,28 @@ ation)%0A%0A + + ...
e4ee2b1d9199028236ce2f5509758a1b968034bb
Add option to download at most <n> messages
nntp2mbox.py
nntp2mbox.py
#!/usr/bin/env python3 # # Distributed under terms of the MIT license. # # Copyright (c) 2009 Sven Velt # original code, # please see https://github.com/wAmpIre/nntp2mbox # for the original project by Sven # # Copyright (c) 2016 Olaf Lessenich # ...
Python
0.000376
@@ -485,16 +485,29 @@ dry_run, + number=None, start=N @@ -730,16 +730,40 @@ %22%22%22%0A%0A + if not dry_run:%0A mbox @@ -795,16 +795,20 @@ .mbox')%0A + mbox @@ -1080,15 +1080,26 @@ nr = + max(first, start -%0A +) %0A @@ -1103,27 +1103,24 @@ -if startnr %3C first: @@ -1...
38f181c6cbca4098abfca4bc29f04afc4d8c7082
Remove comments
notify_tp.py
notify_tp.py
import argparse import xml.etree.ElementTree as ET from collections import namedtuple import requests import json import datetime parser = argparse.ArgumentParser(description='Analyze perf tests results and notify TP.') parser.add_argument('-f', '--file', type=str, nargs='?', help='XML-file with test results',...
Python
0
@@ -2142,51 +2142,8 @@ %0D%0A%0D%0A - # existing_bugs = get_raw('Bugs')%0D%0A
95e90f72e9a0a854bfa7c0612aaadd12b36b7d7c
Print server name.
ntpclient.py
ntpclient.py
#!/usr/bin/env python3 # file: ntpclient.py # vim:fileencoding=utf-8:fdm=marker:ft=python # # Copyright © 2018 R.F. Smith <rsmith@xs4all.nl>. # SPDX-License-Identifier: MIT # Created: 2017-11-16 19:33:50 +0100 # Last modified: 2018-11-24T10:18:56+0100 """ Simple NTP query program. This program does not strive for high ...
Python
0
@@ -230,21 +230,21 @@ 18-1 -1-24T10:18:56 +2-06T22:37:44 +010 @@ -2879,16 +2879,65 @@ quiet:%0A + print('Using server %7B%7D.'.format(server))%0A @@ -2982,24 +2982,25 @@ oundtrip, 's +. ')%0A p @@ -3068,16 +3068,17 @@ %25S.%25f %25Y +. '))%0A @@ -3147,16 +3147,17 @@ %25S.%25f %25Y +...
81dc3cf445046290381e94ccf8f20c32f419dde2
Fix datetime creation
okapi/api.py
okapi/api.py
""" okapi.api ~~~~~~~~~ This module implements the Requests API while storing valuable information into mongodb. """ import datetime import requests import time import urlparse from pymongo import MongoClient # TODO: # Depends on how we want to calculate the time to # receieve the request form Home Depots API. #...
Python
0.999988
@@ -1097,16 +1097,12 @@ date -.today() +time .utc
d1514b6be184915e0f1227e2761db00945d0e7b4
use the new interface to attach gdb
spyvm/plugins/vmdebugging.py
spyvm/plugins/vmdebugging.py
import os from spyvm import model, error from spyvm.plugins.plugin import Plugin from spyvm.util.system import IS_WINDOWS DebuggingPlugin = Plugin() DebuggingPlugin.userdata['stop_ui'] = False def stop_ui_process(): DebuggingPlugin.userdata['stop_ui'] = True # @DebuggingPlugin.expose_primitive(unwrap_spec=[obje...
Python
0
@@ -1066,368 +1066,98 @@ -print s_frame.print_stack()%0A from rpython.config.translationoption import get_translation_config%0A from rpython.rlib.objectmodel import we_are_translated%0A if not we_are_translated() or get_translation_config().translation.lldebug or get_translation_config().translation.llde...
bbff1221efe038e8b58a59a45d4a4a0854f822aa
Append the outputs refs to the exported env vars
polyaxon/scheduler/spawners/templates/env_vars.py
polyaxon/scheduler/spawners/templates/env_vars.py
import json from kubernetes import client from django.conf import settings from db.models.outputs import get_paths_from_specs from libs.api import API_KEY_NAME, get_settings_api_url from scheduler.spawners.templates import constants def get_env_var(name, value, reraise=True): if not isinstance(value, str): ...
Python
0.000001
@@ -2672,16 +2672,45 @@ utputs:%0A + env_vars.append(%0A @@ -2795,16 +2795,17 @@ outputs) +) %0A ret
abbc2f46d79be255a0abc4163dbcd4ee3ebe97ff
Bring back validate function
cosmic/models.py
cosmic/models.py
import sys from werkzeug.local import LocalStack from teleport import * from .exceptions import ModelNotFound class Model(object): def __init__(self, data): self.data = data def serialize_self(self): return self.get_schema().serialize(self.data) @classmethod def deserialize_self(c...
Python
0.000003
@@ -478,25 +478,114 @@ -return cls(datum) +cls.validate(datum)%0A return cls(datum)%0A%0A @classmethod%0A def validate(cls, datum):%0A pass %0A%0A
313cafa9320a3842eb91186a1ffe225e6d3a025d
Add __version__ (#372)
mlflow/__init__.py
mlflow/__init__.py
""" Provides the MLflow fluent API, allowing management of an active MLflow run. For example: .. code:: python import mlflow mlflow.start_run() mlflow.log_param("my", "param") mlflow.log_metric("score", 100) mlflow.end_run() You can also use syntax like this: .. code:: python with mlflow.st...
Python
0
@@ -417,16 +417,67 @@ k.%0A%22%22%22%0A%0A +from mlflow.version import VERSION as __version__%0A%0A import o
f45f1b5a70473d36ac6845db4e1ebf050ec0d9ea
Change u'id' from unicode to ascii string
project_fish/whats_fresh/tests/test_vendor_model.py
project_fish/whats_fresh/tests/test_vendor_model.py
from django.test import TestCase from django.conf import settings from phonenumber_field.modelfields import PhoneNumberField from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class VendorTestCase(TestCase): def setUp(self): self.ex...
Python
0.999162
@@ -968,17 +968,16 @@ -u 'id': mo
4ac450fd2c6cd847cbafd3dc222de7076f08eb61
allow comments in the config file
scripts/manual_macro_place.py
scripts/manual_macro_place.py
#!/usr/bin/env python3 # Copyright 2020 Efabless Corporation # # 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
@@ -2317,24 +2317,151 @@ onfig_file:%0A + # Discard comments and empty lines%0A line = line.split('#')%5B0%5D.strip()%0A if not line:%0A continue%0A line
a3db7893dbeef2970ab5524be1827f1870245020
Insert for groupt added
ServerSide/Main.py
ServerSide/Main.py
from http.server import BaseHTTPRequestHandler, HTTPServer import simplejson import sqlite3 import urllib #skeleton code found online class Server(BaseHTTPRequestHandler): def do_GET(self): file = open("WriteFile.txt", "r+") # Send response status code self.send_response(200) # Sen...
Python
0
@@ -2272,16 +2272,21 @@ urn '1'%0A + %0A def grou @@ -2592,24 +2592,165 @@ se.commit()%0A + cursor.execute('''INSERT INTO user(gId,gName,admin,adminIp) VALUES(?,?,?,?)''', (gId,gName,admin,adminIp))%0A database.commit()%0A except s