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 |
|---|---|---|---|---|---|---|---|
c28de15fd8cade476fa8d7af904826dcea3c0f3e | Add Python note on simple unit test | python.py | python.py | # Python Notes
# Version 2.7
# for loop
for i in range(10):
print i
# check list elements of matching string
randList = ["a", "ab", "bc", "de", "abc"]
toFind = "a"
print [x for x in randList if toFind in x]
# read file
with open("filename.txt", "r") as fh:
data = fh.readline() # read line by line
# data ... | Python | 0 | @@ -761,8 +761,172 @@
t(setA)%0A
+%0A# unit testing with unittest%0Adef fun(x):%0A return x + 1%0Aclass TestAddingMethod(unittest.TestCase):%0A def test_three(self):%0A self.assertEqual(fun(3), 4)%0A
|
80cdc54dbe41c243c4620472aa8ba5c6ece40324 | Add target_table attribute to DataRow | etl_framework/DataTable.py | etl_framework/DataTable.py | class DataRow(dict):
"""object for holding row of data"""
def row_values(self, field_names, default_value=None):
"""returns row value of specified field_names"""
return tuple(self.get(field_name, default_value) for field_name in field_names)
class DataTable(object):
"""object for holding ... | Python | 0.000001 | @@ -48,32 +48,206 @@
row of data%22%22%22%0A%0A
+ def __init__(self, *args, **kwargs):%0A %22%22%22creates instance of DataRow%22%22%22%0A%0A super(DataRow, self).__init__(*args, **kwargs)%0A%0A self.target_table = None%0A%0A
def row_valu
@@ -436,16 +436,259 @@
names)%0A%0A
+ def set_t... |
ec1d29411f5cf3513b2d17cd2e7e4e8700d2715c | Fix change-pass form in admin. | saskatoon/member/admin.py | saskatoon/member/admin.py | # coding: utf-8
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.forms import UserCreationForm, UserChangeForm, \
ReadOnlyPasswordHashField
from member.models import AuthUser, Person, Notification
from django import forms
class CustomUserCreationForm(UserC... | Python | 0 | @@ -1639,16 +1639,19 @@
href=%5C%22
+../
password
|
9d1d8ed852b329d9f9465218b516840f308c9340 | Remove errant comma in capabilities policies | cinder/policies/capabilities.py | cinder/policies/capabilities.py | # Copyright (c) 2017 Huawei Technologies Co., Ltd.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | Python | 0.000014 | @@ -762,17 +762,16 @@
ilities%22
-,
%0A%0A%0Acapab
|
a8aa61b0dca0e03cee014ade5b5c7239638c74ed | Install deploy dependencies after test dependencies | ciscripts/setup/python/setup.py | ciscripts/setup/python/setup.py | # /ciscripts/setup/python/setup.py
#
# The main setup script to bootstrap and set up a python project.
#
# See /LICENCE.md for Copyright information
"""The main setup script to bootstrap and set up a python project."""
from collections import defaultdict
def _install_test_dependencies(cont, util, py_util):
"""In... | Python | 0 | @@ -2637,225 +2637,8 @@
r)%0A%0A
- util.prepare_deployment(_prepare_python_deployment,%0A cont,%0A util,%0A shell,%0A py_util)%0A%0A
@@ -3684,8 +3684,225 @@
ralls%22)%0A
+%0A ... |
f6864990e94d15cb73f1b57e3e255a712890c9d5 | update search items | ptt_title_parser.py | ptt_title_parser.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys
import time
import feedparser
from datetime import datetime
from datetime import timedelta
from send_notify import send_notify_mail
AUTO_UPDATE_SECS = 300
BOARD_LIST = ['HardwareSale', 'give']
SHOW_ALL_BOARD = ['Key_Mou_Pad', 'CompBook']
KEYWORD_LIST = [u'... | Python | 0.000001 | @@ -244,16 +244,8 @@
ale'
-, 'give'
%5D%0ASH
@@ -277,20 +277,8 @@
Pad'
-, 'CompBook'
%5D%0AKE
@@ -298,35 +298,21 @@
%5Bu'%E9%8D%B5
-%E5%B8%BD', u'%E9%8D%B5%E7%9B%A4', 'ducky', u'%E7%B6%B2%E6%A8%82%E9%80%9A'%5D
+%E7%9B%A4'%5D # unicode
%0AAUT
@@ -324,16 +324,24 @@
IST = %5B'
+zzzaaa12
'%5D%0A%0Aclas
|
d38473284a82a878262f94c61df73e6f41ce29b3 | Fix argument formatting in receiver.py | satnogsclient/receiver.py | satnogsclient/receiver.py | # -*- coding: utf-8 -*-
import logging
import os
from datetime import datetime
from subprocess import Popen
import settings
logger = logging.getLogger('satnogsclient')
class SignalReceiver():
_decoding_values = [
'POCSAG512',
'POCSAG1200',
'POCSAG2400',
'EAS',
'UFSK120... | Python | 0 | @@ -2220,114 +2220,61 @@
= %5B
-%5D%0A for key in params:%0A args.append(key)%0A args.append(params%5Bkey%5D)
+'%7B0%7D %7B1%7D'.format(key, params%5Bkey%5D) for key in params%5D
%0A%0A
@@ -2706,101 +2706,70 @@
-for key in params:%0A args.append(key)%0A... |
782e0305c1a385775eda129f8d526e4a58d78b7b | Add new Ozwillo footer link | ckanext/ozwillo_theme/plugin.py | ckanext/ozwillo_theme/plugin.py | import requests
import xml.etree.ElementTree as ET
from slugify import slugify
from pylons import config as pconfig
import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
from ckan.lib.app_globals import set_app_global
from ckan.lib.plugins import DefaultTranslation
def footer_links():
url = 'http... | Python | 0 | @@ -662,16 +662,25 @@
Notices'
+, 'Terms'
)%0A%0A f
|
31341f4794c159d0f650c04ec72d5b8e73bbd5db | Add better error handling to cleanup_datastore command | ckanext/switzerland/commands.py | ckanext/switzerland/commands.py | import sys
import itertools
import ckan.lib.cli
import ckan.logic as logic
import ckan.model as model
class OgdchCommand(ckan.lib.cli.CkanCommand):
'''Command for opendata.swiss
Usage:
# General usage
paster --plugin=ckanext-switzerland <command> -c <path to config file>
# Show this he... | Python | 0.000001 | @@ -21,16 +21,33 @@
ertools%0A
+import traceback%0A
import c
@@ -58,16 +58,16 @@
lib.cli%0A
-
import c
@@ -1488,32 +1488,49 @@
ce_id_list = %5B%5D%0A
+ try:%0A
for offs
@@ -1567,24 +1567,28 @@
step=100):%0A
+
@@ -1666,16 +1666,20 @@
+
record_l
@@ -1759,32 +175... |
0fefd82c1a39b7cf8467b138731a1be26e4dea43 | Fix test | mne/decoding/tests/test_csp.py | mne/decoding/tests/test_csp.py | # Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Romain Trachel <trachelr@gmail.com>
#
# License: BSD (3-clause)
import os.path as op
from nose.tools import assert_true, assert_raises
import numpy as np
from numpy.testing import assert_array_almost_equal
from mne import io, Epochs, re... | Python | 0.000003 | @@ -1057,16 +1057,55 @@
s%5B2:9:3%5D
+ # subselect channels -%3E disable proj!
%0A epo
@@ -1209,32 +1209,44 @@
0), preload=True
+, proj=False
)%0A epochs_dat
@@ -2766,16 +2766,17 @@
e(corr %3E
+=
0.95, m
|
0b82512646dbd81f9d01d65d9625025f675a67ec | fix SpringerLink plugin reading of related registered publisher | openarticlegauge/plugins/springerlink.py | openarticlegauge/plugins/springerlink.py | from openarticlegauge import plugin
from openarticlegauge.models import Publisher
class SpringerLinkPlugin(plugin.Plugin):
_short_name = __name__.split('.')[-1]
__version__='0.1' # consider incrementing or at least adding a minor version
# e.g. "0.1.1" if you change this plugin
# The d... | Python | 0 | @@ -1918,16 +1918,28 @@
nal_url(
+'http://' +
cburl)%0A%0A
|
3f800f0f48055328c8ff548dcd639473e1624f61 | Revert "get unique users" | custom/icds/location_reassignment/utils.py | custom/icds/location_reassignment/utils.py | from datetime import datetime
from xml.etree import cElementTree as ElementTree
from casexml.apps.case.mock import CaseBlock
from corehq.apps.hqcase.utils import submit_case_blocks
from corehq.apps.locations.models import SQLLocation
from corehq.apps.locations.tasks import deactivate_users_at_location
from corehq.app... | Python | 0 | @@ -2508,13 +2508,10 @@
s =
-set()
+%5B%5D
%0A
@@ -2773,22 +2773,22 @@
cases.
-update
+extend
(%5Bcase f
@@ -2879,22 +2879,22 @@
cases.
-update
+extend
(child_c
|
10116f3166d7754fadebda12c23235001447fce9 | Add pls to __init__ | scikits/learn/__init__.py | scikits/learn/__init__.py | """
Machine Learning module in python
=================================
scikits.learn is a Python module integrating classique machine
learning algorithms in the tightly-nit world of scientific Python
packages (numpy, scipy, matplotlib).
It aims to provide simple and efficient solutions to learning problems
that are ... | Python | 0.000001 | @@ -1477,16 +1477,23 @@
'clone'
+, 'pls'
%5D%0A%0A__ver
|
3d430b5505ce8307633eda3d01e92713a5abba32 | remove more word count stuff | scrapers/seamus/models.py | scrapers/seamus/models.py | from collections import OrderedDict
from dateutil import parser
from itertools import groupby
from pytz import timezone
from pyquery import PyQuery
from scrapers.homepage.models import ApiEntry
import os
class Story(ApiEntry):
"""
Represents a story in the Seamus API
"""
def __init__(self, element, ru... | Python | 0.000012 | @@ -921,53 +921,8 @@
l),%0A
- ('word_count', self.word_count),%0A
@@ -2174,186 +2174,4 @@
url%0A
-%0A @property%0A def word_count(self):%0A html = self.element.find('textWithHtml').text()%0A text_parts = PyQuery(html).text().split(' ')%0A return len(text_parts)%0A%0A
|
6876ce61a2f324c8aa36ba7084b23e5180c14c2a | fix pica conversion thanks to Paul McNett | reportlab/lib/units.py | reportlab/lib/units.py | #!/bin/env python
#Copyright ReportLab Europe Ltd. 2000-2004
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/lib/units.py
__version__=''' $Id$ '''
inch = 72.0
cm = inch / 2.54
mm = cm * 0.1
pica = 12.0
def toLength(s):
'''convert a stri... | Python | 0 | @@ -630,17 +630,17 @@
oat(s%5B:-
-2
+4
%5D)*pica%0A
@@ -735,8 +735,9 @@
gth%22 %25 s
+%0A
|
75aedade6c6c52dc84ef073fda2e9cc428814e27 | fix typo in docstring | steam/client/builtins/leaderboards.py | steam/client/builtins/leaderboards.py | """
Reading the leaderboards with :class:`SteamLeaderboard` is as easy as iterating over a list.
"""
import logging
from steam.core.msg import MsgProto
from steam.enums import EResult, ELeaderboardDataRequest, ELeaderboardSortMethod, ELeaderboardDisplayType
from steam.enums.emsg import EMsg
from steam.util import _rang... | Python | 0.000076 | @@ -1585,12 +1585,20 @@
th:%60
-Misc
+Leaderboards
.get
|
cddccbdf7eb8f329888e58d470f6ad5303b60429 | fix line parks | raidex.py | raidex.py | #!/usr/bin/env python3
from datetime import datetime
from pkg_resources import resource_filename
try:
from ujson import dumps
from flask import json as flask_json
flask_json.dumps = lambda obj, **kwargs: dumps(obj, double_precision=6)
except ImportError:
from json import dumps
from flask import Flask... | Python | 0 | @@ -516,16 +516,28 @@
n, Point
+, LineString
%0A%0A%0Aapp =
@@ -1164,16 +1164,231 @@
parks:%0A
+ coords = p%5B'coords'%5D%0A if len(coords) == 2:%0A if LineString(coords).within(Point(g%5B'lat'%5D, g%5B'lon'%5D)):%0A gyms.append(g)%0A else if len(co... |
7e7d71f4c0628d51e4f849783ac95794b8780736 | move pinning setup | antipackage.py | antipackage.py | # encoding: utf-8
"""Automagically import single file Python modules from GitHub.
To use, just import `antigravity`:
import antigravity
Then you can import single file Python modules from GitHub using:
from github.username.repo.branch.subpackages import module
Modules are downloaded and cached locally. They are... | Python | 0.000001 | @@ -871,37 +871,196 @@
e')%0A
-pinning._base_dir = _base_dir
+%0Adef _setup_pinning(fname):%0A path = _base_dir+'/'+fname%0A if not os.path.isfile(path):%0A with open(path, 'w+') as f:%0A json.dump(%7B%7D,f)%0A%0A_setup_pinning('pinnings.json')
%0A%0A#
@@ -1717,24 +1717,25 @@
self.
+_... |
ac18b12563f9ce9328af7cac0cc2d3e1fdd7f4b5 | Replace continuous capture by state-based trigger | resources/lib/state.py | resources/lib/state.py | '''
XBMC video capturer for Hyperion
Copyright (c) 2013 Hyperion Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use... | Python | 0 | @@ -2621,40 +2621,10 @@
, 64
-, xbmc.CAPTURE_FLAG_CONTINUOUS
)%0A
+
%09%09%0A%09
@@ -3031,18 +3031,30 @@
(200)%0A%09%09
-if
+captureState =
self.__
@@ -3078,16 +3078,34 @@
eState()
+%0A%09%09if captureState
== xbmc
@@ -3749,19 +3749,241 @@
ttings)%0A
-
%09%09%09
+%0A%09%09if captureState != xbmc.CAPTURE_STAT... |
4a355ee5f253ee0643cd9f5f72a777d4c8391e8b | Add vault to prerequisites | .prerequisites.py | .prerequisites.py | #!/usr/bin/env python
from distutils.version import StrictVersion
from shlex import split
import os, sys
MINIMUM_VERSION_TERRAFORM = StrictVersion('0.11.7')
def sh(cmd):
return os.system(cmd) == 0
def shs(cmd):
from subprocess import Popen, PIPE
try:
stdout, stderr = Popen(split(cmd), stdout=PIP... | Python | 0.000001 | @@ -2403,24 +2403,187 @@
ecker%0A ),
+%0A%0A (%0A 'vault',%0A %7B'all': 'download from https://www.vaultproject.io/downloads.html'%7D,%0A lambda x: shs('vault --version'),%0A None%0A ),
%0A%5D%0A%0Amac_chec
|
8b49e908affb3ae77965ed61314d75514eefb738 | update from uid to product id | sample_merchant/TwoBoundMerchantApp.py | sample_merchant/TwoBoundMerchantApp.py | import argparse
import sys
sys.path.append('../')
from merchant_sdk import MerchantBaseLogic, MerchantServer
from merchant_sdk.api import PricewarsRequester, MarketplaceApi, ProducerApi
from merchant_sdk.models import Offer
merchant_token = "{{API_TOKEN}}"
#merchant_token = "rYy8nnr1rWKSoTLwgfytbsdCTstIG5A8c9FQw8Rndl... | Python | 0 | @@ -3669,17 +3669,24 @@
d offer.
-u
+product_
id == pr
@@ -3691,17 +3691,24 @@
product.
-u
+product_
id:%0A
|
11c479fdb6187f33ec33fb889be5fe953dd6a434 | Fix typos in edp integration test utility method name | savanna/tests/integration/tests/edp.py | savanna/tests/integration/tests/edp.py | # Copyright (c) 2013 Mirantis 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 writ... | Python | 0.000132 | @@ -2202,24 +2202,25 @@
def __cre
+a
te_job_birar
@@ -2212,25 +2212,25 @@
reate_job_bi
-r
+n
aries(self,
@@ -2266,24 +2266,25 @@
ernal_list,%0A
+
@@ -5155,32 +5155,33 @@
self.__cre
+a
te_job_biraries(
@@ -5165,33 +5165,33 @@
.__create_job_bi
-r
+n
aries(%0A
@@ -5316,16 +5316,1... |
db0b75f4021e04d5e8aaeec54af3f31d78b54b92 | test handlers: run teardown method even if test fails | schedules_tools/tests/test_handlers.py | schedules_tools/tests/test_handlers.py | from schedules_tools import testrunner
from schedules_tools import discovery
import logging
import os
logger = logging.getLogger(__name__)
discovery.schedule_handlers.run_discovery()
discovery.storage_handlers.run_discovery()
BASE_DIR = os.path.dirname(os.path.realpath(__file__))
def pytest_generate_tests(metafunc)... | Python | 0.000003 | @@ -3230,16 +3230,33 @@
ptions)%0A
+ try:%0A
@@ -3272,24 +3272,28 @@
== EXPORT:%0A
+
@@ -3337,16 +3337,20 @@
+
elif act
@@ -3360,24 +3360,75 @@
== IMPORT:%0A
+ #import pudb; pudb.set_trace()%0A
@@ -3475,14 +3475,22 @@
+ ... |
c52e037990de9f7ccae894f8eb1afc835ba55ac5 | Handle newlines in select | rdlgen.py | rdlgen.py | from jinja2 import Template
import codecs
import re
import string
import random
class RDL():
query = ''
fields = []
def __init__(self,server_url,datasource,query,template='template.rdl'):
self.query = query
self.server_url = server_url
self.datasource = datasource
self.... | Python | 0 | @@ -1090,15 +1090,13 @@
lect
-
(.*?)
-
from
@@ -1129,16 +1129,39 @@
NORECASE
+%7Cre.MULTILINE%7Cre.DOTALL
)%0A
@@ -1195,16 +1195,24 @@
roup(1).
+strip().
split(',
|
9e125a7cd1c8e320840767c835b10af9fa517394 | Refactor Control F1 report reset data | Importacions_F1_Q1/Fact_impF1_QuadreDeControl.py | Importacions_F1_Q1/Fact_impF1_QuadreDeControl.py | # -*- coding: utf-8 -*-
from ooop import OOOP
import configdb
from consolemsg import fail
O = OOOP(**configdb.ooop)
def parseargs():
import argparse
parser = argparse.ArgumentParser(description='Reimportar els F1')
parser.add_argument('-d', '--date',
help="Escull data des de que comence... | Python | 0 | @@ -400,34 +400,8 @@
()%0D%0A
-args.date = '2017-03-19'%0D%0A
if n
@@ -2515,16 +2515,22 @@
RTACIONS
+ de F1
%22%0D%0Afor e
|
0949f036c3a39c4afb2603082a0e7feaa4760718 | Fix packaged script Python 3 support (#3931) | scripts/automation/release/packaged.py | scripts/automation/release/packaged.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | Python | 0 | @@ -2016,16 +2016,102 @@
OOT_DIR)
+%0A available_tags = str(available_tags, 'utf-8')%0A available_tags = available_tags
.split()
|
523fa25c5d72822847ffed23046907a213dfe00d | Extend CombineExperiments-wrapper so it can be defined how experiments are combined | Wrappers/Dials/CombineExperiments.py | Wrappers/Dials/CombineExperiments.py | #!/usr/bin/env python
# CombineExperiments.py
#
# Copyright (C) 2015 Diamond Light Source, Richard Gildea
#
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.
#
from __future__ import division
import os
from __init__ import _setup_xia2_environ
... | Python | 0 | @@ -959,16 +959,115 @@
= None%0A%0A
+ self._same_beam = False%0A self._same_detector = True%0A self._same_goniometer = True%0A%0A
re
@@ -1063,32 +1063,32 @@
e%0A%0A return%0A
-
%0A def add_exp
@@ -1597,32 +1597,456 @@
tions_filename%0A%0A
+ def set_experimental_model(self,%0A ... |
7a1c13994a9ca0897437ce19a33ceb44526c81d3 | Fix migration of anonymous authors (refs #42) | ddcz/management/commands/migrateauthors.py | ddcz/management/commands/migrateauthors.py | from django.apps import apps
from django.core.management.base import BaseCommand, CommandError
from ddcz.models import (
Author, CreativePage, UserProfile
)
from ddcz.text import misencode
class Command(BaseCommand):
help = 'Denormalizes authors from legacy tables to Author table'
def get_author(self, cr... | Python | 0 | @@ -1756,17 +1756,16 @@
tion.aut
-h
or%0A
|
1b6cc43261e4ff6493c9446f666a550e7ee8f360 | Revert back now that db is populated | snipt/snipts/models.py | snipt/snipts/models.py | from django.template.defaultfilters import slugify
from django.contrib.sites.models import Site
from django.contrib.auth.models import User
from django.conf import settings
from django.db import models
from taggit.managers import TaggableManager
from pygments import highlight
from pygments.lexers import get_lexer_by_... | Python | 0 | @@ -366,17 +366,16 @@
atter%0A%0A%0A
-#
site = S
@@ -2215,17 +2215,16 @@
nt%0A%0A
-#
def get_
@@ -2248,17 +2248,16 @@
-#
return '
@@ -2359,17 +2359,16 @@
-#
site.dom
@@ -2414,17 +2414,16 @@
-#
self.key
|
9e7fe9e2a1ac8d8b7651d4ce9859427844c3c988 | Revert "Add support for setting shard_index instead of shard_num" | solr/run_solr_shard.py | solr/run_solr_shard.py | #!/usr/bin/env python
import argparse
from mc_solr.constants import *
from mc_solr.solr import run_solr_shard
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Install Solr and start a shard.",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
... | Python | 0 | @@ -314,371 +314,126 @@
er)%0A
-%0A
-shard_group = parser.add_mutually_exclusive_group(required=True)%0A%0A # Shard number for humans (1, 2, 3, ...)%0A shard_group.add_argument(%22-n%22, %22--shard_num%22, type=int, help=%22Shard number (starts with 1).%22)%0A%0A # Shard index for Supervisor (0, 1, 2, .... |
6711d484d23478d857b2af969e9d32677b4a5261 | Add proper recrusive directory logic | sonowatcher/watcher.py | sonowatcher/watcher.py | from lxml import etree
import os
class SonoSiteWatcher(object):
IGNORE_PATH = 'temp_sl'
NEEDED_FOR_COMPLETION = [
'sonologo.gif',
'REPORT.XML',
'PT_PPS.XML',
'PT_REPORT.HTML',
]
REPORT_PDF = 'PT_REPORT.PDF'
SHOULD_NOT_EXIST = [
'REPORT.XS... | Python | 0.000056 | @@ -509,18 +509,16 @@
.path)%0D%0A
-%0D%0A
@@ -575,16 +575,83 @@
', '..'%5D
+ and %5C%0D%0A os.path.isdir(os.path.join(self.path, exam))
:%0D%0A
@@ -3704,21 +3704,16 @@
def is_
-exam_
complete
@@ -3713,34 +3713,24 @@
omplete(self
-, exam_dir
):%0D%0A
@@ -3861,57 +3861,483 @@... |
d43728c456f8982c79bfbf206fd8c75830010152 | add missing import | rmake/server/daemon.py | rmake/server/daemon.py | #!/usr/bin/python2.4
#
# Copyright (c) 2006 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www... | Python | 0.000042 | @@ -2040,16 +2040,23 @@
erver =
+server.
rMakeSer
@@ -2083,18 +2083,24 @@
(), cfg,
-
%0A
+
|
48e682e267f45a731e90a60ce9798272f7a9c24c | Add supportted Mbed platform | test/gdb_server.py | test/gdb_server.py | """
mbed CMSIS-DAP debugger
Copyright (c) 2006-2013 ARM Limited
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 | @@ -629,16 +629,46 @@
raceback
+%0Aimport pyOCD.board.mbed_board
%0A%0Afrom p
@@ -766,16 +766,49 @@
onParser
+%0Afrom optparse import OptionGroup
%0A%0ALEVELS
@@ -1034,31 +1034,244 @@
%22 %0A
-%0Aparser = OptionParser(
+supportted_list = ''%0Afor (k,v) in pyOCD.board.mbed_board.TARGET_TYPE.items():%0A supportt... |
b53c8c1ad7eb2ff81e0b5b741502f5958dcd611c | Change the way migrations are imported so it works in python2 | dbmigrator/utils.py | dbmigrator/utils.py | # -*- coding: utf-8 -*-
# ###
# Copyright (c) 2015, Rice University
# This software is subject to the provisions of the GNU Affero General
# Public License version 3 (AGPLv3).
# See LICENCE.txt for details.
# ###
try:
import configparser
except ImportError:
# python 2
import ConfigParser as configparser
im... | Python | 0 | @@ -1512,232 +1512,148 @@
-package_name = dirname.replace('/', '.')%0A module_name = basename.rsplit('.', 1)%5B0%5D%0A __import__(package_name, fromlist=%5Bmodule_name%5D)%0A module = sys.modules%5B'%7B%7D.%7B%7D'.format(package_name, module_name)%5D%0A return module
+if dirname not in sys.path:%0A ... |
88a28b1c856179139cfe9d9b7dd9b69d2df1017d | version bump | dbwipes/__init__.py | dbwipes/__init__.py | __version__ = '0.0.20' | Python | 0.000001 | @@ -13,10 +13,10 @@
= '0.0.2
-0
+1
'
|
aae345774a5be87902fd38e0591576f9069f52f4 | use statistics instead of stats | pymzn/mzn/output.py | pymzn/mzn/output.py |
from enum import IntEnum
from ..dzn import dict2dzn, dzn2dict
from queue import Queue
class Status(IntEnum):
COMPLETE = 0
INCOMPLETE = 1
UNKNOWN = 2
UNSATISFIABLE = 3
UNBOUNDED = 4
UNSATorUNBOUNDED = 5
ERROR = 6
class Solutions:
"""Represents a solution stream from the `minizinc` f... | Python | 0.999999 | @@ -912,24 +912,29 @@
self.stat
+istic
s = None%0A
@@ -962,75 +962,8 @@
ne%0A%0A
- @property%0A def statistics(self):%0A return self.stats%0A%0A
@@ -2734,16 +2734,21 @@
lns.stat
+istic
s = self
|
8643a4f037531df0c437a46009049661ccd3b08e | fix ctrl-c handling | roushagent/__init__.py | roushagent/__init__.py | #!/usr/bin/env python
import fcntl
import getopt
import json
import logging
import os
import signal
import socket
import sys
import time
import traceback
from ConfigParser import ConfigParser
from logging.handlers import SysLogHandler
from roushagent.modules import OutputManager
from roushagent.modules import InputM... | Python | 0.0005 | @@ -6674,36 +6674,39 @@
self._
-exit
+cleanup
()%0A%0A def _dis
@@ -7555,32 +7555,119 @@
sult%5B'input'%5D)%0A%0A
+ except KeyboardInterrupt:%0A raise KeyboardInterrupt%0A%0A
|
5feebab1580ef511cefd149dc841d2f5802d06cb | add possibility of get context from terminal | synergine/core/connection/Terminal.py | synergine/core/connection/Terminal.py | from synergine.core.exception.NotFoundError import NotFoundError
class Terminal():
"""
Obj who receive synergine data at each cycle
"""
_name = None
@classmethod
def get_name(cls):
if not cls._name:
raise Exception("Terminal must be named")
return cls._name
d... | Python | 0.000008 | @@ -1625,28 +1625,86 @@
erminate(self):%0A pass
+%0A%0A def get_context(self):%0A return self._context%0A
|
98ed1e825e00780f23a0a9362ac79e273866ae2e | add example on how to retrieve property | examples/add_properties.py | examples/add_properties.py | # -*- coding: utf-8 -*-
# * Copyright (c) 2009-2022. Authors: see NOTICE file.
# *
# * 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... | Python | 0 | @@ -2443,16 +2443,35 @@
ytomine:
+%0A obj = None
%0A%0A
@@ -2506,32 +2506,22 @@
-prop = Property(
+obj =
Project(
@@ -2546,16 +2546,48 @@
project)
+%0A prop = Property(obj
, key=pa
@@ -2697,32 +2697,22 @@
-prop = Property(
+obj =
ImageIns
@@ -2750,16 +2750,48 @@
nsta... |
bc55db2ff0fc48c6f65ad40da3befca6b065c57e | Fix bug when using proxy (#2603) (#2838) | lib/ansible/modules/extras/packaging/elasticsearch_plugin.py | lib/ansible/modules/extras/packaging/elasticsearch_plugin.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
"""
Ansible module to manage elasticsearch plugins
(c) 2015, Mathew Davies <thepixeldeveloper@googlemail.com>
This file is part of Ansible
Ansible is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publi... | Python | 0 | @@ -5077,16 +5077,17 @@
t=%25s%22 %25
+(
proxy_ho
@@ -5101,16 +5101,17 @@
xy_port)
+)
%0A%0A if
|
829d84832a36668145793b3166babf41b00c6828 | Update hug to automatically handle set serialization | hug/output_format.py | hug/output_format.py | """hug/output_format.py
Defines Hug's built-in output formatting methods
Copyright (C) 2015 Timothy Edmund Crosley
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... | Python | 0 | @@ -1764,16 +1764,74 @@
'utf8')%0A
+ elif isinstance(item, set):%0A return list(item)%0A
elif
|
5057c21a62e74be51119ffd5990e5746043c47e2 | Handle the case where a load balancer has zero instances | app/awslib.py | app/awslib.py | import socket
import boto3
import re
import os
# List of all EIPs
def _list_eips(region, filter):
print "Connecting to ec2..."
client = boto3.client('ec2', region_name=region)
addresses_dict = client.describe_addresses()
all_eips = []
for eip_dict in addresses_dict['Addresses']:
if eip_dict... | Python | 0.000018 | @@ -2998,69 +2998,251 @@
-instances = %5Binst%5B'InstanceId'%5D for inst in lb%5B'Instances'%5D%5D%0A
+print %22Processing instances for ELB %25s%22 %25 lb%5B'LoadBalancerName'%5D%0A instances = %5Binst%5B'InstanceId'%5D for inst in lb%5B'Instances'%5D%5D%0A print %22Instances discovered: %2... |
1469bba5c87c6bd6c66eb87a695579f032806353 | Update data_import.py | data_import.py | data_import.py | import scipy.io
import numpy as np
from collections import Counter
def data_prep(filename):
"""
Main function for importing triples from raw INTACT DNA methylation data
Inputs:
filename: filename for INTACT DNA methylation data
Otputs:
N: number of maximum number of coverage
X_importance_weighte... | Python | 0.000002 | @@ -83,16 +83,34 @@
filename
+,format='explicit'
):%0A %22%22%22
@@ -251,16 +251,130 @@
on data%0A
+ format: whether to return the data formatted for explicit feature map %0A or for kernel feature map%0A
Otputs
@@ -1354,24 +1354,53 @@
ted%5Bi%5D%0A %0A
+ if format=='explicit':%0A
X_z... |
fb827c5ba92d56800b2753db0f681422d8b75391 | Add new parser to split make net and make modules | scripts/SCNIC_analysis.py | scripts/SCNIC_analysis.py | #!/usr/local/bin/python2
import argparse
from SCNIC.within_correls import within_correls
from SCNIC.between_correls import between_correls
__author__ = 'shafferm'
"""Entry to both module_maker and between_correls, only holds main and args are passed to the corresponding program
"""
def main():
"""Things"""
... | Python | 0 | @@ -132,16 +132,60 @@
_correls
+%0Afrom SCNIC.module_maker import module_maker
%0A%0A__auth
@@ -318,17 +318,16 @@
program
-%0A
%22%22%22%0A%0A%0Ade
@@ -535,25 +535,189 @@
able
- and make modules
+%22,%0A formatter_class=argparse.ArgumentDefaultsHelpFormatter)%0A make_modu... |
488099ac84b7975d73e0f615f77b108ef5741437 | Change calling of entered scripts from args | scripts/analytics/base.py | scripts/analytics/base.py | import time
import logging
import argparse
import importlib
from datetime import datetime, timedelta
from dateutil.parser import parse
from website.app import init_app
from website.settings import KEEN as keen_settings
from keen.client import KeenClient
logger = logging.getLogger(__name__)
logging.basicConfig(level=l... | Python | 0 | @@ -5992,76 +5992,25 @@
-entered_scripts = args.analytics_scripts%0A if args.entered
+if args.analytics
_scr
@@ -6072,39 +6072,46 @@
mport_from_args(
-entered
+args.analytics
_scripts)%0A%0A
@@ -7676,23 +7676,30 @@
om_args(
-entered
+args.analytics
_scripts
|
ef2b6ae55c4b4282d859ab4b4b78eced82a6d756 | Fix regularization_parameter | src/ikpy/inverse_kinematics.py | src/ikpy/inverse_kinematics.py | # coding= utf8
import scipy.optimize
import numpy as np
from . import logs
ORIENTATION_COEFF = 1.
def inverse_kinematic_optimization(chain, target_frame, starting_nodes_angles, regularization_parameter=None, max_iter=None, orientation_mode=None, no_position=False, optimization_method='L-BFGS-B'):
"""
Comput... | Python | 0.000001 | @@ -4252,56 +4252,53 @@
x -
-starting_nodes_angles%5Bchain.first_active_joint:%5D
+chain.active_from_full(starting_nodes_angles)
)%0A
|
bff5fc6f8266d4a788cd2514de806564c95d9440 | add removal of empty directories | conda_build/noarch.py | conda_build/noarch.py | import os
from os.path import dirname, isdir, join
from conda_build.config import config
BASH_HEAD = '''\
#!/bin/bash
SP_DIR=$($PREFIX/bin/python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
#echo "SP_DIR='$SP_DIR'"
'''
def handle_file(f):
path = join(config.build_prefix, f)
... | Python | 0.000001 | @@ -1121,39 +1121,40 @@
-for f in files:%0A print f
+dirs = set()%0A for f in files:
%0A
@@ -1286,16 +1286,49 @@
g%5B14:%5D%0A
+ dirs.add(dirname(g))%0A
@@ -1475,20 +1475,16 @@
.write('
-''%5C%0A
rm -f $S
@@ -1496,18 +1496,18 @@
/%25s*
-%0A''
+%5Cn
' %25 g)%0A
+%0A
@... |
667955e3376357ac987d3fbf40de6151ba0a980c | implement client.init | client/client.py | client/client.py | class OTC_Client(object):
def __init__(self):
raise NotImplementedError("TODO: write a client")
def send(self,message):
payload = {'message':message}
r = requets.post(self.server_address,data=payload)
raise NotImplementedError("TODO: write send method")
def recieve(self):
... | Python | 0.000007 | @@ -1,8 +1,35 @@
+import requests%0Aimport sys%0A
class OT
@@ -67,19 +67,167 @@
t__(self
-):%0A
+,server_address,pad):%0A self.encrypt_index = 0 %0A self.pad = pad%0A self.decrypt_index = len(pad)%0A self.connect(server_address)
%0A
@@ -302,16 +302,23 @@
,message
+,target
):%0A ... |
b88dbecd04072f2215347d10ee5135428cce552c | add pymatgen local_env strategy for all bonds below cutoff | megnet/data/local_env.py | megnet/data/local_env.py | Python | 0 | @@ -0,0 +1,1364 @@
+from pymatgen.analysis.local_env import MinimumDistanceNN%0A%0Aclass MinimumDistanceNNAll(MinimumDistanceNN):%0A %22%22%22%0A Determine bonded sites by fixed cutoff%0A Args:.%0A cutoff (float): cutoff radius in Angstrom to look for trial%0A near-neighbor sites (default: 4.... | |
f9a081af27c45c13b1763d25b9da32f32c4d3b00 | Add checks to verify that functions imported from saved model contain the attribute "tf._original_func_name". | tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/control_flow_upgrade_legacy_v1.py | tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/control_flow_upgrade_legacy_v1.py | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Python | 0.000007 | @@ -1246,39 +1246,113 @@
HECK
-: func private @%22key/%5B%5Bthen%5D%5D%22(
+-SAME: tf._original_func_name%0A# CHECK: func private @%22key/%5B%5Bthen%5D%5D%22(%0A# CHECK-SAME: tf._original_func_name
%0A%0A%0Ad
|
8d9c97cc74f09fb8f707d2775647fb8cae4b176d | Fix build | lib_client/src/d1_client/tests/test_iter_log_record_multi.py | lib_client/src/d1_client/tests/test_iter_log_record_multi.py | #!/usr/bin/env python
# This work was created by participants in the DataONE project, and is
# jointly copyrighted by participating institutions in DataONE. For
# more information on DataONE, see our web site at http://dataone.org.
#
# Copyright 2009-2019 DataONE
#
# Licensed under the Apache License, Version 2.0 (t... | Python | 0.000001 | @@ -1698,16 +1698,20 @@
client_
+arg_
dict=%7B%22v
@@ -1776,16 +1776,20 @@
records_
+arg_
dict=%7B%22f
|
8031bd97778a5b842ea5c85dce86ffc63c1cc3c1 | update pw file parser | tabpy-server/tabpy_server/app/util.py | tabpy-server/tabpy_server/app/util.py | import csv
import logging
import os
from datetime import datetime
from OpenSSL import crypto
logger = logging.getLogger(__name__)
def log_and_raise(msg, exception_type):
'''
Log the message and raise an exception of specified type
'''
logger.fatal(msg)
raise exception_type(msg)
def validate_ce... | Python | 0.000003 | @@ -2580,32 +2580,69 @@
turn False, %7B%7D%0A%0A
+ if(len(row%5B1%5D) %3E 0):%0A
cred
@@ -2665,16 +2665,20 @@
row%5B1%5D%0A
+
@@ -2728,16 +2728,150 @@
(login))
+%0A else:%0A logger.warning('Found username %7B%7D but no password'.format(row%5B0%5D))... |
d30c66c84a3370710127eace1f1fbf8d2f0d072a | Add 'created' column to django admin ratings | src/olympia/ratings/admin.py | src/olympia/ratings/admin.py | from django.contrib import admin
from django.utils.html import format_html
from django.utils.translation import ugettext_lazy as _
from django.urls import reverse
from olympia.translations.utils import truncate_text
from olympia.zadmin.admin import related_single_content_link
from .models import Rating
class Rating... | Python | 0.000005 | @@ -1901,30 +1901,45 @@
ddon', '
-truncated_body
+created', 'user', 'ip_address
', 'rati
@@ -1942,24 +1942,16 @@
rating',
- 'user',
%0A
@@ -1961,33 +1961,31 @@
'i
-p_address
+s_reply
', 'flag', '
@@ -1988,27 +1988,33 @@
', '
-is_reply', 'deleted
+deleted', 'truncated_body
',)%0A
|
837b63918c29c1cd45a2a0daf8e6ff6e3b28bfb7 | Fix typo breaking the TS6 feature. | merc/features/ts6/sid.py | merc/features/ts6/sid.py | from merc import errors
from merc import feature
from merc import message
from merc import util
class SidFeature(feature.Feature):
NAME = __name__
install = SidFeature.install
@SidFeature.register_server_command
class Sid(message.Command):
NAME = "SID"
MIN_ARITY = 4
def __init__(self, server_name, hopcou... | Python | 0 | @@ -635,16 +635,25 @@
dle me!%0A
+ pass%0A
%0A%0A@SidFe
|
a4ef5f6461cd5c91867e5bda19ac6cb564650b6a | Update the icqsol_add_surface_field_from_expression tool to use icqsol_utils encapsulation. | tools/icqsol_add_surface_field_from_expression/icqsol_add_surface_field_from_expression.py | tools/icqsol_add_surface_field_from_expression/icqsol_add_surface_field_from_expression.py | #!/usr/bin/env python
import argparse
import shutil
import icqsol_utils
from icqsol.shapes.icqShapeManager import ShapeManager
# Parse Command Line.
parser = argparse.ArgumentParser()
parser.add_argument('--input', dest='input', help='Shape dataset selected from history')
parser.add_argument('--input_file_format_and_... | Python | 0 | @@ -69,63 +69,8 @@
tils
-%0Afrom icqsol.shapes.icqShapeManager import ShapeManager
%0A%0A#
@@ -1410,201 +1410,88 @@
ut.%0A
-if input_format == icqsol_utils.VTK:%0A shape_mgr = ShapeManager(file_format=input_format, vtk_dataset_type=args.input_dataset_type)%0Aelse:%0A shape_mgr = ShapeManager(file_format=input... |
6340c57f3676e0fe05795315d4321c15a61c8533 | Update version.py | dax/version.py | dax/version.py | VERSION = '1.0.0b2'
| Python | 0.000001 | @@ -14,7 +14,7 @@
0.0b
-2
+3
'%0A
|
107e8103ddfefe7a801509a1079642ae8fa1221c | fix names of network and subnetworks | tempest/scenario/test_network_ipv6.py | tempest/scenario/test_network_ipv6.py | # Copyright 2014 Cisco Systems, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | Python | 0.002377 | @@ -1292,16 +1292,20 @@
'net-125
+-126
')%0A
@@ -1381,16 +1381,54 @@
ork=net,
+%0A
namesta
@@ -1442,12 +1442,25 @@
net-
-125'
+%7B0%7D'.format(bits)
,%0A
|
927b851b061c4fcbb6a1798bec27c38f6fc14550 | Add todo | client/update_grub.py | client/update_grub.py | #!/usr/bin/python3
import os
import re
import string
import subprocess
import tempfile
class GrubUpdater(object):
_VOLUME_ID_REGEX = re.compile(b'^Volume id: (?P<volume_id>.+)$', re.MULTILINE)
_HOTKEYS = string.digits + string.ascii_letters
def __init__(self, image_dir, boot_dir):
self._image_dir = image... | Python | 0.000002 | @@ -785,16 +785,53 @@
grub')%0A%0A
+ # TODO: clean up if we fail here%0A
with
|
73e36f40213a6737da015057568bfd5589c9673e | Refactor day04 to allow arbitrary hash starts | day04/day04.py | day04/day04.py | #!/usr/bin/env python
"""
Solve day 4 of Advent of Code.
http://adventofcode.com/day/4
"""
import hashlib
def find_integer(key, zeroes=5):
"""
Find the smallest integer such that the md5 hash of the
given secret key plus the integer yields a hash that
begins with a certain number of zeroes (default ... | Python | 0 | @@ -125,23 +125,31 @@
er(key,
-zeroes=
+hash_start='0'*
5):%0A
@@ -395,20 +395,18 @@
ith(
-'0' * zeroes
+hash_start
):%0A
@@ -664,15 +664,23 @@
ey,
-zeroes=
+hash_start='0'*
6))%0A
|
27165c0dfcf34a794c168ae29e371ac53843c6ec | disable Selenium tests due to reliably problem with Firefox 17 | metashare/test_runner.py | metashare/test_runner.py | import logging
from django_selenium.selenium_runner import SeleniumTestRunner
from django.core.management import call_command
from metashare import settings
from metashare.haystack_routers import MetashareRouter
# set up logging support
LOGGER = logging.getLogger(__name__)
LOGGER.addHandler(settings.LOG_HANDLER)
d... | Python | 0.000001 | @@ -1379,16 +1379,340 @@
ns%0Atry:%0A
+ from django_jenkins.runner import CITestSuiteRunner%0A class MetashareJenkinsTestRunner(CITestSuiteRunner):%0A # TODO: reenable Selenium tests again as soon as there is a new Selenium%0A # release which fixes the randomly occurring bug at%0A # %3Chttp:... |
581ad2c9de77a08a833519e01d22333b348df724 | Make bpython consistend with plain console | nikola/plugins/command_console.py | nikola/plugins/command_console.py | # Copyright (c) 2012 Roberto Alsina y otros.
# Permission is hereby granted, free of charge, to any
# person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the
# Software without restriction, including without limitation
# the rights to use, copy, modify, merge, pub... | Python | 0 | @@ -2127,32 +2127,96 @@
TE.scan_posts()%0A
+ gl = %7B'conf': conf, 'SITE': SITE, 'Nikola': Nikola%7D%0A
bpyt
@@ -2334,89 +2334,10 @@
ls_=
-%7B'conf': conf, 'SITE':%0A SITE%7D
+gl
)%0A%0A
|
eb2746a808efa6317e2d65a4605979ddc7507e6e | fix default connection string | config/base.py | config/base.py | # -*- coding: utf-8 -*-
import os
basedir = os.path.abspath(os.path.dirname(__file__))
SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL', 'localhost')
SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db')
| Python | 0.000013 | @@ -135,16 +135,27 @@
_URL', '
+postgres://
localhos
@@ -155,16 +155,17 @@
ocalhost
+/
')%0ASQLAL
|
8633d0e786d50942bba308a66a5f85793d935577 | Allow extra ignore strings to be passed to pyflakes testing. | mezzanine/utils/tests.py | mezzanine/utils/tests.py |
from __future__ import with_statement
from compiler import parse
import os
from mezzanine.utils.path import path_for_import
# Ignore these warnings in pyflakes.
PYFLAKES_IGNORE = (
"'from django.conf.urls.defaults import *' used",
"'from local_settings import *' used",
"'memcache' imported but unused",
... | Python | 0 | @@ -187,83 +187,8 @@
%22
-'from django.conf.urls.defaults import *' used%22,%0A %22'from local_settings
impo
@@ -196,24 +196,24 @@
t *' used%22,%0A
+
%22'memcac
@@ -322,16 +322,35 @@
age_name
+, extra_ignore=None
):%0A %22
@@ -454,24 +454,24 @@
found.%0A
-
%22%22%22%0A
try:
@@ -458,24 +4... |
7430304b3c18fa5de7a3a39a67e6d21a3863fd96 | make the STATIC_ROOT setting configurable through the environment | django/crashreport/crashreport/settings.py | django/crashreport/crashreport/settings.py | """
Django settings for crashreport project.
Generated by 'django-admin startproject' using Django 1.9.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
... | Python | 0 | @@ -458,17 +458,16 @@
e__)))%0A%0A
-%0A
# Quick-
@@ -3971,30 +3971,52 @@
T =
-'/home/moggi/devel/temp/'
+os.environ.get('STATIC_URL', '/srv/www/static')
%0A
|
4bd4083400e9f6331afcf1fe8015ff05cd0fcbf1 | add support for DMVPN connections to the "show vpn ipsec sa" script. | src/op_mode/show_ipsec_sa.py | src/op_mode/show_ipsec_sa.py | #!/usr/bin/env python3
import re
import sys
import subprocess
import tabulate
import hurry.filesize
def parse_conn_spec(s):
try:
# Example: ESTABLISHED 14 seconds ago, 10.0.0.2[foo]...10.0.0.1[10.0.0.1]
return re.search(r'.*ESTABLISHED\s+(.*)ago,\s(.*)\[(.*)\]\.\.\.(.*)\[(.*)\].*', s).groups()
... | Python | 0 | @@ -579,20 +579,60 @@
rse_
-ike_line(s):
+sa_counters(s):%0A bytes_in, bytes_out = None, None
%0A
@@ -777,51 +777,42 @@
-return re.search(r'.*:%5Cs+(.*%5C/.*(?:%5C/.*)?),
+bytes_in, bytes_out = re.search(r'
%5Cs+(
@@ -1046,51 +1046,42 @@
-return re.search(r'.*:%5Cs+(.*%5C/.*(?:%5C/.*)?),
+bytes_in,... |
125a8b81b4b0c580862b91cbf812b723c5c30afd | fix GAE xmpp forwarding | gozerlib/gae/xmpp/bot.py | gozerlib/gae/xmpp/bot.py | # gozerlib/gae/xmpp/bot.py
#
#
""" XMPP bot. """
## gozerlib imports
from gozerlib.botbase import BotBase
from gozerlib.socklib.xmpp.presence import Presence
## basic imports
import types
import logging
## classes
class XMPPBot(BotBase):
""" XMPPBot just inherits from BotBase for now. """
def __init__(... | Python | 0 | @@ -153,16 +153,63 @@
Presence
+%0Afrom gozerlib.utils.generic import strippedtxt
%0A%0A## bas
@@ -796,32 +796,147 @@
pp message. %22%22%22%0A
+ if type(jids) != types.ListType: jids = %5Bjids, %5D%0A logging.warn(%22%25s - OUT - %25s%22 %25 (self.name, jids))%0A
self.out
@@ -1343,17 +1343,17 ... |
ddcf8dd8bc92319ef8ecce29e81603fbfee679dd | Use None as default for --password, --password-file. | zerver/management/commands/create_user.py | zerver/management/commands/create_user.py | import argparse
import sys
from typing import Any
from django.core import validators
from django.core.exceptions import ValidationError
from django.core.management.base import CommandError
from django.db.utils import IntegrityError
from zerver.lib.actions import do_create_user
from zerver.lib.initial_password import ... | Python | 0 | @@ -998,48 +998,8 @@
d',%0A
- default='',%0A
@@ -1465,48 +1465,8 @@
e',%0A
- default='',%0A
@@ -3258,16 +3258,28 @@
d_file'%5D
+ is not None
:%0A
@@ -3400,16 +3400,28 @@
ssword'%5D
+ is not None
:%0A
|
17e717c356436aff01fe2dddf3a315e9747b3b7a | fix bug in load tools | import/load/tools.py | import/load/tools.py | #!/usr/bin/env python
"""
common tools for load scripts
"""
import os, re
import simplejson
import web
from settings import db
STATE_TABLE = 'load/manual/states.json'
DISTRICT_TABLE = 'load/manual/states.json'
_stripterms = ['the', 'corporation', 'corp', 'incorporated', 'inc']
r_plain = re.compile(r'[a-z ]+')
def ste... | Python | 0.000001 | @@ -203,16 +203,66 @@
es.json'
+%0APOLITICIAN_TABLE = 'load/manual/politicians.json'
%0A%0A_strip
@@ -1339,45 +1339,24 @@
ile(
-'../data/load/politicians/index.json'
+POLITICIAN_TABLE
))%0A
|
3d59bd8b328f2c25ba6f6932ad00dd9abd4038e9 | Increment to version 0.4.3 | importio2/version.py | importio2/version.py | #
# Copyright 2017 Import.io
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | Python | 0.99925 | @@ -589,11 +589,11 @@
= '0.4.
-2
+3
'%0A
|
954f8c2bc62c614724f53dd7d0fdee3a368fc208 | Update fastq-to-fasta.py | scripts/fastq-to-fasta.py | scripts/fastq-to-fasta.py | #! /usr/bin/env python2
#
# This file is part of khmer, http://github.com/ged-lab/khmer/, and is
# Copyright (C) Michigan State University, 2009-2014. It is licensed under
# the three-clause BSD license; see doc/LICENSE.txt.
# Contact: khmer-project@idyll.org
#
# pylint: disable=invalid-name,missing-docstring
"""
Conv... | Python | 0 | @@ -1183,19 +1183,19 @@
tion to
-dro
+kee
p reads
@@ -1260,24 +1260,49 @@
quence file.
+ Default is to drop reads
')%0A retur
|
c88ce63f071d801de44964ae1317bfa4cd62714b | Fix regression test script help message | scripts/reg_test.py | scripts/reg_test.py | #!/usr/bin/env python3
import os
import sys
import argparse
import tempfile
import tarfile
import glob
import urllib.request
import math
import subprocess
import shutil
TATUM_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
tests = {
'basic': [os.path.join(TATUM_ROOT, 'test', 'basic')],
'm... | Python | 0.000027 | @@ -1300,32 +1300,33 @@
ault: %25(default)
+s
)%22,%0A
@@ -1527,16 +1527,17 @@
default)
+s
)%22,%0A
|
f13579c41fed762e154a069a2fb08bd082cba48b | Use status_changed in Paypal card | payments/paypal-card/forms.py | payments/paypal-card/forms.py | from ..forms import PaymentForm
from authorizenet.fields import CreditCardExpiryField
from django import forms
from django.conf import settings
from django.core import validators
from django.utils.translation import ugettext_lazy as _
from payment.fields import CreditCardNumberField
from re import match
CVV_VALIDATOR ... | Python | 0.000001 | @@ -2396,19 +2396,25 @@
t.status
- =
+_changed(
'confirm
@@ -2416,16 +2416,17 @@
nfirmed'
+)
%0A
@@ -2629,18 +2629,25 @@
atus
- =
+_changed(
'error'
+)
%0A
|
497ee04f69ba29b19340a48a47ffb9623f3ce9d5 | Fix casting rule issue in reshape | examples/interpolations.py | examples/interpolations.py | # -----------------------------------------------------------------------------
# Copyright (c) 2009-2016 Nicolas P. Rougier. All rights reserved.
# Distributed under the (new) BSD License.
# -----------------------------------------------------------------------------
""" This example shows spatial interpolation of im... | Python | 0.000001 | @@ -3787,32 +3787,48 @@
= 4*np.arange(17
+,dtype=np.uint32
).reshape(17,1)%0A
|
62ea8f97b5ccffabb70c8c931aa83d0773d74cf8 | Test statistics print formatting | server/collector.py | server/collector.py | """
Collector service provides methods for collection of test runtime results results and storing results
2017 - samuels(c)
"""
import time
from logger import server_logger
class Collector:
def __init__(self, test_stats, stop_event):
self.logger = server_logger.StatsLogger('__Collector__').logger
... | Python | 0.000006 | @@ -572,34 +572,34 @@
logger.info(%22%7B0:
-%5E8
+%3E4
0%7D%22.format(%22Tota
@@ -690,34 +690,34 @@
logger.info(%22%7B0:
-%5E8
+%3E4
0%7D%22.format(%22Tota
@@ -744,24 +744,71 @@
cceeded %7B0%7D%22
+%0A
.format(self
@@ -867,34 +867,34 @@
logger.info(%22%7B0:
-%5E8
+%3... |
e98b493c830e7834da2c59bfdd5284b13bf56335 | stop caching during __init__ | config/core/loader.py | config/core/loader.py | # No shebang line, this module is meant to be imported
#
# Copyright 2013 Oliver Palmer
#
# 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
#
# U... | Python | 0.000001 | @@ -1983,32 +1983,9 @@
-self.files = %5B%5D%0A%0A
+#
if
@@ -2013,36 +2013,32 @@
in self._DATA:%0A
-
self.fil
@@ -2088,28 +2088,24 @@
s)%0A%0A
-
-
if not self.
@@ -2101,38 +2101,60 @@
f not self.files
-:%0A
+ and filename and not data:%0A
rais
@@ -2189,36 +2... |
7c7ffc87887d921db970255de9a5b4052600566a | Add a test for an obsid with an uncommanded slot | mica/vv/tests/test_vv.py | mica/vv/tests/test_vv.py | import os
import numpy as np
from .. import vv
from .. import process
from ... import common
def test_get_vv_dir():
obsdir = vv.get_vv_dir(16504)
assert obsdir == os.path.abspath(os.path.join(common.MICA_ARCHIVE, 'vv/16/16504_v01'))
def test_get_vv_files():
obsfiles = vv.get_vv_files(16504)
assert s... | Python | 0 | @@ -1353,24 +1353,171 @@
(18978, version='last')%0A
+%0Adef test_run_vv_7_track_slots():%0A # Run on an obsid with only 7 slots *commanded* during Kalman%0A process.get_arch_vv(19847, version='last')%0A
|
c20445180e8e4190058560fdd71ae6ef25a69359 | Update spot check vv data test to use fixed version | mica/vv/tests/test_vv.py | mica/vv/tests/test_vv.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import pytest
import numpy as np
from .. import vv
from .. import process
from ... import common
HAS_L1_ARCHIVE = os.path.exists(process.asp_l1_arch.CONFIG['data_root'])
HAS_VV_ARCHIVE = (os.path.exists(vv.FILES['data_root'])
&... | Python | 0 | @@ -1248,24 +1248,23 @@
ta%5B'
-isdefault
+revision
'%5D ==
-1
+3
)%5D%5B'
|
96e210ae9dfcee9013d6dc0b0290ade44d37e6b8 | Remove merge leftover | cloudbaseinit/init.py | cloudbaseinit/init.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Cloudbase Solutions Srl
#
# 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/LICEN... | Python | 0.000001 | @@ -1386,26 +1386,8 @@
s)%0A%0A
-%3E%3E%3E%3E%3E%3E%3E pre-merge%0A
LOG
|
e4c1d531d475ecfcf5cb7b00422e728a57c43433 | change sort order for past topics | chipy_org/apps/meetings/views.py | chipy_org/apps/meetings/views.py | import datetime
from django.conf import settings
from django.contrib.sites.models import Site
from django.core.exceptions import ValidationError
from django.core.mail import EmailMultiAlternatives
from django.template import Context
from django.template.loader import get_template
from django.shortcuts import get_objec... | Python | 0 | @@ -5395,16 +5395,43 @@
ed=True)
+.order_by(%22-meeting__when%22)
%0A%0A%0Aclass
|
0ec21454610d0fc162fc473e9c4477be69670ca3 | fix namespace | mint/cmdline/__init__.py | mint/cmdline/__init__.py | #!/usr/bin/python
#
# Copyright (c) 2005-2006 rPath, Inc.
#
# All Rights Reserved
#
import os
import sys
from conary.lib import options, util, log
from conary.conarycfg import ConfigFile
from mint import constants
from mint.client import MintClient
from mint.cmdline import builds
from mint.cmdline import users
from m... | Python | 0.000166 | @@ -930,16 +930,24 @@
rds%22%5D =
+options.
NO_PARAM
|
824821cfb70ecedab20c7a30d884684046b38a32 | Add test extra feature in feature view test. | phy/plot/tests/test_features.py | phy/plot/tests/test_features.py | # -*- coding: utf-8 -*-
"""Test feature plotting."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
from pytest import mark
import numpy as np
from ..features import FeatureView, plot_features... | Python | 0 | @@ -1408,24 +1408,98 @@
ke_samples)%0A
+ c.add_extra_feature('test', np.sin(np.linspace(-10., 10., n_spikes)))%0A
matrix =
@@ -1630,21 +1630,21 @@
), (
-(1, 0), 'time
+'time', 'test
')%5D%5D
|
330d0df6c45ef1748d7eb4af27dd1d6a49605ad2 | Fix test 007 and 012 | panoptes/test/mount/test_ioptron.py | panoptes/test/mount/test_ioptron.py | import nose.tools
from nose.plugins.skip import Skip, SkipTest
import panoptes
from panoptes.mount.ioptron import Mount
import panoptes.utils.error as error
class TestIOptron():
good_config = {'mount': {'model': 'ioptron', 'port': '/dev/ttyUSB0'}}
def connect_with_skip(self):
"""
This is a ... | Python | 0.000047 | @@ -2329,32 +2329,65 @@
nect_with_skip()
+%0A mount.initialize_mount()
%0A%0A assert
@@ -2813,13 +2813,10 @@
= '
+:
V
-1.00
#'%0A%0A
|
cad48e91776ded810b23c336380797c88dd456c0 | Fix Netflix in light of the new scope selection system | services/netflix.py | services/netflix.py | import urlparse
import foauth.providers
from oauthlib.oauth1.rfc5849 import SIGNATURE_TYPE_QUERY
class Netflix(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'https://www.netflix.com/'
docs_url = 'http://developer.netflix.com/docs'
# URLs to interact with the API
requ... | Python | 0.000008 | @@ -748,28 +748,31 @@
s(self,
-redirect_uri
+*args, **kwargs
):%0A
@@ -829,20 +829,23 @@
ams(
-redirect_uri
+*args, **kwargs
)%0A
|
6d943aa45d2acfc354a0d35448686c026abcfc66 | Update Prechelts_test_program.py | Prechelts_test_program/Prechelts_test_program.py | Prechelts_test_program/Prechelts_test_program.py | """
See: http://norvig.com/java-lisp.html
Problem statement: http://www.flownet.com/ron/papers/lisp-java/instructions.html
Other files: http://www.flownet.com/ron/papers/lisp-java/
Completed in six sessions, for a total of two hours and 58 minutes.
Start: 10:50am
End: 12:26pm
Start: 1:20pm
End: 1:42p... | Python | 0 | @@ -4055,17 +4055,17 @@
digit i
-t
+f
no word
|
527408f92c7a0a2f7492c4c6f0833309a188e153 | fix timezone import (it is from user, not message) | msgvis/apps/importer/models.py | msgvis/apps/importer/models.py | from django.db import models
from django.utils.timezone import utc
from urlparse import urlparse
import json
from datetime import datetime
from email.utils import parsedate
from msgvis.apps.corpus.models import *
# Create your models here.
def create_an_instance_from_json(json_str, dataset_obj):
"""
Given a d... | Python | 0 | @@ -730,24 +730,32 @@
f tweet_data
+%5B'user'%5D
.get('time_z
@@ -759,28 +759,16 @@
e_zone')
- is not None
:%0A
@@ -843,16 +843,24 @@
t_data%5B'
+user'%5D%5B'
time_zon
|
f1c8e3013f8e6da10b796affd23051319388432c | fix import | myconnectome/utils/get_data.py | myconnectome/utils/get_data.py | """
get_data.py: functions to download data for myconnectome project from Stanford archive
Options:
--all: get all basic data needed for analysis
--rawfunc: get raw fMRI data
--diffusion: get raw diffusion data
--anatomy: get raw anatomical data
-h: print this help message
"""
import os,getopt,sys
... | Python | 0.000001 | @@ -389,16 +389,40 @@
ts%0Afrom
+from myconnectome.utils.
run_shel
|
6a4ca5501b2413e77d4408dd269d77e00b053f36 | change up level method | dictate_num/data.py | dictate_num/data.py | import os
import sys
import pickle
import time
from collections import OrderedDict
DEFAULT_NAME = 'anonymous'
DEFAULT_LEVEL = 3
DEFAULT_TRYCNT = 3
DEFAULT_SAVEPATH='./save'
PRE_SAVETAG='savefile_'
#------------------------------------------------
class CRcd(object):
def __init__(self, usr_data, rlt):
... | Python | 0.000062 | @@ -3310,14 +3310,14 @@
_now
-fail +
+succ -
= 1%0A
@@ -3344,15 +3344,22 @@
_now
-fail %3E=
+succ %3C= (-1) *
sel
@@ -3511,42 +3511,8 @@
= 0%0A
- self._nowfail = 0%0A
|
8c353a5596cbcd620eefb3520c86d8117e1dde80 | Change version to v1.2.0a for development purposes. | discord/__init__.py | discord/__init__.py | # -*- coding: utf-8 -*-
"""
Discord API Wrapper
~~~~~~~~~~~~~~~~~~~
A basic wrapper for the Discord API.
:copyright: (c) 2015-2019 Rapptz
:license: MIT, see LICENSE for more details.
"""
__title__ = 'discord'
__author__ = 'Rapptz'
__license__ = 'MIT'
__copyright__ = 'Copyright 2015-2019 Rapptz'
__version__ = '1.1.... | Python | 0 | @@ -311,19 +311,20 @@
__ = '1.
-1.1
+2.0a
'%0A%0Afrom
@@ -1531,17 +1531,17 @@
nor=
-1
+2
, micro=
1, r
@@ -1536,17 +1536,17 @@
, micro=
-1
+0
, releas
@@ -1557,13 +1557,13 @@
el='
-final
+alpha
', s
|
be0410a0a674a1f5b5ba4094bde6e3dc8fba600a | Rework time evolution example. | examples/rate_equations.py | examples/rate_equations.py | import numpy as np
import matplotlib.pyplot as plt
import atomic
ad = atomic.element('carbon')
temperature = np.logspace(0, 3, 50)
density = 1e19
tau = 1e19 / density
t_normalized = np.logspace(-4, 0, 50)
t_normalized -= t_normalized[0]
times = t_normalized * tau
rt = atomic.RateEquations(ad)
yy = rt.solve(tim... | Python | 0 | @@ -196,17 +196,17 @@
gspace(-
-4
+7
, 0, 50)
@@ -344,61 +344,8 @@
y)%0A%0A
-# solution after the last timestep%0Ay_final = yy%5B-1%5D%0A%0A
# ti
@@ -443,17 +443,18 @@
erature(
-4
+38
)%0A%0A# ste
@@ -505,130 +505,8 @@
()%0A%0A
-plt.figure(2); plt.clf()%0Ay_final.plot_vs_temperature()%0Alines_ref = yy.y_coronal.... |
eb6fde636cda8967f5094a325b12988c51a92133 | Bump version | selvbetjening/__init__.py | selvbetjening/__init__.py | __version__ = '8.1'
| Python | 0 | @@ -14,7 +14,7 @@
'8.
-1
+2
'%0A
|
bcb1065513a17fc4155d52af17b4681c16bb2346 | Fix receiver params string generation | senlin/engine/receiver.py | senlin/engine/receiver.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 unde... | Python | 0.000044 | @@ -6853,22 +6853,93 @@
-params
+normalized = sorted(self.params.items(), key=lambda d: d%5B0%5D)%0A qstr
= parse
@@ -6949,27 +6949,26 @@
lencode(
-self.params
+normalized
)%0A
@@ -7012,22 +7012,20 @@
?V=1&',
-params
+qstr
%5D)%0A
|
602954fc1157bad28888135255e6169a7cbf59a7 | bump version to 0.7.2 | phonenumber_field/__init__.py | phonenumber_field/__init__.py | # -*- coding: utf-8 -*-
__version__ = '0.7.1'
| Python | 0 | @@ -40,7 +40,7 @@
0.7.
-1
+2
'%0A
|
787704cb5904ab174e898fe07bd32df52f420a0f | Clean up file afterward otherwise disk will fill up | src/export/export.py | src/export/export.py | #!/usr/bin/env python
"""Wrapper around tilelive for exporting vector tiles from tm2source.
Usage:
export.py local <mbtiles_file> --tm2source=<tm2source> [--bbox=<bbox>] [--min_zoom=<min_zoom>] [--max_zoom=<max_zoom>] [--render_scheme=<scheme>]
export.py remote <sqs_queue> --tm2source=<tm2source> [--bucket=<bucket... | Python | 0 | @@ -3480,24 +3480,56 @@
tiles_file)%0A
+ os.remove(mbtiles_file)%0A
expo
|
66c2259f5ccf81fb73b340147c210edb27fd7066 | Fix Tuya vacuum display battery level (#61643) | homeassistant/components/tuya/vacuum.py | homeassistant/components/tuya/vacuum.py | """Support for Tuya Vacuums."""
from __future__ import annotations
from typing import Any
from tuya_iot import TuyaDevice, TuyaDeviceManager
from homeassistant.components.vacuum import (
STATE_CLEANING,
STATE_DOCKED,
STATE_IDLE,
STATE_PAUSED,
STATE_RETURNING,
SUPPORT_BATTERY,
SUPPORT_FAN_... | Python | 0 | @@ -3753,35 +3753,43 @@
if
-function := device.function
+status_range := device.status_range
.get
@@ -3932,32 +3932,36 @@
a.from_json(
-function
+status_range
.values)%0A%0A
|
86fe21eae50f95c1d6996a630ae95a2fe7a5301c | Rename test class for cached task | buildlet/tests/test_cachedtask.py | buildlet/tests/test_cachedtask.py | import unittest
from ..task import BaseSimpleTask
from ..task.cachedtask import BaseCachedTask
from ..runner import simple
from ..datastore.inmemory import DataStoreNestableInMemory
class ImMemoryCachedTask(BaseCachedTask, BaseSimpleTask):
num_run = 0
def run(self):
self.num_run += 1
def get_ta... | Python | 0 | @@ -374,20 +374,18 @@
Test
-SimpleRunner
+CachedTask
(uni
|
24c2f348e2a91af82759f393c1757693b0e4d1ac | fix import | core/ignore.py | core/ignore.py | #!/usr/bin/env python
"""
simple ignore rule configured by file misc/ignore_event.txt
example:
#sintax:
#src_ip;src_port;dst_ip;dst_port
#
# '*' is use for any
#
# ignore all events from source ip 192.168.0.3
# 192.168.0.3;*;*;*
#
# ignore all events to ssh port 22
# *;*;*;22
"""
import csv
import gzip
import os
i... | Python | 0.000001 | @@ -420,22 +420,49 @@
%0A
-
+%0Afrom core.settings import config
%0Afrom co
|
8d286613dc1cd51fe90338de429f086ed4a264e7 | Comment out a test that wasn't passing that I don't really need | allegedb/allegedb/tests/test_load.py | allegedb/allegedb/tests/test_load.py | import pytest
import os
from allegedb import ORM
import networkx as nx
scalefreestart = nx.MultiDiGraph(name='scale_free_graph_5')
scalefreestart.add_edges_from([(0, 1), (1, 2), (2, 0)])
testgraphs = [
nx.chvatal_graph(),
nx.scale_free_graph(5, create_using=scalefreestart),
nx.chordal_cycle_graph(5, cre... | Python | 0.000002 | @@ -279,24 +279,26 @@
estart),%0A
+ #
nx.chordal_
@@ -371,16 +371,192 @@
h_5')),%0A
+ # The standard networkx edges iterator decides to flip some edges about in arbitrary-seeming%0A # ways that I haven't been able to replicate and it doesn't seem worth it.%0A
%5D%0A# have
|
cbf9cee0e0e12321eb72e97ddd062c17bc4ef31a | add comments | core/models.py | core/models.py | import logging
import datetime
import pytz
utc = pytz.utc
from tornado.escape import json_encode
from couchdbkit import Server
from couchdbkit.schema import Document, StringProperty, \
DateTimeProperty, \
ListProperty
from newebe.sett... | Python | 0 | @@ -1503,32 +1503,157 @@
ocalized=True):%0A
+ '''%0A Transform doc to dictionary. Removes all fields that are not useful%0A for attachments%0A '''%0A%0A
docDict
@@ -1802,16 +1802,17 @@
%5B%22_id%22%5D%0A
+%0A
|
83ec77807d3688236f421555e1f74006a0308208 | Add missing encoding info to alltheitems.py | alltheitems.py | alltheitems.py | #!/usr/bin/env python3
"""
Wurstmineberg: All The Items
"""
import bottle
application = bottle.Bottle()
document_root = '/var/www/alltheitems.wurstmineberg.de'
@application.route('/')
def show_index():
"""The index page."""
return bottle.static_file('index.html', root=document_root)
@application.route('/all... | Python | 0.000004 | @@ -16,16 +16,40 @@
python3%0A
+# -*- coding: utf-8 -*-%0A
%22%22%22%0AWurs
|
772840642e828ee2ad14b2d0ab937f23c2adaac9 | Bump version to 0.1.0rc2 | safepickle/__init__.py | safepickle/__init__.py | from .safepickle import load, loads, dump, dumps
__title__ = 'safepickle'
__version__ = '0.1.0rc1'
__author__ = 'n.io'
__license__ = 'MIT'
__copyright__ = 'Copyright 2017 n.io'
| Python | 0 | @@ -91,17 +91,17 @@
'0.1.0rc
-1
+2
'%0A__auth
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.