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 |
|---|---|---|---|---|---|---|---|
8ba65a15e12bba077d3b7e2c4e4d7ede3e2a7018 | Make hidden methods actually hidden | file_distributor/pcloud_upload.py | file_distributor/pcloud_upload.py | #!/usr/bin/env python3
import configparser
import hashlib
import requests
import sys
import time
config_filename = "file_distributor.cfg"
# Change this to True to enable output debug logging for this module.
print_debug_logs = True
class Logger:
@staticmethod
def __log(log_level, message):
if print_... | Python | 0.000001 | @@ -975,16 +975,17 @@
def
+_
_api_cal
@@ -1043,16 +1043,16 @@
d=None,%0A
-
@@ -2456,16 +2456,17 @@
def
+_
_get_dig
@@ -2498,32 +2498,33 @@
se_body = self._
+_
api_call(%0A
@@ -2919,16 +2919,17 @@
= self._
+_
get_dige
@@ -3296,24 +3296,25 @@
ody = self._
+_
api_call(%0A
@@ -4065,32... |
cde3547d7492049a40858a02b85b054accc6da61 | save image to temp file | background_changer/setbackground.py | background_changer/setbackground.py | #! /usr/bin/python
import ctypes
import os
from os.path import expanduser
import platform
import subprocess
import sys
import time
from threading import Thread
import urllib
image_url = "http://lorempixel.com/1920/1080/";
dest_path = expanduser("~") + "/image.jpg"
PLATFORM_LINUX = "Linux"
PLATFORM_OSX = "Darwin"
PL... | Python | 0 | @@ -113,16 +113,32 @@
ort sys%0A
+import tempfile%0A
import t
@@ -237,51 +237,8 @@
0/%22;
-%0Adest_path = expanduser(%22~%22) + %22/image.jpg%22
%0A%0APL
@@ -1451,16 +1451,69 @@
ound():%0A
+ (fd, filename) = tempfile.mkstemp()%0A try:%0A
down
@@ -1528,27 +1528,30 @@
ge_url,
-dest_path)%0A
+filenam... |
17d88fa2d3b7185a1cb9a6c43a1f1d6d45e8fec0 | change diffios.open to builtins.open | tests/DiffiosConfig_test.py | tests/DiffiosConfig_test.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
try:
from unittest import mock
except ImportError:
from mock import mock
import pytest
THIS_DIR = os.path.dirname(__file__)
sys.path.append(os.path.abspath("."))
from diffios import DiffiosConfig
def test_raises_error_if_config_not_given()... | Python | 0.000002 | @@ -2490,22 +2490,23 @@
.patch('
-diffio
+builtin
s.open',
@@ -2521,21 +2521,8 @@
data
-, create=True
) as
|
38e80cab7cda7a9b56523e244aa0f94be041d0bf | Version bump to v3.0.9 | geomdl/__init__.py | geomdl/__init__.py | """ NURBS-Python Main Component
.. moduleauthor:: Onur Rauf Bingol <orbingol@gmail.com>
"""
__version__ = "3.0.8"
| Python | 0 | @@ -111,7 +111,7 @@
3.0.
-8
+9
%22%0A
|
1d65c0de318426551ffdcda691e90aee67075ee0 | fix Signal instances as selector on mux | hwtHls/allocator/allocator.py | hwtHls/allocator/allocator.py | from typing import Union
from hwt.hdl.operatorDefs import AllOps
from hwt.pyUtils.arrayQuery import grouper
from hwt.synthesizer.interfaceLevel.unitImplHelpers import getSignalName
from hwt.synthesizer.rtlLevel.rtlSignal import RtlSignal
from hwtHls.codeOps import HlsRead, HlsOperation, HlsWrite,\
HlsConst
from hw... | Python | 0.000001 | @@ -389,16 +389,83 @@
epsilon%0A
+from hwt.synthesizer.interfaceLevel.mainBases import InterfaceBase%0A
%0A%0Aclass
@@ -4073,16 +4073,113 @@
s(src)%0A
+ if isinstance(cond, InterfaceBase):%0A cond = cond._sig%0A
|
9b85f61afa8ac10fb122df1814043e413e70d0ea | Deal with non-ascii filenames in import completion. | bpython/importcompletion.py | bpython/importcompletion.py | # The MIT License
#
# Copyright (c) 2009-2010 Andreas Stuehrk
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, mo... | Python | 0 | @@ -1147,16 +1147,53 @@
rt sys%0A%0A
+py3 = sys.version_info%5B:2%5D %3E= (3, 0)%0A
%0A# The c
@@ -3949,32 +3949,188 @@
continue%0A
+ except UnicodeEncodeError:%0A # Happens with Python 3 when there is a filename in some%0A # invalid encoding%0A continue%0A
els... |
7bdc81f8fc1fd069c81eea622ae4f9bc31dcb8d5 | Remove long flag | EasyEuler/commands/list.py | EasyEuler/commands/list.py | import click
from EasyEuler import data
@click.command()
@click.option('--long', '-l', is_flag=True,
help='Include problem descriptions.')
@click.option('--sort', '-s', type=click.Choice(['id', 'difficulty']),
default='id', help='Sort the list by problem attribute.')
def cli(long, sort):
... | Python | 0.000027 | @@ -57,104 +57,8 @@
d()%0A
-@click.option('--long', '-l', is_flag=True,%0A help='Include problem descriptions.')%0A
@cli
@@ -124,16 +124,16 @@
lty'%5D),%0A
+
@@ -208,14 +208,8 @@
cli(
-long,
sort
@@ -369,17 +369,20 @@
lem_
-string =
+list.append(
'Pro
@@ -421,281 +421,8 @@
lem)
-%0A%0A ... |
6ac82f66fc7ba1a8886955db9edb335fbf0187b1 | Change exception for unrecognized element | tests/drivers/test-union.py | tests/drivers/test-union.py | import pyxb.binding.generate
import pyxb.utils.domutils
from xml.dom import Node
import os.path
schema_path = '%s/../schemas/test-union.xsd' % (os.path.dirname(__file__),)
code = pyxb.binding.generate.GeneratePython(schema_file=schema_path)
rv = compile(code, 'test', 'exec')
eval(rv)
from pyxb.exceptions_ import *
... | Python | 0.000001 | @@ -2257,13 +2257,20 @@
ses(
-NotAn
+Unrecognized
Elem
|
ff9b6bdd3f3fdf5491590a9f54bf89f2d7d642fe | use match year in query | helpers/data_fetchers/team_details_data_fetcher.py | helpers/data_fetchers/team_details_data_fetcher.py | import datetime
from google.appengine.ext import ndb
from models.award import Award
from models.event_team import EventTeam
from models.match import Match
class TeamDetailsDataFetcher(object):
@classmethod
def fetch(self, team, year, return_valid_years=False):
"""
returns: events_sorted, ... | Python | 0.000249 | @@ -455,36 +455,24 @@
get_events_
-and_matches_
async():%0A
@@ -1338,25 +1338,16 @@
events
-, matches
= yield
@@ -1382,39 +1382,8 @@
eys)
-, get_matches_async(event_keys)
%0A
@@ -1408,33 +1408,22 @@
.Return(
-(
events
-, matches)
)%0A%0A
@@ -1472,91 +1472,11 @@
ync(
-event_keys
):%0A
- ... |
bc2ba8e1c8c988ae24f6961ce64187782f5ba32d | Add missing type declaration to AsusWrt Scanner Entity (#69773) | homeassistant/components/asuswrt/device_tracker.py | homeassistant/components/asuswrt/device_tracker.py | """Support for ASUSWRT routers."""
from __future__ import annotations
from homeassistant.components.device_tracker import SOURCE_TYPE_ROUTER
from homeassistant.components.device_tracker.config_entry import ScannerEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, ... | Python | 0 | @@ -522,16 +522,32 @@
r import
+ AsusWrtDevInfo,
AsusWrt
@@ -553,16 +553,16 @@
tRouter%0A
-
%0ADEFAULT
@@ -1162,38 +1162,58 @@
ef add_entities(
+%0A
router
+: AsusWrtRouter
, async_add_enti
@@ -1216,26 +1216,66 @@
entities
-, tracked)
+: AddEntitiesCallback, tracked: set%5Bstr%5D%0A) -%3E None
:%0A %22... |
f9ded788d74c18cec6e41b3258f83d5ecc20e49a | Fix newLine in gDrive | getTemperatures.py | getTemperatures.py | #!/usr/bin/python2
#should be executed each minute with cron
#*/1 * * * * /path/getTemperatures.py
#system time has tobe rigt -> start after NTP time sync
import datetime
import os
import glob
import time
#Adafruit_DHT has to be installed -> https://github.com/adafruit/Adafruit_Python_DHT.git
import Adafruit_DHT
#Ada... | Python | 0.00001 | @@ -1732,13 +1732,8 @@
ure)
-+%22%5Cn%22
)%0Awi
@@ -1809,16 +1809,21 @@
taString
++%22%5Cn%22
)%0A%0Apath
|
b761ce959f512ce391a2a073462d00e9c90ab1f3 | Migrate phase example to cartopy. | doc/pyplots/plot_phase.py | doc/pyplots/plot_phase.py | # -*- coding: utf-8 -*-
"""Plot to demonstrate the phase colormap.
"""
import numpy as np
import matplotlib.pyplot as plt
from netCDF4 import Dataset
from mpl_toolkits.basemap import Basemap
from matplotlib.ticker import FuncFormatter
import typhon
@FuncFormatter
def degree_formatter(x, pos):
"""Create degree... | Python | 0 | @@ -17,17 +17,16 @@
f-8 -*-%0A
-%0A
%22%22%22Plot
@@ -63,33 +63,14 @@
map.
-%0A
+
%22%22%22%0A%0A
-import numpy as np%0A
impo
@@ -101,21 +101,22 @@
plt%0A
-%0Afrom
+import
netCDF4
imp
@@ -115,64 +115,130 @@
CDF4
- import Dataset%0Afrom mpl_toolkits.basemap import Basemap
+%0Aimport numpy as np%0Aimport car... |
8cdea69e51241497f90c576ee386e9d7a2b011af | Update hyper-parameters to test the script for training | src/btc_parameters.py | src/btc_parameters.py | # Brain Tumor Classification
# Script for Hyper Parameters
# Author: Qixun Qu
# Create on: 2017/10/14
# Modify on: 2017/10/14
# ,,, ,,,
# ;" '; ;' ",
# ; @.ss$$$$$$s.@ ;
# `s$$$$$$$$$$$$$$$'
# $$$$$$$$$$$$$$$$$$
# $$$$P""Y$$$Y""W$$$$$
# $$$$ p"$$$"q $$$$$
# $$$$ .$$$$$. $$$$'
# $... | Python | 0 | @@ -949,16 +949,17 @@
%22train%22%5D
+,
%0A %22va
@@ -1002,16 +1002,39 @@
lidate%22%5D
+,%0A %22classes_num%22: 3,
%0A %22pa
@@ -1150,17 +1150,17 @@
_size%22:
-2
+1
0,%0A %22
@@ -1173,12 +1173,12 @@
oches%22:
-3
+2
%0A%7D%0A
|
454b04d8426803f6e1d4fffd0ad5b2bfb3d41531 | remove unneeded line | ports/pyqt-webengine/minibuffer.py | ports/pyqt-webengine/minibuffer.py | from PyQt5.QtWebEngineWidgets import QWebEngineView
import core_interface
class Minibuffer(QWebEngineView):
"""Documentation for Minibuffer
"""
scripts = {}
callback_count = 0
window_identifier = 0
def __init__(self, window_identifier, parent=None):
super(Minibuffer, self).__init__(p... | Python | 0.000015 | @@ -374,61 +374,8 @@
fier
-%0A self.setHtml(%22%22) # breaks without this line
%0A%0A
|
18875cbe61311650803e1d3fdf27d1e5774fa246 | improve attachments | bin/addons/base/ir/ir_attachment.py | bin/addons/base/ir/ir_attachment.py | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
#... | Python | 0.000002 | @@ -3499,16 +3499,344 @@
ck()
+%0A %0A def action_get(self, cr, uid, context=None):%0A dataobj = self.pool.get('ir.model.data')%0A data_id = dataobj._get_id(cr, 1, 'base', 'action_attachment')%0A res_id = dataobj.browse(cr, uid, data_id, context).res_id%0A return self.pool.get('ir... |
724e8770487bddaacbb8a36aca4c5299c0d64474 | clean core urls | core/urls.py | core/urls.py | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
admin.site.site_header = 'Coworking space administration'
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'billjobs.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^$... | Python | 0.000001 | @@ -25,18 +25,8 @@
port
- patterns,
inc
@@ -35,17 +35,16 @@
de, url%0A
-%0A
from dja
@@ -72,29 +72,8 @@
min%0A
-admin.autodiscover()%0A
admi
@@ -145,50 +145,21 @@
s =
-patterns('',%0A # Examples:
+%5B
%0A
- #
url(r'%5E
$',
@@ -158,245 +158,42 @@
(r'%5E
-$', 'billjobs.views.home', name='home'),%0A ... |
ddd508257a03e7a138720a9b4b2090fd231a626d | add a filename token. | toydist/config_parser/grammar.py | toydist/config_parser/grammar.py | from toydist.compat.pyparsing import \
Literal, WordStart, CharsNotIn, LineEnd, alphas, Word, \
indentedBlock, OneOrMore, ZeroOrMore, OnlyOnce, \
Group, empty, lineEnd, FollowedBy, col, alphanums, \
Forward, Optional, delimitedList, \
ParseException, ParseFatalException
#-------... | Python | 0 | @@ -1,8 +1,19 @@
+import os%0A%0A
from toy
@@ -727,16 +727,62 @@
)
+%0Afilename = Word(alphanums + '.' + os.pathsep)
%0A%0Aindent
|
eff700262c672d71e0670d5ba3eaab283112c3f4 | Add support for arbitrary characters in generation rules (i.e. not categories) | Generator.py | Generator.py | import random
import re
def generateWord(meaning, form, settings):
'''Takes an English string, desired form, generation
categories, settings, and optional form-specific rules.
Returns a generated word.
'''
word = ""
minS = settings["minS"]
maxS = settings["maxS"]
defaultrule = settings... | Python | 0 | @@ -1741,32 +1741,79 @@
Category(place)%0A
+ if category in categories:%0A
@@ -1851,32 +1851,95 @@
ories%5Bcategory%5D)
+%0A else:%0A syllable += category
%0A%0A # Incl
@@ -2030,32 +2030,75 @@
Category(place)%0A
+ if category i... |
de4bef5f39a43816c061b0725966de846fa585bd | add missing () on f.close | iniconfig.py | iniconfig.py | """ brain-dead simple parser for ini-style files.
(C) Ronny Pfannschmidt, Holger Krekel -- MIT licensed
"""
__version__ = "0.2.dev2"
__all__ = ['IniConfig', 'ParseError']
class ParseError(Exception):
def __init__(self, path, lineno, msg):
Exception.__init__(self, path, lineno, msg)
self.path = pat... | Python | 0.000006 | @@ -1470,16 +1470,18 @@
f.close
+()
%0A
|
cd45860f68002145dd7bcd04d201b38bff4cd501 | Bump version | fcm_django/__init__.py | fcm_django/__init__.py | __author__ = "xTrinch"
__email__ = "mojca.rojko@gmail.com"
__version__ = "1.0.11"
class NotificationError(Exception):
pass
try:
from django import VERSION as DJANGO_VERSION
if DJANGO_VERSION < (3, 2):
default_app_config = "fcm_django.apps.FcmDjangoConfig"
except ImportError:
pass
| Python | 0 | @@ -72,17 +72,17 @@
= %221.0.1
-1
+2
%22%0A%0A%0Aclas
|
5114973846b90a51155233b2472bfb7b25bcae14 | Update typo in GCE service | fedimg/services/gce.py | fedimg/services/gce.py | # This file is part of fedimg.
# Copyright (C) 2014 Red Hat, Inc.
#
# fedimg 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.
#
#... | Python | 0 | @@ -1811,16 +1811,17 @@
om offic
+i
al Fedor
|
10cd33aba58d59e0e44f32b1ffaf5d50e15a33b0 | prepare release 0.9.44 | femagtools/__init__.py | femagtools/__init__.py | # -*- coding: utf-8 -*-
"""
femagtools
~~~~~~~~~~
Python bindings for FEMAG
"""
__title__ = 'femagtools'
__version__ = '0.9.44-snapshot'
__author__ = 'Ronald Tanner'
__license__ = 'BSD'
__copyright__ = 'Copyright 2016-2018 SEMAFOR Informatik & Energie AG'
from .bch import Reader
from .model import Mach... | Python | 0 | @@ -139,17 +139,8 @@
9.44
--snapshot
'%0A__
|
9d6716a7bf7c7811b0fcafc2e9aff89495f8fea3 | Update runsegment.py | bin/runsegment.py | bin/runsegment.py | #!/usr/bin/python
import os
import numpy as np
import shutil
import common
from segment import normalizefile, segmentfile
def runAll(args):
print('\n\n\nYou have requested to normalize and segment bincounts files')
print('\tWARNING:')
print('\t\tIF USING ANY REFERENCES OTHER THAN THOSE I PROVIDE I CAN... | Python | 0.000001 | @@ -1542,15 +1542,13 @@
%7Bx:
-%5B
False
-%5D
for
@@ -1571,16 +1571,54 @@
name'%5D%7D%0A
+%09sampleNormMethoDict%5BFalse%5D = %5BFalse%5D%0A
%09%0A%09if no
|
9a05664f0a623d27e7062516d8014883fee2b28b | Add files via upload | locations/spiders/publix.py | locations/spiders/publix.py | # -*- coding: utf-8 -*-
import scrapy
import re
from locations.items import GeojsonPointItem
class PublixSpider(scrapy.Spider):
name = "publix"
allowed_domains = ['publix.com']
start_urls = (
'http://weeklyad.publix.com/Publix/Entry/Locations/',
)
def parse(self, response):
respo... | Python | 0 | @@ -2940,40 +2940,8 @@
%7D%0A%0A
- print(str(properties))%0A%0A
%0A
|
c7d86d7dd82421fb1f189d15718eb9a55c5574cf | Add maybe_make_pardir() | file/maybe_make_dir.py | file/maybe_make_dir.py | import os
# ==============================================================================
# MAYBE_MAKE_DIR
# ==============================================================================
def maybe_make_dir(path):
""" Checks if a directory path exist... | Python | 0.000001 | @@ -896,12 +896,644 @@
ame(file)%0A%0A%0A
+# ==============================================================================%0A# MAYBE_MAKE_PARDIR%0A# ==============================================================================%0Adef maybe_make_pardir(file)... |
e27953aad34bd1f416a1568ffb9f10609cf905b2 | Clean up pidfile on exit, regardless of any errors | bin/summariser.py | bin/summariser.py | #!/usr/bin/env python
# Copyright (C) 2012 STFC
#
# 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 applicab... | Python | 0.000001 | @@ -4377,24 +4377,230 @@
ancelled.')%0A
+ sys.exit(1)%0A finally:%0A # Clean up pidfile regardless of any excpetions%0A # This even executes if sys.exit() is called%0A log.info('Removing Pidfile')%0A os.remove(pidfile)%0A
log.
@@ -4623,27 +4623,16 @@
-sys.exit(1... |
cd7d7d6843e0159b8d272b8cfc572884d061b89a | Add test for equality between tuple and namedtuple. | tests/basics/namedtuple1.py | tests/basics/namedtuple1.py | try:
try:
from ucollections import namedtuple
except ImportError:
from collections import namedtuple
except ImportError:
print("SKIP")
raise SystemExit
T = namedtuple("Tup", ["foo", "bar"])
# CPython prints fully qualified name, what we don't bother to do so far
#print(T)
for t in T(1, ... | Python | 0 | @@ -526,16 +526,134 @@
uple))%0A%0A
+ # Check tuple can compare equal to namedtuple with same elements%0A print(t == (t%5B0%5D, t%5B1%5D), (t%5B0%5D, t%5B1%5D) == t)%0A%0A
# Create
|
d4effa0749734293075b28a739affde55be52727 | add some unit tests for bedpetobed12 | tests/bedpetobed12_tests.py | tests/bedpetobed12_tests.py | from unittest import TestCase, main
import os
import sys
import tempfile
import difflib
import svtools.bedpetobed12
class IntegrationTest_bedpetobed12(TestCase):
def run_integration_test(self):
test_directory = os.path.dirname(os.path.abspath(__file__))
test_data_dir = os.path.join(test_directory, ... | Python | 0 | @@ -110,16 +110,1562 @@
obed12%0A%0A
+class TestBedpeToBlockedBedConverter(TestCase):%0A%0A def setUp(self):%0A self.converter = svtools.bedpetobed12.BedpetoBlockedBedConverter('TESTCONV', 20)%0A%0A def test_track_name(self):%0A self.assertEqual(self.converter.track_name(), 'track name=TESTCONV ite... |
28d5bd2c00e5d3c3dfcb5198e45407568828a67f | Remove extension from config | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
#
import os
import sys
from sphinx.highlighting import lexers
from pygments.lexers.web import PhpLexer
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx_http_domain'
]
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
project = u'Dogmat... | Python | 0.000001 | @@ -194,34 +194,8 @@
inx'
-,%0A 'sphinx_http_domain'
%0A%5D%0At
|
4bf1ee120b2a660f9599fdd7589be1181179a28d | Fix import path for docs | docs/conf.py | docs/conf.py | import os
import sys
sys.path.insert(0, os.path.abspath("."))
project = ""
copyright = "2020, Martin Domke"
author = "Martin Domke"
# The full version, including alpha/beta/rc tags
release = "1.0.0"
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.... | Python | 0.000004 | @@ -52,16 +52,17 @@
spath(%22.
+.
%22))%0A%0Apro
|
3f6cab19825fa3bd573f325738ce113a3eb2695f | Fix sorting. | docs/conf.py | docs/conf.py | """Sphinx configuration file."""
import os
import sys
import time
import sphinx_rtd_theme
sys.path.append(os.path.abspath('..'))
# General configuration.
author = 'Robpol86'
exclude_patterns = ['_build']
copyright = '{}, {}'.format(time.strftime('%Y'), author)
extensions = ['sphinxcontrib.disqus']
master_doc = 'in... | Python | 0.000001 | @@ -176,38 +176,8 @@
86'%0A
-exclude_patterns = %5B'_build'%5D%0A
copy
@@ -229,16 +229,46 @@
author)%0A
+exclude_patterns = %5B'_build'%5D%0A
extensio
|
6516234f0240b3ddc5429efb4da66420f23b4708 | Fix url conf | platform/polycommon/polycommon/settings/api.py | platform/polycommon/polycommon/settings/api.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, 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 ... | Python | 0.999092 | @@ -624,18 +624,8 @@
List
-, Optional
%0A%0Afr
@@ -782,16 +782,29 @@
NF%22%5D = %22
+polyconf.urls
%22%0A%0A d
|
fa180457ab1b24a608c3d6a9571d3858aad8af1e | version bump: 0.2 | binary_builder.py | binary_builder.py | #!/usr/bin/env python
from __future__ import print_function
from platform import system
import os, shutil, argparse
def input():
try:
return raw_input()
except NameError:
return __builtins__.input()
__version__ = '0.1'
def main(args):
path = os.getcwd()
while not args.file:
de... | Python | 0.000002 | @@ -235,17 +235,17 @@
__ = '0.
-1
+2
'%0A%0Adef m
|
22a05581e8d1b6f5f7fe952c75e314d20d04bfc9 | Remove TODO -- we use gatherResults in txriak_manager already so this isn't a new requirement. | vumi/connectors.py | vumi/connectors.py | # TODO: We use gatherResults(), which requires Twisted>=11.1
# We need to either implement a fallback (which is easy enough) or
# explicitly require a suitable Twisted version.
from twisted.internet.defer import gatherResults
from vumi import log
from vumi.message import TransportMessage, TransportEvent, ... | Python | 0 | @@ -1,194 +1,4 @@
-# TODO: We use gatherResults(), which requires Twisted%3E=11.1%0A# We need to either implement a fallback (which is easy enough) or%0A# explicitly require a suitable Twisted version.%0A%0A
from
|
c311dfdc8108a4196a3bc20f6002adbccfc9f9ec | Use REACHPATH in AWS submission script | indra/tools/reading/pmid_reading/read_pmids_aws.py | indra/tools/reading/pmid_reading/read_pmids_aws.py | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
from indra.tools.reading.pmid_reading.read_pmids import READER_DICT
from datetime import datetime
DOC = \
"""
This script is intended to be run on an Amazon ECS container, so information
for the job either needs to ... | Python | 0 | @@ -2276,29 +2276,24 @@
n.get('REACH
-_JAR_
PATH')%0A r
@@ -2418,13 +2418,8 @@
EACH
-_JAR_
PATH
|
77ccd056487a4ad5d58bef50fa10c1ac1a080888 | Update function to optionally keep original extension | nlppln/utils.py | nlppln/utils.py | """NLP pipeline utility functionality"""
import os
import shutil
import glob
from nlppln import CWL_PATH
DEFAULT_DATA_DIR = '{}/.local/share/'.format(os.environ.get('HOME'))
CWL_DATA_DIR_PREFIX = 'commonwl'
def remove_ext(fname):
"""Removes the extension from a filename
"""
bn = os.path.basename(fname)
... | Python | 0 | @@ -552,16 +552,17 @@
fname)%0A%0A
+%0A
def out_
@@ -590,18 +590,513 @@
ame, ext
-):
+=None):%0A %22%22%22Return path of output file, given a directory, file name and extension.%0A%0A Args:%0A out_dir (str): path to the directory where output should be written.%0A fname (str): name of the input f... |
bc5038c98d9107215b1c11716ba7f465f2f139d8 | fix pep8 issue | examples/create_vlan.py | examples/create_vlan.py | '''
Example: python ./examples/create_vlan.py [master]
Master is an interface to add VLAN to, e.g. eth0 or tap0 or
whatever else. Without parameters use tap0 as the default.
'''
import sys
from pyroute2 import IPDB
ip = IPDB()
try:
if len(sys.argv) == 2:
# Get master interface from the command line
... | Python | 0.000001 | @@ -447,17 +447,16 @@
p0.index
-
%0A
|
d5221ea7fae058fda79f57daa358d1b2389b9d1a | Create pidfile on start up if running as daemon. | celerymon/bin/celerymon.py | celerymon/bin/celerymon.py | #!/usr/bin/env python
"""celerymon
.. program:: celerymon
.. cmdoption:: -P, --port
Port the webserver should listen to. Default: ``8989``.
.. cmdoption:: -B, --bind
Address the webserver should bind to. Default (any).
.. cmdoption:: -f, --logfile
Path to log file. If no logfile is specified, ``stder... | Python | 0 | @@ -771,16 +771,32 @@
strargv
+, create_pidlock
%0Afrom ce
@@ -2888,16 +2888,77 @@
rkdir):%0A
+ with create_pidlock(pidfile) as pidlock:%0A
|
4adb0833d96d966ae0ea4f71979d383014e8d85e | Update waf key name | wafw00f/wafprio.py | wafw00f/wafprio.py | #!/usr/bin/env python
# NOTE: this priority list is used so that each check can be prioritized,
# so that the quick checks are done first and ones that require more
# requests, are done later
wafdetectionsprio = [
# cached default request ones first
'Yunjiasu (Baidu Cloud Computing)',
'PowerCDN (PowerCDN... | Python | 0.000001 | @@ -1979,15 +1979,22 @@
ic (
-Zendesk
+Penta Security
)',%0A
|
b559134bf980dc4f2410d8c94667205ad306ecd5 | Change Sphinx theme | docs/conf.py | docs/conf.py | # Accelerator for npm, the Node.js package manager.
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: June 28, 2017
# URL: https://github.com/xolox/python-npm-accel
"""Sphinx documentation configuration for the `npm-accel` project."""
import os
import sys
# Add the npm-accel source distribution's root ... | Python | 0 | @@ -2525,15 +2525,14 @@
= '
-classic
+nature
'%0A%0A#
|
fbd6b7f8e20c1237f3a718ae1e5fcc03a7ec4b05 | Remove old releases variables | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
import os
import alagitpull
from recommonmark.transform import AutoStructify
# Get the project root dir, which is the parent dir of this
cwd = os.getcwd()
project_root = os.path.dirname(cwd)
# package data
about = {}
with open("../libvcs/__about__.py") as fp:
exec(fp.read(), about)
exten... | Python | 0 | @@ -495,223 +495,8 @@
%0A%5D%0A%0A
-releases_unstable_prehistory = True%0Areleases_document_name = %5B%22history%22%5D%0Areleases_issue_uri = %22https://github.com/vcs-python/libvcs/issues/%25s%22%0Areleases_release_uri = %22https://github.com/vcs-python/libvcs/tree/v%25s%22%0A%0A
issu
|
7409118c3306abcd538c2c0af3af301472c64140 | use local function variables in query_api | crewchief.py | crewchief.py | #!/usr/bin/env python2
#
# Description: This script is run at boot in a Rackconnected
# cloud server. It will continue to run until
# Rackconnect automation is complete, then it will
# launch the scripts inside /etc/crewchief.d/.
#
#
# Filelist: /etc/crewchief/
# ... | Python | 0.000007 | @@ -1620,24 +1620,213 @@
mplete. '''%0A
+ # pull our settings from the dictionary%0A max_api_attempts = settings.get('max_api_attempts')%0A api_wait_seconds = settings.get('api_wait_seconds')%0A # construct the endpoint url%0A
apiurl =
@@ -1871,32 +1871,32 @@
%7BINFO%7D'.format(%0A
-
REGION=... |
604bbe5f339a1dccf06bc655b9c33ec170587137 | Fix Usage of cliff commandmanager | magnum/cmd/driver_manage.py | magnum/cmd/driver_manage.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
# ... | Python | 0.000071 | @@ -3120,20 +3120,24 @@
Manager(
-None
+'magnum'
),%0A
|
a902b80b0f6bf201de626c7b3e2eddde6b23e3f8 | Enable parsing of Google style docstrings | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
#
# Hoggorm documentation build configuration file, created by
# sphinx-quickstart on Wed Dec 13 09:28:23 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... | Python | 0 | @@ -1072,16 +1072,39 @@
autodoc'
+, 'sphinx.ext.napoleon'
%5D%0A%0A# Add
@@ -2539,16 +2539,513 @@
False%0A%0A%0A
+# -- Options for Napoleon pre-processor -----------------------------------%0A%0Anapoleon_google_docstring = True%0Anapoleon_numpy_docstring = False%0A# napoleon_include_init_with_doc = False%0A# napoleo... |
3c386d3761418996d06a0940c4cd247d31aa78a6 | replace lmap with list comprehension | corehq/apps/userreports/indicators/__init__.py | corehq/apps/userreports/indicators/__init__.py | from __future__ import absolute_import
from collections import defaultdict
from future.utils import lmap
from corehq.apps.userreports.util import truncate_value
from corehq.form_processor.interfaces.dbaccessors import LedgerAccessors
from fluff import TYPE_INTEGER
class Column(object):
def __init__(self, id, d... | Python | 0.000284 | @@ -73,39 +73,8 @@
ct%0A%0A
-from future.utils import lmap%0A%0A
from
@@ -4097,13 +4097,9 @@
urn
-lmap(
+%5B
self
@@ -4107,25 +4107,58 @@
_make_column
-,
+(product_code) for product_code in
self.produc
@@ -4164,17 +4164,17 @@
ct_codes
-)
+%5D
%0A%0A de
|
bafc61ce3029a244cd49251deda984d2d10f4af2 | fix sort for date columns with missing values | corehq/apps/userreports/reports/data_source.py | corehq/apps/userreports/reports/data_source.py | from django.utils.datastructures import SortedDict
from sqlagg import (
ColumnNotFoundException,
TableNotFoundException,
)
from sqlalchemy.exc import ProgrammingError
from corehq.apps.reports.sqlreport import SqlData
from corehq.apps.userreports.exceptions import (
UserReportsError, TableNotFoundWarning,
)
... | Python | 0.000013 | @@ -1,12 +1,54 @@
+import datetime%0Afrom datetime import date%0A
from django.
@@ -4563,129 +4563,877 @@
-ret.sort(%0A key=lambda x: x.get(col%5B0%5D, None),%0A reverse=col%5B1%5D == DESCENDING
+is_descending = col%5B1%5D == DESCENDING%0A is_date =... |
b76a330665015e83e03f6a77734ef2b6e1e25bae | improve SyncLogAssertionError logging and send to admins | corehq/ex-submodules/casexml/apps/case/util.py | corehq/ex-submodules/casexml/apps/case/util.py | from __future__ import absolute_import
from collections import defaultdict
import uuid
from xml.etree import ElementTree
import datetime
from django.conf import settings
from casexml.apps.case import const
from casexml.apps.case.const import CASE_ACTION_UPDATE, CASE_ACTION_CREATE
from casexml.apps.case.dbaccessors i... | Python | 0 | @@ -4705,44 +4705,26 @@
ert(
-'@'.join(%5B'droberts', 'dimagi.com'%5D)
+notify_admins=True
)%0A
@@ -4809,16 +4809,50 @@
ase_id,%0A
+ 'form_id': xform._id,%0A
|
334f35f2f4eb24ef2828d8eb79c5e6343349d2cc | Change sphinx theme | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
#
# rubik_solver documentation build configuration file, created by
# sphinx-quickstart on Tue May 9 20:13:45 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
... | Python | 0.000001 | @@ -2844,18 +2844,70 @@
= '
-alabaster'
+guzzle_sphinx_theme'%0A%0Aextensions.append(%22guzzle_sphinx_theme%22)
%0A%0A#
@@ -3069,18 +3069,16 @@
tion.%0A#%0A
-#
html_the
@@ -3091,16 +3091,57 @@
ions = %7B
+%0A %22project_nav_name%22: %22Rubik Solver%22,%0A
%7D%0A%0A# Add
|
b422312a38b517d77f920ace68f24cbe0f60faaf | Update docs copyright year range | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
#
# Scrapy documentation build configuration file, created by
# sphinx-quickstart on Mon Nov 24 12:02:52 2008.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleab... | Python | 0 | @@ -1409,17 +1409,17 @@
2008-201
-3
+4
, Scrapy
|
7532dbc680b379d1774e12d6097d5afcb97b269b | Fix ordering of parameters in function _get_lon_lat_meters | gtfspy/geometry.py | gtfspy/geometry.py | from shapely.geometry import MultiPoint
def get_convex_hull_coordinates(gtfs):
"""
Parameters
----------
gtfs: gtfs.GTFS
Returns
-------
lons: list
of floats
lats: list
of floats
"""
lons, lats = _get_stop_lat_lons(gtfs)
lon_lats = list(zip(lons, lats))
... | Python | 0.999641 | @@ -968,24 +968,24 @@
meters(l
-at
+on
s, l
-on
+at
s):%0A
|
371f69ae2861c04bef9a4942427ad26bf431c72b | Update docs conf. | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
import re
import os
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinxcontrib.napoleon'
]
if os.getenv('SPELLCHECK'):
extensions +... | Python | 0 | @@ -21,17 +21,48 @@
-*-%0A
-import re
+from __future__ import unicode_literals%0A
%0Aimp
@@ -68,16 +68,18 @@
port os%0A
+%0A%0A
extensio
@@ -145,34 +145,8 @@
y',%0A
- 'sphinx.ext.doctest',%0A
@@ -492,182 +492,144 @@
rk'%0A
-copyright = u'2014, Ionel Cristian M%C4%83rie%C8%99'%0Aversion = release = re.fin... |
0f28572ef1ab2ce1c94e653fd9839e3e2f8d9812 | Add imports | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/stable/config
# -- Path setup ------------------------------------------------------------... | Python | 0.000001 | @@ -649,16 +649,65 @@
d_theme%0A
+from recommonmark.parser import CommonMarkParser%0A
%0A%0A# -- P
|
5cc376bda356ceec28c1385b180620353752cd5a | Add isolation properties | mcnet/components/network.py | mcnet/components/network.py | # Class for network functionality
from . import Core, destAddrPredicate
import z3
class Network (Core):
"""Represent a network, this encompases both routing and wiring"""
def _init(self, context):
self.ctx = context
self.constraints = list()
self.elements = list()
def Attach (self,... | Python | 0.000001 | @@ -3465,16 +3465,887 @@
eway)%5D)%0A
+ %0A def SetIsolationConstraint (self, node, adjacencies):%0A %22%22%22Set isolation constraints on a node. Doesn't need to be set but%0A useful when interfering policies are in play.%22%22%22%0A%0A if not isinstance(adjacencies, list):%0A a... |
a4a7e16ac2a29506cf22a125be43621f682aa174 | fix documentation copyright string | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
#
# RDMO Documentation documentation build configuration file, created by
# sphinx-quickstart on Fri Mar 3 11:25:56 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated ... | Python | 0.002682 | @@ -668,100 +668,62 @@
.%0A#%0A
-# import os%0A# import sys%0A# sys.path.insert(0, os.path.abspath('.'))%0Aimport sphinx_rtd_theme%0A
+%0Aimport sphinx_rtd_theme%0A%0Afrom rdmo import __version__
%0A%0A#
@@ -1478,85 +1478,201 @@
'201
-7, Jochen Klar, Claudia Engelhardt'%0Aauthor = u'Jochen Klar, Claudia Engelhard
+... |
c2af06e51207c2e261ddc6306c85d66d59d06427 | switch to default (readthedocs) theme | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
#
# Private Postgres RDS documentation build configuration file, created by
# sphinx-quickstart on Thu Apr 20 08:50:47 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerate... | Python | 0 | @@ -2838,17 +2838,15 @@
= '
-alabaster
+default
'%0A%0A#
|
6bb0015c132b5da0ee3b0c8147e88fd4dac39527 | Bump version in the docs again | docs/conf.py | docs/conf.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# aiozmq documentation build configuration file, created by
# sphinx-quickstart on Mon Mar 17 15:12:47 2014.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autog... | Python | 0 | @@ -462,16 +462,17 @@
ersion%0A%0A
+#
sys.path
@@ -505,16 +505,17 @@
('..'))%0A
+#
import a
|
c199f571440626ac05cdc0c34f831c3b0f8a2b25 | Use MathJax. | docs/conf.py | docs/conf.py | #
# PyWENO documentation build configuration file
#
import os
import sys
# path to autogen'ed modules
sys.path.append(os.path.abspath('..'))
# mock out some extension modules
class Mock(object):
def __init__(self, *args, **kwargs):
pass
def __call__(self, *args, **kwargs):
return Mock()
... | Python | 0 | @@ -691,16 +691,17 @@
entions%0A
+#
extensio
@@ -730,17 +730,16 @@
odoc' %5D%0A
-#
extensio
|
2d0de066d955e6f349e52958c450f6aa714315b0 | add side bar | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
#
# mirtop documentation build configuration file, created by
# sphinx-quickstart on Tue Nov 14 15:51:17 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | Python | 0.000001 | @@ -1262,18 +1262,16 @@
ring:%0A#%0A
-#
source_s
@@ -1294,16 +1294,18 @@
'.md'%5D%0A
+#
source_s
@@ -1544,32 +1544,52 @@
arc K. Halushka,
+ Michael Hackenberg,
Gianvito Urgese
@@ -1699,16 +1699,36 @@
alushka,
+ Michael Hackenberg,
Gianvit
@@ -3654,16 +3654,69 @@
'**': %5B%0A
+ 'navigation.html',%0A... |
0f7692c86ab319bc3c0bb3f0729ec941b567d250 | update intersphinx | docs/conf.py | docs/conf.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# scvi documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autoge... | Python | 0 | @@ -2555,149 +2555,8 @@
e),%0A
- leidenalg=(%22https://leidenalg.readthedocs.io/en/latest/%22, None),%0A louvain=(%22https://louvain-igraph.readthedocs.io/en/latest/%22, None),%0A
@@ -2893,16 +2893,70 @@
None),%0A
+ torch=(%22https://pytorch.org/docs/master/%22, None),%0A
)%0A%0A# Gen
|
861b51c6319890f3adb023424ad0ad9c202b063d | Update version to 1.0.3 in docs too | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
#
# comics documentation build configuration file, created by
# sphinx-quickstart on Sat Dec 5 17:33:45 2009.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All ... | Python | 0 | @@ -1655,10 +1655,8 @@
.0.3
-a1
'%0A%0A#
|
6e3e54df5ac29d8672974c0bc30d414619215e0a | Connect doc version with pom.xml | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
import os
import sys
import pkg_resources
# If extensions (or modules to d... | Python | 0 | @@ -257,16 +257,56 @@
port sys
+%0Afrom xml.etree import ElementTree as ET
%0A%0Aimport
@@ -605,16 +605,207 @@
ext'))%0A%0A
+# Read the latest Yamcs versions from the Maven pom.xml%0Atree = ET.ElementTree()%0Atree.parse('../pom.xml')%0Ayamcs_version_el = tree.getroot().find('%7Bhttp://maven.apache.org/POM/4.0.0%7Dve... |
49fd49e7ee9fbb9dc8fdc785bc022ca26dd6ff16 | Fix dirty-flag removal in docs/conf.py | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing dir.
import os, sys, time, cgi
sys.path.append(os.path.abspath(".."))
from get_version import __version__ as hy_version
if hy_version.endswith(".dirty"):
# Read the Docs might dirty its checkout, so ignore this.
... | Python | 0.000001 | @@ -107,16 +107,20 @@
%0A%0Aimport
+ re,
os, sys
@@ -131,16 +131,16 @@
me, cgi%0A
-
sys.path
@@ -225,46 +225,8 @@
ion%0A
-if hy_version.endswith(%22.dirty%22):%0A
# Re
@@ -270,65 +270,80 @@
so
-ignore this.%0A hy_version = hy_version%5B:-len(%22.dirty%22)%5D
+strip the dirty flag.%0Ahy_version = re.sub... |
e05465657c6738f02eafdd851cfa74c6d6bbe439 | Print path | docs/conf.py | docs/conf.py | #!/usr/bin/env python3
#
# pliers documentation build configuration file, created by
# sphinx-quickstart on Wed Dec 27 16:15:14 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All... | Python | 0.000004 | @@ -784,16 +784,67 @@
b('*'))%0A
+print(os.path.dirname(os.path.realpath(__file__)))%0A
%0A%0A# -- G
|
1a98b29293ccfab6534a48402414e89726d8e5bb | Set icon, summary for notification | Python/pomodoro.py | Python/pomodoro.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import subprocess as spr
import time
def main():
start = datetime.datetime.now()
spr.call(['notify-send', 'Started new pomodoro'])
time.sleep(30 * 60)
end = datetime.datetime.now()
duration = (end - start).total_seconds() // 60
fo... | Python | 0 | @@ -152,54 +152,219 @@
s
-pr.call(%5B'notify-send', 'Started new pomodoro'
+tart_str = start.strftime(%22%25H:%25M:%25S%22)%0A spr.call(%5B'notify-send',%0A '--app-name', 'POMODORO',%0A '--icon', 'dialog-information',%0A 'New pomodoro', 'From: %7B%7D'.format(start_str)
%5D... |
656457c049e32fc8c40ef51ec35a68f6266d1752 | Fix str() on ComparisonInstructions. | QGL/ControlFlow.py | QGL/ControlFlow.py | from .BlockLabel import newlabel, label, endlabel
from .PulseSequencer import Pulse
from functools import wraps
from .mm import multimethod
## QGL control-flow statements ##
def qif(mask, ifSeq, elseSeq=None):
if elseSeq:
return [CmpEq(mask), Goto(label(ifSeq))] + elseSeq + [
Goto(endlabel(if... | Python | 0 | @@ -4428,95 +4428,14 @@
-labelPart = %22%7B0%7D: %22.format(self.label) if self.label else %22%22%0A return labelPart +
+return
%22CM
|
d975a5c398d6b4892cea2299bb26d83dcb10c971 | Remove deprecated function call | blitz/web/http.py | blitz/web/http.py | __author__ = 'Will Hart'
import json
import logging
import os
from blitz.constants import CommunicationCodes
from blitz.io.tcp import TcpBase, TcpCommunicationException
from blitz.web.api import ApiRequestHandler
class IndexHandler(ApiRequestHandler):
def get(self):
# just read the file in to prevent t... | Python | 0.000037 | @@ -2824,21 +2824,36 @@
tcp.
-request_s
+send(CommunicationCodes.S
top
-(
)%0A%0A
|
27de8081925ef93b1c923d97781518ce0324d7c6 | Add sphinx.ext.napoleon for parsing google style doc | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
#
# nlppln documentation build configuration file, created by
# sphinx-quickstart on Tue Nov 28 16:27:45 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | Python | 0 | @@ -1124,20 +1124,16 @@
utodoc',
-%0A
'sphinx
@@ -1149,16 +1149,53 @@
rsphinx'
+,%0A 'sphinx.ext.napoleon'
%5D%0A%0A# Add
|
37b4cacd258eca8b22cc9698783b0d7496ada8c6 | Fix openscm residual | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | Python | 0 | @@ -4703,15 +4703,16 @@
c, %22
-openscm
+pymagicc
%22, %22
|
156d3f3b7de98752d70e861602bd9d21936f5e6a | Allow specification of the validation log destination. | nodes/picard.py | nodes/picard.py | #!/usr/bin/python
#
# Copyright (c) 2012 Mikkel Schubert <MSchubert@snm.ku.dk>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
#... | Python | 0 | @@ -1349,16 +1349,36 @@
bamfile,
+ output_file = None,
ignore
@@ -1395,32 +1395,32 @@
ndencies = ()):%0A
-
jar = o
@@ -1572,32 +1572,33 @@
UT=%25(IN_BAM)s%22%5D%0A
+%0A
for erro
@@ -1659,16 +1659,94 @@
ror,))%0A%0A
+ if not output_file:%0A output_file = bamfile + %22.validate... |
19b65cddc821713ae66c5c02d74a361332b464d4 | exclude readme.rst from sphinx | docs/conf.py | docs/conf.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# urlquick documentation build configuration file, created by
# sphinx-quickstart on Fri Apr 7 17:02:08 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# a... | Python | 0.000003 | @@ -2477,16 +2477,30 @@
S_Store'
+, 'README.rst'
%5D%0A%0A# The
@@ -3347,24 +3347,133 @@
_static'%5D%0A%0A%0A
+# This will exclude any warnings of 'nonlocal image URI found'.%0Asuppress_warnings = %5B'image.nonlocal_uri'%5D%0A%0A%0A
# -- Options
|
55b77558713aa87fa326de04db5db2df470130be | Create index when merging bam files. | nodes/picard.py | nodes/picard.py | import os
from pypeline.node import CommandNode
from pypeline.atomiccmd import AtomicCmd
from pypeline.common.fileutils import swap_ext
class ValidateBAMNode(CommandNode):
def __init__(self, config, bamfile, ignore = (), dependencies = ()):
jar = os.path.join(config.picard_root, "ValidateSamFile.jar")
... | Python | 0 | @@ -1219,16 +1219,20 @@
%22 %25 str(
+not
keep_dup
@@ -1249,16 +1249,53 @@
ower(),%0A
+ %22CREATE_INDEX=True%22,%0A
@@ -1544,32 +1544,105 @@
= output_file,%0A
+ OUT_BAI = swap_ext(output_file, %22.bai%22),%0A
|
19db67efd230880f4ddf5d0ae61e99cb202fe700 | Add folds to the Sphinx config file. | docs/conf.py | docs/conf.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Glooey documentation build configuration file, created by
# sphinx-quickstart on Tue Apr 4 09:53:05 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# aut... | Python | 0 | @@ -748,84 +748,195 @@
))%0A%0A
-%0A# -- General configuration ------------------------------------------------
+## Customizations%0A%0A# Add a screenshot directive. This would basically be the same as %60figure%60, %0A# but it would automatically add the download link as a caption.%0A%0A## General configuration
%0A... |
21dc9eef02019d4f97ec24ea298a26d38ede74dd | update docs | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ----------------------------------------------------... | Python | 0.000001 | @@ -847,48 +847,53 @@
%0D%0A%0D%0A
-# The short X.Y version%0D%0Aversion = '0.1'
+import lingam%0D%0Aversion = lingam.__version__%0D%0A
%0D%0A#
@@ -954,13 +954,26 @@
e =
-'0.1'
+lingam.__version__
%0D%0A%0D%0A
|
d65e58f108d6060166319b89686dea31e25b058d | Update wiki.py | lamia/wiki.py | lamia/wiki.py | import requests
import urllib
from requests.auth import HTTPBasicAuth
class entry(object):
def __init__(self, page, auther):
self.user = auther.user
self.key = auther.key
self.id_number = page["id"]
self.created_at = page["created_at"]
self.last_update = page["updated_at"]
self.title = page["title"]
... | Python | 0.000001 | @@ -752,16 +752,17 @@
lf.body)
+,
%0A%09%09%09%09%09 a
@@ -987,16 +987,17 @@
r(body))
+,
%0A%09%09%09%09%09 a
|
255370651317d3729f9c71dae8b91daff09947ca | version bump 0.2.0a | YesssSMS/YesssSMS.py | YesssSMS/YesssSMS.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" Send SMS via yesss.at web interface with your yesss login and password """
#from __future__ import print_function
VERSION = "0.1.2"
#
# @author: Florian Klien <flowolf@klienux.org>
#
DESC = "YesssSMS let's you send SMS via yesss.at's website"
LONG_DESC = """\
YesssSMS... | Python | 0.000001 | @@ -175,11 +175,12 @@
%220.
-1.2
+2.0a
%22%0A%0A#
|
cba5d8b152093612eee929f0d07d088e17d74cc1 | Bump of version to 1.0.0 to make it compatible with Firefox 4 https://github.com/darwin/firepython/issues/13 | firepython/__init__.py | firepython/__init__.py | # -*- mode: python; coding: utf-8 -*-
"""
FireLogger_ server-side support library for Python.
For usage see ``README.txt`` or visit the `github homepage`_.
.. _FireLogger: https://addons.mozilla.org/en-US/firefox/addon/11090
.. _github homepage: http://github.com/darwin/firepython
"""
__api_version__ = '0.9'
# ^--- c... | Python | 0 | @@ -300,19 +300,19 @@
on__ = '
-0.9
+1.0
'%0A# %5E---
@@ -372,11 +372,11 @@
= '
-0.9
+1.0
.0'
|
a2d575aa64da07fb4d40d38b7404c63bbb8a1cd2 | Add on_delete to ForeignKey | tests/default_app/models.py | tests/default_app/models.py | from django.db import models
import swapper
class BaseType(models.Model):
name = models.CharField(max_length=255)
class Meta:
abstract = True
class Type(BaseType):
class Meta:
swappable = swapper.swappable_setting("default_app", "Type")
class Item(models.Model):
type = models.Fore... | Python | 0.000001 | @@ -320,16 +320,25 @@
eignKey(
+%0A
swapper.
@@ -374,16 +374,47 @@
%22Type%22)
+, on_delete=models.CASCADE%0A
)%0A na
|
2627e2b7ef516a9be2b453e4c216ef7a163e0673 | Bump version to 0.6.1.post1 | gurtel/__init__.py | gurtel/__init__.py | __version__ = '0.6.1'
| Python | 0 | @@ -13,10 +13,16 @@
= '0.6.1
+.post1
'%0A
|
c2e886a34b78283f56feb660de2a55fe999dfaba | remove `move_in` part of user integration test | tests/lib/user/test_user.py | tests/lib/user/test_user.py | # Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
from pycroft import config
from pycroft.lib import user as UserHelper
from pycroft.model import session
from ..... | Python | 0 | @@ -2329,843 +2329,4 @@
one%0A
-%0A UserHelper.move_in(%0A user=new_user,%0A building_id=test_building.id,%0A level=1,%0A room_number=%221%22,%0A mac=test_mac,%0A birthdate=test_birthdate,%0A processor=self.processing_user,%0A )... |
b8a06cb92dedd17c1706c9f08ee4c1a562c84407 | add early stopping and standardize gamma calculation | predictive_imputer/predictive_imputer.py | predictive_imputer/predictive_imputer.py | # -*- coding: utf-8 -*-
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.ensemble import RandomForestRegressor
from sklearn.preprocessing import Imputer
from sklearn.utils.validation import check_array, check_is_fitted, check_X_y
class PredictiveImputer(BaseEstimator, Transfor... | Python | 0 | @@ -866,16 +866,53 @@
_ = %5B%5D%0A%0A
+ new_imputed = imputed.copy()%0A
@@ -942,35 +942,36 @@
N):%0A
-new
+last
_imputed = imput
@@ -957,32 +957,36 @@
last_imputed =
+new_
imputed.copy()%0A%0A
@@ -984,16 +984,28 @@
.copy()%0A
+
%0A
@@ -1055,32 +1055,37 @@
X_s =... |
e703305507cb8abbf1475f83701b07420e31ece8 | fix for csv lookup path | scripts/metadata/reformat_metadata_files_and_archive.py | scripts/metadata/reformat_metadata_files_and_archive.py | #!/usr/bin/env python
#
########################################################################
#
# A script for reformatting metadata and samplesheet files
# and copy them to the archive dir with additional year and month tags
# For checking the usgae, run the script with -h flag
#
###################################... | Python | 0 | @@ -1634,16 +1634,31 @@
listdir(
+path=input_path
):%0A
|
52ea3c736178a6a7a693a7a6a819e7c24b29454f | Revert back VariantDirWrap for Simba framework (compatibility) | builder/frameworks/simba.py | builder/frameworks/simba.py | # Copyright 2014-present PlatformIO <contact@platformio.org>
#
# 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 applicabl... | Python | 0 | @@ -1300,16 +1300,134 @@
cate)%0A%0A%0A
+def VariantDirWrap(env, variant_dir, src_dir, duplicate=False):%0A env.VariantDir(variant_dir, src_dir, duplicate)%0A%0A%0A
env = De
@@ -1474,16 +1474,46 @@
Sources)
+%0Aenv.AddMethod(VariantDirWrap)
%0A%0Aenv.Re
|
fd81eb224f17742595d87915a92dfb83df84b9c4 | Update inventory test from 'release' branch | functional_tests/test_jahia2wp.py | functional_tests/test_jahia2wp.py | """(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017"""
import os
import shutil
import pytest
from settings import OPENSHIFT_ENV, SRC_DIR_PATH
from utils import Utils
from wordpress import WPUser, WPBackup
from wordpress.generator import MockedWPGenerator
SCRIPT_FILE = os.pat... | Python | 0 | @@ -178,16 +178,36 @@
DIR_PATH
+, WP_SITE_INSTALL_OK
%0Afrom ut
@@ -4388,19 +4388,16 @@
%7B2%7D;
-ok;
%7B3%7D;%7B4%7D;
wp_%22
@@ -4392,16 +4392,20 @@
%7B3%7D;%7B4%7D;
+%7B5%7D;
wp_%22.for
@@ -4461,16 +4461,36 @@
ST_SITE,
+ WP_SITE_INSTALL_OK,
SITE_UR
|
00286ba511cf3b13ff3ec1c64752743c43e00b68 | parent, parent_no merge to parent_no | prd_detail_crawler/spiders/biccamera_spider.py | prd_detail_crawler/spiders/biccamera_spider.py | # -*- coding: utf-8 -*-
import scrapy
import re
import datetime
class BiccameraSpider(scrapy.Spider):
name = "biccamera"
start_urls = [
'http://www.biccamera.com/bc/c/contents/sitemap/index.jsp'
]
@staticmethod
def _extract_disp_no(url):
dispNo = re.findall(r'dispNo=(\d+)', url)
... | Python | 0.999888 | @@ -745,16 +745,19 @@
'parent
+_no
': None,
@@ -1426,16 +1426,19 @@
'parent
+_no
': paren
|
e3f4afd0fd7b9beaca4c4ddaa3cc1c7ade24e047 | capitalize IP | ip_mailer.py | ip_mailer.py | #!/usr/bin/python
# Script to email Raspberry Pi IP Address at boot using Gmail SMTP
import subprocess
import smtplib
import socket
from email.mime.text import MIMEText
import datetime
# Change to your own account information
to = 'me@example.com'
gmail_user = 'test@gmail.com'
gmail_password = 'yourpassword'
smtpserv... | Python | 0.999999 | @@ -699,18 +699,18 @@
= 'Your
-ip
+IP
is %25s'
|
8f1cf7f71cae44967a4fe260d149eb6c49c40d17 | Add test for successive traffic entries | tests/model/test_traffic.py | tests/model/test_traffic.py | from pycroft.model.traffic import PmacctTrafficEgress, PmacctTrafficIngress, TrafficVolume
from tests import FactoryDataTestBase
from tests.factories.traffic import PMAcctTrafficEgressFactory, PMAcctTrafficIngressFactory
from tests.factories.user import UserWithHostFactory
class PMAcctPseudoTableTest(FactoryDataTestB... | Python | 0 | @@ -1196,16 +1196,728 @@
(), 0)%0A%0A
+ def test_egress_update_successive_entries(self):%0A data = %5B%0A # timestamp, packets, amount%0A ('2018-03-15 00:15:00', 200, 1024),%0A ('2018-03-15 10:15:00', 324, 500),%0A ('2018-03-15 23:59:00', 12, 7055),%0A %5D%0... |
e165337cf2af38c785a8be162d3228f0ad92a2df | allow to save/load trained networkds | brain/__init__.py | brain/__init__.py | #!/usr/bin/env python2
# -*- coding : utf-8 -*-
import logging
import math
import random
__author__ = "Julien Rialland"
__copyright__ = "Copyright 2015, J.Rialland"
__license__ = "Apache License 2.0"
__version__ = "0.2"
__maintainer__ = __author__
__email__ = "julien.rialland@gmail.com"
__status__ = "Production"
de... | Python | 0 | @@ -83,16 +83,44 @@
random%0A
+import pickle , zlib, base64
%0A%0A__auth
@@ -4221,16 +4221,212 @@
output%0A%0A
+ def dump(self):%0A return base64.b64encode(zlib.compress(pickle.dumps(self), 9))%0A %0A @staticmethod%0A def load(s):%0A return pickle.loads(zlib.decompress(base64.b64decode(s)))... |
b3a216bbb490f6d1a69c77f0d1de76937984f716 | kill off whitespace; allows for indentation for sections | oneCommand.py | oneCommand.py | from __future__ import print_function
from util import *
import nbtencoder as nbt
import argparse
import sys, os
cprintconf.name = "One Command"
cprintconf.color = bcolors.PEACH
parser = argparse.ArgumentParser()
parser.add_argument("-m", "--mode", help="Uses manual mode", dest="mode", default="", choices=["m", "i"... | Python | 0.000013 | @@ -3354,16 +3354,53 @@
ontinue%0A
+%09%09command = command.strip().rstrip()%0A
%09%09if com
|
ebd2fc847336d5e1497b57987c255f9d2965339e | Add number days argument | project/api/management/commands/sync_groups.py | project/api/management/commands/sync_groups.py | # Standard Libary
import datetime
# Django
from django.core.management.base import BaseCommand
# First-Party
from api.models import Group
from bhs.models import Structure
from bhs.updaters import update_or_create_group_from_structure
from django.utils import (
timezone,
)
class Command(BaseCommand):
help = ... | Python | 0.014846 | @@ -274,16 +274,17 @@
one,%0A)%0A%0A
+%0A
class Co
@@ -419,16 +419,34 @@
gument(%0A
+ '-a',%0A
@@ -592,16 +592,194 @@
)%0A%0A
+ parser.add_argument(%0A '-d',%0A '--days',%0A type=int,%0A dest='days',%0A help='Number of days to u... |
d9a6071674857ceae566d29c7c77a31a5ed5214d | Return proper WWW-Authenticate header if API authentication fails | byceps/blueprints/api/decorators.py | byceps/blueprints/api/decorators.py | """
byceps.blueprints.api.decorators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from functools import wraps
from typing import Optional
from flask import abort, request
from ...services.authentication.api import service as a... | Python | 0.001051 | @@ -256,16 +256,68 @@
request
+%0Afrom werkzeug.datastructures import WWWAuthenticate
%0A%0Afrom .
@@ -560,16 +560,73 @@
oken():%0A
+ www_authenticate = WWWAuthenticate('Bearer')%0A
@@ -657,24 +657,32 @@
nticate=
-'Bearer'
+www_authenticate
)%0A
|
aac6f85e7ec2952d9a8e84c585f1cf26a2c9dda7 | Change the way ext_colorlog.py locates its config | cement/ext/ext_colorlog.py | cement/ext/ext_colorlog.py | """
Cement colorlog extension module.
"""
import os
import sys
import logging
from colorlog import ColoredFormatter
from ..ext.ext_logging import LoggingLogHandler
from ..utils.misc import is_true
class ColorLogHandler(LoggingLogHandler):
"""
This class implements the Log Handler interface. It is
a sub... | Python | 0 | @@ -2020,33 +2020,51 @@
ig.get('log.
-colorlog'
+%7B%7D'.format(self.Meta.label)
, 'colorize_
@@ -2384,33 +2384,51 @@
ig.get('log.
-colorlog'
+%7B%7D'.format(self.Meta.label)
, 'colorize_
@@ -2623,33 +2623,51 @@
ig.get('log.
-colorlog'
+%7B%7D'.format(self.Meta.label)
, 'colorize_
@@ -3352,17 +3352,35 @@
log.
-c... |
b5653ac28ac8358127943bd1f40c22dfd8a274f3 | Make Python example output identical to C++ and Java by removing redundant spaces. | examples/list_people.py | examples/list_people.py | #! /usr/bin/python
# See README.txt for information and build instructions.
import addressbook_pb2
import sys
# Iterates though all people in the AddressBook and prints info about them.
def ListPeople(address_book):
for person in address_book.person:
print "Person ID:", person.id
print " Name:", person.na... | Python | 0.000012 | @@ -519,36 +519,35 @@
Mobile phone #:
-
%22,%0A
+
elif phone
@@ -613,33 +613,32 @@
%22 Home phone #:
-
%22,%0A elif ph
@@ -685,16 +685,16 @@
n.WORK:%0A
+
@@ -715,17 +715,16 @@
phone #:
-
%22,%0A
|
74ff6e3ab89fabf44fb40397209b1ea2570a71e5 | Remove obsolete debug message. | mediagoblin_picscout/api.py | mediagoblin_picscout/api.py | # MediaGoblin plugin for searching image metadata in the PicScout database.
#
# Copyright 2013 Commons Machinery http://commonsmachinery.se/
#
# Authors: Artem Popov <artfwo@commonsmachinery.se>
#
# Distributed under GNU Affero GPL v3, please see LICENSE in the top dir.
import json, urllib, urllib2
import requests
imp... | Python | 0.000001 | @@ -2722,35 +2722,8 @@
n()%0A
- print response_data
%0A
|
ff4dd944335f2469cb26bbb5234e0ee377c68a18 | refactor example maurer_rose.py | examples/maurer_rose.py | examples/maurer_rose.py | # Purpose: draw a maurer rose with polylines
# https://en.wikipedia.org/wiki/Maurer_rose
# Copyright (c) 2019-2021, Manfred Moitzi
# License: MIT License
from typing import Iterable, Tuple
import pathlib
import math
import ezdxf
from ezdxf import zoom
DIR = pathlib.Path("~/Desktop/Outbox").expanduser()
N = 6 # The ro... | Python | 0.999478 | @@ -1,93 +1,4 @@
-# Purpose: draw a maurer rose with polylines%0A# https://en.wikipedia.org/wiki/Maurer_rose%0A
# Co
@@ -17,17 +17,17 @@
2019-202
-1
+2
, Manfre
@@ -157,19 +157,19 @@
t zoom%0A%0A
-DIR
+CWD
= pathl
@@ -209,16 +209,319 @@
duser()%0A
+if not CWD.exists():%0A CWD = pathlib.Path(%22.%22)%0A%0A# --... |
89f3b80aa92c8da090266f725d09129f4fc28088 | Make framework_test listdir more robust by checking a set, not a list | client/tests/framework_test.py | client/tests/framework_test.py | from models import core
from unittest import mock
import exceptions
import ok
import os
import shutil
import sys
import unittest
DEMO = 'demo_assignments'
INVALID = os.path.join(DEMO, 'invalid')
VALID = os.path.join(DEMO, 'valid')
TMP = os.path.join(DEMO, 'tmp')
class TestProtocol(ok.Protocol):
def __init__(self,... | Python | 0.001095 | @@ -3192,33 +3192,33 @@
elf.assertEqual(
-%5B
+%7B
ok.INFO_FILE%5D, s
@@ -3213,17 +3213,17 @@
NFO_FILE
-%5D
+%7D
, self.l
@@ -3689,17 +3689,17 @@
rtEqual(
-%5B
+%7B
ok.INFO_
@@ -3711,17 +3711,17 @@
'q1.py'
-%5D
+%7D
, self.l
@@ -4332,17 +4332,17 @@
return
-%5B
+%7B
f for f
@@ -4381,17 +4381,17 @@
cache__... |
b0fff7ee5b587213da1b76df0907ee0e9e3746ab | Print out last gameID after all tasks completed. | admin/checkTaskCompletion.py | admin/checkTaskCompletion.py | #!/usr/bin/env python3
import configparser
import time
from datetime import datetime
import pymysql
parser = configparser.ConfigParser()
parser.read("../halite.ini")
DB_CONFIG = parser["database"]
def check_compiles(db):
db.begin()
with db.cursor() as cursor:
cursor.execute("SELECT COUNT(*) FROM Us... | Python | 0 | @@ -1807,36 +1807,220 @@
-print(%22All tasks completed.%22
+db.begin()%0A with db.cursor() as cursor:%0A cursor.execute(%22SELECT MAX(gameID) FROM Game%22)%0A max_game = cursor.fetchone()%5B%22MAX(gameID)%22%5D%0A print(%22All tasks completed, last gameID %25d.%22 %25 (max_game,)
)%0A%0Ai
|
40ed344eab49427cee04859d1ba3136d4211ebee | Return [] if the video's chunks object doesn't contain "live". | getflv.py | getflv.py | '''Given video id, output the FLV URLs
A video ID should look something like a12345.
'''
import requests
import re
import gzip
import json
import sys
CHUNK_URL = 'http://api.twitch.tv/api/videos/{0}?as3=t'
default_headers = {'User-Agent': 'ArchiveTeam'}
def main():
video_id = sys.argv[1]
output_filename = ... | Python | 0.000022 | @@ -1100,24 +1100,60 @@
results!')%0A%0A
+ if 'live' in doc%5B'chunks'%5D:%0A
urls = l
@@ -1204,16 +1204,91 @@
'live'%5D)
+%0A else:%0A print('No live chunks found for item')%0A urls = %5B%5D
%0A%0A re
|
681a29ae5a4cd9fb3278bccad981b09d3293286d | fix bug in args parsing for the sinan client | client/libsinan/args.py | client/libsinan/args.py | import optparse
def parse_key_value(key, value, args):
if ':' not in key:
args[key] = value
return
key, rest = key.split(':', 1)
args = args.setdefault(key, {})
parse_key_value(rest, value, args)
def erl_args_callback(option, opt_str, value, parser):
parser.values.erl_args = lis... | Python | 0 | @@ -2500,24 +2500,117 @@
pts'%5D)%0A%0A
+if options.release:%0A parse_key_value('-r', options.release, args%5B'server_opts'%5D)%0A%0A
return args%0A
@@ -2608,18 +2608,16 @@
urn args
-%0A%0A
%0A%0Adef _t
|
504d2d6ed54620c3a8b988566f2cef74503b4adf | modify import statement in online_check.py | online_check.py | online_check.py | import wait_socket_messages as wsm
import socket_handler as sh
import socket
def ReceivingOnlineChecks(ready_socket):
while(1):
check, from_who = ready_socket.recvfrom(10)
ready_socket.sendto(b'Online',(from_who, check_online_port))
ready_socket.close()
pass
def CheckSomeoneOnline(... | Python | 0.000001 | @@ -326,16 +326,19 @@
s =
+sh.
CreatePo
|
8de8da05bb9461aaa48d3058f5b1e2caab6191f1 | Use dict() syntax that works in Python 2.6 onward | openmath/xml.py | openmath/xml.py | from . import openmath as om
openmath_ns = "http://www.openmath.org/OpenMath"
omtags = {
"OMOBJ": om.OMObject,
"OMR": om.OMReference,
"OMI": om.OMInteger,
"OMF": om.OMFloat,
"OMSTR": om.OMString,
"OMB": om.OMBytes,
"OMS": om.OMSymbol,
"OMV": om.OMVariable,
"OMFOREIGN": om.OMForeign... | Python | 0.000017 | @@ -502,16 +502,17 @@
r%0A %7D%0A
+%0A
inv_omta
@@ -516,17 +516,21 @@
mtags =
-%7B
+dict(
(v,k) fo
@@ -552,17 +552,17 @@
.items()
-%7D
+)
%0A %0Ade
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.