commit stringlengths 40 40 | old_file stringlengths 4 150 | new_file stringlengths 4 150 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 501 | message stringlengths 15 4.06k | lang stringclasses 4
values | license stringclasses 13
values | repos stringlengths 5 91.5k | diff stringlengths 0 4.35k |
|---|---|---|---|---|---|---|---|---|---|---|
b3889bbdab80fb502c74b99b61cf36bae112ce2c | node/node.py | node/node.py | from configparser import ConfigParser
from driver import BTRFSDriver
class Node:
"""
# Dummy config example
[bk1-z3.presslabs.net]
ssd = True
"""
def __init__(self, context):
self._conf_path = context['node']['conf_path']
self._driver = BTRFSDriver(context['volume_path'])
... | from configparser import ConfigParser
from driver import BTRFSDriver
class Node:
"""
# Dummy config example
[bk1-z3.presslabs.net]
ssd = True
"""
def __init__(self, context):
self._conf_path = context['node']['conf_path']
self._driver = BTRFSDriver(context['volume_path'])
... | Add property decorator to getters | Add property decorator to getters
| Python | apache-2.0 | PressLabs/cobalt,PressLabs/cobalt | ---
+++
@@ -26,9 +26,11 @@
def get_subvolumes(self):
return self._driver.get_all()
+ @property
def name(self):
return self._name
+ @property
def labels(self):
return self._labels
|
493637ace6881defedee22971f3bc39fe9a5bd0a | freesas/test/__init__.py | freesas/test/__init__.py | #!usr/bin/env python
# coding: utf-8
__author__ = "Jérôme Kieffer"
__license__ = "MIT"
__date__ = "05/09/2017"
__copyright__ = "2015, ESRF"
import unittest
from .test_all import suite
def run():
runner = unittest.TextTestRunner()
return runner.run(suite())
if __name__ == '__main__':
run()
| #!usr/bin/env python
# coding: utf-8
__author__ = "Jérôme Kieffer"
__license__ = "MIT"
__date__ = "15/01/2021"
__copyright__ = "2015-2021, ESRF"
import sys
import unittest
from .test_all import suite
def run_tests():
"""Run test complete test_suite"""
mysuite = suite()
runner = unittest.TextTestRunner()... | Make it compatible with Bob | Make it compatible with Bob | Python | mit | kif/freesas,kif/freesas,kif/freesas | ---
+++
@@ -3,17 +3,27 @@
__author__ = "Jérôme Kieffer"
__license__ = "MIT"
-__date__ = "05/09/2017"
-__copyright__ = "2015, ESRF"
+__date__ = "15/01/2021"
+__copyright__ = "2015-2021, ESRF"
+import sys
import unittest
from .test_all import suite
-def run():
+def run_tests():
+ """Run test complete tes... |
ef03541b2b25ab9cf34deec554a19a32dad7fbec | tools/python/odin_data/meta_writer/__init__.py | tools/python/odin_data/meta_writer/__init__.py | from pkg_resources import require
require('pygelf==0.3.1')
require("h5py==2.8.0")
require('pyzmq==16.0.2') | from pkg_resources import require
require('pygelf==0.3.1')
require("h5py==2.8.0")
require('pyzmq==16.0.2')
| Add new line to end of init file for Meta Writer application | Add new line to end of init file for Meta Writer application | Python | apache-2.0 | percival-detector/odin-data,odin-detector/odin-data,percival-detector/odin-data,odin-detector/odin-data,odin-detector/odin-data,percival-detector/odin-data,percival-detector/odin-data,odin-detector/odin-data,odin-detector/odin-data,odin-detector/odin-data,percival-detector/odin-data,odin-detector/odin-data,percival-det... | |
eaae2a1e88572e224621e242be1d15e92065f15e | mopidy_nad/__init__.py | mopidy_nad/__init__.py | from __future__ import unicode_literals
import os
import pygst
pygst.require('0.10')
import gst
import gobject
from mopidy import config, ext
__version__ = '1.0.0'
class Extension(ext.Extension):
dist_name = 'Mopidy-NAD'
ext_name = 'nad'
version = __version__
def get_default_config(self):
... | from __future__ import unicode_literals
import os
import pygst
pygst.require('0.10')
import gst
import gobject
from mopidy import config, ext
__version__ = '1.0.0'
class Extension(ext.Extension):
dist_name = 'Mopidy-NAD'
ext_name = 'nad'
version = __version__
def get_default_config(self):
... | Use new extension setup() API | Use new extension setup() API
| Python | apache-2.0 | ZenithDK/mopidy-primare,mopidy/mopidy-nad | ---
+++
@@ -22,7 +22,7 @@
conf_file = os.path.join(os.path.dirname(__file__), 'ext.conf')
return config.read(conf_file)
- def register_gstreamer_elements(self):
+ def setup(self, registry):
from .mixer import NadMixer
gobject.type_register(NadMixer)
gst.element_reg... |
42f74f304d0ac404f17d6489033b6140816cb194 | fireplace/cards/gvg/neutral_common.py | fireplace/cards/gvg/neutral_common.py | from ..utils import *
##
# Minions
# Explosive Sheep
class GVG_076:
def deathrattle(self):
for target in self.game.board:
self.hit(target, 2)
# Clockwork Gnome
class GVG_082:
deathrattle = giveSparePart
# Micro Machine
class GVG_103:
def TURN_BEGIN(self, player):
# That card ID is not a mistake
self.... | from ..utils import *
##
# Minions
# Stonesplinter Trogg
class GVG_067:
def CARD_PLAYED(self, player, card):
if player is not self.controller and card.type == CardType.SPELL:
self.buff("GVG_067a")
class GVG_067a:
Atk = 1
# Burly Rockjaw Trogg
class GVG_068:
def CARD_PLAYED(self, player, card):
if player... | Implement Stonesplinter Trogg, Burly Rockjaw Trogg, Ship's Cannon | Implement Stonesplinter Trogg, Burly Rockjaw Trogg, Ship's Cannon
| Python | agpl-3.0 | Ragowit/fireplace,NightKev/fireplace,jleclanche/fireplace,smallnamespace/fireplace,smallnamespace/fireplace,amw2104/fireplace,beheh/fireplace,Meerkov/fireplace,amw2104/fireplace,oftc-ftw/fireplace,butozerca/fireplace,liujimj/fireplace,oftc-ftw/fireplace,Meerkov/fireplace,butozerca/fireplace,Ragowit/fireplace,liujimj/fi... | ---
+++
@@ -3,6 +3,34 @@
##
# Minions
+
+# Stonesplinter Trogg
+class GVG_067:
+ def CARD_PLAYED(self, player, card):
+ if player is not self.controller and card.type == CardType.SPELL:
+ self.buff("GVG_067a")
+
+class GVG_067a:
+ Atk = 1
+
+
+# Burly Rockjaw Trogg
+class GVG_068:
+ def CARD_PLAYED(self, playe... |
7d1463fc732cdc6aef3299c6d2bbe916418e6d6e | hkisaml/api.py | hkisaml/api.py | from django.contrib.auth.models import User
from rest_framework import permissions, routers, serializers, generics, mixins
from oauth2_provider.ext.rest_framework import TokenHasReadWriteScope
class UserSerializer(serializers.ModelSerializer):
def to_representation(self, obj):
ret = super(UserSerializer, ... | from django.contrib.auth.models import User
from rest_framework import permissions, serializers, generics, mixins
from oauth2_provider.ext.rest_framework import TokenHasReadWriteScope
class UserSerializer(serializers.ModelSerializer):
def to_representation(self, obj):
ret = super(UserSerializer, self).to_... | Add full_name field to API | Add full_name field to API
| Python | mit | mikkokeskinen/tunnistamo,mikkokeskinen/tunnistamo | ---
+++
@@ -1,5 +1,5 @@
from django.contrib.auth.models import User
-from rest_framework import permissions, routers, serializers, generics, mixins
+from rest_framework import permissions, serializers, generics, mixins
from oauth2_provider.ext.rest_framework import TokenHasReadWriteScope
@@ -8,6 +8,8 @@
... |
15f22d7c0ac9ddce6cb14cb0cbb35c4d630605d2 | api/ud_helper.py | api/ud_helper.py | import re
from ufal.udpipe import Model, Pipeline, ProcessingError
class Parser:
MODELS = {
"swe": "data/swedish-ud-2.0-170801.udpipe",
}
def __init__(self, language):
model_path = self.MODELS.get(language, None)
if not model_path:
raise ParserException("Cannot find mod... | import re
from ufal.udpipe import Model, Pipeline, ProcessingError
class Parser:
MODELS = {
"swe": "data/swedish-ud-2.0-170801.udpipe",
}
def __init__(self, language):
model_path = self.MODELS.get(language, None)
if not model_path:
raise ParserException("Cannot find mod... | Remove period so input corresponds to output. | Remove period so input corresponds to output.
Former-commit-id: ec6debb1637304407715441ae8319787fe7f0945 | Python | mit | EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger | ---
+++
@@ -20,9 +20,12 @@
def parse(self, text):
text = text.strip()
+ # Adding a period improves detection on especially short sentences
+ period_added = False
last_character = text.strip()[-1]
if re.match(r"\w", last_character, flags=re.UNICODE):
text +=... |
f5de027e14e50ff5085ac1765bdfd2ee7646cabb | extras/sublime_mdown.py | extras/sublime_mdown.py | import sublime
import sublime_plugin
from os.path import basename, dirname
import subprocess
def parse_file_name(file_name):
if file_name is None:
title = "Untitled"
basepath = None
else:
title = basename(file_name)
basepath = dirname(file_name)
return title, basepath
cla... | import sublime
import sublime_plugin
from os.path import basename, dirname
import subprocess
def parse_file_name(file_name):
if file_name is None:
title = "Untitled"
basepath = None
else:
title = basename(file_name)
basepath = dirname(file_name)
return title, basepath
cla... | Adjust extras sublime plugin to follow new changes | Adjust extras sublime plugin to follow new changes
| Python | mit | facelessuser/PyMdown,facelessuser/PyMdown,facelessuser/PyMdown | ---
+++
@@ -23,7 +23,7 @@
binary = sublime.load_settings("mdown.sublime-settings").get("binary", None)
if binary is not None:
- cmd = [binary, "-t", title, "-s", "-p"]
+ cmd = [binary, "-T", title, "-s", "-p"]
if basepath is not None:
cmd += ["-b... |
ba5edd102ddd53f2e95da8b673bf14bdd72dc012 | pw_cli/py/pw_cli/argument_types.py | pw_cli/py/pw_cli/argument_types.py | # Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | # Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | Add quotes around user-provided values | pw_cli: Add quotes around user-provided values
Change-Id: Ifc5fafeefef0dea65cb3aba90b985e6be31fa0bd
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/81980
Reviewed-by: Joe Ethier <f5eb8cb2f5310c7fa9df6f16eabccb4436f47999@google.com>
Commit-Queue: RJ Ascani <4734195edb8e393f72741de86b813743e1460... | Python | apache-2.0 | google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed | ---
+++
@@ -23,7 +23,7 @@
if path.is_dir():
return path.resolve()
- raise argparse.ArgumentTypeError(f'{path} is not a directory')
+ raise argparse.ArgumentTypeError(f'"{path}" is not a directory')
def log_level(arg: str) -> int:
@@ -31,4 +31,4 @@
return getattr(logging, arg.upper(... |
9783844b1597598fad833794b4b291fce49438d4 | app/hr/tasks.py | app/hr/tasks.py | from django.conf import settings
import logging
from datetime import datetime, timedelta
from celery.decorators import task
from hr.utils import blacklist_values
from django.contrib.auth.models import User
from django.core.mail import send_mail
@task(ignore_result=True)
def blacklist_check():
log = blacklist_check... | from django.conf import settings
import logging
from datetime import datetime, timedelta
from celery.decorators import task
from hr.utils import blacklist_values
from django.contrib.auth.models import User
from django.core.mail import send_mail
@task(ignore_result=True)
def blacklist_check():
log = blacklist_check... | Send alerts as one mail | Send alerts as one mail
| Python | bsd-3-clause | nikdoof/test-auth | ---
+++
@@ -12,16 +12,24 @@
users = User.objects.filter(is_active=True)
+ alerts = 0
+ msg = ""
+
for u in users:
if u.groups.count() > 0:
# Has groups
val = blacklist_values(u)
if len(val) > 0:
+ alerts += 1
# Report ... |
7fb89e4dbe2cbed4ef37e13073d4fa3f2a650049 | InvenTree/part/apps.py | InvenTree/part/apps.py | from __future__ import unicode_literals
from django.apps import AppConfig
class PartConfig(AppConfig):
name = 'part'
| from __future__ import unicode_literals
import os
from django.db.utils import OperationalError, ProgrammingError
from django.apps import AppConfig
from django.conf import settings
class PartConfig(AppConfig):
name = 'part'
def ready(self):
"""
This function is called whenever the Part app i... | Check for missing part thumbnails when the server first runs | Check for missing part thumbnails when the server first runs
| Python | mit | inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree | ---
+++
@@ -1,7 +1,36 @@
from __future__ import unicode_literals
+import os
+
+from django.db.utils import OperationalError, ProgrammingError
from django.apps import AppConfig
+from django.conf import settings
class PartConfig(AppConfig):
name = 'part'
+
+ def ready(self):
+ """
+ This ... |
e6e0d96790d71caccb3f00487bfeeddccdc78139 | app/raw/tasks.py | app/raw/tasks.py | from __future__ import absolute_import
from celery import shared_task
from twisted.internet import reactor
from scrapy.crawler import Crawler
from scrapy import log, signals
from scrapy.utils.project import get_project_settings
import os
from raw.scraper.spiders.legco_library import LibraryAgendaSpider
from raw.scrape... | from __future__ import absolute_import
from celery import shared_task
from twisted.internet import reactor
from scrapy.crawler import Crawler
from scrapy import log, signals
from scrapy.utils.project import get_project_settings
import os
from raw.scraper.spiders.legco_library import LibraryAgendaSpider
from raw.scrape... | Fix variable and return value | Fix variable and return value
| Python | mit | legco-watch/legco-watch,comsaint/legco-watch,comsaint/legco-watch,legco-watch/legco-watch,comsaint/legco-watch,legco-watch/legco-watch,comsaint/legco-watch,legco-watch/legco-watch | ---
+++
@@ -14,8 +14,8 @@
output_name = 'foo.jl'
spider = LibraryAgendaSpider()
settings = get_project_settings()
- url_path = os.path.join(settings.get('DATA_DIR_BASE'), 'scrapes', output_name)
- settings.overrides['FEED_URI'] = url_path
+ output_path = os.path.join(settings.get('DATA_DIR_BAS... |
e71870736959efcde2188bdcbd89838b67ca8582 | pathvalidate/__init__.py | pathvalidate/__init__.py | """
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from .__version__ import __author__, __copyright__, __email__, __license__, __version__
from ._common import (
Platform,
ascii_symbols,
normalize_platform,
replace_ansi_escape,
replace_unprintable_char,
unprintable_ascii_ch... | """
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from .__version__ import __author__, __copyright__, __email__, __license__, __version__
from ._base import AbstractSanitizer, AbstractValidator
from ._common import (
Platform,
ascii_symbols,
normalize_platform,
replace_ansi_escape... | Add AbstractSanitizer/AbstractValidator class to import path | Add AbstractSanitizer/AbstractValidator class to import path
| Python | mit | thombashi/pathvalidate | ---
+++
@@ -3,6 +3,7 @@
"""
from .__version__ import __author__, __copyright__, __email__, __license__, __version__
+from ._base import AbstractSanitizer, AbstractValidator
from ._common import (
Platform,
ascii_symbols, |
99818f02ebc46debe349a6c1b6bba70be6e04968 | skimage/io/_plugins/null_plugin.py | skimage/io/_plugins/null_plugin.py | __all__ = ['imshow', 'imread', 'imsave', '_app_show']
import warnings
message = '''\
No plugin has been loaded. Please refer to
skimage.io.plugins()
for a list of available plugins.'''
def imshow(*args, **kwargs):
warnings.warn(RuntimeWarning(message))
def imread(*args, **kwargs):
warnings.warn(Runtime... | __all__ = ['imshow', 'imread', 'imsave', '_app_show']
import warnings
message = '''\
No plugin has been loaded. Please refer to the docstring for ``skimage.io``
for a list of available plugins. You may specify a plugin explicitly as
an argument to ``imread``, e.g. ``imread("image.jpg", plugin='pil')``.
'''
def i... | Update error message for no plugins | Update error message for no plugins
| Python | bsd-3-clause | oew1v07/scikit-image,robintw/scikit-image,rjeli/scikit-image,vighneshbirodkar/scikit-image,Hiyorimi/scikit-image,paalge/scikit-image,juliusbierk/scikit-image,ofgulban/scikit-image,bennlich/scikit-image,bsipocz/scikit-image,chriscrosscutler/scikit-image,vighneshbirodkar/scikit-image,keflavich/scikit-image,oew1v07/scikit... | ---
+++
@@ -3,11 +3,11 @@
import warnings
message = '''\
-No plugin has been loaded. Please refer to
+No plugin has been loaded. Please refer to the docstring for ``skimage.io``
+for a list of available plugins. You may specify a plugin explicitly as
+an argument to ``imread``, e.g. ``imread("image.jpg", plugi... |
9ee9ba34e447e99c868fcb43d40ce905cebf5fb9 | noah/noah.py | noah/noah.py | import json
class Noah(object):
pass | import json
class Noah(object):
def __init__(self, dictionary_file):
self.dictionary = json.load(dictionary_file)
def list(self):
return '\n'.join([entry['word'] for entry in self.dictionary])
def define(self, word):
entry = next((x for x in self.dictionary if x['word'] == word), ... | Add list and define functions. | Add list and define functions.
| Python | mit | maxdeviant/noah | ---
+++
@@ -1,4 +1,24 @@
import json
class Noah(object):
- pass
+ def __init__(self, dictionary_file):
+ self.dictionary = json.load(dictionary_file)
+
+ def list(self):
+ return '\n'.join([entry['word'] for entry in self.dictionary])
+
+ def define(self, word):
+ entry = next((x ... |
55983401814bc0e7158d213885ebdfdbc7e02e9b | DeployUtil/authentication.py | DeployUtil/authentication.py | import urllib.request
import http.cookiejar
import DeployUtil.toolsession as session
#TODO: give an indicator of success
#TODO: handle errors a bit better.
def do_pair(ip, pin, **_args):
# IF YOU DON'T DO THIS OVER HTTPS YOU WILL GET 308s to goto HTTPS
scheme = 'https://'
port = ''
api = '/api/authorize/pair?pin=... | import requests
import json
#TODO: give an indicator of success
#TODO: handle errors a bit better.
def do_pair(ip, pin, **_args):
# IF YOU DON'T DO THIS OVER HTTPS YOU WILL GET 308s to goto HTTPS
# But we cannot verify our HTTPS cert yet because we cannot get it off
# of all devices.
# If the tooling gets smarter... | Add dependency on the requests module and refactor | Add dependency on the requests module and refactor
Since I didn't want to have to write my own Multipart POST handler when I start
writing the install command, I started doing research on the options and came
across "requests". I added the dependency and tried it out by reimplementing
the pair command using that libra... | Python | mit | loarabia/DeployUtil | ---
+++
@@ -1,23 +1,23 @@
-import urllib.request
-import http.cookiejar
-import DeployUtil.toolsession as session
+import requests
+import json
#TODO: give an indicator of success
#TODO: handle errors a bit better.
def do_pair(ip, pin, **_args):
# IF YOU DON'T DO THIS OVER HTTPS YOU WILL GET 308s to goto HTT... |
da5a05c27f1c19c69ce23f5cd6cd0f09edb9d7f7 | paranuara_api/views.py | paranuara_api/views.py | from rest_framework import viewsets
from paranuara_api.models import Company, Person
from paranuara_api.serializers import (
CompanySerializer, CompanyListSerializer, PersonListSerializer,
PersonSerializer
)
class CompanyViewSet(viewsets.ReadOnlyModelViewSet):
queryset = Company.objects.all()
... | from rest_framework import viewsets
from paranuara_api.models import Company, Person
from paranuara_api.serializers import (
CompanySerializer, CompanyListSerializer, PersonListSerializer,
PersonSerializer
)
class MultiSerializerMixin(object):
def get_serializer_class(self):
return self.s... | Refactor common serializer selection code. | Refactor common serializer selection code.
| Python | bsd-3-clause | jarvis-cochrane/paranuara | ---
+++
@@ -6,7 +6,13 @@
PersonSerializer
)
-class CompanyViewSet(viewsets.ReadOnlyModelViewSet):
+class MultiSerializerMixin(object):
+
+ def get_serializer_class(self):
+ return self.serializers[self.action]
+
+
+class CompanyViewSet(MultiSerializerMixin, viewsets.ReadOnlyModelViewSet):
q... |
d36e17e3823af74b5a6f75191f141ec98fdf281f | plugins/irc/irc.py | plugins/irc/irc.py | from p1tr.helpers import clean_string
from p1tr.plugin import *
@meta_plugin
class Irc(Plugin):
"""Provides commands for basic IRC operations."""
@command
@require_master
def nick(self, server, channel, nick, params):
"""Usage: nick NEW_NICKNAME - changes the bot's nickname."""
if len(... | from p1tr.helpers import clean_string
from p1tr.plugin import *
@meta_plugin
class Irc(Plugin):
"""Provides commands for basic IRC operations."""
@command
@require_master
def nick(self, server, channel, nick, params):
"""Usage: nick NEW_NICKNAME - changes the bot's nickname."""
if len(... | Fix failing reconnects; add quit IRC command | Fix failing reconnects; add quit IRC command
| Python | mit | howard/p1tr-tng,howard/p1tr-tng | ---
+++
@@ -38,8 +38,12 @@
if len(params) > 0:
channel = params[0]
self.bot.client.send('PART', channel)
-
+
@command
@require_master
def quit(self, server, channel, nick, params):
- self.blot.intended_disconnect = True
+ """
+ Usage: quit - Tell ... |
d8e0109e4c697f4a920ff4993c491eb5b0d38d55 | setup.py | setup.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2010-2018 OneLogin, Inc.
# MIT License
from setuptools import setup
setup(
name='python-saml',
version='2.4.1',
description='Onelogin Python Toolkit. Add SAML support to your Python software using this library',
classifiers=[
'De... | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2010-2018 OneLogin, Inc.
# MIT License
from setuptools import setup
setup(
name='python-saml',
version='2.4.1',
description='Onelogin Python Toolkit. Add SAML support to your Python software using this library',
classifiers=[
'De... | Update pylint dependency to 1.9.1 | Update pylint dependency to 1.9.1
| Python | mit | onelogin/python-saml,onelogin/python-saml | ---
+++
@@ -40,7 +40,7 @@
'test': (
'coverage>=3.6',
'freezegun==0.3.5',
- 'pylint==1.3.1',
+ 'pylint==1.9.1',
'pep8==1.5.7',
'pyflakes==0.8.1',
'coveralls==1.1', |
cf16c64e378f64d2267f75444c568aed895f940c | setup.py | setup.py | import platform, sys
from distutils.core import setup
from distextend import *
packages, package_data = findPackages("countershape")
setup(
name = "countershape",
version = "0.1",
description = "A framework for rendering static documentation.",
author = "Nullcube Pty Ltd",
autho... | import platform, sys
from distutils.core import setup
from distextend import *
packages, package_data = findPackages("countershape")
setup(
name = "countershape",
version = "0.1",
description = "A framework for rendering static documentation.",
author = "Nullcube Pty Ltd",
autho... | Add csblog to installed scripts. | Add csblog to installed scripts.
| Python | mit | mhils/countershape,samtaufa/countershape,cortesi/countershape,cortesi/countershape,samtaufa/countershape,mhils/countershape | ---
+++
@@ -12,5 +12,5 @@
url = "http://dev.nullcube.com",
packages = packages,
package_data = package_data,
- scripts = ["cshape"],
+ scripts = ["cshape", "csblog"],
) |
075488b6f2b33c211b734dc08414d45cb35c4e68 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
# Match releases to redis-py versions
__version__ = '2.9.0.11'
# Jenkins will replace __build__ with a unique value.
__build__ = ''
setup(name='mockredispy',
version=__version__ + __build__,
description='Mock for redis-py',
url='htt... | #!/usr/bin/env python
from setuptools import setup, find_packages
# Match releases to redis-py versions
__version__ = '2.9.0.12'
# Jenkins will replace __build__ with a unique value.
__build__ = ''
setup(name='mockredispy',
version=__version__ + __build__,
description='Mock for redis-py',
url='htt... | Bump version to prepare for next release. | Bump version to prepare for next release.
| Python | apache-2.0 | locationlabs/mockredis | ---
+++
@@ -3,7 +3,7 @@
from setuptools import setup, find_packages
# Match releases to redis-py versions
-__version__ = '2.9.0.11'
+__version__ = '2.9.0.12'
# Jenkins will replace __build__ with a unique value.
__build__ = '' |
76f254582243dc927ca25eebf2b47702ef43167b | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
from mongorm import VERSION
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
version = '.'.join(map(str, VERSION))
if __name__ == '__main__':
setup(
name='mongorm',
versi... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
VERSION = (0, 6, 5)
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
version = '.'.join(map(str, VERSION))
if __name__ == '__main__':
setup(
name='mongorm',
version=versi... | Fix install-time dependency on pymongo. | Fix install-time dependency on pymongo.
| Python | bsd-2-clause | rahulg/mongorm | ---
+++
@@ -4,7 +4,7 @@
import os
from setuptools import setup
-from mongorm import VERSION
+VERSION = (0, 6, 5)
def read(fname): |
047215a3e07e7cebf78e409602dd57a2709f8923 | setup.py | setup.py |
import sys
from setuptools import setup, find_packages
from cement.utils import version
VERSION = version.get_version()
f = open('README.md', 'r')
LONG = f.read()
f.close()
setup(name='cement',
version=VERSION,
description='CLI Framework for Python',
long_description=LONG,
long_description_content_t... |
import sys
from setuptools import setup, find_packages
from cement.utils import version
VERSION = version.get_version()
f = open('README.md', 'r')
LONG = f.read()
f.close()
setup(name='cement',
version=VERSION,
description='CLI Framework for Python',
long_description=LONG,
long_description_content_t... | Update broken link in PyPi (Homepage) | Update broken link in PyPi (Homepage) | Python | bsd-3-clause | datafolklabs/cement,datafolklabs/cement,datafolklabs/cement | ---
+++
@@ -19,7 +19,7 @@
keywords='cli framework',
author='Data Folk Labs, LLC',
author_email='derks@datafolklabs.com',
- url='http://builtoncement.org',
+ url='https://builtoncement.com',
license='BSD',
packages=find_packages(exclude=['ez_setup', 'tests*']),
package_data={'cement... |
ca7df2103a2e53f0b401c7004a2a5e942bd3e7e1 | setup.py | setup.py | from distutils.core import setup
from setuptools import setup, find_packages
setup(name = "django-image-cropping",
version = "0.3.0",
description = "A reusable app for cropping images easily and non-destructively in Django",
long_description=open('README.rst').read(),
author = "jonasvp",
author_ema... | from distutils.core import setup
from setuptools import setup, find_packages
setup(name = "django-image-cropping",
version = "0.3.0",
description = "A reusable app for cropping images easily and non-destructively in Django",
long_description=open('README.rst').read(),
author = "jonasvp",
author_ema... | Remove PIL and docutils from requirements, easy_thumbnails requires it anyway | Remove PIL and docutils from requirements, easy_thumbnails requires it anyway
| Python | bsd-3-clause | winzard/django-image-cropping,henriquechehad/django-image-cropping,henriquechehad/django-image-cropping,winzard/django-image-cropping,henriquechehad/django-image-cropping,winzard/django-image-cropping | ---
+++
@@ -15,8 +15,6 @@
packages = find_packages(),
include_package_data=True,
install_requires = [
- 'docutils',
- 'PIL',
'easy_thumbnails',
],
classifiers = [ |
4b3dc61e5cb46774cf647f8c640b280aae1e4e90 | setup.py | setup.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# © 2017-2019 qsuscs, TobiX
# Should still run with Python 2.7...
from __future__ import print_function, unicode_literals
import os
import sys
from glob import glob
os.chdir(os.path.dirname(os.path.abspath(__file__)))
exit = 0
for f in glob('dot.*'):
dst_home = '~/... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# © 2017-2021 qsuscs, TobiX
# Should still run with Python 2.7...
from __future__ import print_function, unicode_literals
import os
import sys
from glob import glob
os.chdir(os.path.dirname(os.path.abspath(__file__)))
home = os.path.realpath(os.path.expanduser('~'))
ex... | Handle symlinks in path to home directory | Handle symlinks in path to home directory
| Python | isc | TobiX/dotfiles,TobiX/dotfiles | ---
+++
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-# © 2017-2019 qsuscs, TobiX
+# © 2017-2021 qsuscs, TobiX
# Should still run with Python 2.7...
from __future__ import print_function, unicode_literals
@@ -10,11 +10,13 @@
from glob import glob
os.chdir(os.path.dirname(os.path.abspath(__... |
f8c049e1b6a6309d494771e4038aa10b40bfbf76 | setup.py | setup.py | from setuptools import setup
VERSION = '1.2.2'
setup(
name='pkgconfig',
version=VERSION,
author='Matthias Vogelgesang',
author_email='matthias.vogelgesang@gmail.com',
url='http://github.com/matze/pkgconfig',
license='MIT',
packages=['pkgconfig'],
description="Interface Python with pkg-... | from setuptools import setup
VERSION = '1.2.2'
setup(
name='pkgconfig',
version=VERSION,
author='Matthias Vogelgesang',
author_email='matthias.vogelgesang@gmail.com',
url='http://github.com/matze/pkgconfig',
license='MIT',
packages=['pkgconfig'],
description="Interface Python with pkg-... | Move 'nose' dependency to 'tests_require' | Move 'nose' dependency to 'tests_require'
`nose` is only required for invoking `setup.py test`, not for any other
`setup.py` command. This avoids the auto-download behavior when just
building and installing the module (e.g., installing via `pip`).
Signed-off-by: Eric N. Vander Weele <4c4001a597f85b23ba16d5c26e44733b... | Python | mit | matze/pkgconfig | ---
+++
@@ -12,7 +12,7 @@
packages=['pkgconfig'],
description="Interface Python with pkg-config",
long_description=open('README.rst').read(),
- setup_requires=['nose>=1.0'],
+ tests_require=['nose>=1.0'],
python_requires='>=2.6, !=3.0.*, !=3.1.*, !=3.2.*',
test_suite='test',
) |
70be93343a985b4aa81944649c42c4138fece388 | setup.py | setup.py | from __future__ import print_function
import codecs
import os
from setuptools import setup, find_packages
import piazza_api
def read(filename):
"""Read and return `filename` in root dir of project and return string"""
here = os.path.abspath(os.path.dirname(__file__))
return codecs.open(os.path.join(here... | from __future__ import print_function
import codecs
import os
import re
from setuptools import setup
def read(filename):
"""Read and return `filename` in root dir of project and return string"""
here = os.path.abspath(os.path.dirname(__file__))
return codecs.open(os.path.join(here, filename), 'r').read()... | Use regex for finding version in __init__.py | Use regex for finding version in __init__.py
| Python | mit | hfaran/piazza-api | ---
+++
@@ -2,9 +2,8 @@
import codecs
import os
-from setuptools import setup, find_packages
-
-import piazza_api
+import re
+from setuptools import setup
def read(filename):
@@ -13,13 +12,17 @@
return codecs.open(os.path.join(here, filename), 'r').read()
+# https://github.com/kennethreitz/requests/... |
e1cc4d49f37abbda308968b1bf4f49298a1c904e | setup.py | setup.py | #!/usr/bin/env python
# coding=utf8
import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(name='legitfs',
version='0.3dev',
description='A read-only FUSE-based filesystem allowing you to browse '
... | #!/usr/bin/env python
# coding=utf8
import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(name='legitfs',
version='0.3.dev1',
description='A read-only FUSE-based filesystem allowing you to browse '
... | Change version to prevent unleash from choking. | Change version to prevent unleash from choking.
| Python | mit | mbr/legitfs | ---
+++
@@ -11,7 +11,7 @@
setup(name='legitfs',
- version='0.3dev',
+ version='0.3.dev1',
description='A read-only FUSE-based filesystem allowing you to browse '
'git repositories',
long_description=read('README.rst'), |
90c82f0936addeb4469db2c42c1cd48713e7f3cf | progress_logger.py | progress_logger.py | # Copyright Google
# BSD License
import copy
import wash
# from http://stackoverflow.com/questions/8924173/how-do-i-print-bold-text-in-python
class color:
PURPLE = '\033[95m'
CYAN = '\033[96m'
DARKCYAN = '\033[36m'
BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
BOLD = '\033... | # Copyright Google
# BSD License
import copy
import wash
# from http://stackoverflow.com/questions/8924173/how-do-i-print-bold-text-in-python
class color:
PURPLE = '\033[95m'
CYAN = '\033[96m'
DARKCYAN = '\033[36m'
BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
BOLD = '\033... | Switch from bold to red highlighting. | Switch from bold to red highlighting.
With many terminal fonts bold is subtle. The red is much more clear.
| Python | bsd-2-clause | adlr/wash-sale-calculator | ---
+++
@@ -19,20 +19,20 @@
END = '\033[0m'
class TermLogger(object):
- def print_progress(self, lots, text, bold_lots):
+ def print_progress(self, lots, text, red_lots):
lots = copy.copy(lots) # so I can re-sort non-destructively
print text
lots.sort(cmp=wash.cmp_by_buy_date)
- bold_ids = ... |
8f815c41b505c01cbc1c57088ddc3a465f1ac07c | fmn/web/default_config.py | fmn/web/default_config.py | SECRET_KEY = 'changeme please'
# TODO -- May I set this to true?
FAS_OPENID_CHECK_CERT = False
#ADMIN_GROUPS = ['sysadmin-web']
| SECRET_KEY = 'changeme please'
# TODO -- May I set this to true?
FAS_OPENID_CHECK_CERT = False
#ADMIN_GROUPS = ['sysadmin-web']
FMN_FEDORA_OPENID = 'https://id.fedoraproject.org'
| Add a configuration key for the URL of the Fedora OpenID server | Add a configuration key for the URL of the Fedora OpenID server | Python | lgpl-2.1 | jeremycline/fmn,jeremycline/fmn,jeremycline/fmn | ---
+++
@@ -4,3 +4,5 @@
FAS_OPENID_CHECK_CERT = False
#ADMIN_GROUPS = ['sysadmin-web']
+
+FMN_FEDORA_OPENID = 'https://id.fedoraproject.org' |
c0c3d63c6124549008a2dc17c1e691e799129444 | plex2myshows/modules/plex/plex.py | plex2myshows/modules/plex/plex.py | class Plex(object):
def __init__(self, plex):
self.plex = plex
def get_watched_episodes(self, section_name):
watched_episodes = set(self.plex.library.section(section_name).searchEpisodes(unwatched=False))
return watched_episodes
| class Plex(object):
def __init__(self, plex):
self.plex = plex
def get_watched_episodes(self, section_name):
watched_episodes = []
shows = self.plex.library.section(section_name).searchShows()
for show in shows:
watched_episodes.extend(show.watched())
return ... | Fix getting unwatched episodes from Plex | Fix getting unwatched episodes from Plex
| Python | mit | verdel/plex2myshows | ---
+++
@@ -3,5 +3,8 @@
self.plex = plex
def get_watched_episodes(self, section_name):
- watched_episodes = set(self.plex.library.section(section_name).searchEpisodes(unwatched=False))
+ watched_episodes = []
+ shows = self.plex.library.section(section_name).searchShows()
+ ... |
b34c8b94202294f63ff88d2d8085222bfa50dc46 | candidates/csv_helpers.py | candidates/csv_helpers.py | from __future__ import unicode_literals
from compat import BufferDictWriter
from .models import CSV_ROW_FIELDS
def _candidate_sort_by_name_key(row):
return (
row['name'].split()[-1],
not row['election_current'],
row['election_date'],
row['election'],
row['post_label']
... | from __future__ import unicode_literals
from compat import BufferDictWriter
from .models import CSV_ROW_FIELDS
def _candidate_sort_by_name_key(row):
return (
row['name'].split()[-1],
row['name'].rsplit(None, 1)[0],
not row['election_current'],
row['election_date'],
row['el... | Sort on first name after last name | Sort on first name after last name
| Python | agpl-3.0 | DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative | ---
+++
@@ -7,6 +7,7 @@
def _candidate_sort_by_name_key(row):
return (
row['name'].split()[-1],
+ row['name'].rsplit(None, 1)[0],
not row['election_current'],
row['election_date'],
row['election'],
@@ -19,7 +20,9 @@
row['election_date'],
row['election... |
0ed07211d62044a42e1b0ff024f8feb20435270d | pombola/south_africa/views/api.py | pombola/south_africa/views/api.py | from django.http import JsonResponse
from django.views.generic import ListView
from pombola.core.models import Organisation
# Output Popolo JSON suitable for WriteInPublic for any committees that have an
# email address.
class CommitteesPopoloJson(ListView):
queryset = Organisation.objects.filter(
kind__... | from django.http import JsonResponse
from django.views.generic import ListView
from pombola.core.models import Organisation
# Output Popolo JSON suitable for WriteInPublic for any committees that have an
# email address.
class CommitteesPopoloJson(ListView):
queryset = Organisation.objects.filter(
kind__... | Use strings for IDs in Committee Popolo | Use strings for IDs in Committee Popolo
| Python | agpl-3.0 | mysociety/pombola,mysociety/pombola,mysociety/pombola,mysociety/pombola,mysociety/pombola,mysociety/pombola | ---
+++
@@ -17,7 +17,7 @@
{
'persons': [
{
- 'id': committee.id,
+ 'id': str(committee.id),
'name': committee.name,
'email': committee.contacts.filter(kind__slug='email')[... |
1a18445482c67b38810e330065e5ff04e772af4a | foundation/letters/migrations/0009_auto_20151216_0656.py | foundation/letters/migrations/0009_auto_20151216_0656.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
def split_models(apps, schema_editor):
# We can't import the Person model directly as it may be a newer
# version than this migration expects. We use the historical version.
L = apps.get_model("letter... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
def split_models(apps, schema_editor):
# We can't import the Person model directly as it may be a newer
# version than this migration expects. We use the historical version.
L = apps.get_model("letter... | Fix from_email in IncomingLetter migrations | Fix from_email in IncomingLetter migrations
| Python | bsd-3-clause | ad-m/foundation-manager,pilnujemy/pytamy,pilnujemy/pytamy,pilnujemy/pytamy,ad-m/foundation-manager,ad-m/foundation-manager,pilnujemy/pytamy,ad-m/foundation-manager | ---
+++
@@ -13,7 +13,7 @@
for letter in L.objects.filter(incoming=True).all():
IL.objects.create(parent=letter,
- temp_from_email=letter.email,
+ temp_email=letter.email,
temp_sender=letter.sender_office)
for letter in L... |
e47b7e5952d4001459aee5ba570a7cc6d4c10d43 | tests/unit/directory/test_directory.py | tests/unit/directory/test_directory.py | """Contains the unit tests for the inner directory package"""
import unittest
import os
from classyfd import Directory
class TestDirectory(unittest.TestCase):
def setUp(self):
self.fake_path = os.path.abspath("hello-world-dir")
return
def test_create_directory_object(self):
d = D... | """Contains the unit tests for the inner directory package"""
import unittest
import os
from classyfd import Directory, InvalidDirectoryValueError
class TestDirectory(unittest.TestCase):
def setUp(self):
self.fake_path = os.path.abspath("hello-world-dir")
return
def test_create_directory... | Add import of the InvalidDirectoryValueError to the directory package's test file | Add import of the InvalidDirectoryValueError to the directory package's test file
| Python | mit | SizzlingVortex/classyfd | ---
+++
@@ -3,7 +3,7 @@
import unittest
import os
-from classyfd import Directory
+from classyfd import Directory, InvalidDirectoryValueError
class TestDirectory(unittest.TestCase):
def setUp(self):
@@ -14,6 +14,8 @@
d = Directory(self.fake_path)
self.assertTrue(d)
return
+
... |
4b7b2727a35cfcb0117b0ba4571da9a0ea81824a | greenmine/base/routers.py | greenmine/base/routers.py | # -*- coding: utf-8 -*-
from rest_framework import routers
# Special router for actions.
actions_router = routers.Route(url=r'^{prefix}/{methodname}{trailing_slash}$',
mapping={'{httpmethod}': '{methodname}'},
name='{basename}-{methodnamehyphen}',
... | # -*- coding: utf-8 -*-
from rest_framework import routers
class DefaultRouter(routers.DefaultRouter):
pass
__all__ = ["DefaultRouter"]
| Remove old reimplementation of routes. | Remove old reimplementation of routes.
| Python | agpl-3.0 | joshisa/taiga-back,joshisa/taiga-back,gam-phon/taiga-back,bdang2012/taiga-back-casting,jeffdwyatt/taiga-back,rajiteh/taiga-back,crr0004/taiga-back,crr0004/taiga-back,EvgeneOskin/taiga-back,dayatz/taiga-back,Rademade/taiga-back,joshisa/taiga-back,Rademade/taiga-back,astronaut1712/taiga-back,forging2012/taiga-back,coopso... | ---
+++
@@ -2,20 +2,9 @@
from rest_framework import routers
-# Special router for actions.
-actions_router = routers.Route(url=r'^{prefix}/{methodname}{trailing_slash}$',
- mapping={'{httpmethod}': '{methodname}'},
- name='{basename}-{methodnamehyphen}'... |
d896082b282d17616573de2bcca4b383420d1e7a | python/__init__.py | python/__init__.py | # -*- coding: UTF-8 -*-
# Copyright (C) 2009 Itaapy, ArsAperta, Pierlis, Talend
# Import from itools
from itools.pkg import get_version
__version__ = get_version()
| # -*- coding: UTF-8 -*-
# Copyright (C) 2009 Itaapy, ArsAperta, Pierlis, Talend
# Import from itools
from itools.core import get_version
__version__ = get_version()
| Fix a bad import (get_version) | Fix a bad import (get_version)
| Python | apache-2.0 | Agicia/lpod-python,lpod/lpod-docs,Agicia/lpod-python,lpod/lpod-docs | ---
+++
@@ -2,7 +2,7 @@
# Copyright (C) 2009 Itaapy, ArsAperta, Pierlis, Talend
# Import from itools
-from itools.pkg import get_version
+from itools.core import get_version
__version__ = get_version() |
b78ce84f2a36789fc0fbb6b184b5c8d8ebb23234 | run_tests.py | run_tests.py | #!/usr/bin/env python
import sys
import pytest
if __name__ == '__main__':
sys.exit(pytest.main())
| #!/usr/bin/env python
import sys
import pytest
if __name__ == '__main__':
# show output results from every test function
args = ['-v']
# show the message output for skipped and expected failure tests
args.append('-rxs')
# compute coverage stats for bluesky
args.extend(['--cov', 'bluesky'])
... | Clarify py.test arguments in run_test.py | TST: Clarify py.test arguments in run_test.py
| Python | bsd-3-clause | ericdill/bluesky,ericdill/bluesky | ---
+++
@@ -3,4 +3,12 @@
import pytest
if __name__ == '__main__':
- sys.exit(pytest.main())
+ # show output results from every test function
+ args = ['-v']
+ # show the message output for skipped and expected failure tests
+ args.append('-rxs')
+ # compute coverage stats for bluesky
+ args.e... |
d043eef098be68690b9d6cd5790b667cdb2d825b | runserver.py | runserver.py | from wKRApp import app
app.secret_key = "my precious" # 2 security flaws, need to sort out
app.run(debug=True)
| from wKRApp import app
# 2 security flaws, need to sort out
# 1. the key should be randomy generated
# 2. the key should be set in a config file that is then imported in.
app.secret_key = "my precious"
app.run(debug=True)
| Add comments about security issue | style(comments): Add comments about security issue
- Added comments about two security issues relating to the session secret key
| Python | mit | stuffy-the-dragon/wKRApp,bafana5/wKRApp,stuffy-the-dragon/wKRApp,stuffy-the-dragon/wKRApp,bafana5/wKRApp,bafana5/wKRApp | ---
+++
@@ -1,3 +1,6 @@
from wKRApp import app
-app.secret_key = "my precious" # 2 security flaws, need to sort out
+ # 2 security flaws, need to sort out
+ # 1. the key should be randomy generated
+ # 2. the key should be set in a config file that is then imported in.
+app.secret_key = "my precious"
app.run(de... |
803368f1741a9558ea84092dc975c1a10f51fa79 | administracion/urls.py | administracion/urls.py | from django.conf.urls import url
from .views import admin_main_dashboard, admin_users_dashboard, \
admin_users_create, admin_users_edit, admin_users_edit_form, \
admin_users_delete_modal, admin_users_delete, list_studies
app_name = 'administracion'
# Urls en espanol
urlpatterns =... | from django.conf.urls import url
from .views import admin_main_dashboard, admin_users_dashboard, \
admin_users_create, admin_users_edit, admin_users_edit_form, \
admin_users_delete_modal, admin_users_delete, list_studies
app_name = 'administracion'
# Urls en espanol
urlpatterns =... | Change url in dashboard administrador | Change url in dashboard administrador
| Python | mit | erikiado/jp2_online,erikiado/jp2_online,erikiado/jp2_online | ---
+++
@@ -7,7 +7,7 @@
# Urls en espanol
urlpatterns = [
- url(r'^principal/', admin_main_dashboard, name='main'),
+ url(r'^principal/$', admin_main_dashboard, name='main'),
url(r'^usuarios/nuevo/', admin_users_create, name='users_add'),
url(r'^usuarios/editar/(\d+)/', admin_users_edit_form, name... |
3450712ec629c1720b6a6af28835d95a91b8fce7 | setup.py | setup.py | #!/usr/bin/python
import os
import re
from setuptools import setup
from m2r import parse_from_file
import restructuredtext_lint
# Parser README.md into reStructuredText format
rst_readme = parse_from_file('README.md')
# Validate the README, checking for errors
errors = restructuredtext_lint.lint(rst_readme)
# Raise ... | #!/usr/bin/python
import os
import re
from setuptools import setup
from m2r import parse_from_file
import restructuredtext_lint
# Parser README.md into reStructuredText format
rst_readme = parse_from_file('README.md')
# Validate the README, checking for errors
errors = restructuredtext_lint.lint(rst_readme)
# Raise ... | Use classifiers to specify the license. | Use classifiers to specify the license.
Classifiers are a standard way of specifying a license, and make it easy
for automated tools to properly detect the license of the package.
The "license" field should only be used if the license has no
corresponding Trove classifier.
| Python | mit | jongracecox/anybadge,jongracecox/anybadge | ---
+++
@@ -42,5 +42,8 @@
entry_points={
'console_scripts': ['anybadge=anybadge:main',
'anybadge-server=anybadge_server:main'],
- }
+ },
+ classifiers=[
+ 'License :: OSI Approved :: MIT License'
+ ]
) |
e2e6cdac88ee03f78713ac4a50d0003a471a0027 | setup.py | setup.py | from setuptools import setup
long_description = open('README.rst').read()
setup(
name="celery-redbeat",
description="A Celery Beat Scheduler using Redis for persistent storage",
long_description=long_description,
version="2.0.0",
url="https://github.com/sibson/redbeat",
license="Apache License... | from setuptools import setup
long_description = open('README.rst').read()
setup(
name="celery-redbeat",
description="A Celery Beat Scheduler using Redis for persistent storage",
long_description=long_description,
version="2.0.0",
url="https://github.com/sibson/redbeat",
license="Apache License... | Add Python 3.9 to the list of supported versions. | Add Python 3.9 to the list of supported versions.
| Python | apache-2.0 | sibson/redbeat | ---
+++
@@ -23,6 +23,7 @@
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython',
'Operating ... |
38fb1ef71f827ff8483984ed9b7844dbdd945643 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(
name='Dapi',
version='1.0',
description='DevAssistant Package Index',
author='Miro Hroncok',
author_email='mhroncok@redhat.com',
url='https://github.com/hroncok/dapi',
license='AGPLv3',
install_requires=[
'Django==1.6',
... | #!/usr/bin/env python
from setuptools import setup
setup(
name='Dapi',
version='1.0',
description='DevAssistant Package Index',
author='Miro Hroncok',
author_email='mhroncok@redhat.com',
url='https://github.com/hroncok/dapi',
license='AGPLv3',
install_requires=[
'Django==1.6',
... | Add dependency link to daploader from pypi to overide Openshift's cache | Add dependency link to daploader from pypi to overide Openshift's cache
| Python | agpl-3.0 | devassistant/dapi,devassistant/dapi,devassistant/dapi | ---
+++
@@ -29,5 +29,6 @@
dependency_links = [
'git+git://github.com/omab/python-social-auth.git@c5dd3339#egg=python-social-auth',
'git+git://github.com/tomchristie/django-rest-framework.git@03b4c60b#egg=djangorestframework',
+ 'https://pypi.python.org/packages/source/d/daploader/dapload... |
04a31c02c8186505e6e211e76903e5f1b62b3f90 | setup.py | setup.py | from distutils.core import setup, Extension
setup(name='python-pytun',
author='montag451',
author_email='montag451 at laposte.net',
maintainer='montag451',
maintainer_email='montag451 at laposte.net',
url='https://github.com/montag451/pytun',
description='Linux TUN/TAP wrapper for P... | from distutils.core import setup, Extension
setup(name='python-pytun',
author='montag451',
author_email='montag451 at laposte.net',
maintainer='montag451',
maintainer_email='montag451 at laposte.net',
url='https://github.com/montag451/pytun',
description='Linux TUN/TAP wrapper for P... | Change version number (v2.2 -> v2.2.1) | Change version number (v2.2 -> v2.2.1)
| Python | mit | montag451/pytun,montag451/pytun | ---
+++
@@ -8,7 +8,7 @@
url='https://github.com/montag451/pytun',
description='Linux TUN/TAP wrapper for Python',
long_description=open('README.rst').read(),
- version='2.2',
+ version='2.2.1',
ext_modules=[Extension('pytun', ['pytun.c'])],
classifiers=[
'Develo... |
6ab083eede68946f4a87d24732cd82be09734d52 | setup.py | setup.py | import os
from setuptools import setup
longDesc = ""
if os.path.exists("README.md"):
longDesc = open("README.md").read().strip()
setup(
name = "pytesseract",
version = "0.1.6",
author = "Samuel Hoffstaetter",
author_email="",
maintainer = "Matthias Lee",
maintainer_email = "pytesseract@madma... | import os
from setuptools import setup
longDesc = ""
if os.path.exists("README.rst"):
longDesc = open("README.rst").read().strip()
setup(
name = "pytesseract",
version = "0.1.6",
author = "Samuel Hoffstaetter",
author_email="",
maintainer = "Matthias Lee",
maintainer_email = "pytesseract@mad... | Update the long_description with README.rst | Update the long_description with README.rst | Python | apache-2.0 | madmaze/pytesseract | ---
+++
@@ -3,8 +3,8 @@
longDesc = ""
-if os.path.exists("README.md"):
- longDesc = open("README.md").read().strip()
+if os.path.exists("README.rst"):
+ longDesc = open("README.rst").read().strip()
setup(
name = "pytesseract", |
1ba7e00ac7ef7f22aed22833940d3666d7584deb | setup.py | setup.py | from setuptools import setup
setup(
name='tangled.sqlalchemy',
version='0.1a3.dev0',
description='Tangled SQLAlchemy integration',
long_description=open('README.rst').read(),
url='http://tangledframework.org/',
download_url='https://github.com/TangledWeb/tangled.sqlalchemy/tags',
author='W... | from setuptools import setup
setup(
name='tangled.sqlalchemy',
version='0.1a3.dev0',
description='Tangled SQLAlchemy integration',
long_description=open('README.rst').read(),
url='http://tangledframework.org/',
download_url='https://github.com/TangledWeb/tangled.sqlalchemy/tags',
author='W... | Add generic Python 3 trove classifier | Add generic Python 3 trove classifier
| Python | mit | TangledWeb/tangled.sqlalchemy | ---
+++
@@ -27,6 +27,7 @@
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
+ 'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
... |
a84159df875f6a07300deb8f98224f92e0578445 | setup.py | setup.py | import os
from os.path import relpath, join
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def find_package_data(data_root, package_root):
files = []
for root, dirnames, filenames in os.walk(data_root):
for fn in filenames:
... | import os
from os.path import relpath, join
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def find_package_data(data_root, package_root):
files = []
for root, dirnames, filenames in os.walk(data_root):
for fn in filenames:
... | Increment version number now that 0.1.5 release out. | Increment version number now that 0.1.5 release out.
| Python | mit | open-forcefield-group/openforcefield,open-forcefield-group/openforcefield,openforcefield/openff-toolkit,open-forcefield-group/openforcefield,openforcefield/openff-toolkit | ---
+++
@@ -14,7 +14,7 @@
setup(
name = "smarty",
- version = "0.1.5",
+ version = "0.1.6",
author = "John Chodera, David Mobley, and others",
author_email = "john.chodera@choderalab.org",
description = ("Automated Bayesian atomtype sampling"), |
fb166c2afa110b758efbc8aeae9ff177050bfa0c | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
import sys
setup(name="OnionLauncher",
version="0.0.1",
description="Launcher for Tor",
license = "BSD",
author="Neel Chauhan",
author_email="neel@neelc.org",
url="https://www.github.com/neelchauhan/OnionLauncher/",
packages=["OnionLauncher"],
entry_points={'... | #!/usr/bin/env python
from setuptools import setup
import sys
setup(name="OnionLauncher",
version="0.0.1",
description="Launcher for Tor",
license = "BSD",
author="Neel Chauhan",
author_email="neel@neelc.org",
url="https://www.github.com/neelchauhan/OnionLauncher/",
packages=["OnionLauncher"],
entry_points={'... | Add correct filename in OnionLauncher ui directory | Add correct filename in OnionLauncher ui directory
| Python | bsd-2-clause | neelchauhan/OnionLauncher | ---
+++
@@ -12,7 +12,7 @@
url="https://www.github.com/neelchauhan/OnionLauncher/",
packages=["OnionLauncher"],
entry_points={'gui_scripts': ['OnionLauncher=OnionLauncher.main:main_loop']},
- package_data={"OnionLauncher": ["data/*"]},
+ package_data={"OnionLauncher": ["ui_files/*"]},
install_requires=[
"st... |
3352920f7e92e2732eb2914313bdee6b5ab7f549 | setup.py | setup.py | # -*- coding: utf-8 -*-
# Copyright (C) 2012-2014 MUJIN Inc
from distutils.core import setup
try:
from mujincommon.setuptools import Distribution
except ImportError:
from distutils.dist import Distribution
version = {}
exec(open('python/mujincontrollerclient/version.py').read(), version)
setup(
distclass=... | # -*- coding: utf-8 -*-
# Copyright (C) 2012-2014 MUJIN Inc
from distutils.core import setup
try:
from mujincommon.setuptools import Distribution
except ImportError:
from distutils.dist import Distribution
version = {}
exec(open('python/mujincontrollerclient/version.py').read(), version)
setup(
distclass=... | Fix bin scripts having python2 or python3 specific path. | Fix bin scripts having python2 or python3 specific path.
| Python | apache-2.0 | mujin/mujincontrollerclientpy | ---
+++
@@ -15,7 +15,11 @@
version=version['__version__'],
packages=['mujincontrollerclient'],
package_dir={'mujincontrollerclient': 'python/mujincontrollerclient'},
- scripts=['bin/mujin_controllerclientpy_registerscene.py', 'bin/mujin_controllerclientpy_applyconfig.py'],
+ data_files=[
+ ... |
16d509f2ff1af0f7588f302323c883edcd4384b4 | setup.py | setup.py | #!/usr/bin/env python
import os
import sys
import shutil
import setuptools.command.egg_info as egg_info_cmd
from setuptools import setup, find_packages
SETUP_DIR = os.path.dirname(__file__)
README = os.path.join(SETUP_DIR, 'README.rst')
try:
import gittaggers
tagger = gittaggers.EggInfoFromGit
except Import... | #!/usr/bin/env python
import os
import sys
import shutil
import setuptools.command.egg_info as egg_info_cmd
from setuptools import setup, find_packages
SETUP_DIR = os.path.dirname(__file__)
README = os.path.join(SETUP_DIR, 'README.rst')
try:
import gittaggers
tagger = gittaggers.EggInfoFromGit
except Import... | Move schema salad minimum version back to earlier version. | Move schema salad minimum version back to earlier version.
| Python | apache-2.0 | common-workflow-language/cwltest,common-workflow-language/cwltest | ---
+++
@@ -27,7 +27,7 @@
license='Apache 2.0',
packages=["cwltest"],
install_requires=[
- 'schema-salad >= 1.17',
+ 'schema-salad >= 1.14',
'typing >= 3.5.2' ],
tests_require=[],
entry_points={ |
fb3983017da558018fd0de7ef10a4c0e98bbb0ec | txircd/modules/cmd_user.py | txircd/modules/cmd_user.py | from twisted.words.protocols import irc
from txircd.modbase import Command
import string
class UserCommand(Command):
def onUse(self, user, data):
if not user.username:
user.registered -= 1
user.setUsername(data["ident"])
user.realname = data["gecos"]
if user.registered =... | from twisted.words.protocols import irc
from txircd.modbase import Command
import string
class UserCommand(Command):
def onUse(self, user, data):
if not user.username:
user.registered -= 1
user.setUsername(data["ident"])
user.setRealname(data["gecos"])
if user.registered... | Send the gecos input from USER through the sanitization as well | Send the gecos input from USER through the sanitization as well
| Python | bsd-3-clause | Heufneutje/txircd,ElementalAlchemist/txircd,DesertBus/txircd | ---
+++
@@ -7,7 +7,7 @@
if not user.username:
user.registered -= 1
user.setUsername(data["ident"])
- user.realname = data["gecos"]
+ user.setRealname(data["gecos"])
if user.registered == 0:
user.register()
|
a013af88adad469782d2f05a0b882c2f5500b6b8 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(
name='gallerize',
version='0.3.1',
description='Create a static HTML/CSS image gallery from a bunch of images.',
author='Jochen Kupperschmidt',
author_email='homework@nwsnet.de',
url='http://homework.nwsnet.de/releases/cc0e/#gallerize'... | # -*- coding: utf-8 -*-
from setuptools import setup
def read_readme():
with open('README.rst') as f:
return f.read()
setup(
name='gallerize',
version='0.3.1',
description='Create a static HTML/CSS image gallery from a bunch of images.',
long_description=read_readme(),
license='MIT'... | Include README as long package description. Specified license. | Include README as long package description. Specified license.
| Python | mit | TheLady/gallerize,TheLady/gallerize | ---
+++
@@ -1,12 +1,19 @@
-#!/usr/bin/env python
+# -*- coding: utf-8 -*-
from setuptools import setup
+
+
+def read_readme():
+ with open('README.rst') as f:
+ return f.read()
setup(
name='gallerize',
version='0.3.1',
description='Create a static HTML/CSS image gallery from a bunch o... |
71acce577d1fc7d3366e1cc763433f18bbdfdc00 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name="valideer",
version="0.4.1",
description="Lightweight data validation and adaptation library for Python",
long_description=open("README.rst").read(),
url="https://github.com/podio/valideer",
author="George Sakkis",
... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name="valideer",
version="0.4.1",
description="Lightweight data validation and adaptation library for Python",
long_description=open("README.rst").read(),
url="https://github.com/podio/valideer",
author="George Sakkis",
... | Upgrade status to Production/Stable and add specific python version to classifiers | Upgrade status to Production/Stable and add specific python version to classifiers
| Python | mit | gsakkis/valideer,podio/valideer | ---
+++
@@ -16,11 +16,14 @@
platforms=["any"],
keywords="validation adaptation typechecking jsonschema",
classifiers=[
- "Development Status :: 4 - Beta",
+ "Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: OS Independ... |
c96dfa0387380da023f72b77b2d159e400d2f491 | setup.py | setup.py | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from setuptools import setup
PACKAGE_VERSION = '0.1'
deps = ['fxos-appgen>=0.2.7',
'marionette_client>=0.7.1.1'... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from setuptools import setup
PACKAGE_VERSION = '0.1'
deps = ['fxos-appgen>=0.2.7',
'marionette_client>=0.7.1.1'... | Update to the latest version of wptrunner. | Update to the latest version of wptrunner.
| Python | mpl-2.0 | ypwalter/fxos-certsuite,mozilla-b2g/fxos-certsuite,ShakoHo/fxos-certsuite,Conjuror/fxos-certsuite,ShakoHo/fxos-certsuite,ypwalter/fxos-certsuite,oouyang/fxos-certsuite,ypwalter/fxos-certsuite,mozilla-b2g/fxos-certsuite,cr/fxos-certsuite,ypwalter/fxos-certsuite,oouyang/fxos-certsuite,askeing/fxos-certsuite,mozilla-b2g/f... | ---
+++
@@ -13,7 +13,7 @@
'moznetwork >= 0.24',
'mozprocess >= 0.18',
'wptserve >= 1.0.1',
- 'wptrunner >= 0.2.8, < 0.3']
+ 'wptrunner >= 0.3']
setup(name='fxos-certsuite',
version=PACKAGE_VERSION, |
6da15fd8f95638d919e47fe1150acce5a9401745 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
import conveyor
install_requires = [
"APScheduler",
"forklift",
"redis",
"xmlrpc2",
]
setup(
name="conveyor",
version=conveyor.__version__,
description="Warehouse and PyPI Synchronization",
long_description=open("READ... | #!/usr/bin/env python
from setuptools import setup, find_packages
import conveyor
install_requires = [
"APScheduler",
"forklift",
"redis",
"six",
"xmlrpc2",
]
setup(
name="conveyor",
version=conveyor.__version__,
description="Warehouse and PyPI Synchronization",
long_description... | Add six to the requirements | Add six to the requirements
| Python | bsd-2-clause | crateio/carrier | ---
+++
@@ -8,6 +8,7 @@
"APScheduler",
"forklift",
"redis",
+ "six",
"xmlrpc2",
]
|
7bab32ef89d760a8cf4aeb2700725ea88e3fc31c | tests/basics/builtin_hash.py | tests/basics/builtin_hash.py | # test builtin hash function
print(hash(False))
print(hash(True))
print({():1}) # hash tuple
print({1 << 66:1}) # hash big int
print(hash in {hash:1}) # hash function
try:
hash([])
except TypeError:
print("TypeError")
class A:
def __hash__(self):
return 123
def __repr__(self):
return ... | # test builtin hash function
print(hash(False))
print(hash(True))
print({():1}) # hash tuple
print({1 << 66:1}) # hash big int
print(hash in {hash:1}) # hash function
try:
hash([])
except TypeError:
print("TypeError")
class A:
def __hash__(self):
return 123
def __repr__(self):
return ... | Add further tests for class defining __hash__. | tests: Add further tests for class defining __hash__.
| Python | mit | martinribelotta/micropython,puuu/micropython,ganshun666/micropython,suda/micropython,EcmaXp/micropython,ChuckM/micropython,mgyenik/micropython,pramasoul/micropython,infinnovation/micropython,bvernoux/micropython,xyb/micropython,lbattraw/micropython,adafruit/circuitpython,blazewicz/micropython,tobbad/micropython,kostyll... | ---
+++
@@ -42,3 +42,15 @@
hash(D())
except TypeError:
print("TypeError")
+
+# __hash__ returning a bool should be converted to an int
+class E:
+ def __hash__(self):
+ return True
+print(hash(E()))
+
+# __hash__ returning a large number should be truncated
+class F:
+ def __hash__(self):
+ ... |
4d6fdc98fd681a78eeeff6041efdfe7107a9743c | setup.py | setup.py | from setuptools import setup, find_packages
import account
setup(
name="django-user-accounts",
version=account.__version__,
author="Brian Rosner",
author_email="brosner@gmail.com",
description="a Django user account app",
long_description=open("README.rst").read(),
license="MIT",
url=... | from setuptools import setup, find_packages
import account
setup(
name="django-user-accounts",
version=account.__version__,
author="Brian Rosner",
author_email="brosner@gmail.com",
description="a Django user account app",
long_description=open("README.rst").read(),
license="MIT",
url=... | Set new minimum pytz version | Set new minimum pytz version
| Python | mit | GeoNode/geonode-user-accounts,ntucker/django-user-accounts,nderituedwin/django-user-accounts,mysociety/django-user-accounts,pinax/django-user-accounts,jawed123/django-user-accounts,pinax/django-user-accounts,ntucker/django-user-accounts,jpotterm/django-user-accounts,nderituedwin/django-user-accounts,jawed123/django-use... | ---
+++
@@ -15,7 +15,7 @@
packages=find_packages(),
install_requires=[
"django-appconf>=0.6",
- "pytz>=2013.9"
+ "pytz>=2015.6"
],
zip_safe=False,
package_data={ |
0936621b0a4162589560cc112f4f8e4425fed652 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name = "django-ajax-utilities",
url = 'https://github.com/citylive/django-ajax-utilities',
license = 'BSD',
description = "Pagination, xhr and tabbing utilities for the Django framework.",
long_description = open('README','r').read(),
author = ... | from setuptools import setup, find_packages
setup(
name = "django-ajax-utilities",
version = '1.2.0',
url = 'https://github.com/citylive/django-ajax-utilities',
license = 'BSD',
description = "Pagination, xhr and tabbing utilities for the Django framework.",
long_description = open('README','r'... | Change to semantic version number | Change to semantic version number
| Python | bsd-3-clause | vikingco/django-ajax-utilities,vikingco/django-ajax-utilities,vikingco/django-ajax-utilities | ---
+++
@@ -2,6 +2,7 @@
setup(
name = "django-ajax-utilities",
+ version = '1.2.0',
url = 'https://github.com/citylive/django-ajax-utilities',
license = 'BSD',
description = "Pagination, xhr and tabbing utilities for the Django framework.", |
9712dd202f4fe5ee3938dbea987ced267a5199e5 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='pyhaproxy',
version='0.3.0',
keywords=('haproxy', 'parse'),
description='A Python library to parse haproxy configuration file',
license='MIT License',
install_requires=[],
include_package_data=True,
package_data={
'pyhapr... | from setuptools import setup, find_packages
setup(
name='pyhaproxy',
version='0.3.2',
keywords=('haproxy', 'parse'),
description='A Python library to parse haproxy configuration file',
license='MIT License',
install_requires=[],
include_package_data=True,
package_data={
'pyhapr... | Change version to v0.3.2. Release Notes: fix the incorrect attribute accessing in class Option. | Change version to v0.3.2. Release Notes: fix the incorrect attribute accessing in class Option.
| Python | mit | imjoey/pyhaproxy | ---
+++
@@ -2,7 +2,7 @@
setup(
name='pyhaproxy',
- version='0.3.0',
+ version='0.3.2',
keywords=('haproxy', 'parse'),
description='A Python library to parse haproxy configuration file',
license='MIT License', |
dae923853e0218fc77923f4512f72d0109e8f4bb | setup.py | setup.py | from setuptools import setup
PACKAGE_NAME = 'funsize'
PACKAGE_VERSION = '0.1'
setup(name=PACKAGE_NAME,
version=PACKAGE_VERSION,
description='partial mar webservice prototype',
long_description='https://wiki.mozilla.org/User:Ffledgling/Senbonzakura',
classifiers=[],
author='Anhad Jai Sing... | from setuptools import setup
PACKAGE_NAME = 'funsize'
PACKAGE_VERSION = '0.1'
setup(name=PACKAGE_NAME,
version=PACKAGE_VERSION,
description='partial mar webservice prototype',
long_description='https://wiki.mozilla.org/User:Ffledgling/Senbonzakura',
classifiers=[],
author='Anhad Jai Sing... | Add boto as requirement for funsize deployment. | Add boto as requirement for funsize deployment.
| Python | mpl-2.0 | petemoore/build-funsize,petemoore/build-funsize | ---
+++
@@ -17,6 +17,7 @@
'celery==3.1.11',
'nose==1.3.3',
'requests==2.2.1',
+ 'boto==2.33.0',
],
packages=[
'funsize', |
bfc85ac3d2b29e5287fa556e0e2215bc39668db5 | setup.py | setup.py | """setup.py - build script for parquet-python."""
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='parquet',
version='1.2',
description='Python support for Parquet file format',
author='Joe Crobak',
author_email='joecrow@gmail.com',
ur... | """setup.py - build script for parquet-python."""
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='parquet',
version='1.2',
description='Python support for Parquet file format',
author='Joe Crobak',
author_email='joecrow@gmail.com',
ur... | Replace thriftpy dependency with thriftpy2 | Replace thriftpy dependency with thriftpy2
| Python | apache-2.0 | jcrobak/parquet-python | ---
+++
@@ -30,7 +30,7 @@
packages=['parquet'],
install_requires=[
'python-snappy',
- 'thriftpy>=0.3.6',
+ 'thriftpy2',
],
extras_require={
':python_version=="2.7"': [ |
c4e1059b387269b6098d05d2227c085e7931b140 | setup.py | setup.py | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from distutils.core import setup, Extension
cpp_args = ['-std=c++11', '-stdlib=libc++', '-mmacosx-version-min=10.7']
e... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from distutils.core import setup, Extension
cpp_args = ['-std=c++11', '-stdlib=libc++', '-mmacosx-version-min=10.7']
e... | Update module description for clarity | Update module description for clarity
| Python | mpl-2.0 | natelust/least_asymmetry,natelust/least_asymmetry,natelust/least_asymmetry | ---
+++
@@ -21,6 +21,6 @@
version='0.1',
author='Nate Lust',
author_email='nlust@astro.princeton.edu',
- description='A python extension module for calculating asymmetry values',
+ description='A module for calculating centers though least asymmetry',
ext_modules=ext_modules,
) |
a52c84f092d89f89130c2696c98779e955f083dc | tests/test_version_parser.py | tests/test_version_parser.py | import pytest
from leak.version_parser import versions_split
def test_versions_split():
pass
def test_wrong_versions_split():
# too many dots
assert versions_split('1.2.3.4') == [0, 0, 0]
# test missing numeric version
with pytest.raises(ValueError):
versions_split('not.numeric')
... | import pytest
from leak.version_parser import versions_split
def test_versions_split():
assert versions_split('1.8.1') == [1, 8, 1]
assert versions_split('1.4') == [1, 4, 0]
assert versions_split('2') == [2, 0, 0]
def test_versions_split_str_mapping():
assert versions_split('1.11rc1', type_applyer=... | Add tests for version splitting | Add tests for version splitting
| Python | mit | bmwant21/leak | ---
+++
@@ -4,7 +4,15 @@
def test_versions_split():
- pass
+ assert versions_split('1.8.1') == [1, 8, 1]
+ assert versions_split('1.4') == [1, 4, 0]
+ assert versions_split('2') == [2, 0, 0]
+
+
+def test_versions_split_str_mapping():
+ assert versions_split('1.11rc1', type_applyer=str) == ['1', '... |
fdb461f000adefff0d1050464e5783c96222f364 | setup.py | setup.py | from setuptools import setup
setup(
name='scuevals-api',
packages=['scuevals_api'],
include_package_data=True,
test_suite='tests',
entry_points={
'console_scripts': [
'app=scuevals_api.cmd:cli'
]
},
install_requires=[
'alembic==0.9.7',
'beautifuls... | from setuptools import setup
setup(
name='scuevals-api',
packages=['scuevals_api'],
include_package_data=True,
test_suite='tests',
entry_points={
'console_scripts': [
'app=scuevals_api.cmd:cli'
]
},
install_requires=[
'alembic==0.9.7',
'beautifuls... | Add minimum version for pycryptodome | Add minimum version for pycryptodome
| Python | agpl-3.0 | SCUEvals/scuevals-api,SCUEvals/scuevals-api | ---
+++
@@ -26,6 +26,7 @@
'gunicorn==19.7.1',
'newrelic==2.100.0.84',
'psycopg2==2.7.3.2',
+ 'pycryptodome>=3.4.7'
'python-jose==2.0.1',
'PyYAML==3.12',
'requests==2.18.4', |
43dc6dc0a9b33de0db1f79f7470d69519192dc1f | setup.py | setup.py | from setuptools import setup, find_packages
try:
import nose.commands
extra_args = dict(
cmdclass={'test': nose.commands.nosetests},
)
except ImportError:
extra_args = dict()
setup(
name='dear_astrid',
version='0.1.0',
author='Randy Stauner',
author_email='randy@magnificent-tears.com',
package... | from setuptools import setup, find_packages
try:
import nose.commands
extra_args = dict(
cmdclass={'test': nose.commands.nosetests},
)
except ImportError:
extra_args = dict()
# TODO: would this work? (is the file included in the dist?)
#tests_require = [l.strip() for l in open('test-requirements.txt').rea... | Put tests_require into extras_require also | Put tests_require into extras_require also
| Python | mit | rwstauner/dear_astrid,rwstauner/dear_astrid | ---
+++
@@ -7,6 +7,10 @@
)
except ImportError:
extra_args = dict()
+
+# TODO: would this work? (is the file included in the dist?)
+#tests_require = [l.strip() for l in open('test-requirements.txt').readlines()]
+tests_require = ['mock']
setup(
name='dear_astrid',
@@ -29,10 +33,11 @@
setup_requires=... |
85d2c012bfaeeb04fa8dd31cd05a04a8dc43c14e | tests/grammar_term-nonterm_test/NonterminalsInvalidTest.py | tests/grammar_term-nonterm_test/NonterminalsInvalidTest.py | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import TestCase, main
from grammpy.RawGrammar import RawGrammar
class NonterminalsInvalidTest(TestCase):
pass
if __name__ == '__main__':
main()
| #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import TestCase, main
from grammpy.RawGrammar import RawGrammar as Grammar
from grammpy import Nonterminal
from grammpy.exceptions import NotNonterminalException
class TempClass(... | Add tests that have and get of nonterms raise exceptions | Add tests that have and get of nonterms raise exceptions
| Python | mit | PatrikValkovic/grammpy | ---
+++
@@ -7,13 +7,57 @@
"""
from unittest import TestCase, main
-from grammpy.RawGrammar import RawGrammar
+from grammpy.RawGrammar import RawGrammar as Grammar
+from grammpy import Nonterminal
+from grammpy.exceptions import NotNonterminalException
+
+
+class TempClass(Nonterminal):
+ pass
class Nonter... |
d57161b9449faa1218e4dab55fe4b2bd6f0c3436 | utils.py | utils.py | import json
import os
import time
import uuid
from google.appengine.api import urlfetch
from models import Profile
def getUserId(user, id_type="email"):
if id_type == "email":
return user.email()
if id_type == "oauth":
"""A workaround implementation for getting userid."""
auth = os.ge... | import json
import os
import time
from google.appengine.api import urlfetch
def getUserId(user, id_type="email"):
if id_type == "email":
return user.email()
if id_type == "oauth":
"""A workaround implementation for getting userid."""
auth = os.getenv('HTTP_AUTHORIZATION')
bea... | Remove unused code and get rid of flake8 errors | Remove unused code and get rid of flake8 errors
| Python | apache-2.0 | swesterveld/udacity-nd004-p4-conference-organization-app,swesterveld/udacity-nd004-p4-conference-organization-app,swesterveld/udacity-nd004-p4-conference-organization-app | ---
+++
@@ -1,10 +1,9 @@
import json
import os
import time
-import uuid
from google.appengine.api import urlfetch
-from models import Profile
+
def getUserId(user, id_type="email"):
if id_type == "email":
@@ -33,13 +32,3 @@
time.sleep(wait)
wait = wait + i
retu... |
2a7ed7c2d6f37c3b6965ad92b21cecc0a4abd91a | upload_datasets_to_galaxy.py | upload_datasets_to_galaxy.py | #!/usr/bin/python3
import argparse
# from bioblend.galaxy import GalaxyInstance
import configparser
def upload_datasets_to_galaxy():
# Arguments initialization
parser = argparse.ArgumentParser(description="Script to upload a folder into"
"Galaxy Data Libraries")... | #!/usr/bin/python3
import argparse
from bioblend.galaxy import GalaxyInstance
import configparser
import os
def upload_datasets_to_galaxy():
# Arguments initialization
parser = argparse.ArgumentParser(description="Script to upload a folder into"
"Galaxy Data Lib... | Add first verion to upload via BioBlend | Add first verion to upload via BioBlend
| Python | mit | pajanne/galaxy-kickstart,pajanne/galaxy-kickstart | ---
+++
@@ -1,7 +1,8 @@
#!/usr/bin/python3
import argparse
-# from bioblend.galaxy import GalaxyInstance
+from bioblend.galaxy import GalaxyInstance
import configparser
+import os
def upload_datasets_to_galaxy():
# Arguments initialization
@@ -21,9 +22,34 @@
galaxy_config = config['Galaxy']
- #... |
e890ac9ef00193beac77b757c62911553cebf656 | test.py | test.py | import urllib
urllib.urlretrieve('http://192.168.0.13:8080/photoaf.jpg', '/home/pi/img/img.jpg') | import urllib
urllib.urlretrieve('http://192.168.0.13:8080/photoaf.jpg', 'img.jpg') | Change save path to local path | Change save path to local path
| Python | mit | adampiskorski/lpr_poc | ---
+++
@@ -1,2 +1,2 @@
import urllib
-urllib.urlretrieve('http://192.168.0.13:8080/photoaf.jpg', '/home/pi/img/img.jpg')
+urllib.urlretrieve('http://192.168.0.13:8080/photoaf.jpg', 'img.jpg') |
ac8d6210b1e48e7ce1131412b45d23846b7c73d2 | test.py | test.py | import time
import panoply
KEY = "panoply/2g866xw4oaqt1emi"
SECRET = "MmM0NWNvc2wwYmJ4ZDJ0OS84MmY3MzQ4NC02MDIzLTQyN2QtODdkMS0yY2I0NTAzNDk0NDQvMDM3MzM1OTk5NTYyL3VzLWVhc3QtMQ==" # noqa
sdk = panoply.SDK(KEY, SECRET)
sdk.write('roi-test', {'hello': 1})
print sdk.qurl
time.sleep(5)
| import time
import panoply
KEY = "panoply/2g866xw4oaqt1emi"
SECRET = "MmM0NWNvc2wwYmJ4ZDJ0OS84MmY3MzQ4NC02MDIzLTQyN2QtODdkMS0yY2I0NTAzNDk0NDQvMDM3MzM1OTk5NTYyL3VzLWVhc3QtMQ==" # noqa
sdk = panoply.SDK(KEY, SECRET)
sdk.write('roi-test', {'hello': 1})
print sdk.qurl
time.sleep(5)
| Fix to minor style issue | Fix to minor style issue
| Python | mit | panoplyio/panoply-python-sdk | ---
+++
@@ -7,8 +7,6 @@
sdk = panoply.SDK(KEY, SECRET)
sdk.write('roi-test', {'hello': 1})
-
-
print sdk.qurl
time.sleep(5) |
0c1b0a7787bd6824815ae208edab8f208b53af09 | api/base/exceptions.py | api/base/exceptions.py |
def jsonapi_exception_handler(exc, context):
"""
Custom exception handler that returns errors object as an array with a 'detail' member
"""
from rest_framework.views import exception_handler
response = exception_handler(exc, context)
if response is not None:
if 'detail' in response.dat... |
def jsonapi_exception_handler(exc, context):
"""
Custom exception handler that returns errors object as an array with a 'detail' member
"""
from rest_framework.views import exception_handler
response = exception_handler(exc, context)
if response is not None:
if 'detail' in response.dat... | Add comment to override of status code | Add comment to override of status code
| Python | apache-2.0 | Ghalko/osf.io,billyhunt/osf.io,wearpants/osf.io,asanfilippo7/osf.io,ticklemepierce/osf.io,kch8qx/osf.io,GageGaskins/osf.io,njantrania/osf.io,mluke93/osf.io,baylee-d/osf.io,alexschiller/osf.io,asanfilippo7/osf.io,wearpants/osf.io,kwierman/osf.io,leb2dg/osf.io,leb2dg/osf.io,chennan47/osf.io,arpitar/osf.io,leb2dg/osf.io,e... | ---
+++
@@ -12,6 +12,7 @@
else:
response.data = {'errors': [{'detail': response.data}]}
+ # Returns 401 instead of 403 during unauthorized requests without having user to log in with Basic Auth
if response is not None and response.data['errors'][0]['detail'] == "Authentication credenti... |
a155e8654a95969abc2290d4198622991d6cb00e | ideascube/conf/idb_bdi.py | ideascube/conf/idb_bdi.py | """Generic config for Ideasbox of Burundi"""
from .idb import * # noqa
from django.utils.translation import ugettext_lazy as _
USER_FORM_FIELDS = (
('Ideasbox', ['serial', 'box_awareness']),
(_('Personal informations'), ['refugee_id', 'short_name', 'full_name', 'birth_year', 'gender', 'phone']), # noqa
(... | """Generic config for Ideasbox of Burundi"""
from .idb import * # noqa
from django.utils.translation import ugettext_lazy as _
USER_FORM_FIELDS = (
('Ideasbox', ['serial', 'box_awareness']),
(_('Personal informations'), ['refugee_id', 'short_name', 'full_name', 'birth_year', 'gender', 'phone']), # noqa
(... | Remove duplicate entry for vikidia and gutenberg in burundi boxes | Remove duplicate entry for vikidia and gutenberg in burundi boxes
| Python | agpl-3.0 | ideascube/ideascube,ideascube/ideascube,ideascube/ideascube,ideascube/ideascube | ---
+++
@@ -14,12 +14,6 @@
HOME_CARDS = HOME_CARDS + [
{
- 'id': 'vikidia',
- },
- {
- 'id': 'gutenberg',
- },
- {
'id': 'cpassorcier',
},
{ |
bc199a9eaa2416b35d1d691f580e6c9ca0b1a2ae | website/discovery/views.py | website/discovery/views.py | from website import settings
from website.project import Node
from website.project import utils
from modularodm.query.querydialect import DefaultQueryDialect as Q
def activity():
node_data = utils.get_node_data()
if node_data:
hits = utils.hits(node_data)
else:
hits = {}
# New Proje... | from website import settings
from website.project import Node
from website.project import utils
from modularodm.query.querydialect import DefaultQueryDialect as Q
def activity():
"""Reads node activity from pre-generated popular projects and registrations.
New and Noteworthy projects are set manually or thro... | Remove node counts and update docstrings on new view for activity | Remove node counts and update docstrings on new view for activity
| Python | apache-2.0 | monikagrabowska/osf.io,binoculars/osf.io,monikagrabowska/osf.io,acshi/osf.io,laurenrevere/osf.io,cslzchen/osf.io,laurenrevere/osf.io,alexschiller/osf.io,monikagrabowska/osf.io,Johnetordoff/osf.io,alexschiller/osf.io,mluo613/osf.io,CenterForOpenScience/osf.io,chennan47/osf.io,mfraezz/osf.io,aaxelb/osf.io,alexschiller/os... | ---
+++
@@ -6,14 +6,12 @@
def activity():
+ """Reads node activity from pre-generated popular projects and registrations.
+ New and Noteworthy projects are set manually or through `scripts/populate_new_and_noteworthy_projects.py`
+ Popular projects and registrations are generated by `scripts/populate_po... |
e968983001cced5391a163ab282ef2f2ded492f6 | eliot/__init__.py | eliot/__init__.py | """
Eliot: An Opinionated Logging Library
Suppose we turn from outside estimates of a man, to wonder, with keener
interest, what is the report of his own consciousness about his doings or
capacity: with what hindrances he is carrying on his daily labors; what
fading of hopes, or what deeper fixity of s... | """
Eliot: Logging as Storytelling
Suppose we turn from outside estimates of a man, to wonder, with keener
interest, what is the report of his own consciousness about his doings or
capacity: with what hindrances he is carrying on his daily labors; what
fading of hopes, or what deeper fixity of self-del... | Remove link to private document. | Remove link to private document.
| Python | apache-2.0 | ScatterHQ/eliot,ClusterHQ/eliot,ScatterHQ/eliot,iffy/eliot,ScatterHQ/eliot | ---
+++
@@ -1,5 +1,5 @@
"""
-Eliot: An Opinionated Logging Library
+Eliot: Logging as Storytelling
Suppose we turn from outside estimates of a man, to wonder, with keener
interest, what is the report of his own consciousness about his doings or
@@ -10,9 +10,6 @@
its final pause.
-- George... |
4d46001296ad083df6827a9c97333f0f093f31bd | example/config.py | example/config.py | # Mnemosyne configuration
# =======================
#
# This file is a Python script. When run, the following variables will be
# defined for you; you may change or add to them as you see fit.
#
# ``entries_dir``: a Maildir containing all the blog entries.
# ``layout_dir``: the blog's layout, as a skeleton directory tr... | # Mnemosyne configuration
# =======================
#
# This file is a Python script. When run, the following variables will be
# defined for you; you may change or add to them as you see fit.
#
# * ``entries_dir``: a Maildir containing all the blog entries.
# * ``layout_dir``: the blog's layout, as a skeleton director... | Document new evil magic, and add required var. | Document new evil magic, and add required var.
| Python | isc | decklin/ennepe | ---
+++
@@ -4,27 +4,26 @@
# This file is a Python script. When run, the following variables will be
# defined for you; you may change or add to them as you see fit.
#
-# ``entries_dir``: a Maildir containing all the blog entries.
-# ``layout_dir``: the blog's layout, as a skeleton directory tree.
-# ``style_dir``:... |
5b0386d0872d4106902655ada78389503c62a95a | yunity/models/relations.py | yunity/models/relations.py | from django.db.models import ForeignKey, DateTimeField, ManyToManyField
from yunity.models.entities import User, Location, Mappable, Message
from yunity.models.utils import BaseModel, MaxLengthCharField
from yunity.utils.decorators import classproperty
class Chat(BaseModel):
participants = ManyToManyField(User)
... | from django.db.models import ForeignKey, DateTimeField, ManyToManyField
from yunity.models.entities import User, Location, Mappable, Message
from yunity.models.utils import BaseModel, MaxLengthCharField
from yunity.utils.decorators import classproperty
class Chat(BaseModel):
participants = ManyToManyField(User)
... | Add some default feedback types for item requests | Add some default feedback types for item requests
| Python | agpl-3.0 | yunity/yunity-core,yunity/yunity-core,yunity/foodsaving-backend,yunity/foodsaving-backend,yunity/foodsaving-backend | ---
+++
@@ -42,6 +42,10 @@
class ItemRequest(BaseModel):
+ @classproperty
+ def FEEDBACK(cls):
+ return cls.create_constants('feedback', 'OK', 'NO_SHOW', 'NOT_GRANTED')
+
requester = ForeignKey(User)
requested = ForeignKey(Mappable)
|
af4c5a72afb80ff59662cc6992ce3084fed75dfe | node/deduplicate.py | node/deduplicate.py | #!/usr/bin/env python
from nodes import Node
class Deduplicate(Node):
char = "}"
args = 1
results = 2
@Node.test_func([2], [4])
@Node.test_func([1.5], [3])
def double(self, inp: Node.number):
"""inp*2"""
self.results = 1
return inp*2
def func(self, seq... | #!/usr/bin/env python
from nodes import Node
class Deduplicate(Node):
char = "}"
args = 1
results = 1
@Node.test_func([2], [4])
@Node.test_func([1.5], [3])
def double(self, inp: Node.number):
"""inp*2"""
return inp*2
@Node.test_func([[1,2,3,1,1]], [[1,2,3]])
... | Fix dedupe not preserving order | Fix dedupe not preserving order
| Python | mit | muddyfish/PYKE,muddyfish/PYKE | ---
+++
@@ -5,17 +5,20 @@
class Deduplicate(Node):
char = "}"
args = 1
- results = 2
+ results = 1
@Node.test_func([2], [4])
@Node.test_func([1.5], [3])
def double(self, inp: Node.number):
"""inp*2"""
- self.results = 1
return inp*2
+ @Node.t... |
05c319f868215f832e97577f5e158edf82fab074 | markdown/__version__.py | markdown/__version__.py | #
# markdown/__version__.py
#
# version_info should conform to PEP 386
# (major, minor, micro, alpha/beta/rc/final, #)
# (1, 1, 2, 'alpha', 0) => "1.1.2.dev"
# (1, 2, 0, 'beta', 2) => "1.2b2"
version_info = (2, 6, 0, 'zds', 7)
def _get_version():
" Returns a PEP 386-compliant version number from version_info. "
... | #
# markdown/__version__.py
#
# version_info should conform to PEP 386
# (major, minor, micro, alpha/beta/rc/final, #)
# (1, 1, 2, 'alpha', 0) => "1.1.2.dev"
# (1, 2, 0, 'beta', 2) => "1.2b2"
version_info = (2, 6, 0, 'zds', 8)
def _get_version():
" Returns a PEP 386-compliant version number from version_info. "
... | Change version for next release | Change version for next release | Python | bsd-3-clause | zestedesavoir/Python-ZMarkdown,Situphen/Python-ZMarkdown,zestedesavoir/Python-ZMarkdown,Situphen/Python-ZMarkdown,zestedesavoir/Python-ZMarkdown,Situphen/Python-ZMarkdown | ---
+++
@@ -5,7 +5,7 @@
# (major, minor, micro, alpha/beta/rc/final, #)
# (1, 1, 2, 'alpha', 0) => "1.1.2.dev"
# (1, 2, 0, 'beta', 2) => "1.2b2"
-version_info = (2, 6, 0, 'zds', 7)
+version_info = (2, 6, 0, 'zds', 8)
def _get_version(): |
ab10f3d134065047a7260662d3c39295904795b8 | migration/versions/001_initial_migration.py | migration/versions/001_initial_migration.py | from __future__ import print_function
from getpass import getpass
import readline
import sys
from sqlalchemy import *
from migrate import *
from migrate.changeset.constraint import ForeignKeyConstraint
import annotateit
from annotateit import db
from annotateit.model import Consumer, User
meta = MetaData()
consumer... | from sqlalchemy import *
from migrate import *
import annotateit
from annotateit import db
from annotateit.model import Consumer, User
meta = MetaData()
consumer = Table('consumer', meta,
Column('id', Integer, primary_key=True, nullable=False),
Column('key', String),
Column('secret', String),
Column(... | Add fkey constraints at the same time | Add fkey constraints at the same time
| Python | agpl-3.0 | openannotation/annotateit,openannotation/annotateit | ---
+++
@@ -1,11 +1,5 @@
-from __future__ import print_function
-from getpass import getpass
-import readline
-import sys
-
from sqlalchemy import *
from migrate import *
-from migrate.changeset.constraint import ForeignKeyConstraint
import annotateit
from annotateit import db
@@ -20,7 +14,7 @@
Column('ttl... |
1421866ac3c4e4f1f09d17019d058aa903597df5 | modules/menus_reader.py | modules/menus_reader.py | # -*- coding: utf-8 -*-
from json_reader import *
from config import *
def get_menus_data():
old_data = read_json_from_file(filenames["menus"])
if old_data == None or type(old_data) is not dict: # rewrite old_data and create new recipe dictionary
# initialize new dict
old_data = {}
old_data["menus"] = {}
elif... | # -*- coding: utf-8 -*-
from json_reader import *
from config import *
def get_menus_data():
old_data = read_json_from_file(filenames["menus"])
if old_data == None or type(old_data) is not dict: # rewrite old_data and create new recipe dictionary
# initialize new dict
old_data = {}
old_data["menus"] = {}
elif... | Add new feature: find out is current week menu created already | Add new feature: find out is current week menu created already
| Python | mit | Jntz/RuokalistaCommandLine | ---
+++
@@ -17,5 +17,7 @@
return data["menus"]
def get_menu(index): #get recipe with spesific index
- pass
- #return get_menus()[index]
+ return get_menus()[index]
+
+def is_week_menu_created(week):
+ return week in get_menus() # True/False |
10dc027ee15428d7ca210e0b74e5ae9274de0fa8 | lianXiangCi.py | lianXiangCi.py | #coding:utf-8
import urllib
import urllib2
import re
from random import choice
ipList=['120.76.115.134:80','222.83.14.145:3128','119.188.94.145:80']
thisIp=choice(ipList)
keyWord=urllib.quote('科学')
url='http://search.sina.com.cn/iframe/suggest/index.php?q='+keyWord
headers={
'Get':url,
... | #coding:utf-8
import urllib
import urllib2
import re
from random import choice
ipList=['120.76.115.134:80','222.83.14.145:3128','119.188.94.145:80']
thisIp=choice(ipList)
input = raw_input("Please input your key words:")
keyWord=urllib.quote(input)
url='http://search.sina.com.cn/iframe/suggest/index.ph... | Use raw_input instead of the unmodified words | Use raw_input instead of the unmodified words | Python | mit | YChrisZhang/PythonCrawler | ---
+++
@@ -8,7 +8,8 @@
ipList=['120.76.115.134:80','222.83.14.145:3128','119.188.94.145:80']
thisIp=choice(ipList)
-keyWord=urllib.quote('科学')
+input = raw_input("Please input your key words:")
+keyWord=urllib.quote(input)
url='http://search.sina.com.cn/iframe/suggest/index.php?q='+keyWord
|
03fec45fa269a8badbe047b4911c655c3c952404 | st2client/st2client/models/action_alias.py | st2client/st2client/models/action_alias.py | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | Use consistent CLI command names. | Use consistent CLI command names.
| Python | apache-2.0 | alfasin/st2,Itxaka/st2,StackStorm/st2,StackStorm/st2,alfasin/st2,punalpatel/st2,punalpatel/st2,dennybaa/st2,alfasin/st2,punalpatel/st2,Plexxi/st2,Plexxi/st2,nzlosh/st2,StackStorm/st2,peak6/st2,pixelrebel/st2,armab/st2,tonybaloney/st2,grengojbo/st2,Plexxi/st2,grengojbo/st2,emedvedev/st2,Plexxi/st2,nzlosh/st2,pixelrebel/... | ---
+++
@@ -21,7 +21,7 @@
class ActionAlias(core.Resource):
- _alias = 'ActionAlias'
+ _alias = 'Action-Alias'
_display_name = 'Action Alias'
_plural = 'ActionAliases'
_plural_display_name = 'Runners' |
70181b3069649eddacac86dbcb49cb43733be0ec | tw_begins.py | tw_begins.py | #!/usr/bin/env python
import begin
import twitterlib
@begin.subcommand
def timeline():
"Display recent tweets from users timeline"
for status in begin.context.api.timeline:
print u"%s: %s" % (status.user.screen_name, status.text)
@begin.subcommand
def mentions():
"Display recent tweets mentionin... | #!/usr/bin/env python
import begin
import twitterlib
# sub-command definitions using subcommand decorator for each sub-command that
# implements a timeline display
@begin.subcommand
def timeline():
"Display recent tweets from users timeline"
for status in begin.context.api.timeline:
print u"%s: %s" %... | Add code comments for begins example | Add code comments for begins example
Code comments for the major sections of the begins example program.
| Python | mit | aliles/cmdline_examples | ---
+++
@@ -4,6 +4,8 @@
import twitterlib
+# sub-command definitions using subcommand decorator for each sub-command that
+# implements a timeline display
@begin.subcommand
def timeline():
"Display recent tweets from users timeline"
@@ -22,6 +24,8 @@
for status in begin.context.api.retweets:
... |
c95bff54d8ff6534c40d60f34484f864cc04754a | lib/web/web.py | lib/web/web.py | import os, os.path
import random
import string
import json
import cherrypy
from . import get_pic
class StringGenerator(object):
@cherrypy.expose
def index(self):
return """<html>
<head>
<link href="/static/css/style.css" rel="stylesheet">
</head>
<body>
... | import os, os.path
import random
import string
import json
import cherrypy
from . import get_pic
class StringGenerator(object):
@cherrypy.expose
def index(self):
return """<html>
<head>
<link href="/static/css/style.css" rel="stylesheet">
</head>
<body>
... | Add example for when there is no book cover url | Add example for when there is no book cover url
| Python | mit | DexterLB/bookrat,DexterLB/bookrat,DexterLB/bookrat,DexterLB/bookrat,DexterLB/bookrat | ---
+++
@@ -29,8 +29,8 @@
@cherrypy.expose
def search(self, query):
return json.dumps({"book": {"title":"Gs", "author":"Bash Gs", "url":"https://chitanka.info/text/1"},
- "recommended":[{"title":"Gs1", "author":"Bash Gs1", "url":"https://chitanka.info/text/2"},
- {"titl... |
ecc471f94dc2ca2931370e53948d9f674dd673d4 | h2o-py/tests/testdir_munging/unop/pyunit_cor.py | h2o-py/tests/testdir_munging/unop/pyunit_cor.py | from builtins import range
import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
##
# Test out the cor() functionality
# If NAs in the frame, they are skipped in calculation unless na.rm = F
# If any categorical columns, throw an error
##
import numpy as np
def cor_test():
iris... | from builtins import range
import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
##
# Test out the cor() functionality
# If NAs in the frame, they are skipped in calculation unless na.rm = F
# If any categorical columns, throw an error
##
import numpy as np
def cor_test():
iris... | Add parenthesis to print statement | Add parenthesis to print statement
| Python | apache-2.0 | mathemage/h2o-3,h2oai/h2o-dev,h2oai/h2o-3,h2oai/h2o-3,mathemage/h2o-3,mathemage/h2o-3,michalkurka/h2o-3,jangorecki/h2o-3,h2oai/h2o-dev,mathemage/h2o-3,h2oai/h2o-3,jangorecki/h2o-3,michalkurka/h2o-3,mathemage/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,h2oai/h2o-dev,jangorecki/h2o-3,michalkurka/h2o-3,h2o... | ---
+++
@@ -29,16 +29,16 @@
cor_diff = abs(cor_h2o - cor_np)
print("Correlation matrix with H2O: ")
- print cor_h2o
+ print(cor_h2o)
print("Correlation matrix with Numpy: ")
- print cor_np
+ print(cor_np)
print("Correlation differences between H2O and Numpy: ")
- print cor_dif... |
4adb78fde502faed78350233896f3efd3f42816e | cytoplasm/interpreters.py | cytoplasm/interpreters.py | '''
These are some utilites used when writing and handling interpreters.
'''
import shutil
from cytoplasm import configuration
from cytoplasm.errors import InterpreterError
def SaveReturned(fn):
'''Some potential interpreters, like Mako, don't give you an easy way to save to a destination.
In these cases, sim... | '''
These are some utilites used when writing and handling interpreters.
'''
import shutil
from cytoplasm import configuration
from cytoplasm.errors import InterpreterError
def SaveReturned(fn):
'''Some potential interpreters, like Mako, don't give you an easy way to save to a destination.
In these cases, sim... | Define a default interpreter rather than using shutil.copyfile. | Define a default interpreter rather than using shutil.copyfile.
It would choke before if it was handed a file-like object rather than a
file name. Even more bleh!.
| Python | mit | startling/cytoplasm | ---
+++
@@ -21,15 +21,18 @@
f.close()
return InterpreterWithSave
+@SaveReturned
+def default_interpreter(source, **kwargs):
+ f = open(source)
+ source_string = f.read()
+ f.close()
+ return source_string
+
def interpret(file, destination, **kwargs):
"Interpret a file with an interpr... |
5934669c0edbd914d14612e16be7c88641b50bee | test/test_chat_chatserverstatus.py | test/test_chat_chatserverstatus.py | from pytwitcherapi import chat
def test_eq_str(servers):
assert servers[0] == '192.16.64.11:80',\
"Server should be equal to the same address."
def test_noteq_str(servers):
assert servers[0] != '192.16.64.50:89',\
"""Server should not be equal to a different address"""
def test_eq(servers)... | from pytwitcherapi import chat
def test_eq_str(servers):
assert servers[0] == '192.16.64.11:80',\
"Server should be equal to the same address."
def test_noteq_str(servers):
assert servers[0] != '192.16.64.50:89',\
"""Server should not be equal to a different address"""
def test_eq(servers)... | Fix test for eq and test eq with other classes | Fix test for eq and test eq with other classes
| Python | bsd-3-clause | Pytwitcher/pytwitcherapi,Pytwitcher/pytwitcherapi | ---
+++
@@ -15,10 +15,12 @@
s1 = chat.ChatServerStatus('192.16.64.11:80')
assert servers[0] == s1,\
"""Servers with same address should be equal"""
+ assert not (s1 == 123),\
+ """Servers should not be eqaul to other classes with different id"""
def test_noteq(servers):
- assert s... |
0cc04e9a486fb7dcf312a5c336f8f529f8b1f32d | skcode/__init__.py | skcode/__init__.py | """
SkCode (Python implementation of BBcode syntax) parser library.
"""
# Package information
__author__ = "Fabien Batteix (@skywodd)"
__copyright__ = "Copyright 2015, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
__version__ = "1.0.4"
__maintainer__ = "Fabien Batteix"
__email__ = "fabie... | """
SkCode (Python implementation of BBcode syntax) parser library.
"""
# Package information
__author__ = "Fabien Batteix (@skywodd)"
__copyright__ = "Copyright 2015, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
__version__ = "1.0.5"
__maintainer__ = "Fabien Batteix"
__email__ = "fabie... | Update version 1.0.4 -> 1.0.5 | Update version 1.0.4 -> 1.0.5
| Python | agpl-3.0 | TamiaLab/PySkCode | ---
+++
@@ -7,7 +7,7 @@
__copyright__ = "Copyright 2015, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
-__version__ = "1.0.4"
+__version__ = "1.0.5"
__maintainer__ = "Fabien Batteix"
__email__ = "fabien.batteix@tamialab.fr"
__status__ = "Development" # "Production" |
76829380376c31ea3f1e899770d1edffd1afc047 | apps/profiles/utils.py | apps/profiles/utils.py | import hashlib
def get_gravatar_url(email):
email_hash = hashlib.md5(email.lower().encode('utf-8')).hexdigest()
return "http://www.gravatar.com/avatar/{}".format(email_hash)
| import hashlib
def get_gravatar_url(email):
email_hash = hashlib.md5(email.lower().encode('utf-8')).hexdigest()
return "https://www.gravatar.com/avatar/{}".format(email_hash)
| Change gravatar url to use https | Change gravatar url to use https
| Python | mit | SoPR/horas,SoPR/horas,SoPR/horas,SoPR/horas | ---
+++
@@ -3,4 +3,4 @@
def get_gravatar_url(email):
email_hash = hashlib.md5(email.lower().encode('utf-8')).hexdigest()
- return "http://www.gravatar.com/avatar/{}".format(email_hash)
+ return "https://www.gravatar.com/avatar/{}".format(email_hash) |
ae916c1ee52941bb5a1ccf87abe2a9758897bd08 | IPython/utils/ulinecache.py | IPython/utils/ulinecache.py | """
Wrapper around linecache which decodes files to unicode according to PEP 263.
"""
import functools
import linecache
import sys
from IPython.utils import py3compat
from IPython.utils import openpy
getline = linecache.getline
# getlines has to be looked up at runtime, because doctests monkeypatch it.
@functools.wr... | """
This module has been deprecated since IPython 6.0.
Wrapper around linecache which decodes files to unicode according to PEP 263.
"""
import functools
import linecache
import sys
from warnings import warn
from IPython.utils import py3compat
from IPython.utils import openpy
getline = linecache.getline
# getlines ... | Add deprecation warnings and message to getlines function | Add deprecation warnings and message to getlines function
| Python | bsd-3-clause | ipython/ipython,ipython/ipython | ---
+++
@@ -1,9 +1,12 @@
"""
+This module has been deprecated since IPython 6.0.
+
Wrapper around linecache which decodes files to unicode according to PEP 263.
"""
import functools
import linecache
import sys
+from warnings import warn
from IPython.utils import py3compat
from IPython.utils import openpy
@@... |
31381728cb8d76314c82833d4400b4140fcc573f | django_jinja/builtins/global_context.py | django_jinja/builtins/global_context.py | # -*- coding: utf-8 -*-
import logging
from django.conf import settings
from django.core.urlresolvers import reverse as django_reverse, NoReverseMatch
from django.contrib.staticfiles.storage import staticfiles_storage
JINJA2_MUTE_URLRESOLVE_EXCEPTIONS = getattr(settings, "JINJA2_MUTE_URLRESOLVE_EXCEPTIONS", False)
l... | # -*- coding: utf-8 -*-
import logging
from django.conf import settings
from django.core.urlresolvers import reverse as django_reverse, NoReverseMatch
from django.contrib.staticfiles.storage import staticfiles_storage
JINJA2_MUTE_URLRESOLVE_EXCEPTIONS = getattr(settings, "JINJA2_MUTE_URLRESOLVE_EXCEPTIONS", False)
l... | Change parameter name so it does not conflict with an url parameter called "name". | builtins/url: Change parameter name so it does not conflict with an url parameter called "name".
This reflects the same name used in https://github.com/coffin/coffin/blob/master/coffin/template/defaultfilters.py, but it's probably as bad as a solution, because now you cannot use url() with a "view_name" url parameter.... | Python | bsd-3-clause | akx/django-jinja,glogiotatidis/django-jinja,glogiotatidis/django-jinja,akx/django-jinja,akx/django-jinja,glogiotatidis/django-jinja,niwinz/django-jinja,glogiotatidis/django-jinja,niwinz/django-jinja,akx/django-jinja,niwinz/django-jinja | ---
+++
@@ -10,7 +10,7 @@
logger = logging.getLogger(__name__)
-def url(name, *args, **kwargs):
+def url(view_name, *args, **kwargs):
"""
Shortcut filter for reverse url on templates. Is a alternative to
django {% url %} tag, but more simple.
@@ -23,7 +23,7 @@
"""
try:
- return ... |
6dffa2d22fa5da3b2d8fbcdff04477ff0116bfc1 | utilities.py | utilities.py | # Function to return a list of pvs from a given file
import pkg_resources
pkg_resources.require('aphla')
import aphla as ap
def get_pv_names(mode):
''' Given a certain ring mode as a string, return all available pvs '''
ap.machines.load(mode)
result = set()
elements = ap.getElements('*')
for el... | # Function to return a list of pvs from a given file
import pkg_resources
pkg_resources.require('aphla')
import aphla as ap
def get_pv_names(mode):
''' Given a certain ring mode as a string, return all available pvs '''
ap.machines.load(mode)
result = set()
elements = ap.getElements('*')
for el... | Resolve a bug in the write function | Resolve a bug in the write function
| Python | apache-2.0 | razvanvasile/Work-Mini-Projects,razvanvasile/Work-Mini-Projects,razvanvasile/Work-Mini-Projects | ---
+++
@@ -31,5 +31,5 @@
''' Write given pvs to file '''
f = open(filename, 'w')
for element in data:
- f.write(element, '\n')
+ f.write(element + '\n')
f.close() |
7f13b29cc918f63c4d1fc24717c0a0b5d2f5f8ad | filter.py | filter.py | import numpy as np
class LowPassFilter(object):
'''
First order discrete IIR filter.
'''
def __init__(self, feedback_gain, initial_value=0.0):
self.feedback_gain = np.ones_like(initial_value) * feedback_gain
self.initial_value = initial_value
self.output_gain = 1.0 - feedback_ga... | import numpy as np
class LowPassFilter(object):
'''
First order discrete IIR filter.
'''
def __init__(self, feedback_gain, initial_value=0.0):
self.feedback_gain = np.ones_like(initial_value) * feedback_gain
self.initial_value = initial_value
self.output_gain = 1.0 - feedback_ga... | Fix problem with array values. | Fix problem with array values.
| Python | mit | jcsharp/DriveIt | ---
+++
@@ -28,12 +28,12 @@
self.lifetime = lifetime
self.sampling_time = sampling_time
self.exp = np.exp(-sampling_time / lifetime)
- self.last_value = np.nan
- self.mean_value = np.nan
+ self.last_value = None
+ self.mean_value = None
def filter(self, va... |
b717696b5cff69e3586e06c399be7d06c057e503 | nova/tests/fake_utils.py | nova/tests/fake_utils.py | # Copyright (c) 2013 Rackspace Hosting
#
# 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... | # Copyright (c) 2013 Rackspace Hosting
#
# 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... | Make spawn_n() stub properly ignore errors in the child thread work | Make spawn_n() stub properly ignore errors in the child thread work
When we call spawn_n() normally, we fork off a thread that can run or
die on its own, without affecting the parent. In unit tests, we stub
this out to be a synchronous call, but we allow any exceptions that
occur in that work to bubble up to the calle... | Python | apache-2.0 | barnsnake351/nova,dawnpower/nova,alvarolopez/nova,JioCloud/nova_test_latest,joker946/nova,apporc/nova,cyx1231st/nova,dims/nova,klmitch/nova,mgagne/nova,openstack/nova,orbitfp7/nova,phenoxim/nova,rajalokan/nova,Stavitsky/nova,akash1808/nova_test_latest,apporc/nova,projectcalico/calico-nova,devendermishrajio/nova_test_la... | ---
+++
@@ -23,6 +23,14 @@
This aids testing async processes by blocking until they're done.
"""
def no_spawn(func, *args, **kwargs):
- return func(*args, **kwargs)
+ try:
+ return func(*args, **kwargs)
+ except Exception:
+ # NOTE(danms): This is supposed to ... |
e76777897bed5b9396d126e384555ea230b35784 | sass_processor/apps.py | sass_processor/apps.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from django.apps import apps, AppConfig
APPS_INCLUDE_DIRS = []
class SassProcessorConfig(AppConfig):
name = 'sass_processor'
verbose_name = "Sass Processor"
_static_dir = 'static'
_sass_exts = ('.scss', '.sass')
def ready... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from django.apps import apps, AppConfig
from django.conf import settings
from django.core.files.storage import get_storage_class
APPS_INCLUDE_DIRS = []
class SassProcessorConfig(AppConfig):
name = 'sass_processor'
verbose_name = "Sass... | Use StaticFileStorage to determine source directories | Use StaticFileStorage to determine source directories
| Python | mit | jrief/django-sass-processor,jrief/django-sass-processor | ---
+++
@@ -3,6 +3,8 @@
import os
from django.apps import apps, AppConfig
+from django.conf import settings
+from django.core.files.storage import get_storage_class
APPS_INCLUDE_DIRS = []
@@ -10,17 +12,15 @@
class SassProcessorConfig(AppConfig):
name = 'sass_processor'
verbose_name = "Sass Process... |
dac0afb3db74b1e8cd144993e662dc8ac0622cb9 | osbrain/ftp.py | osbrain/ftp.py | """
Implementation of FTP-related features.
"""
from .core import BaseAgent
from .common import address_to_host_port
class FTPAgent(BaseAgent):
"""
An agent that provides basic FTP functionality.
"""
def ftp_configure(self, addr, user, passwd, path, perm='elr'):
from pyftpdlib.authorizers impo... | """
Implementation of FTP-related features.
"""
import Pyro4
from .core import BaseAgent
from .common import address_to_host_port
class FTPAgent(BaseAgent):
"""
An agent that provides basic FTP functionality.
"""
def ftp_configure(self, addr, user, passwd, path, perm='elr'):
from pyftpdlib.aut... | Add missing import to FTP module | Add missing import to FTP module
| Python | apache-2.0 | opensistemas-hub/osbrain | ---
+++
@@ -1,6 +1,7 @@
"""
Implementation of FTP-related features.
"""
+import Pyro4
from .core import BaseAgent
from .common import address_to_host_port
|
3199b523a67f9c241950992a07fe38d2bbee07dc | seedlibrary/migrations/0003_extendedview_fix.py | seedlibrary/migrations/0003_extendedview_fix.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2017-02-21 02:55
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('seedlibrary', '0002_auto_20170219_2058'),
]
operations = [
migrations.Rename... | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2017-02-21 02:55
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('seedlibrary', '0002_add_extendedview'),
]
operations = [
migrations.RenameFi... | Update migration file for namechange | Update migration file for namechange
| Python | mit | RockinRobin/seednetwork,RockinRobin/seednetwork,RockinRobin/seednetwork | ---
+++
@@ -8,7 +8,7 @@
class Migration(migrations.Migration):
dependencies = [
- ('seedlibrary', '0002_auto_20170219_2058'),
+ ('seedlibrary', '0002_add_extendedview'),
]
operations = [ |
17b0f5d7b718bc12755f7ddefdd76ee9312adf5f | books.py | books.py | import falcon
import template
def get_paragraphs(pathname: str) -> list:
result = []
with open(pathname) as f:
for line in f.readlines():
if line != '\n':
result.append(line[:-1])
return result
class BooksResource:
def on_get(self, req, resp):
resp.status ... | import falcon
import template
def get_paragraphs(pathname: str) -> list:
result = []
with open(pathname) as f:
for line in f.readlines():
if line != '\n':
result.append(line[:-1])
return result
class BooksResource:
def on_get(self, req, resp):
resp.status ... | Add content type text/html to response | Add content type text/html to response
| Python | agpl-3.0 | sanchopanca/reader,sanchopanca/reader | ---
+++
@@ -14,6 +14,7 @@
class BooksResource:
def on_get(self, req, resp):
resp.status = falcon.HTTP_200
+ resp.content_type = 'text/html'
paragraphs = get_paragraphs('/home/sanchopanca/Documents/thunder.txt')
resp.body = template.render_template('book.html', paragraphs=paragr... |
02efde47b5cf20b7385eacaa3f21454ffa636ad7 | troposphere/codestarconnections.py | troposphere/codestarconnections.py | # Copyright (c) 2012-2020, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from . import AWSObject, Tags
VALID_CONNECTION_PROVIDERTYPE = ('Bitbucket')
def validate_connection_providertype(connection_providertype):
"""Validate ProviderType for Connection"""
if conne... | # Copyright (c) 2012-2020, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from . import AWSObject, Tags
VALID_CONNECTION_PROVIDERTYPE = ('Bitbucket')
def validate_connection_providertype(connection_providertype):
"""Validate ProviderType for Connection"""
if conne... | Update CodeStarConnections::Connection per 2020-07-23 update | Update CodeStarConnections::Connection per 2020-07-23 update
| Python | bsd-2-clause | cloudtools/troposphere,cloudtools/troposphere | ---
+++
@@ -24,6 +24,7 @@
props = {
'ConnectionName': (basestring, True),
+ 'HostArn': (basestring, False),
'ProviderType': (validate_connection_providertype, True),
'Tags': (Tags, False),
} |
b628e466f86bc27cbe45ec27a02d4774a0efd3bb | semantic_release/pypi.py | semantic_release/pypi.py | """PyPI
"""
from invoke import run
from semantic_release import ImproperConfigurationError
def upload_to_pypi(
dists: str = 'sdist bdist_wheel',
username: str = None,
password: str = None,
skip_existing: bool = False
):
"""Creates the wheel and uploads to pypi with twine.
:pa... | """PyPI
"""
from invoke import run
from semantic_release import ImproperConfigurationError
def upload_to_pypi(
dists: str = 'sdist bdist_wheel',
username: str = None,
password: str = None,
skip_existing: bool = False
):
"""Creates the wheel and uploads to pypi with twine.
:pa... | Clean out dist and build before building | fix: Clean out dist and build before building
This should fix the problem with uploading old versions.
Fixes #86
| Python | mit | relekang/python-semantic-release,relekang/python-semantic-release | ---
+++
@@ -21,6 +21,7 @@
"""
if username is None or password is None or username == "" or password == "":
raise ImproperConfigurationError('Missing credentials for uploading')
+ run('rm -rf build dist')
run('python setup.py {}'.format(dists))
run(
'twine upload -u {} -p {} {}... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.