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 |
|---|---|---|---|---|---|---|---|
cba1e26d496baddea504c01c72c414f948c90c7c | Write formatted message | logserver/handlers.py | logserver/handlers.py | import logging
import sqlite3
class SQLiteHandler(logging.Handler):
"""Handler to write logs to a SQLite database.
:param str path: Path to SQLite file.
:param str table_name: Name of the table to write logs to.
:param bool use_wal: Enable the WAL journal mode. This generally improves
perform... | Python | 0.999999 | @@ -2322,13 +2322,17 @@
record.m
-sg
+essage
))%0A
|
44d8576eb4a882f5ea960384b9ab5a8912e12704 | fix a bug with logger | plenum/common/timer.py | plenum/common/timer.py | from abc import ABC, abstractmethod
from functools import wraps
from logging import getLogger
from typing import Callable, NamedTuple
import time
from sortedcontainers import SortedListWithKey
class TimerService(ABC):
@abstractmethod
def get_current_time(self) -> float:
pass
@abstractmethod
... | Python | 0 | @@ -189,16 +189,38 @@
ithKey%0A%0A
+logger = getLogger()%0A%0A
%0Aclass T
@@ -2114,43 +2114,8 @@
lse%0A
- self._logger = getLogger()%0A
@@ -2552,22 +2552,16 @@
-self._
logger.d
|
41fe9bd62375809058e5c26790e1ce472096f5ee | Avoid exception when last_remote_modifier is None | nuxeo-drive-client/nxdrive/wui/conflicts.py | nuxeo-drive-client/nxdrive/wui/conflicts.py | '''
Created on 10 mars 2015
@author: Remi Cattiau
'''
from nxdrive.logging_config import get_logger
from nxdrive.wui.dialog import WebDialog, WebDriveApi
from nxdrive.wui.translator import Translator
from PyQt4 import QtCore
log = get_logger(__name__)
class WebConflictsApi(WebDriveApi):
def __init__(self, appli... | Python | 0.998694 | @@ -2416,16 +2416,105 @@
utor%22%5D =
+ %22 %22 if state.last_remote_modifier is None %5C%0A else
self._e
|
e8395df2ec7bd4eb40507d98d5f0463f513f271e | Add weight to PathHist.add_traj; sep local method | openpathsampling/analysis/path_histogram.py | openpathsampling/analysis/path_histogram.py | import openpathsampling as paths
from openpathsampling.analysis import SparseHistogram
from collections import Counter
import numpy as np
# should path histogram be moved to the generic histogram.py? Seems to be
# independent of the fact that this is actually OPS
class PathHistogram(SparseHistogram):
def __init__... | Python | 0.000004 | @@ -5096,25 +5096,24 @@
d_side%0A%0A
-%0A
def
add_traj
@@ -5096,35 +5096,38 @@
d_side%0A%0A def
-add
+single
_trajectory(self
@@ -5121,16 +5121,24 @@
ajectory
+_counter
(self, t
@@ -5144,31 +5144,14 @@
traj
-, trajectory_weight=1.0
+ectory
):%0A
@@ -5262,16 +5262,22 @@
ins(traj
+ectory
%5B0%5D)%5D%... |
cc3863493d77f60fae78e3d13bc8205a673cdafd | fix import operators for Arriva North East et al | busstops/management/commands/import_operators.py | busstops/management/commands/import_operators.py | """
Usage:
./manage.py import_operators < NOC_db.csv
"""
import sys
import csv
from django.core.management.base import BaseCommand
from busstops.models import Operator, Region
class Command(BaseCommand):
@staticmethod
def row_to_operator(row):
"Given a CSV row (a list), returns an Operator object... | Python | 0.000001 | @@ -633,16 +633,19 @@
or row%5B
+1%5D%5B
:4%5D == '
|
8fc158d3fb51f2685b3c34ef764fa80af8298756 | Fix reconstraining | angr/state_plugins/preconstrainer.py | angr/state_plugins/preconstrainer.py | import logging
import claripy
from .plugin import SimStatePlugin
from .. import sim_options as o
from ..errors import AngrError
l = logging.getLogger("angr.state_plugins.preconstrainer")
class SimStatePreconstrainer(SimStatePlugin):
"""
This state plugin manages the concept of preconstraining - adding cons... | Python | 0.000002 | @@ -5393,16 +5393,21 @@
aints =
+list(
filter(l
@@ -5483,16 +5483,17 @@
traints)
+)
%0A%0A%0A
|
76325eb27958b290459d1f92896191a8992ea85d | Allow bot to respond to unauthorized commands | marvinbot/handlers.py | marvinbot/handlers.py | from telegram.ext.messagehandler import Filters
from marvinbot.models import User
from marvinbot.utils import get_message
from marvinbot.core import get_adapter
from datetime import datetime
import argparse
import logging
log = logging.getLogger(__name__)
class Handler(object):
def __init__(self, callback, adap... | Python | 0.000001 | @@ -2715,24 +2715,69 @@
roles=None,%0A
+ unauthorized_response=None,%0A
@@ -2865,16 +2865,75 @@
= None%0A
+ self.unauthorized_response = unauthorized_response%0A
@@ -4106,230 +4106,8 @@
e):%0A
- if self.required_roles:%0A user = self.get_registered_us... |
c05e49d4fd32c37ba7a2c3e641e06cb63ec05487 | Clean up 'salt --versions-report' after patch from s0undt3ch (thanks!). | salt/version.py | salt/version.py | '''
Set up the version of Salt
'''
# Import python libs
import sys
__version_info__ = (0, 14, 0)
__version__ = '.'.join(map(str, __version_info__))
GIT_DESCRIBE_REGEX = (
r'(?P<major>[\d]{1,2}).(?P<minor>[\d]{1,2}).(?P<bugfix>[\d]{1,2})'
r'(?:(?:.*)-(?P<noc>[\d]+)-(?P<sha>[a-z0-9]{8}))?'
)
def __get_versi... | Python | 0 | @@ -4140,24 +4140,63 @@
ersion__'),%0A
+ ('ZMQ', 'zmq', 'zmq_version'),%0A
)%0A%0A p
@@ -4570,19 +4570,85 @@
if
-not
+callable(version):%0A version = version()%0A if
isinsta
@@ -4664,18 +4664,21 @@
on,
-basestring
+(tuple, list)
):%0A
@@ -4885,100 +4885,8 @@
g)%0A... |
91a8f542b0d4bc91d5d37db0e80df03bfafaf014 | add helptext to option in YouTune-Plugin | cmsplugin_cascade/bootstrap4/embeds.py | cmsplugin_cascade/bootstrap4/embeds.py | import re
from urllib.parse import urlparse, urlunparse, ParseResult
from django.core.exceptions import ValidationError
from django.forms import widgets
from django.forms.fields import BooleanField, ChoiceField, URLField
from django.utils.translation import gettext_lazy as _
from entangled.forms import EntangledModelF... | Python | 0 | @@ -1577,32 +1577,101 @@
required=False,%0A
+ help_text=_(%22Show videos suggested by YouTube at the end.%22),%0A
)%0A%0A class
|
f2ef01e183e9775f05f4c897c2c29248f5c6c927 | exclude data no longer used. | restclients/models/iasystem.py | restclients/models/iasystem.py | from django.db import models
class Evaluation(models.Model):
section_sln = models.IntegerField(max_length=5)
eval_open_date = models.DateTimeField()
eval_close_date = models.DateTimeField()
eval_status = models.CharField(max_length=7)
eval_is_online = models.BooleanField(default=False)
eval_ur... | Python | 0 | @@ -250,64 +250,8 @@
=7)%0A
- eval_is_online = models.BooleanField(default=False)%0A
@@ -279,16 +279,16 @@
Field()%0A
+
%0A def
@@ -458,42 +458,33 @@
n %22%7B
+%25
s
-ln
: %25d,
-eval_is_online: %25s, statu
+%25s: %25s, %25s: %25s, %25
s: %25
@@ -498,24 +498,31 @@
%0A
+ %22sln%22,
self... |
9bf5f9ac162447fb43942fe59c6ac59a888da639 | Removing a print | restclients/trumba/__init__.py | restclients/trumba/__init__.py | """
The low level interface for accessing all Trumba web services.
"""
from restclients.dao import TrumbaBot_DAO, TrumbaSea_DAO, TrumbaTac_DAO
from restclients.util.timer import Timer
from restclients.util.log import log_info, log_err
from lxml import etree
import logging
import json
print __name__
class Trumba(objec... | Python | 0.999999 | @@ -284,23 +284,8 @@
on%0A%0A
-print __name__%0A
clas
|
49c5254de9884aaca7ecb6b3fa0f089d72f90ebf | return ros package sources | robustus/detail/install_ros.py | robustus/detail/install_ros.py | # =============================================================================
# COPYRIGHT 2013 Brain Corporation.
# License under MIT license (see LICENSE file)
# =============================================================================
import logging
import os
from requirement import RequirementException
import... | Python | 0.000003 | @@ -1713,24 +1713,493 @@
d rosdep')%0A%0A
+ # add ros package sources%0A if sys.platform.startswith('linux') and not os.path.isfile('/etc/apt/sources.list.d/ros-latest.list'):%0A os.system('sudo sh -c %5C'echo %22deb http://packages.ros.org/ros/ubuntu precise main%22'%0A ... |
0c0321fae41f88301db168c0ff50dfbb05aaa3b0 | Return error message under "message" key | openfisca_web_api/wsgihelpers.py | openfisca_web_api/wsgihelpers.py | # -*- coding: utf-8 -*-
"""Decorators to wrap functions to make them WSGI applications.
The main decorator :class:`wsgify` turns a function into a WSGI application.
"""
import collections
import datetime
import json
from functools import update_wrapper
import webob.dec
import webob.exc
def N_(message):
retu... | Python | 0.000032 | @@ -4350,22 +4350,23 @@
-errors
+message
= u%22%7B%7D:
|
8372543f62f0fd01b8661f4d6e64503cdd78e5ea | remove RPC | opreturnninja/views.py | opreturnninja/views.py | import json
import random
from pyramid.view import view_config
from .constants import ELECTRUM_SERVERS
from bitcoin.rpc import RawProxy, DEFAULT_USER_AGENT
import socket
class RPC(RawProxy):
def passJson(self, json_to_dump):
self.__dict__['_RawProxy__conn'].request('POST', self.__dict__['_RawProxy__u... | Python | 0.000023 | @@ -173,735 +173,8 @@
et%0A%0A
-class RPC(RawProxy):%0A%0A def passJson(self, json_to_dump):%0A self.__dict__%5B'_RawProxy__conn'%5D.request('POST', self.__dict__%5B'_RawProxy__url'%5D.path, json.dumps(json_to_dump),%0A %7B'Host': self.__dict__%5B'_RawProxy__url'%5D.hostname,%0A ... |
2a8d7f858c10a2eb4dfe76c5dffa61af7d19c97c | Add CI wiki page to driver listing | tools/generate_driver_list.py | tools/generate_driver_list.py | #! /usr/bin/env python
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | Python | 0.000625 | @@ -1057,16 +1057,85 @@
s='?')%0A%0A
+CI_WIKI_ROOT = %22https://wiki.openstack.org/wiki/ThirdPartySystems/%22%0A%0A
%0Aclass O
@@ -2490,16 +2490,176 @@
s_fqn))%0A
+ if driver.ci_wiki_name:%0A output.write('* CI info: %25s%25s' %25 (CI_WIKI_ROOT,%0A drive... |
828e45dcb1312e88c3d680577d33153863bbf851 | Replace deprecated unittest aliases | tools/swig/test/testFarray.py | tools/swig/test/testFarray.py | #!/usr/bin/env python3
# System imports
from distutils.util import get_platform
import os
import sys
import unittest
# Import NumPy
import numpy as np
major, minor = [ int(d) for d in np.__version__.split(".")[:2] ]
if major == 0: BadListError = TypeError
else: BadListError = ValueError
# Add the distutils... | Python | 0 | @@ -861,34 +861,34 @@
self.
-failUnless
+assertTrue
(isinstance(
@@ -1163,26 +1163,26 @@
self.
-failUnless
+assertTrue
(arrayCo
@@ -1571,34 +1571,34 @@
self.
-failUnless
+assertTrue
(self.array.
@@ -1690,34 +1690,34 @@
self.
-failUnless
+assertTrue
(self.array.
@@ -1813,26 +1813,26 @@
... |
8f5d5b6c10030549e39380123fe83c6edad6af66 | Fix index API method signatures | docido_sdk/index/api.py | docido_sdk/index/api.py |
from docido_sdk.core import Interface
__all__ = [
'IndexAPI',
'IndexAPIConfigurationProvider',
'IndexAPIProcessor',
'IndexAPIProvider',
'IndexPipelineConfig',
'PullCrawlerIndexingConfig',
]
class IndexAPIProvider(Interface): # pragma: no cover
""" Provide an implementation of IndexAPI
... | Python | 0.000036 | @@ -2087,32 +2087,37 @@
ards(self, query
+=None
):%0A %22%22%22Se
@@ -3133,32 +3133,37 @@
ails(self, query
+=None
):%0A %22%22%22De
@@ -5290,32 +5290,37 @@
ards(self, query
+=None
):%0A retur
@@ -5673,16 +5673,21 @@
f, query
+=None
):%0A
|
2abb2227fb4f8c6d0cb855724a1f8d1380fc158c | Use open with | netsecus/korrekturtools.py | netsecus/korrekturtools.py | from __future__ import unicode_literals
import os
from . import helper
def readStatus(student):
student = student.lower()
path = helper.getConfigValue("settings", "attachment_path")
if not os.path.exists(path):
return
path = os.path.join(path, student)
if not os.path.exists(path):
... | Python | 0 | @@ -68,17 +68,16 @@
elper%0A%0A%0A
-%0A
def read
@@ -466,16 +466,17 @@
beitet%22%0A
+%0A
stat
@@ -940,29 +940,17 @@
t%22)%0A
-
%0A
-statusfile =
+with
ope
@@ -961,20 +961,19 @@
th, %22w%22)
-%0A
+ as
statusf
@@ -979,23 +979,14 @@
file
-.write(status)%0A
+:%0A
@@ -984,28 +984,34 @@
... |
b114cecbbb98fd7cfe6572dc6a3c55a1b290adda | fix iv estimate for continuous treatment; current method can return incorrect results when variables are not centered around 0 | dowhy/causal_estimators/instrumental_variable_estimator.py | dowhy/causal_estimators/instrumental_variable_estimator.py | import numpy as np
import sympy as sp
import sympy.stats as spstats
from dowhy.causal_estimator import CausalEstimate
from dowhy.causal_estimator import CausalEstimator
from dowhy.causal_estimator import RealizedEstimand
class InstrumentalVariableEstimator(CausalEstimator):
"""Compute effect of treatment using t... | Python | 0 | @@ -2039,108 +2039,43 @@
by
-Pearl (1995) ratio estimator.%0A # y = x+ u; multiply both sides by z and take expectation.
+2SLS estimator: Cov(y,z) / Cov(x,z)
%0A
@@ -2091,27 +2091,27 @@
num_yz = np.
-dot
+cov
(self._outco
@@ -2117,32 +2117,38 @@
ome, instrument)
+%5B0, 1%5D
%0A den
@@ -... |
c3878e39e97dd2390c3be3dd0229b3dbb4f0c885 | Add walls to the map. | structured_mainloop.py | structured_mainloop.py | import pygame
SCREEN_SIZE = (640, 480)
class Player(pygame.sprite.Sprite):
SPEED = 300
def __init__(self, *groups):
super().__init__(*groups)
self.image = pygame.image.load('frog.gif')
self.rect = pygame.rect.Rect((320, 240), self.image.get_size())
def update(self, dt):... | Python | 0 | @@ -87,17 +87,17 @@
SPEED =
-3
+2
00%0D%0A
@@ -311,18 +311,92 @@
self, dt
-):
+, game):%0D%0A # last position%0D%0A last = self.rect.copy()%0D%0A
%0D%0A
@@ -724,32 +724,151 @@
elf.SPEED * dt%0D%0A
+ %0D%0A for cell in pygame.sprite.spritecollide(self, game.walls, ... |
e08c580f2aed080077ec720540432223abd18306 | Update config_parser.py | lib/core/config_parser.py | lib/core/config_parser.py |
try:
import yaml
from lib.core.exceptions import FlashLightExceptions
except ImportError, err:
from lib.core.core import Core
Core.print_error(err)
class ConfigParser(object):
result = {}
scan_options = None
default_ports = "80,443"
@staticmethod
def parser(config_file):
if not ConfigParser.resu... | Python | 0.000001 | @@ -138,18 +138,16 @@
rint_err
-or
(err)%0A%0A%0A
|
0edb45d851d7882ee1b9843e04f1d8fd3ff0abe4 | Add Pool to subliminal | subliminal/__init__.py | subliminal/__init__.py | # -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com>
#
# This file is part of subliminal.
#
# subliminal is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 3 of... | Python | 0.000001 | @@ -816,16 +816,40 @@
btitles%0A
+from .async import Pool%0A
from .in
@@ -1087,16 +1087,24 @@
btitles'
+, 'Pool'
%5D%0Aloggin
|
f0ad9568c907eac93662357482db346928bddb95 | add verify ssl option to global configuration schema. | polyaxon_cli/schemas/global_configuration.py | polyaxon_cli/schemas/global_configuration.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from marshmallow import fields
from polyaxon_cli.schemas.base import BaseConfig, BaseSchema
class GlobalConfigurationSchema(BaseSchema):
verbose = fields.Bool(allow_none=True)
host = fields.Str(allow_none=True)
http... | Python | 0 | @@ -435,16 +435,62 @@
ne=True)
+%0A verify_ssl = fields.Bool(allow_none=True)
%0A%0A @s
@@ -862,16 +862,50 @@
ps=False
+,%0A verify_ssl=True
):%0A
@@ -1066,8 +1066,45 @@
e_https%0A
+ self.verify_ssl = verify_ssl%0A
|
40c61b8dce69a54d8e8a019615ba3e26c089d7d7 | use substance-box 1.0 as default box | substance/constants.py | substance/constants.py |
class Constants(object):
class ConstError(TypeError):
pass
def __init__(self, **kwargs):
for name, value in list(kwargs.items()):
super(Constants, self).__setattr__(name, value)
def __setattr__(self, name, value):
if name in self.__dist__:
raise self.Const... | Python | 0 | @@ -644,11 +644,11 @@
box:
-0.7
+1.0
'%0A%0AE
|
965713d3e7a452c4f77d289152134f77214024ca | Check for invalid questionnaire | reporter/uhl_reports/bioresource/data_quality/without_check_study_questionnaire.py | reporter/uhl_reports/bioresource/data_quality/without_check_study_questionnaire.py | #!/usr/bin/env python3
from reporter.core import SqlReport
from reporter.uhl_reports.civicrm import (
get_case_link,
get_contact_id_search_link,
)
from reporter.emailing import RECIPIENT_BIORESOURCE_ADMIN
class BioresourceWithoutCheckStudyQuestionnaire(SqlReport):
def __init__(self):
... | Python | 0 | @@ -1111,19 +1111,15 @@
= '
-recruitment
+invalid
_que
@@ -1133,17 +1133,34 @@
ire_
-complete'
+yn'%0D%0A AND rcq.value = 0
%0D%0A
|
27a8c5641d4d419e6e67ed22333a159527356760 | fix cinder quota equality | tempest/api/volume/admin/test_volume_quotas.py | tempest/api/volume/admin/test_volume_quotas.py | # Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
#
# Author: Sylvain Baubeau <sylvain.baubeau@enovance.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... | Python | 0.000008 | @@ -2541,32 +2541,222 @@
-self.assertEqual
+# test that the specific values we set are actually in%0A # the final result. There is nothing here that ensures there%0A # would be no other values in there.%0A self.assertDictContainsSubset
(new_quo
|
c84877afceed7a0eddf10ac62be86ec0027541ae | Use skipFields method in the expando base logic. | app/soc/logic/models/expando_base.py | app/soc/logic/models/expando_base.py | #!/usr/bin/python2.5
#
# Copyright 2009 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | Python | 0 | @@ -2128,37 +2128,28 @@
if
-name in
self.
-_
skip
-_properties
+Field(name)
:%0A
|
fd7e703e17570d08c7277e09261cb919e81a6829 | Delete unused method | app/soc/modules/gci/logic/ranking.py | app/soc/modules/gci/logic/ranking.py | # Copyright 2011 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | Python | 0.000003 | @@ -2494,616 +2494,8 @@
)%0A%0A%0A
-def updateRankingWithTask(task):%0A %22%22%22Updates ranking with the specified task.%0A%0A Args:%0A task: GCITask that has been completed and should be taken into account in%0A the ranking.%0A %22%22%22%0A%0A # get current ranking for the student if it is not specif... |
c44390f45ce5313ed28065d24a9edfe087c599e2 | raise original exception and eventlet.sleep instead of time | packs/elasticsearch/sensors/count_sensor.py | packs/elasticsearch/sensors/count_sensor.py | from st2reactor.sensor.base import PollingSensor
from elasticsearch import Elasticsearch
import json
import time
class ElasticsearchCountSensor(PollingSensor):
def setup(self):
self.host = self.config.get('host', None)
self.port = self.config.get('port', None)
self.query_window = self.con... | Python | 0.000001 | @@ -101,20 +101,24 @@
%0Aimport
-time
+eventlet
%0A%0A%0Aclass
@@ -911,267 +911,37 @@
cept
-:%0A self.LOG.exception(%22Could not connect to elasticsearch. %25s:%25i%22 %25%0A (self.host, self.port))%0A raise Exception(%22Could not connect to elasticsearch. %25s:%2... |
443d435076858cdd63c9e908c606e26e120fa01e | Change celery beat schedule definition. | mozillians/celery.py | mozillians/celery.py | from __future__ import absolute_import
import os
from celery import Celery as BaseCelery
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mozillians.settings')
from django.conf import settings # noqa
RUN_DAILY = 60 * 60 * 24
RUN_HOURLY = 60 * 60
R... | Python | 0 | @@ -841,355 +841,80 @@
)%0A%0A%0A
-@
app.
-on_after_configure.connect%0Adef setup_periodic_tasks(sender, **kwargs):%0A from mozillians.groups.tasks import invalidate_group_membership, notify_membership_renewal%0A from mozillians.users.tasks import (delete_reported_spam_accounts, periodically_send_cis_data,%0A ... |
4aea5f288f4bd677a9ffc8967a6e077b05a47ebc | fix some whitespace | corehq/apps/receiverwrapper/signals.py | corehq/apps/receiverwrapper/signals.py | from casexml.apps.case.signals import case_post_save
from corehq.apps.domain.utils import normalize_domain_name
from receiver.signals import form_received, successful_form_received
import logging
import re
import types
from couchforms.signals import submission_error_received
DOMAIN_RE = re.compile(r'^/a/(\S+)/receiver... | Python | 0.999999 | @@ -2378,28 +2378,17 @@
und_old%0A
-
+%0A
%0Adef _ge
@@ -2548,16 +2548,17 @@
()%5B0%5D)%0A%0A
+%0A
def _get
@@ -2718,16 +2718,17 @@
s()%5B0%5D%0A%0A
+%0A
def add_
@@ -2899,24 +2899,25 @@
to_update%0A%0A
+%0A
def add_expo
@@ -3034,24 +3034,25 @@
eturn True%0A%0A
+%0A
def add_app_
@@ -3171,16 +3171... |
1c94bd390e3fee24a00060e1f2f2df2c6818c1d5 | Fix deferred_format kwargs access && typing | src/hades/config/compute.py | src/hades/config/compute.py | from typing import Union
from hades.config.base import (
Compute, ConfigOptionError, MissingOptionError, Option, coerce, option_reference,
)
class equal_to(Compute):
def __init__(self, other: Union[str, type(Option)]):
super().__init__()
self.other_name = coerce(other)
if not isinstan... | Python | 0.000007 | @@ -207,32 +207,32 @@
on%5Bstr, type
-(
+%5B
Option
-)
+%5D
%5D):%0A
@@ -1314,19 +1314,16 @@
ring, *a
-rgs
: Union%5B
@@ -1331,24 +1331,24 @@
tr, type
-(
+%5B
Option
-)
+%5D
%5D,%0A
@@ -1363,20 +1363,16 @@
**kw
-args
: Union%5B
@@ -1384,16 +1384,16 @@
type
-(
+%5B
Option
-)
+%5D
%5D):%0A
@... |
4c2b84f4ea56dbc4ab2d43a8f3676ee8e48c2fc1 | Remove unused import | src/hades/config/compute.py | src/hades/config/compute.py | import types
from typing import Union
from hades.config.base import (
Compute, ConfigOptionError, MissingOptionError, Option, coerce, option_reference,
)
class equal_to(Compute):
def __init__(self, other: Union[str, type(Option)]):
super().__init__()
self.other_name = coerce(other)
if... | Python | 0.000001 | @@ -1,17 +1,4 @@
-import types%0A
from
|
ea7d15e6a8b87bf08518786a345ffd9556aeecbf | allow 20MB upload | sweettooth/settings.py | sweettooth/settings.py | """
Django settings for sweettooth project.
For the full list of settings and their values, see
https://docs.djangoproject.com/en/stable/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import dj_database_url
SITE_ROOT = os.path.dirname(os.path.abspath(__file__))
B... | Python | 0 | @@ -4721,16 +4721,98 @@
orage'%0A%0A
+DATA_UPLOAD_MAX_MEMORY_SIZE = int(os.getenv('EGO_MAX_UPLOAD', 20 * 1024 * 1024))%0A%0A
ACCOUNT_
|
23b76d2aace3b64487c4715cbc2371c5eb7b80f4 | Fix royalroadl.com chapter dates | sites/royalroad.py | sites/royalroad.py | #!/usr/bin/python
import http.client
import logging
import datetime
import re
import urllib
from . import register, Site, Section, Chapter
logger = logging.getLogger(__name__)
@register
class RoyalRoad(Site):
"""Royal Road: a place where people write novels, mostly seeming to be light-novel in tone."""
@sta... | Python | 0.000001 | @@ -1349,24 +1349,145 @@
a-url'))))%0A%0A
+ # Have to get exact publishing time from the chapter page%0A chapter_soup = self._soup(chapter_url)%0A
@@ -1552,24 +1552,57 @@
int(chapter
+_soup.find(class_=%22profile-info%22)
.find('time'
|
7a59903500bd766cd51aca28f679c846bc59389b | read url parameter per request | catkin/src/portal_config/scripts/serve_config.py | catkin/src/portal_config/scripts/serve_config.py | #!/usr/bin/env python
import rospy
import urllib2
from portal_config.srv import *
# XXX TODO: return an error if the config file isn't valid JSON
class ConfigRequestHandler():
def __init__(self, url):
self.url = url
def get_config(self):
response = urllib2.urlopen(self.url)
return re... | Python | 0 | @@ -77,16 +77,161 @@
port *%0A%0A
+NODE_NAME = 'portal_config'%0ASRV_QUERY = '/'.join(('', NODE_NAME, 'query'))%0APARAM_URL = '~url'%0ADEFAULT_URL = 'http://lg-head/portal/config.json'%0A%0A
# XXX TO
@@ -329,51 +329,77 @@
def
-__init__(self, url):%0A self.url = url
+get_url(self):%0A return rospy.get_... |
17d258d6442bae09b69fd923843c3d74cfe57d0e | Eliminate old Earth class | skyfield/jpllib.py | skyfield/jpllib.py | """n interface between JPL ephemerides and Skyfield."""
import jplephem
from jplephem.spk import SPK
from jplephem.names import target_names as _names
from numpy import max, min
from .constants import AU_KM, C_AUDAY, DAY_S
from .ephemerislib import Body, Segment
from .functions import length_of
from .positionlib impo... | Python | 0.999997 | @@ -5073,545 +5073,4 @@
n g%0A
-%0Aclass Earth(Planet):%0A%0A def topos(self, latitude=None, longitude=None, latitude_degrees=None,%0A longitude_degrees=None, elevation_m=0.0):%0A %22%22%22Return a %60%60Topos%60%60 object for a specific location on Earth.%22%22%22%0A t = Topos(latitude, ... |
0406cc1352cbdec15c8a885e3c875ea94e3677a5 | add post_message method to client | slackrtm/client.py | slackrtm/client.py | #!/usr/bin/python
# mostly a proxy object to abstract how some of this works
import json
from .server import Server
class SlackClient(object):
def __init__(self, token):
self.token = token
self.server = Server(self.token, False)
def rtm_connect(self):
self.server.rtm_connect()
d... | Python | 0.000001 | @@ -1027,24 +1027,327 @@
e(message)%0A%0A
+ def post_message(self, channel_id, message, **kwargs):%0A params = %7B%0A %22post_data%22: %7B%0A %22text%22: message,%0A %22channel%22: channel_id,%0A %7D%0A %7D%0A params%5B%22post_data%22%5D.updat... |
ba77b9a4fc56fe979cd709c584f055370db5d153 | Update __init__.py to reflect renaming. | sleuth/__init__.py | sleuth/__init__.py | """
Sleuth: A debugging and diagnostic tool for Python.
------
"""
import sys
if sys.version_info[:2] < (3, 0):
raise ImportError("Sleuth requires Python 3.")
del sys
__version__ = '0.2.0d'
from .__main__ import main
from .error import *
from .inject import *
from .sleuth import *
| Python | 0 | @@ -270,14 +270,12 @@
om .
-sleuth
+wrap
imp
|
2ba9eaba0bcb229055db09147f1cb654190badbf | Use a list for the style cycle so that subsequent calls to the plotting functions don't mix up the line styles. | notebooks/style_helpers.py | notebooks/style_helpers.py | import brewer2mpl
import itertools
from cycler import cycler
cmap = brewer2mpl.get_map('Set1', 'Qualitative', 5, reverse=False)
color_cycle = cycler('color', cmap.hex_colors)
marker_cycle = cycler('marker', ['s', '^', 'o', 'D', 'v'])
markersize_cycle = cycler('markersize', [10, 12, 11, 10, 12])
style_cycle = itertool... | Python | 0 | @@ -15,25 +15,8 @@
mpl%0A
-import itertools%0A
from
@@ -38,16 +38,22 @@
cycler%0A%0A
+N = 5%0A
%0Acmap =
@@ -94,17 +94,17 @@
ative',
-5
+N
, revers
@@ -298,23 +298,12 @@
e =
-itertools.cycle
+list
(col
@@ -345,16 +345,20 @@
e_cycle)
+%5B:N%5D
%0A%0Acmap =
@@ -784,16 +784,20 @@
_fig7 =
+list
(color_c
@@ ... |
1c5d204096947658feef7fa19479961727a4af9a | Fix #519 | raven/contrib/celery/__init__.py | raven/contrib/celery/__init__.py | """
raven.contrib.celery
~~~~~~~~~~~~~~~~~~~~
>>> class CeleryClient(CeleryMixin, Client):
>>> def send_encoded(self, *args, **kwargs):
>>> "Errors through celery"
>>> self.send_raw.delay(*args, **kwargs)
>>> @task(routing_key='sentry')
>>> def send_raw(*args, **kwargs):
>>> return super(clien... | Python | 0.000001 | @@ -1623,20 +1623,16 @@
ogger()%0A
-
hand
@@ -1659,28 +1659,24 @@
client)%0A
-
-
handler.setL
@@ -1695,20 +1695,16 @@
.ERROR)%0A
-
hand
|
1c51fc78e072eee4bd62964ff71629f13e200975 | fix Python ModuleLinkTest | src/test/python/testModuleLink.py | src/test/python/testModuleLink.py | #
# This file is 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, software
# distr... | Python | 0.000007 | @@ -612,16 +612,54 @@
smvPy%0A%0A
+from fixture.stage2.links import L,B%0A%0A
import u
@@ -1167,76 +1167,8 @@
()%0A%0A
- @unittest.skip(%22temporarily ignore due to datasethash problem%22)%0A
@@ -1282,36 +1282,15 @@
ule(
-'mod:fixture.stage2.links.L'
+L.urn()
)%0A
@@ -1451,36 +1451,15 @@
ule(
-'mod:fi... |
4a611e68ccc5db0e7bd1763d6eeffaecc8e8cb62 | Drop Py2 and six on salt/beacons/twilio_txt_msg.py | salt/beacons/twilio_txt_msg.py | salt/beacons/twilio_txt_msg.py | # -*- coding: utf-8 -*-
"""
Beacon to emit Twilio text messages
"""
# Import Python libs
from __future__ import absolute_import, unicode_literals
import logging
from salt.ext import six
from salt.ext.six.moves import map
# Import 3rd Party libs
try:
import twilio
# Grab version, ensure elements are ints
... | Python | 0 | @@ -1,28 +1,4 @@
-# -*- coding: utf-8 -*-%0A
%22%22%22%0A
@@ -41,188 +41,23 @@
%22%22%22%0A
-%0A# Import Python libs%0Afrom __future__ import absolute_import, unicode_literals%0A%0Aimport logging%0A%0Afrom salt.ext import six%0Afrom salt.ext.six.moves import map%0A%0A# Import 3rd Party libs
+import logging%0A
%0Atry... |
0f4290101e300c179de532d0cf7ae5133602b7d9 | Update the default CLANG_USER_VISIBLE_VERSION to 6.0.0 | utils/build_swift/defaults.py | utils/build_swift/defaults.py | # This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for the list of ... | Python | 0.000001 | @@ -1133,9 +1133,9 @@
on('
-5
+6
.0.0
|
d99377dc78efb20ce5fd27c0f7f5b3d0c4dfdbf9 | Fix discover_test get_skills_dir() | test/integrationtests/skills/discover_tests.py | test/integrationtests/skills/discover_tests.py | # Copyright 2017 Mycroft AI Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | Python | 0 | @@ -636,16 +636,34 @@
t exists
+, join, expanduser
%0Aimport
@@ -2124,16 +2124,27 @@
return
+expanduser(
sys.argv
@@ -2148,10 +2148,13 @@
rgv%5B
+-
1%5D
+)%0A
%0A
@@ -2161,16 +2161,87 @@
return
+expanduser(join(Configuration.get()%5B'data_dir'%5D,%0A
Configur
@@ -2281,16 +2281,18 ... |
08bcc2b60ead91d9c0e2492338e2b360edd88def | update jsonp middleware for 1.3 cache framework | cwod_site/cwod_api/middleware/jsonp.py | cwod_site/cwod_api/middleware/jsonp.py | import re
class JSONPMiddleware(object):
'''
Middleware to handle jsonp requests on projects while still providing for
caching of content. What happens here is:
1. Some page makes a jquery $.getJSON request to foo.json?callback=? on projects
2. jquery replaces callback=? with callback=foo, where ... | Python | 0 | @@ -2,16 +2,30 @@
mport re
+%0Aimport urllib
%0A%0Aclass
@@ -997,95 +997,8 @@
'%5D%0A%0A
- # key path before mutating the GET dict%0A print request.get_full_path()%0A%0A
@@ -1303,44 +1303,75 @@
#
-key path after mutating the GET dict
+Update request.META with our new querystring. Cache keys ... |
a68df85c1124331003d69c6da7fcdfe2cbd279e5 | Fix versioning | polyglotdb/__init__.py | polyglotdb/__init__.py | __ver_major__ = 1
__ver_minor__ = 1
__ver_patch__ = '3a'
__version__ = f"{__ver_major__}.{__ver_minor__}.{__ver_patch__}"
__all__ = ['query', 'io', 'corpus', 'config', 'exceptions', 'CorpusContext', 'CorpusConfig']
import polyglotdb.query.annotations as graph
import polyglotdb.io as io
import polyglotdb.corpus as c... | Python | 0.000002 | @@ -23,25 +23,25 @@
r_minor__ =
-1
+2
%0A__ver_patch
@@ -50,9 +50,9 @@
= '
-3
+0
a'%0A_
|
e8b2389099b4586d85725f4dc30fe3d1aceb6101 | Update testrail_client.py | testrail_reporting/testrail/testrail_client.py | testrail_reporting/testrail/testrail_client.py | # TestRail API binding (API v2, available since TestRail 3.0)
#
# Learn more:
# http://docs.gurock.com/testrail-api2/start
# http://docs.gurock.com/testrail-api2/accessing
import logging
import time
import aiohttp
log = logging.getLogger(__name__)
class TestRailClient(object):
def __init__(self, base_url, user... | Python | 0.000001 | @@ -2313,21 +2313,16 @@
0.status
-_code
%7D%5Cn%22%0A
|
29ee35ff47325ce3fadd958d4be0af0fd9762bc7 | Remove hardcoded c++11 compiler flags | scipy/optimize/_highs/setup.py | scipy/optimize/_highs/setup.py |
import sys
import pathlib
from datetime import datetime
def _get_sources(CMakeLists, start_token, end_token):
# Read in sources from CMakeLists.txt
CMakeLists = pathlib.Path(__file__).parent / CMakeLists
with open(CMakeLists, 'r') as f:
s = f.read()
# Find block where sources are listed
... | Python | 0.000006 | @@ -51,16 +51,254 @@
tetime%0A%0A
+def pre_build_hook(build_ext, ext):%0A from scipy._build_utils.compiler_helper import get_cxx_std_flag%0A std_flag = get_cxx_std_flag(build_ext._cxx_compiler)%0A if std_flag is not None:%0A ext.extra_compile_args.append(std_flag)%0A
%0Adef _ge
@@ -2670,325 +2670,8 @@... |
1e10b75c5ea884b6bd1e20ce001af33cf70b87b8 | Move token address rate limit to start of function, client check still happens later | oauthclientbridge/views.py | oauthclientbridge/views.py | from flask import jsonify, render_template_string, request, session
from oauthclientbridge import app, crypto, db, oauth, rate_limit
# Disable caching, and handle OAuth error responses automatically.
app.after_request(oauth.nocache)
app.register_error_handler(oauth.Error, oauth.error_handler)
@app.route('/')
def au... | Python | 0 | @@ -2862,24 +2862,212 @@
n needed.%22%22%22
+%0A if rate_limit.check(request.remote_addr):%0A app.logger.warning('Rate limiting token: %25s', request.remote_addr)%0A raise oauth.Error('invalid_request', 'Too many requests.')
%0A%0A if req
@@ -3938,22 +3938,10 @@
-client_limit =
+if
rat
@@ ... |
7ed907a2936d04dc63ea334d9c4362bd98925120 | initialize child table | tests/aggregate/test_join_table_inheritance.py | tests/aggregate/test_join_table_inheritance.py | from decimal import Decimal
import pytest
import sqlalchemy as sa
from sqlalchemy_utils.aggregates import aggregated
@pytest.fixture
def Product(Base):
class Product(Base):
__tablename__ = 'product'
id = sa.Column(sa.Integer, primary_key=True)
name = sa.Column(sa.Unicode(255))
pr... | Python | 0.000023 | @@ -2255,16 +2255,19 @@
_models(
+Any
Product,
|
1449131d87e3def4bd23835dd37d9f4744f2f62d | revert hostname calculation due to changed upgrade process | octane/commands/cleanup.py | octane/commands/cleanup.py | # 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, software
# distributed under t... | Python | 0 | @@ -1471,120 +1471,124 @@
-data = %22%22%0A for node in env_util.get_controllers(env):%0A data = data + node.data%5B'fqdn'%5D + %22%5Cn%22%0A
+with ssh.popen(command, node=controller, stdin=ssh.PIPE) as proc:%0A roles = %5B%22controller%22, %22compute%22%5D%0A
@@ -1631,19 +1... |
829c051ee4cc25b7dffc60147090f095207ebe96 | update TestProgressMonitor | tests/unit/ProgressBar/test_ProgressMonitor.py | tests/unit/ProgressBar/test_ProgressMonitor.py | from AlphaTwirl.ProgressBar import ProgressReporter, Queue, ProgressMonitor
import unittest
##__________________________________________________________________||
class MockPresentation(object):
def __init__(self): self.reports = [ ]
def present(self, report): self.reports.append(report)
##___________________... | Python | 0.000001 | @@ -852,23 +852,25 @@
ef test_
-monitor
+begin_end
(self):%0A
@@ -975,23 +975,43 @@
monitor.
+begin()%0A
monitor
+.end
()%0A%0A
|
e3f9250acbb4db849e97158780ace3dc9b37873c | add missing import | okupy/common/encryption.py | okupy/common/encryption.py | from Crypto.Cipher import AES
from django.conf import settings
import base64
import hashlib
import os
import string
def sha1_password(password):
'''
Create a SHA1 salted hash
'''
salt = os.urandom(4)
h = hashlib.sha1(password)
h.update(salt)
return "{SSHA}" + base64.encodestring(h.digest() ... | Python | 0.000042 | @@ -56,16 +56,42 @@
ettings%0A
+from random import choice%0A
import b
|
6a6c5d9c12308cc6638aa5139bf6e7eeb84256df | Bump version after release | openscap_daemon/version.py | openscap_daemon/version.py | # Copyright 2015 Red Hat Inc., Durham, North Carolina.
# All Rights Reserved.
#
# openscap-daemon is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 2.1 of the License, or
# (at your option)... | Python | 0.000001 | @@ -850,9 +850,9 @@
H =
-7
+8
%0A%0AVE
|
08a797d340b73555f3c91a04782b5bab1dbafd0f | remove unused import pandas | cea/plots/life_cycle/primary_energy_intensity.py | cea/plots/life_cycle/primary_energy_intensity.py | from __future__ import division
from __future__ import print_function
import pandas as pd
import plotly.graph_objs as go
from plotly.offline import plot
import cea.plots.life_cycle
from cea.plots.variable_naming import LOGO, COLOR, NAMING
__author__ = "Jimeno A. Fonseca"
__copyright__ = "Copyright 2018, Architecture ... | Python | 0.000001 | @@ -68,28 +68,8 @@
on%0A%0A
-import pandas as pd%0A
impo
|
0474427dd6aee36e09c481423356d3eab092600d | Tweak JSON concepts in TF tensor_codec | src/tfi/driver/tf/tensor_codec.py | src/tfi/driver/tf/tensor_codec.py | import tensorflow as tf
import numpy as np
import mimetypes
from tfi.tensor.codec import ShapeMismatchException as _ShapeMismatchException
from tfi.base import _recursive_transform
import tensorflow as tf
_DECODERS = {}
def _register_decoder(_mimetypes):
def _register(func):
for mimetype in _mimetypes:
... | Python | 0 | @@ -5666,32 +5666,44 @@
%5Bnp.float32
+, np.ndarray
%5D,%0A %5BNone
@@ -5774,191 +5774,4 @@
t()%0A
-%0A@_register_encoder(%0A %5B%22python/jsonable%22%5D,%0A %5Bobject%5D,%0A %5B(None)%5D)%0Adef _jsonable_encode(tensor):%0A return %5Bo.decode() if isinstance(o, bytes) else o for o... |
f476a790be39b62d52132a4587f33b947c297909 | add hashtable | appveyor/upload_googlebenchmark_result.py | appveyor/upload_googlebenchmark_result.py | import matplotlib
matplotlib.use('Agg')
import argparse
import matplotlib.pyplot as plt
import numpy as np
import os
import pandas as pd
import subprocess
def setup_args():
parser = argparse.ArgumentParser()
parser._action_groups.pop()
requiredArguments = parser.add_argument_group('required arguments')
... | Python | 0.000088 | @@ -2961,10 +2961,9 @@
sex=
-10
+2
)%0A
|
784c316b8edf5459c1e9805bd5303d3d0005257d | Set new rules templates name on generic view list | opps/views/generic/list.py | opps/views/generic/list.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.core.exceptions import ImproperlyConfigured
from django.views.generic.list import ListView as DjangoListView
from django.contrib.sites.models import get_current_site
from django.utils import timezone
from django.conf import settings
from opps.views.generic.base... | Python | 0 | @@ -462,19 +462,23 @@
-nam
+templat
es = %5B%5D%0A
@@ -473,16 +473,17 @@
es = %5B%5D%0A
+%0A
@@ -538,236 +538,229 @@
-# look for a different template only if defined in settings%0A # default should be OPPS_PAGINATE_SUFFIX = %22_paginated%22%0A # if set OPPS_PAGINATE_NOT_APP =... |
f38d930b0bcc7ca27bc06e9818d68f88089ac33f | Update suffix | scripts/generate_submission.py | scripts/generate_submission.py | #!/usr/bin/env python
import pandas as pd
from sklearn.preprocessing import LabelEncoder
from xgboost.sklearn import XGBClassifier
from utils.io import generate_submission
def main():
path = '../data/processed/'
prefix = 'processed_'
suffix = '1'
train_users = pd.read_csv(path + prefix + 'train_users... | Python | 0.000009 | @@ -252,17 +252,17 @@
ffix = '
-1
+4
'%0A tr
|
8336b7090dcefe19116a63f22e9799d7f5b926e9 | Disable building the 2.0 profile in mono-basic. | packages/mono-basic.py | packages/mono-basic.py | GitHubTarballPackage ('mono', 'mono-basic', '3.0', 'a74642af7f72d1012c87d82d7a12ac04a17858d5',
configure = './configure --prefix="%{prefix}"',
override_properties = { 'make': 'make' }
)
| Python | 0 | @@ -49,48 +49,48 @@
', '
-a74642af7f72d1012c87d82d7a12ac04a17858d5
+bd316e914e1a230c29b5d637239334df41a79c7f
',%0A%09
@@ -134,16 +134,35 @@
prefix%7D%22
+ --with-profile2=no
',%0A%09over
|
74ae937ba4d13acf49f9df0fa33579f2b5d07177 | Bump version | src/ikpy/_version.py | src/ikpy/_version.py | __version__ = '3.0.1'
| Python | 0 | @@ -14,9 +14,10 @@
'3.
-0.1
+1dev
'%0A
|
4f32f46484cb208c9fd3d90bd249b57d649aed06 | fix wrong size output | voctogui/lib/videopreviews.py | voctogui/lib/videopreviews.py | import logging
from gi.repository import Gst, Gtk
from lib.config import Config
from lib.videodisplay import VideoDisplay
import lib.connection as Connection
class VideoPreviewsController(object):
""" Displays Video-Previews and selection Buttons for them """
def __init__(self, drawing_area, win, uibuilder):
sel... | Python | 0.998459 | @@ -853,37 +853,38 @@
figured to %25u',
-width
+height
)%0A%09%09except:%0A%09%09%09h
@@ -951,29 +951,30 @@
ted to %25u',
-width
+height
)%0A%0A%09%09# Accel
|
3910675ef42fb7978c2bcbaa8943eebbfaf4e1af | add test for MemoryRequestIdStore | plenum/test/client/test_request_id_store.py | plenum/test/client/test_request_id_store.py | import pytest
from plenum.client.request_id_store import FileRequestIdStore
import os
from plenum.test.conftest import tdir
import random
def test_file_request_id_store(tdir):
# creating tem file
os.mkdir(tdir)
storeFileName = "test_file_request_id_store_{}".format(random.random())
storeFilePath = os.p... | Python | 0 | @@ -50,34 +50,17 @@
import
-FileRequestIdStore
+*
%0Aimport
@@ -115,16 +115,390 @@
random%0A%0A
+def check_request_id_store(store: RequestIdStore):%0A for signerIndex in range(3):%0A signerId = %22signer-id-%7B%7D%22.format(signerIndex)%0A assert store.currentId(signerId) is None%0A for re... |
b719da732665283b28ff9a3467755e62e5709810 | Change the calculation of scores | prediction/explorer.py | prediction/explorer.py | from . import support
from . import tuner
from .learner import Learner
from .random import Random
import glob
import numpy as np
import os
import re
import threading
class Explorer:
def __init__(self, input, config):
self.input = input
self.config = config.learner
self.first = True
... | Python | 0.99972 | @@ -4118,13 +4118,11 @@
np.
-mean(
+sum
(err
@@ -4136,12 +4136,8 @@
cay)
-**2)
%0A
|
ed9a21b33f1aaaaa9fcaae4a24c6bd27c3ad7646 | Use JAVA8_HOME for server upgrade | prestoadmin/package.py | prestoadmin/package.py | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | Python | 0 | @@ -3003,24 +3003,25 @@
host)%0A%0A%0Adef
+_
rpm_install(
@@ -3024,57 +3024,22 @@
all(
-rpm_name):%0A _LOGGER.info(%22Installing the rpm%22)
+package_path):
%0A
@@ -3196,374 +3196,357 @@
s' %25
-%0A (nodeps, os.path.join(constants.REMOTE_PACKAGES_PATH,%0A ... |
9a457862693f32d2cc8c46d8a0525dcad0e286fc | Add scar path to pythonpath | scar/scarcli.py | scar/scarcli.py | #! /usr/bin/python
# Copyright (C) GRyCAP - I3M - UPV
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | Python | 0.000015 | @@ -591,18 +591,16 @@
cense.%0A%0A
-#
import s
@@ -602,18 +602,16 @@
ort sys%0A
-#
sys.path
|
6662245f47d032e6617fba77307c23219c91b84c | Use utc timestamps | scrapi/tasks.py | scrapi/tasks.py | import os
import logging
from dateutil import parser
from datetime import datetime
from celery import Celery
from scrapi import settings
from scrapi import processing
from scrapi.util import import_consumer
from scrapi.util.storage import store
from scrapi.linter.document import RawDocument
app = Celery()
app.confi... | Python | 0.999511 | @@ -1195,16 +1195,19 @@
atetime.
+utc
now().is
|
f8afe612d39b8c39c031a2aa0ccafe38bb85ef83 | Update test cases. | test/core/services/test_service_meta.py | test/core/services/test_service_meta.py | from threading import Event, Thread
from app.core.messaging import Receiver, Sender
from app.core.services import EventDrivenService, Capability
from app.core.services import BaseService, BackgroundThreadServiceStart
from app.services.messaging import MessageService
CONFIG = {
"redis_config": {
"USE_FAKE... | Python | 0 | @@ -30,16 +30,31 @@
Thread%0A%0A
+import pytest%0A%0A
from app
@@ -92,16 +92,40 @@
, Sender
+, SchemaValidationFailed
%0Afrom ap
@@ -171,90 +171,19 @@
ce,
-Capability%0Afrom app.core.services import BaseService, BackgroundThreadServiceStart
+BaseService
%0Afro
@@ -470,16 +470,51 @@
kwargs)%0A
+ self.valu... |
6811454b3bdbcd5f31c0f2e021a6807b50ea41a6 | Update the test_verifier code. | atlassian_jwt_auth/tests/test_verifier.py | atlassian_jwt_auth/tests/test_verifier.py | import datetime
import unittest
import mock
from ..signer import JWTAuthSigner
from ..verifier import JWTAuthVerifier
from .utils import (
get_new_rsa_private_key_in_pem_format,
get_public_key_pem_for_private_key_pem,
RS256KeyTestMixin,
ES256KeyTestMixin,
)
class BaseJWTAuthVerifierTest(object):
... | Python | 0 | @@ -438,16 +438,30 @@
vate_key
+_in_pem_format
()%0A
@@ -4672,17 +4672,19 @@
rifierRS
-A
+256
Test(%0A
@@ -4718,18 +4718,13 @@
-PrivateRSA
+RS256
KeyT
@@ -4790,20 +4790,20 @@
erifierE
-CDSA
+S256
Test(%0A
@@ -4837,20 +4837,13 @@
-PrivateECDSA
+ES256
KeyT
|
69b8805fdaf6b6a885904696ccf9e25885de6edf | fix keyboard interrupt handler | unit_tests/web_tests/web_test_setup_cleanup.py | unit_tests/web_tests/web_test_setup_cleanup.py | from selenium import webdriver
from cloudscheduler.unit_tests.unit_test_common import load_settings
import subprocess
import signal
# This module contains setup and cleanup functions for the unittest web tests.
# Setups and cleanups are done here to prevent issues of passing variables
# between test runners and to all... | Python | 0.000011 | @@ -951,27 +951,86 @@
-cleanup(cls
+if hasattr(cls, 'driver') and cls.driver:%0A cls.driver.quit(
)%0A
@@ -3497,17 +3497,17 @@
up'%5D%5D%5D,
-3
+5
)%0A de
@@ -5011,16 +5011,36 @@
bjects()
+%0A raise Exception
%0A%0Asignal
|
5758912f86f73a019e7df309aea5bc1bcd7516e5 | Make some broadcast admin fields editable. | avalonstar/components/broadcasts/admin.py | avalonstar/components/broadcasts/admin.py | # -*- coding: utf-8 -*-
from django.contrib import admin
from .models import Broadcast, Series
class BroadcastAdmin(admin.ModelAdmin):
list_display = ['number', 'airdate', 'status', 'series']
list_display_links = ['number', 'airdate']
raw_id_fields = ['games', 'series']
autocomplete_lookup_fields = ... | Python | 0 | @@ -188,24 +188,76 @@
, 'series'%5D%0A
+ list_editable = %5B'airdate', 'status', 'series'%5D%0A
list_dis
|
39b8cb70ffd6be60c6d757ecd4703a3a0ca2a415 | Improve logs and change delete pos | dbaas/workflow/steps/build_database.py | dbaas/workflow/steps/build_database.py | # -*- coding: utf-8 -*-
import logging
from base import BaseStep
from logical.models import Database
LOG = logging.getLogger(__name__)
class BuildDatabase(BaseStep):
def __unicode__(self):
return "Creating logical database..."
def do(self, workflow_dict):
try:
if not workflow_... | Python | 0 | @@ -94,16 +94,32 @@
atabase%0A
+import datetime%0A
%0A%0ALOG =
@@ -609,16 +609,73 @@
infra'%5D)
+%0A%0A LOG.info(%22Database %25s created!%22 %25 database)
%0A
@@ -713,24 +713,71 @@
= database%0A%0A
+ LOG.info(%22Updating database team%22)%0A
@@ -858,16 +858,70 @@
w_dic... |
aeba459b542b7decb547add79be042566c5c9ad0 | Fix to CoreNLP launcher | kindred/Dependencies.py | kindred/Dependencies.py |
import zipfile
import hashlib
import os
import sys
import wget
import subprocess
import shlex
import time
import atexit
from nltk.parse import malt
if sys.version_info >= (3, 0):
import urllib.request
else:
import urllib
def _calcSHA256(filename):
return hashlib.sha256(open(filename, 'rb').read()).hexdigest()
de... | Python | 0.000049 | @@ -2407,17 +2407,8 @@
ue:%0A
-%09%09#break%0A
%09%09li
@@ -2513,31 +2513,36 @@
%09if
-'listening at' in line:
+line.find('listening') != -1
%0A%09%09%09
|
0de277c18b1f0a99f515430f45031071af8e7ea3 | improve test | test/mitmproxy/console/test_flowlist.py | test/mitmproxy/console/test_flowlist.py | import mitmproxy.tools.console.flowlist as flowlist
from mitmproxy.tools import console
from mitmproxy import proxy
from mitmproxy import options
from .. import tservers
from unittest import mock
class TestFlowlist(tservers.MasterTest):
def mkmaster(self, **opts):
if "verbosity" not in opts:
o... | Python | 0.000023 | @@ -1,16 +1,43 @@
+from unittest import mock%0A%0A
import mitmproxy
@@ -170,99 +170,28 @@
ons%0A
-from .. import tservers%0Afrom unittest import mock%0A%0A%0Aclass TestFlowlist(tservers.MasterTest)
+%0A%0Aclass TestFlowlist
:%0A
|
47a3f587b2530f9c46b5b7db5df52fb3999b8f2d | Change Model | taOonja/game/models.py | taOonja/game/models.py | import os
from django.db import models
#def get_image_path(filename):
# return os.path.join('media')
class Location(models.Model):
name = models.CharField(max_length=250)
local_name = models.CharField(max_length=250)
visited = models.BooleanField(default=False)
def __str__(self):
return s... | Python | 0.000001 | @@ -38,74 +38,8 @@
ls%0A%0A
-#def get_image_path(filename):%0A# return os.path.join('media')%0A%0A
clas
@@ -210,86 +210,8 @@
lse)
-%0A%0A def __str__(self):%0A return self.name%0A%0Aclass Detail(models.Model):
%0A
@@ -381,97 +381,8 @@
ue)%0A
- location = models.OneToOneField(Location, on_delete=... |
c7aaee482440608453ba9f6472f9600ff7b55653 | Add module documentation and extra functions | fpkit.py | fpkit.py | """
fpkit
Functional programming toolkit for Python.
"""
__author__ = "Mark Shroyer"
__email__ = "code@markshroyer.com"
__version__ = 0.1
import inspect
class Comp:
"""@composable function decorator
Converts a regular Python function into one which can be composed with
other Python functions using ... | Python | 0 | @@ -1,57 +1,825 @@
%22%22%22%0A
-fpkit%0A%0AFunctional programming toolkit for Python.
+Functional programming toolkit for Python%0A%0AImplements easy function composition and currying via operator overloads%0Aand some trickery using decorators. This makes it possible to do things%0Alike:%0A%0A @curryable%0A de... |
5e5f3a27c8a9a4e657f1b4ab4fbeae87ff201c8b | allow edit ids for individuals in mme | seqr/utils/model_sync_utils.py | seqr/utils/model_sync_utils.py | from bs4 import BeautifulSoup
from seqr.models import Individual
from seqr.model_utils import find_matching_xbrowse_model
def convert_html_to_plain_text(html_string, remove_line_breaks=False):
"""Returns string after removing all HTML markup.
Args:
html_string (str): string with HTML markup
... | Python | 0 | @@ -821,26 +821,8 @@
_id'
-, family.family_id
)%0A%0A%0A
@@ -931,34 +931,8 @@
_id'
-, individual.individual_id
)%0A%0A%0A
@@ -977,27 +977,16 @@
y_id_key
-, entity_id
):%0A b
@@ -1250,501 +1250,4 @@
y))%0A
- if project.is_mme_enabled:%0A filter_key = 'family__family_id' if entity_id_key == 'family_id... |
9239f52312e30ce6b55f111af1072a75d548650e | clean up doc | cement/core/hook.py | cement/core/hook.py | """Methods and classes to handle Cement Hook support."""
from cement import hooks
from cement.core.exc import CementRuntimeError
from cement.core.log import get_logger
log = get_logger(__name__)
def clear_hooks():
hooks = {}
def define_hook(name):
"""
Define a hook namespace that plugins can registe... | Python | 0 | @@ -1157,16 +1157,17 @@
e used.%0A
+%0A
Usag
|
ff71ca42d7b3e8fdd04d8a9d74a24a04c1fec494 | Move GSSAPI credcache from authorization config section to accounts | certidude/config.py | certidude/config.py |
import click
import codecs
import configparser
import ipaddress
import os
import string
from random import choice
from urllib.parse import urlparse
cp = configparser.ConfigParser()
cp.readfp(codecs.open("/etc/certidude/server.conf", "r", "utf8"))
AUTHENTICATION_BACKENDS = set([j for j in
cp.get("authentication",... | Python | 0 | @@ -529,16 +529,128 @@
, ldap%0A%0A
+if ACCOUNTS_BACKEND == %22ldap%22:%0A LDAP_GSSAPI_CRED_CACHE = cp.get(%22accounts%22, %22ldap gssapi credential cache%22)%0A%0A
USER_SUB
@@ -3027,93 +3027,8 @@
ND:%0A
- LDAP_GSSAPI_CRED_CACHE = cp.get(%22authorization%22, %22ldap gssapi credential cache%22)%0A
|
1cbe86ed9aa8123cf91fb06b0199a9ac797c6419 | fix building manual | cfg/mutt/install.py | cfg/mutt/install.py | from dotinstall import packages
from dotinstall import util
def run():
packages.try_install('neomutt')
packages.try_install('w3m')
util.create_file('~/.mutt/certificates')
util.create_dir('~/.mutt/cache/bodies')
util.create_dir('~/.mutt/cache/headers')
util.create_symlink('./file_email', '~/.m... | Python | 0 | @@ -134,16 +134,89 @@
('w3m')%0A
+ packages.try_install('lynx')%0A packages.try_install('docbook-xsl')%0A
util
|
b6a60b0c62547b5b6f3f1d6e89d0f5bfb798fbb9 | make atlassian errors ignorable | link/wrappers/__init__.py | link/wrappers/__init__.py | """
I don't exactly love that you have to do this. I will look for a new design
"""
from apiwrappers import *
from dbwrappers import *
from nosqlwrappers import *
from consolewrappers import *
from atlassianwrappers import *
from alexawrappers import *
from hivewrappers import *
from elasticsearchwrappers import *
fro... | Python | 0.999254 | @@ -191,40 +191,8 @@
t *%0A
-from atlassianwrappers import *%0A
from
@@ -211,24 +211,24 @@
rs import *%0A
+
from hivewra
@@ -274,24 +274,24 @@
rs import *%0A
-
from liverai
@@ -293,24 +293,176 @@
verailwrappers import *%0A
+import logging%0Atry:%0A from atlassianwrappers import *%0Aexcept:%0A logging.warni... |
802d03af3f1fe1719ff0843690b51b3200c20044 | Remove unused import. | lintreview/tools/black.py | lintreview/tools/black.py | from __future__ import absolute_import
import os
import logging
import lintreview.docker as docker
from lintreview.review import IssueComment
from lintreview.tools import Tool, python_image
log = logging.getLogger(__name__)
class Black(Tool):
name = 'black'
def check_dependencies(self):
"""See if t... | Python | 0 | @@ -172,22 +172,8 @@
Tool
-, python_image
%0A%0Alo
|
5a0114506d71f5c73f2e8eab572dd3922d7233e4 | Add a presubmit check so that no new unit tests in content/ are added to the unit_tests target | chrome/PRESUBMIT.py | chrome/PRESUBMIT.py | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Makes sure that the chrome/ code is cpplint clean."""
INCLUDE_CPP_FILES_ONLY = (
r'.*\.cc$', r'.*\.h$'
)
EXCLUDE = (
# Objective C confuses ever... | Python | 0.000002 | @@ -167,61 +167,203 @@
%0A%22%22%22
-Makes sure that the chrome/ code is cpplint clean.%22%22%22
+Presubmit script for changes affecting chrome/%0A%0ASee http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts%0Afor more details about the presubmit API built into gcl.%0A%22%22%22%0A%0Aimport re
%0A%0A... |
3b6a0a7c97d164b4270b8f247fa68b8b5d6ce1dd | fix reply | backend/src/gosa/backend/routes/system.py | backend/src/gosa/backend/routes/system.py | from gosa.common.hsts_request_handler import HSTSRequestHandler
class State:
system_state = "initializing"
class SystemStateReporter(HSTSRequestHandler):
"""
Return the current system state
"""
_xsrf = None
# disable xsrf feature
def check_xsrf_cookie(self):
pass
def get(se... | Python | 0.00001 | @@ -319,14 +319,8 @@
self
-, path
):%0A
@@ -330,15 +330,19 @@
-return
+self.write(
Stat
@@ -351,13 +351,14 @@
system_state
+)
%0A
|
664ed1cf663010d36b979892d8d37e94a9a3ca98 | Add a title to the graph with the date in it. | graph.py | graph.py | """
Simple code to draw a graph of a day of power.
Requires matplotlib
On Fedora Linux: sudo dnf install python3-matplotlib
Usage: python3 graph.py [csv file name]
If you don't give the file name it will use today's
"""
import csv
import time
import datetime
import sys
import os
import matplotlib
matplotlib.use('Ag... | Python | 0.00002 | @@ -1137,16 +1137,113 @@
(my_fmt)
+%0A%0A title_date = time.strftime(%22%25d-%25b-%25Y%22)%0A plt.title(%22Solar generation on %25s%22 %25 title_date)
%0A plt
|
21a3c3314f1c374100e9670d77bb09a82e3c6230 | Add website to user agent | src/sentry/http.py | src/sentry/http.py | """
sentry.utils.http
~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import sentry
import socket
import requests
import warnings
from django.conf import settings
from django.core.exc... | Python | 0.000001 | @@ -475,14 +475,63 @@
try/
-%25s' %25
+%7Bversion%7D (https://getsentry.com)'.format(%0A version=
sent
@@ -540,16 +540,19 @@
.VERSION
+,%0A)
%0A%0ADISALL
|
055978d6c34ec07267a34146c01ca0c688eea019 | make browse go packages work everywhere | gsdoc.py | gsdoc.py | import gscommon as gs, margo
import sublime, sublime_plugin
import os
DOMAIN = 'GsDoc'
class GsDocCommand(sublime_plugin.TextCommand):
def is_enabled(self):
return gs.is_go_source_view(self.view)
def show_output(self, s):
gs.show_output(DOMAIN+'-output', s, False, 'GsDoc')
def run(self, _, mode=''):
view =... | Python | 0 | @@ -2926,77 +2926,22 @@
%09win
-, view = gs.win_view(None, self.window)%0A%09%09if view is None:%0A%09%09%09return%0A
+ = self.window
%0A%09%09r
|
546d0b4d6a830c1c0aef3d5d7ff1bccd497caa6c | Add the cassandra celery hack to the cassandra processor | scrapi/processing/cassandradb.py | scrapi/processing/cassandradb.py | import json
import logging
from uuid import uuid4
from cassandra.cluster import NoHostAvailable
from cqlengine import columns, Model, connection
from cqlengine.management import sync_table, create_keyspace
from scrapi import settings
from scrapi.processing.base import BaseProcessor
logger = logging.getLogger(__name... | Python | 0.000001 | @@ -44,16 +44,64 @@
uuid4%0A%0A
+from celery.signals import worker_process_init%0A%0A
from cas
@@ -187,16 +187,66 @@
nection%0A
+from cqlengine.connection import cluster, session%0A
from cql
@@ -787,16 +787,284 @@
raise%0A%0A%0A
+def cassandra_init(*args, **kwargs):%0A if cluster is not None:%0A cluster... |
1c363e68dd6b0eb23ccd47a2e720468a80d3db4f | FIX actually call function which triggers unit test | test/test_evaluation/test_evaluation.py | test/test_evaluation/test_evaluation.py | import os
import shutil
import sys
import time
import unittest
import numpy as np
if sys.version_info[0] == 2:
import mock
else:
from unittest import mock
this_directory = os.path.dirname(__file__)
sys.path.append(this_directory)
import pynisher
from smac.tae.execute_ta_run import StatusType
from evaluatio... | Python | 0 | @@ -1184,16 +1184,36 @@
memory)%0A
+ safe_eval()%0A
|
601208270ab02c1cabea4f364c0fe61920e5dda7 | Fix typo | parsl/channels/base.py | parsl/channels/base.py | from abc import ABCMeta, abstractmethod, abstractproperty
class Channel(metaclass=ABCMeta):
""" Define the interface to all channels. Channels are usually called via the execute_wait function.
For channels that execute remotely, a push_file function allows you to copy over files.
.. code:: python
... | Python | 0.999999 | @@ -1901,9 +1901,9 @@
l. T
-H
+h
is i
|
e4c66996d46c8dc0ca1b25dfddb1a48282f0dae0 | Add callback signature to docstring | nupic/research/frameworks/pytorch/modules/common_layers.py | nupic/research/frameworks/pytorch/modules/common_layers.py | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2020, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | Python | 0.000001 | @@ -1732,32 +1732,42 @@
loat or function
+(channels)
%0A %22%22%22%0A lay
@@ -2455,32 +2455,59 @@
loat or function
+(in_features, out_features)
%0A %22%22%22%0A lay
@@ -3074,16 +3074,56 @@
function
+(in_channels, out_channels, kernel_size)
%0A %22%22%22
|
a791367342d8e50ca410ece5d27b48157f8ee50e | version bump | picraftzero/version.py | picraftzero/version.py | version = "0.2.8"
build_string = "beta"
| Python | 0.000001 | @@ -12,9 +12,9 @@
0.2.
-8
+9
%22%0Abu
|
d4445f40d258db4d266933da522d8aa3f0952553 | fix missing units in avg_disk_commit_time | webapp/cbmonitor/constants.py | webapp/cbmonitor/constants.py | LABELS = {
"rebalance_progress": "Rebalance progress, %",
"ops": "Ops per sec",
"cmd_get": "GET ops per sec",
"cmd_set": "SET ops per sec",
"delete_hits": "DELETE ops per sec",
"cas_hits": "CAS ops per sec",
"curr_connections": "Connections",
"curr_items": "Active items",
"mem_used":... | Python | 0.000032 | @@ -855,24 +855,27 @@
commit time
+, s
%22,%0A %22avg_
|
c7d8b7f4fdd61c729164ac40135d929b2cf7a3e7 | Modified hello into greeting function | hello.py | hello.py | print("hello")
| Python | 0.999523 | @@ -1,9 +1,88 @@
-print
+# btn3gj%0A%0Adef greeting(msg):%0A print(msg)%0A%0Aif __name__ == %22__main__%22:%0A greeting
(%22he
@@ -87,8 +87,10 @@
hello%22)%0A
+%0A%0A
|
17c5585dcc4dae8fcec96cced8a765804bf1cf13 | update google.py | lyricsar/plugin/google.py | lyricsar/plugin/google.py |
import string
import sys
import urllib2
import simplejson
import httplib
from bs4 import BeautifulSoup
from setting import GOOGLE_API_URL
from lyricsar.errorlist import errorlist
class google:
response=""
""" this plugin provide link by traverse results of google.com with extra keyword"""
def __init__(self... | Python | 0 | @@ -1,1354 +1,5 @@
-%0Aimport string%0Aimport sys%0Aimport urllib2%0Aimport simplejson%0Aimport httplib%0Afrom bs4 import BeautifulSoup%0Afrom setting import GOOGLE_API_URL%0Afrom lyricsar.errorlist import errorlist%0Aclass google:%0A response=%22%22%0A %22%22%22 this plugin provide link by traverse results of go... |
56821faba1ea126687d186e625d35b65974aa56b | Update hover.py | hover.py | hover.py | import sublime
import sublime_plugin
import json
import os
help_on = True
class EnableHelpCommand(sublime_plugin.WindowCommand):
def run(self, enable_help):
global help_on
help_on = enable_help
class HoverOverCommand(sublime_plugin.EventListener):
def on_hover(self, view, point, hover_zo... | Python | 0 | @@ -1703,16 +1703,43 @@
), 'PPCL
+ Language Syntax and Editor
', filen
|
fc78b7db19234f813e25e27e868c8eb743c1ce7e | allow more specific annotations and called-indirectly-by conditions | httpd.py | httpd.py |
# 't': thread name
# 's': thread state
#
# 'cdb': called directly by
# 'cb': called by
annotations = [
('t', ['cdb', 'listener_thread', 'dummy_worker'], 'MPM child listener thread'),
('t', ['cdb', 'worker_thread', 'dummy_worker'], 'MPM child worker thread'),
('t', ['cdb', 'ap_event_pod_check', 'child_main'], 'MPM chi... | Python | 0.000001 | @@ -267,32 +267,99 @@
%5B'c
-d
+i
b', '
-ap_event_pod_check
+child_main', 'event_run'%5D, 'Event MPM child main thread'),%0A# less specific%0A('t', %5B'is
', '
@@ -407,25 +407,25 @@
't', %5B'c
-d
+i
b', 'ap_
mpm_pod_
@@ -420,61 +420,124 @@
'ap_
-mpm_pod_check', 'child_main'%5D, 'MPM child main thread
+wait_or_t... |
22ad5b4fef0dd0397501ff1dfcf4ea21c1fcb10a | Remove VM reference to server while freeing VMs' resources | simmycloud/core/environment.py | simmycloud/core/environment.py |
from core.server import Server
class Environment:
def __init__(self, environment_builder):
self._builder = environment_builder
self._online_servers = {}
self._offline_servers = {}
self._vm_hosts = {}
self._logger = None
self._config = None
def set_config(self,... | Python | 0 | @@ -2588,32 +2588,78 @@
(), vm.dump()))%0A
+ self._vm_hosts.pop(vm.name, None)%0A
serv
|
5c9f70c80c9b2c1b40b5b46826a92fc6ac5b4a1a | Remove unused module | subiquity/utils.py | subiquity/utils.py | # Copyright 2015 Canonical, Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distribute... | Python | 0 | @@ -754,47 +754,8 @@
pty%0A
-from tornado.process import Subprocess%0A
from
@@ -860,35 +860,8 @@
s%22)%0A
-STREAM = Subprocess.STREAM%0A
%0A%0Ade
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.