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 |
|---|---|---|---|---|---|---|---|---|---|---|
56186c985b87fbbf0a7ea0f04c8b089a13b29fe3 | execute_all_tests.py | execute_all_tests.py | #! /bin/python3
"""
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be us... | #! /bin/python3
"""
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be us... | Test execution: Remove unneeded variable | Test execution: Remove unneeded variable
| Python | agpl-3.0 | Tanmay28/coala,Tanmay28/coala,meetmangukiya/coala,arush0311/coala,NalinG/coala,Tanmay28/coala,incorrectusername/coala,yashtrivedi96/coala,shreyans800755/coala,sagark123/coala,jayvdb/coala,MariosPanag/coala,Nosferatul/coala,vinc456/coala,damngamerz/coala,MattAllmendinger/coala,ManjiriBirajdar/coala,andreimacavei/coala,r... | ---
+++
@@ -37,6 +37,5 @@
show_help()
exit()
- test_dir = os.path.abspath("coalib/tests")
- files = TestHelper.get_test_files(test_dir)
+ files = TestHelper.get_test_files(os.path.abspath("coalib/tests"))
exit(TestHelper.execute_python3_files(files, use_coverage)) |
39f327bb9e37d6d290eb3f3179f7e79d60b5ab6d | model.py | model.py | from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
engine = create_engine('postgresql://wn:wn@localhost:5432/wndb')
Base = declarative_base()
from sqlalchemy import Column, Integer, Float, DateTime, Boolean, String
class Observation(Base):
__tablename__ = 'obs'
id =... | from sqlalchemy import create_engine
engine = create_engine('postgresql://wn:wn@localhost:5432/wndb')
from sqlalchemy import Column, Integer, Float, DateTime, Boolean, String, MetaData
metadata = MetaData()
table = Table('obs', metadata, Column(Integer, primary_key=True),
Column('station_name',String),
Colum... | Switch from ORM to Core | Switch from ORM to Core
| Python | mit | labhack/whiskeynovember,labhack/whiskeynovember,labhack/whiskeynovember | ---
+++
@@ -1,26 +1,16 @@
-from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
engine = create_engine('postgresql://wn:wn@localhost:5432/wndb')
-Base = declarative_base()
+from sqlalchemy import Column, Integer, Float, DateTime, Boolean, String, MetaData
-from sqlalche... |
a5b89ed7aa9e2fe4305f6431a3bdd675a7eda03f | web/__init__.py | web/__init__.py | # -*- coding: utf-8 -*-
from os import path
from flask import Flask
PACKAGE_DIR = path.dirname(path.realpath(__file__))
ROOT_DIR = path.realpath(path.join(PACKAGE_DIR, '..'))
ROOT_URL = 'http://pythoncz.herokuapp.com'
GITHUB_URL = (
'https://github.com/honzajavorek/python.cz/'
'blob/master/{template_fold... | # -*- coding: utf-8 -*-
from os import path
from flask import Flask
PACKAGE_DIR = path.dirname(path.realpath(__file__))
ROOT_DIR = path.realpath(path.join(PACKAGE_DIR, '..'))
ROOT_URL = 'http://pythoncz.herokuapp.com'
GITHUB_URL = (
'https://github.com/honzajavorek/python.cz/'
'blob/master/{template_fold... | Fix newline at the end of file. | Fix newline at the end of file.
| Python | mit | honzajavorek/python.cz,honzajavorek/python.cz,honzajavorek/python.cz,honzajavorek/python.cz | |
5f716da231aa3f338300295695b1513aa404ae7d | lino_xl/lib/appypod/__init__.py | lino_xl/lib/appypod/__init__.py | # Copyright 2014-2019 Rumma & Ko Ltd
# License: BSD (see file COPYING for details)
"""
Adds functionality for generating printable documents using
LibreOffice and the `appy.pod <http://appyframework.org/pod.html>`__
package.
See also :ref:`lino.admin.appypod` and :doc:`/specs/appypod`.
"""
import six
from lino.api i... | # Copyright 2014-2019 Rumma & Ko Ltd
# License: BSD (see file COPYING for details)
"""
Adds functionality for generating printable documents using
LibreOffice and the `appy.pod <http://appyframework.org/pod.html>`__
package.
See also :ref:`lino.admin.appypod` and :doc:`/specs/appypod`.
"""
import six
from lino.api i... | Use http instead of https | Use http instead of https
| Python | bsd-2-clause | lino-framework/xl,lino-framework/xl,lino-framework/xl,lino-framework/xl | ---
+++
@@ -23,7 +23,7 @@
except ImportError:
if six.PY3:
# yield "-e svn+https://svn.forge.pallavi.be/appy-dev/dev1#egg=appy"
- yield "svn+https://svn.forge.pallavi.be/appy-dev/dev1#egg=appy"
+ yield "svn+http://svn.forge.pallavi.be/appy-dev/dev1#e... |
b49f733d675d537779bed931d0a079888a83a735 | mpfmonitor/_version.py | mpfmonitor/_version.py | # mpf-monitor
__version__ = '0.3.0-dev.1'
__short_version__ = '0.3'
__bcp_version__ = '1.1'
__config_version__ = '4'
__mpf_version_required__ = '0.33.0'
version = "MPF Monitor v{} (config_version={}, BCP v{}, Requires MPF v{})".format(
__version__, __config_version__, __bcp_version__, __mpf_version_required__)
| # mpf-monitor
__version__ = '0.2.0-dev.3'
__short_version__ = '0.2'
__bcp_version__ = '1.1'
__config_version__ = '4'
__mpf_version_required__ = '0.33.0.dev15'
version = "MPF Monitor v{} (config_version={}, BCP v{}, Requires MPF v{})".format(
__version__, __config_version__, __bcp_version__, __mpf_version_required_... | Revert "Bump dev version to 0.3.0-dev.1" | Revert "Bump dev version to 0.3.0-dev.1"
This reverts commit facc1caaca87e680321be0654882d6c5570bc2ad.
| Python | mit | missionpinball/mpf-monitor | ---
+++
@@ -1,9 +1,9 @@
# mpf-monitor
-__version__ = '0.3.0-dev.1'
-__short_version__ = '0.3'
+__version__ = '0.2.0-dev.3'
+__short_version__ = '0.2'
__bcp_version__ = '1.1'
__config_version__ = '4'
-__mpf_version_required__ = '0.33.0'
+__mpf_version_required__ = '0.33.0.dev15'
version = "MPF Monitor v{} (confi... |
3af2a5b6eda4af972e3a208e727483384f313cb9 | octotribble/csv2tex.py | octotribble/csv2tex.py | #!/usr/bin/env python
"""Convert a CSV table into a latex tabular using pandas."""
import argparse
import pandas as pd
def convert(filename, transpose=False):
"""convert csv to tex table."""
df = pd.read_csv(filename)
if transpose:
df = df.transpose()
tex_name = filename.replace(".csv", ... | #!/usr/bin/env python
"""Convert a CSV table into a latex tabular using pandas."""
import argparse
import pandas as pd
def convert(filename, transpose=False):
"""convert csv to tex table."""
df = pd.read_csv(filename)
if transpose:
df = df.transpose()
tex_name = filename.replace(".csv", ... | Remove index and check filename | Remove index and check filename
| Python | mit | jason-neal/equanimous-octo-tribble,jason-neal/equanimous-octo-tribble,jason-neal/equanimous-octo-tribble | ---
+++
@@ -12,8 +12,16 @@
if transpose:
df = df.transpose()
tex_name = filename.replace(".csv", "_transpose.tex")
+ index = True
else:
tex_name = filename.replace(".csv", ".tex")
+ index=False
+
+ assert tex_name != filename, "This will overwrite the file, did yo... |
75b50ffcb6575e38e6792356dd58612089ee4f55 | django_mercadopago/views.py | django_mercadopago/views.py | import logging
from django.conf import settings
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from .models import Notification, Account
logger = logging.getLogger(__name__)
# Maybe use a form for this? :D
@csrf_exempt
def create_notification(request, slug):
topic = ... | import logging
from django.conf import settings
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from .models import Notification, Account
logger = logging.getLogger(__name__)
# Maybe use a form for this? :D
@csrf_exempt
def create_notification(request, slug):
topic = ... | Return 400 for inexistant accounts | Return 400 for inexistant accounts
| Python | isc | asermax/django-mercadopago | ---
+++
@@ -36,7 +36,11 @@
else:
return HttpResponse('invalid topic', status=400)
- owner = Account.objects.get(slug=slug)
+ try:
+ owner = Account.objects.get(slug=slug)
+ except Account.DoesNotExist:
+ return HttpResponse('Unknown account/slug', status=400)
+
notification... |
b639e094f0ac9feb008c0d13deb26c55bbb50793 | git_gutter_change.py | git_gutter_change.py | import sublime
import sublime_plugin
try:
from GitGutter.view_collection import ViewCollection
except ImportError:
from view_collection import ViewCollection
class GitGutterBaseChangeCommand(sublime_plugin.WindowCommand):
def lines_to_blocks(self, lines):
blocks = []
last_line = -2
... | import sublime
import sublime_plugin
try:
from GitGutter.view_collection import ViewCollection
except ImportError:
from view_collection import ViewCollection
class GitGutterBaseChangeCommand(sublime_plugin.WindowCommand):
def lines_to_blocks(self, lines):
blocks = []
last_line = -2
... | Make jumping between changes loop back around | Make jumping between changes loop back around
| Python | mit | michaelhogg/GitGutter,biodamasceno/GitGutter,biodamasceno/GitGutter,robfrawley/sublime-git-gutter,robfrawley/sublime-git-gutter,robfrawley/sublime-git-gutter,robfrawley/sublime-git-gutter,biodamasceno/GitGutter,natecavanaugh/GitGutter,tushortz/GitGutter,michaelhogg/GitGutter,akpersad/GitGutter,akpersad/GitGutter,nateca... | ---
+++
@@ -34,10 +34,10 @@
class GitGutterNextChangeCommand(GitGutterBaseChangeCommand):
def jump(self, all_changes, current_row):
return next((change for change in all_changes
- if change > current_row), current_row)
+ if change > current_row), all_change... |
6a7fb1ff05202f60c7036db369926e3056372123 | tests/chainer_tests/functions_tests/math_tests/test_sqrt.py | tests/chainer_tests/functions_tests/math_tests/test_sqrt.py | import unittest
import numpy
import chainer.functions as F
from chainer import testing
def make_data(dtype, shape):
x = numpy.random.uniform(0.1, 5, shape).astype(dtype)
gy = numpy.random.uniform(-1, 1, shape).astype(dtype)
return x, gy
#
# sqrt
@testing.math_function_test(F.Sqrt(), make_data=make_da... | import unittest
import numpy
import chainer.functions as F
from chainer import testing
#
# sqrt
def make_data(dtype, shape):
x = numpy.random.uniform(0.1, 5, shape).astype(dtype)
gy = numpy.random.uniform(-1, 1, shape).astype(dtype)
return x, gy
@testing.math_function_test(F.Sqrt(), make_data=make_da... | Simplify test of rsqrt function. | Simplify test of rsqrt function.
| Python | mit | chainer/chainer,niboshi/chainer,hvy/chainer,hvy/chainer,anaruse/chainer,ktnyt/chainer,jnishi/chainer,pfnet/chainer,keisuke-umezawa/chainer,cupy/cupy,ysekky/chainer,kashif/chainer,keisuke-umezawa/chainer,ronekko/chainer,niboshi/chainer,wkentaro/chainer,cupy/cupy,kiyukuta/chainer,okuta/chainer,delta2323/chainer,hvy/chain... | ---
+++
@@ -6,14 +6,14 @@
from chainer import testing
+#
+# sqrt
+
def make_data(dtype, shape):
x = numpy.random.uniform(0.1, 5, shape).astype(dtype)
gy = numpy.random.uniform(-1, 1, shape).astype(dtype)
return x, gy
-
-#
-# sqrt
@testing.math_function_test(F.Sqrt(), make_data=make_data)
cl... |
63bf9c267ff891f1a2bd1f472a5d77f8df1e0209 | tests/iam/test_iam_valid_json.py | tests/iam/test_iam_valid_json.py | """Test IAM Policy templates are valid JSON."""
import jinja2
from foremast.iam.construct_policy import render_policy_template
from foremast.utils.templates import LOCAL_TEMPLATES
def iam_templates():
"""Generate list of IAM templates."""
jinjaenv = jinja2.Environment(loader=jinja2.FileSystemLoader([LOCAL_TE... | """Test IAM Policy templates are valid JSON."""
import json
import jinja2
import pytest
from foremast.iam.construct_policy import render_policy_template
from foremast.utils.templates import LOCAL_TEMPLATES
def iam_templates():
"""Generate list of IAM templates."""
jinjaenv = jinja2.Environment(loader=jinja2... | Split IAM template tests with paramtrize | test: Split IAM template tests with paramtrize
See also: #208
| Python | apache-2.0 | gogoair/foremast,gogoair/foremast | ---
+++
@@ -1,5 +1,8 @@
"""Test IAM Policy templates are valid JSON."""
+import json
+
import jinja2
+import pytest
from foremast.iam.construct_policy import render_policy_template
from foremast.utils.templates import LOCAL_TEMPLATES
@@ -18,15 +21,21 @@
yield iam_template_name
+@pytest.mark.paramet... |
79158c269669fcbe506ae83e803ef58ba1b40913 | examples/olfaction/data/gen_olf_input.py | examples/olfaction/data/gen_olf_input.py | #!/usr/bin/env python
"""
Generate sample olfactory model stimulus.
"""
import numpy as np
import h5py
osn_num = 1375
dt = 1e-4 # time step
Ot = 2000 # number of data point during reset period
Rt = 1000 # number of data point during odor delivery period
Nt = 4*Ot + 3*Rt # number of data points in time
t = np.arang... | #!/usr/bin/env python
"""
Generate sample olfactory model stimulus.
"""
import numpy as np
import h5py
osn_num = 1375
dt = 1e-4 # time step
Ot = 2000 # number of data point during reset period
Rt = 1000 # number of data point during odor delivery period
Nt = 4*Ot + 3*Rt # number of data points in time
t = np.arang... | Tweak olfactory input stimulus to produce more interesting output. | Tweak olfactory input stimulus to produce more interesting output.
| Python | bsd-3-clause | cerrno/neurokernel | ---
+++
@@ -15,7 +15,7 @@
Nt = 4*Ot + 3*Rt # number of data points in time
t = np.arange(0, dt*Nt, dt)
-I = -1.*0.0195 # amplitude of odorant concentration
+I = 10.0 # amplitude of odorant concentration
u_on = I*np.ones(Ot, dtype=np.float64)
u_off = np.zeros(Ot, dtype=np.float64)
u_reset = np... |
0ff797d60c2ddc93579e7c486e8ebb77593014d8 | apiclient/__init__.py | apiclient/__init__.py | """Retain apiclient as an alias for googleapiclient."""
import googleapiclient
from googleapiclient import channel
from googleapiclient import discovery
from googleapiclient import errors
from googleapiclient import http
from googleapiclient import mimeparse
from googleapiclient import model
from googleapiclient impo... | """Retain apiclient as an alias for googleapiclient."""
import googleapiclient
try:
import oauth2client
except ImportError:
raise RuntimeError(
'Previous version of google-api-python-client detected; due to a '
'packaging issue, we cannot perform an in-place upgrade. To repair, '
'remove and rei... | Add another check for a failed googleapiclient upgrade. | Add another check for a failed googleapiclient upgrade.
This adds one more check for a failed 1.2 -> 1.3 upgrade, specifically in the
`apiclient` import (which was the only import available in 1.2). Even combined
with the check in setup.py, this won't catch everything, but it now covers all
the most common cases.
| Python | apache-2.0 | googleapis/google-api-python-client,googleapis/google-api-python-client | ---
+++
@@ -1,6 +1,17 @@
"""Retain apiclient as an alias for googleapiclient."""
import googleapiclient
+
+try:
+ import oauth2client
+except ImportError:
+ raise RuntimeError(
+ 'Previous version of google-api-python-client detected; due to a '
+ 'packaging issue, we cannot perform an in-place upgrad... |
2995f15c1bcb1bc85d83c7407be199b27882a215 | examples/translations/japanese_test_1.py | examples/translations/japanese_test_1.py | # Japanese Language Test - Python 3 Only!
from seleniumbase.translate.japanese import セレンテストケース # noqa
class テストクラス(セレンテストケース): # noqa
def test_例1(self):
self.URLを開く("https://ja.wikipedia.org/wiki/")
self.テキストを確認する("ウィキペディア")
self.要素を確認する('[title="メインページに移動する"]')
self.テキストを更新("#... | # Japanese Language Test - Python 3 Only!
from seleniumbase.translate.japanese import セレニウムテストケース # noqa
class テストクラス(セレニウムテストケース): # noqa
def test_例1(self):
self.URLを開く("https://ja.wikipedia.org/wiki/")
self.テキストを確認する("ウィキペディア")
self.要素を確認する('[title="メインページに移動する"]')
self.テキストを更... | Update for fixing odd Japanese | Update for fixing odd Japanese
Selenium is "セレニウム" in Japanese. (Most people don't write Selenium in Japanese, by the way) | Python | mit | mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase | ---
+++
@@ -1,8 +1,8 @@
# Japanese Language Test - Python 3 Only!
-from seleniumbase.translate.japanese import セレンテストケース # noqa
+from seleniumbase.translate.japanese import セレニウムテストケース # noqa
-class テストクラス(セレンテストケース): # noqa
+class テストクラス(セレニウムテストケース): # noqa
def test_例1(self):
self.URLを開く("h... |
decb9212a5e0adae31d8e7562fa8258c222aae23 | dbmigrator/__init__.py | dbmigrator/__init__.py | # -*- coding: utf-8 -*-
import logging
import sys
logger = logging.getLogger('dbmigrator')
logger.setLevel(logging.INFO)
handler = logging.StreamHandler(sys.stdout)
handler.setFormatter(logging.Formatter('[%(levelname)s] %(name)s (%(filename)s) - %(message)s'))
logger.addHandler(handler)
| Add a logger for dbmigrator that writes to stdout | Add a logger for dbmigrator that writes to stdout
For example in a migration file
20160128111115_mimetype_removal_from_module_files.py:
```
from dbmigrator import logger
logger.info('message from migration')
```
You will see this when you run the migration:
```
[INFO] dbmigrator (20160128111115_mimetype_removal_fr... | Python | agpl-3.0 | karenc/db-migrator | ---
+++
@@ -0,0 +1,11 @@
+# -*- coding: utf-8 -*-
+
+import logging
+import sys
+
+logger = logging.getLogger('dbmigrator')
+logger.setLevel(logging.INFO)
+
+handler = logging.StreamHandler(sys.stdout)
+handler.setFormatter(logging.Formatter('[%(levelname)s] %(name)s (%(filename)s) - %(message)s'))
+logger.addHandler... | |
e15fb53c0fd63942cafd3a6f11418447df6b6800 | siphon/cdmr/tests/test_coveragedataset.py | siphon/cdmr/tests/test_coveragedataset.py | # Copyright (c) 2016 Unidata.
# Distributed under the terms of the MIT License.
# SPDX-License-Identifier: MIT
import warnings
from siphon.testing import get_recorder
from siphon.cdmr.coveragedataset import CoverageDataset
recorder = get_recorder(__file__)
# Ignore warnings about CoverageDataset
warnings.simplefilte... | # Copyright (c) 2016 Unidata.
# Distributed under the terms of the MIT License.
# SPDX-License-Identifier: MIT
import warnings
from siphon.testing import get_recorder
from siphon.cdmr.coveragedataset import CoverageDataset
recorder = get_recorder(__file__)
# Ignore warnings about CoverageDataset
warnings.simplefilte... | Add smoketest for convering CoverageDataset to str. | Add smoketest for convering CoverageDataset to str.
| Python | bsd-3-clause | dopplershift/siphon,dopplershift/siphon,Unidata/siphon | ---
+++
@@ -18,3 +18,11 @@
cd = CoverageDataset('http://localhost:8080/thredds/cdmrfeature/grid/'
'test/HRRR_CONUS_2p5km_20160309_1600.grib2')
assert cd.grids
+
+
+@recorder.use_cassette('hrrr_cdmremotefeature')
+def test_simple_cdmremotefeature_str():
+ 'Just a smoke test for c... |
95add18b382898eb82c7ff3dd0aa0fd6db0f5cb9 | setup.py | setup.py | """
Flask-MongoKit
--------------
Flask-MongoKit simplifies to use MongoKit, a powerful MongoDB ORM in Flask
applications.
Links
`````
* `documentation <http://packages.python.org/Flask-MongoKit>`_
* `development version <http://github.com/jarus/flask-mongokit/zipball/master#egg=Flask-MongoKit-dev>`_
* `MongoK... | """
Flask-MongoKit
--------------
Flask-MongoKit simplifies to use MongoKit, a powerful MongoDB ORM in Flask
applications.
Links
`````
* `documentation <http://packages.python.org/Flask-MongoKit>`_
* `development version <http://github.com/jarus/flask-mongokit/zipball/master#egg=Flask-MongoKit-dev>`_
* `MongoKit <ht... | Add simplejson as requirement for python 2.5 | Add simplejson as requirement for python 2.5
| Python | bsd-3-clause | jarus/flask-mongokit,VishvajitP/flask-mongokit,jarus/flask-mongokit,VishvajitP/flask-mongokit | ---
+++
@@ -2,7 +2,7 @@
Flask-MongoKit
--------------
-Flask-MongoKit simplifies to use MongoKit, a powerful MongoDB ORM in Flask
+Flask-MongoKit simplifies to use MongoKit, a powerful MongoDB ORM in Flask
applications.
Links
@@ -14,8 +14,16 @@
* `Flask <http://flask.pocoo.org>`_
"""
+import sys
fr... |
c575d69ce253f9eb4d9beb6ffcd3e8a57ed804f0 | setup.py | setup.py | from setuptools import setup, find_packages
setup(name='diaspy',
version='0.1.0',
author='Moritz Kiefer',
author_email='moritz.kiefer@gmail.com',
url='https://github.com/Javafant/diaspora-api',
description='A python api to the social network diaspora',
packages=find_packages(),
... | from setuptools import setup, find_packages
setup(name='diaspy',
version='0.2.0',
author='Moritz Kiefer',
author_email='moritz.kiefer@gmail.com',
url='https://github.com/Javafant/diaspora-api',
description='A python api to the social network diaspora',
packages=find_packages(),
... | Update to version 0.2.0 (according with semantic versioning) | Update to version 0.2.0 (according with semantic versioning)
| Python | mit | marekjm/diaspy | ---
+++
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages
setup(name='diaspy',
- version='0.1.0',
+ version='0.2.0',
author='Moritz Kiefer',
author_email='moritz.kiefer@gmail.com',
url='https://github.com/Javafant/diaspora-api', |
535ac4c6eae416461e11f33c1a1ef67e92c73914 | tests/test_exception_wrapping.py | tests/test_exception_wrapping.py | import safe
def test_simple_exception():
class MockReponse(object):
def json(self):
return {'status': False,
'method': 'synchronize',
'module': 'cluster',
'error': {'message': 'Example error'}}
exception = safe.library.raise_from... | import safe
class MockResponse(object):
def __init__(self, data):
self.data = data
def json(self):
return self.data
def test_basic_exception():
error_message = 'Example error'
response = MockResponse({
'status': False,
'method': 'synchronize',
'module': 'clus... | Add a commit failed test | Add a commit failed test
| Python | mpl-2.0 | sangoma/safepy2,leonardolang/safepy2 | ---
+++
@@ -1,13 +1,52 @@
import safe
-def test_simple_exception():
- class MockReponse(object):
- def json(self):
- return {'status': False,
- 'method': 'synchronize',
- 'module': 'cluster',
- 'error': {'message': 'Example error'}}
+c... |
73d69274a21818830b3a0b87ad574321c958c0f7 | setup.py | setup.py | from setuptools import setup
setup(
name="pytest-cpp",
version='0.4',
packages=['pytest_cpp'],
entry_points={
'pytest11': ['cpp = pytest_cpp.plugin'],
},
install_requires=['pytest', 'colorama'],
# metadata for upload to PyPI
author="Bruno Oliveira",
author_email="nicoddemu... | from setuptools import setup
setup(
name="pytest-cpp",
version='0.4',
packages=['pytest_cpp'],
entry_points={
'pytest11': ['cpp = pytest_cpp.plugin'],
},
install_requires=['pytest', 'colorama'],
# metadata for upload to PyPI
author="Bruno Oliveira",
author_email="nicoddemu... | Add Framework::Pytest to list of classifiers | Add Framework::Pytest to list of classifiers
| Python | mit | pytest-dev/pytest-cpp,pytest-dev/pytest-cpp,pytest-dev/pytest-cpp | ---
+++
@@ -19,7 +19,8 @@
keywords="pytest test unittest",
url="http://github.com/pytest-dev/pytest-cpp",
classifiers=[
- 'Development Status :: 3 - Alpha',
+ 'Development Status :: 4 - Beta',
+ 'Framework :: Pytest',
'Intended Audience :: Developers',
'License ::... |
6e57b110750e3e871156a7716e95ffed3adf2cd1 | setup.py | setup.py | import os, io
from setuptools import setup, find_packages
long_description = (
io.open('README.rst', encoding='utf-8').read()
+ '\n' +
io.open('CHANGES.txt', encoding='utf-8').read())
setup(name='more.chameleon',
version='0.3.dev0',
description="Chameleon template integration for Morepath",
... | import io
from setuptools import setup, find_packages
long_description = '\n'.join((
io.open('README.rst', encoding='utf-8').read(),
io.open('CHANGES.txt', encoding='utf-8').read()
))
setup(name='more.chameleon',
version='0.3.dev0',
description="Chameleon template integration for Morepath",
... | Use io.open with encoding='utf-8' and flake8 compliance | Use io.open with encoding='utf-8' and flake8 compliance
| Python | bsd-3-clause | morepath/more.chameleon | ---
+++
@@ -1,10 +1,10 @@
-import os, io
+import io
from setuptools import setup, find_packages
-long_description = (
- io.open('README.rst', encoding='utf-8').read()
- + '\n' +
- io.open('CHANGES.txt', encoding='utf-8').read())
+long_description = '\n'.join((
+ io.open('README.rst', encoding='utf-8').... |
d5d359c5ec0f1735e97355839f1a12c6ea45c460 | polygamy/pygit2_git.py | polygamy/pygit2_git.py | from __future__ import absolute_import
import pygit2
from .base_git import NoSuchRemote
from .plain_git import PlainGit
class Pygit2Git(PlainGit):
@staticmethod
def is_on_branch(path):
repo = pygit2.Repository(path)
return not (repo.head_is_detached or repo.head_is_unborn)
@staticmetho... | from __future__ import absolute_import
import pygit2
from .base_git import NoSuchRemote
from .plain_git import PlainGit
class Pygit2Git(PlainGit):
@staticmethod
def is_on_branch(path):
repo = pygit2.Repository(path)
return not (repo.head_is_detached or repo.head_is_unborn)
@staticmetho... | Add add_remote to pygit2 implementation | Add add_remote to pygit2 implementation
| Python | bsd-3-clause | solarnz/polygamy,solarnz/polygamy | ---
+++
@@ -24,3 +24,8 @@
raise NoSuchRemote()
return remote.url
+
+ @staticmethod
+ def add_remote(path, remote_name, remote_url):
+ repo = pygit2.Repository(path)
+ repo.create_remote(remote_name, remote_url) |
5fc65183e40dd1d06bd6ae3e4e7ba0f0a0e2bdd6 | alg_check_dag.py | alg_check_dag.py | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def _previsit():
pass
def _postvisit():
pass
def _dfs_explore():
pass
def check_dag():
"""Check Directed Acyclic Graph (DAG)."""
pass
def main():
# DAG.
dag_adj_d = {
'... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def _previsit():
pass
def _postvisit():
pass
def _dfs_explore():
pass
def check_dag():
"""Check Directed Acyclic Graph (DAG)."""
pass
def main():
# Graph adjacency dictionary for D... | Add DAG & non-DAG adjacency dicts | Add DAG & non-DAG adjacency dicts
| Python | bsd-2-clause | bowen0701/algorithms_data_structures | ---
+++
@@ -18,7 +18,7 @@
def main():
- # DAG.
+ # Graph adjacency dictionary for DAG.
dag_adj_d = {
'A': ['D'],
'B': ['D'],
@@ -31,5 +31,18 @@
'J': []
}
+ # Graph adjacency dictionary for non-DAG.
+ nondag_adj_d = {
+ 'A': ['B'],
+ 'B': ['C', 'E']... |
4b665bb2e85994e3df0324afacb2453b8f4998a1 | contact_map/tests/test_dask_runner.py | contact_map/tests/test_dask_runner.py |
# pylint: disable=wildcard-import, missing-docstring, protected-access
# pylint: disable=attribute-defined-outside-init, invalid-name, no-self-use
# pylint: disable=wrong-import-order, unused-wildcard-import
from .utils import *
from contact_map.dask_runner import *
class TestDaskContactFrequency(object):
def te... |
# pylint: disable=wildcard-import, missing-docstring, protected-access
# pylint: disable=attribute-defined-outside-init, invalid-name, no-self-use
# pylint: disable=wrong-import-order, unused-wildcard-import
from .utils import *
from contact_map.dask_runner import *
def dask_setup_test_cluster(distributed, n_workers... | Handle dask TimeoutError exception in tests | Handle dask TimeoutError exception in tests
| Python | lgpl-2.1 | dwhswenson/contact_map,dwhswenson/contact_map | ---
+++
@@ -6,6 +6,22 @@
from .utils import *
from contact_map.dask_runner import *
+def dask_setup_test_cluster(distributed, n_workers=4, n_attempts=3):
+ """Set up a test cluster using dask.distributed. Try up to n_attempts
+ times, and skip the test if all attempts fail.
+ """
+ cluster = None
+ ... |
e4dd1da8f2fdfa2f4071ab1796b31147f12d00a0 | setup.py | setup.py | from setuptools import setup
setup(name='covenant',
version='0.1.0',
description='Code contracts for Python 3',
author='Kamil Kisiel',
author_email='kamil@kamilkisiel.net',
url='http://pypi.python.org/pypi/covenant',
license="BSD License",
packages=["covenant"],
keywords... | from setuptools import setup
setup(name='covenant',
version='0.1.0',
description='Code contracts for Python 3',
author='Kamil Kisiel',
author_email='kamil@kamilkisiel.net',
url='http://pypi.python.org/pypi/covenant',
license="BSD License",
packages=["covenant"],
keywords... | Add Python 3.2 trove classifier | Add Python 3.2 trove classifier
| Python | mit | kisielk/covenant,kisielk/covenant | ---
+++
@@ -17,6 +17,7 @@
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.2',
'Topic :: Software Development :: Libraries... |
44b9649df3418713b8ef5ae8e1f2990a92a48907 | setup.py | setup.py | from setuptools import setup
setup(
name='icapservice',
version='0.2.0',
description='ICAP service library for Python',
author='Giles Brown',
author_email='giles_brown@hotmail.com',
url='https://github.com/gilesbrown/icapservice',
license='MIT',
packages=['icapservice'],
zip_safe=F... | from setuptools import setup
setup(
name='icapservice',
version='0.2.1',
description='ICAP service library for Python',
author='Giles Brown',
author_email='giles_brown@hotmail.com',
url='https://github.com/gilesbrown/icapservice',
license='MIT',
packages=['icapservice'],
zip_safe=F... | Patch 0.2.1 to remove print | Patch 0.2.1 to remove print
| Python | mit | gilesbrown/python-icapservice,gilesbrown/python-icapservice | ---
+++
@@ -3,7 +3,7 @@
setup(
name='icapservice',
- version='0.2.0',
+ version='0.2.1',
description='ICAP service library for Python',
author='Giles Brown',
author_email='giles_brown@hotmail.com', |
86103cbdc457c699f3a76eba914a8708c65bbbbc | setup.py | setup.py | from setuptools import setup
with open('README.md') as file:
# Try my best to have at least the intro in Markdown/reST.
long_description = file.read().partition('<!-- END long_description -->')[0]
setup(name='caniusepython3',
version='1.0',
description='Determine what projects are blocking you fro... | from setuptools import setup
with open('README.md') as file:
# Try my best to have at least the intro in Markdown/reST.
long_description = file.read().partition('<!-- END long_description -->')[0]
setup(name='caniusepython3',
version='1.0',
description='Determine what projects are blocking you fro... | Set classifier for Python 3.2 | Set classifier for Python 3.2
For #6
| Python | apache-2.0 | ctismer/caniusepython3,dhamaniasad/caniusepython3,nett55/caniusepypy,brettcannon/caniusepython3,svisser/caniusepython3,public/caniusepypy | ---
+++
@@ -21,6 +21,7 @@
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
],
entry_poin... |
b984060f9e3455df56953580dd3ee4e0717f916b | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(
name='rinse',
version='0.1.2',
description='Python3 SOAP client built with lxml and requests.',
long_description=open('README.rst').read(),
author='Tyson Clugg',
author_email='tyson@clugg.net',
url='http://github.com/tysonclugg/rinse... | #!/usr/bin/env python
from setuptools import setup
setup(
name='rinse',
version='0.1.2',
description='Python3 SOAP client built with lxml and requests.',
long_description=open('README.rst').read(),
author='Tyson Clugg',
author_email='tyson@clugg.net',
url='http://github.com/tysonclugg/rinse... | Add "Python 2" classifier since it works (according to Travis CI). | Add "Python 2" classifier since it works (according to Travis CI).
| Python | mit | MarkusH/rinse,simudream/rinse,simudream/rinse,funkybob/rinse,tysonclugg/rinse,thedrow/rinse,tysonclugg/rinse,MarkusH/rinse | ---
+++
@@ -18,6 +18,7 @@
'requests',
],
classifiers=[
+ "Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License", |
ee8355e8c3d06c6add56ce6962d5ccb9432c98c5 | setup.py | setup.py | from setuptools import setup
def readme():
with open('README.rst') as f:
return f.read()
setup(name='housecanary',
version='0.5',
description='Client Wrapper for the HouseCanary API',
long_description=readme(),
url='http://github.com/housecanary/hc-api-python',
author='HouseC... | from setuptools import setup
def readme():
with open('README.rst') as f:
return f.read()
setup(name='housecanary',
version='0.5.1',
description='Client Wrapper for the HouseCanary API',
long_description=readme(),
url='http://github.com/housecanary/hc-api-python',
author='Hous... | Add missing package name and bump version | Add missing package name and bump version
| Python | mit | housecanary/hc-api-python | ---
+++
@@ -5,14 +5,14 @@
return f.read()
setup(name='housecanary',
- version='0.5',
+ version='0.5.1',
description='Client Wrapper for the HouseCanary API',
long_description=readme(),
url='http://github.com/housecanary/hc-api-python',
author='HouseCanary',
aut... |
98c80428b35e2a79b4481c5eb9180613266e9698 | setup.py | setup.py | from setuptools import find_packages, setup
version = '6.0.0'
install_requires = (
'djangorestframework>=2.4.3,<3',
'incuna_mail>=2.0.0,<3',
)
extras_require = {
'avatar': [
'django-imagekit>=3.2',
],
'utils': [
'raven>=5.1.1',
],
}
setup(
name='django-user-management',... | from setuptools import find_packages, setup
version = '6.0.0'
install_requires = (
'djangorestframework>=2.4.4,<3',
'incuna_mail>=2.0.0,<3',
)
extras_require = {
'avatar': [
'django-imagekit>=3.2',
],
'utils': [
'raven>=5.1.1',
],
}
setup(
name='django-user-management',... | Update `djangorestframework` from 2.4.3 to 2.4.4 | Update `djangorestframework` from 2.4.3 to 2.4.4
| Python | bsd-2-clause | incuna/django-user-management,incuna/django-user-management | ---
+++
@@ -5,7 +5,7 @@
install_requires = (
- 'djangorestframework>=2.4.3,<3',
+ 'djangorestframework>=2.4.4,<3',
'incuna_mail>=2.0.0,<3',
)
|
350f3bb3431d451f6bf6f2fac2e696b9122d65a6 | setup.py | setup.py | #!/usr/bin/env python
import os
import sys
from setuptools import setup
readme = open('README.rst').read()
doclink = """
Documentation
-------------
The full documentation is at http://gryaml.rtfd.org."""
history = open('HISTORY.rst').read().replace('.. :changelog:', '')
setup(
name='gryaml',
use_scm_versi... | #!/usr/bin/env python
"""Setuptools setup."""
from setuptools import setup
readme = open('README.rst').read()
doclink = """
Documentation
-------------
The full documentation is at http://gryaml.rtfd.org."""
history = open('HISTORY.rst').read().replace('.. :changelog:', '')
setup(
name='gryaml',
use_scm_ver... | Add missing 'boltons' package & clean up | Add missing 'boltons' package & clean up
| Python | mit | wcooley/python-gryaml | ---
+++
@@ -1,7 +1,5 @@
#!/usr/bin/env python
-
-import os
-import sys
+"""Setuptools setup."""
from setuptools import setup
@@ -27,6 +25,7 @@
package_dir={'gryaml': 'gryaml'},
include_package_data=True,
install_requires=[
+ 'boltons',
'py2neo>=2.0,<3',
'pyyaml',
], |
672d6cb517198bc37c4126c997ba984901a14b55 | setup.py | setup.py | import os, io
from setuptools import setup, find_packages
long_description = (
io.open('README.rst', encoding='utf-8').read()
+ '\n' +
io.open('CHANGES.txt', encoding='utf-8').read())
setup(name='more.jinja2',
version='0.3.dev0',
description="Jinja2 template integration for Morepath",
lo... | import io
from setuptools import setup, find_packages
long_description = '\n'.join((
io.open('README.rst', encoding='utf-8').read(),
io.open('CHANGES.txt', encoding='utf-8').read()
))
setup(name='more.jinja2',
version='0.3.dev0',
description="Jinja2 template integration for Morepath",
long_d... | Use io.open with encoding='utf-8' and flake8 compliance | Use io.open with encoding='utf-8' and flake8 compliance
| Python | bsd-3-clause | morepath/more.jinja2 | ---
+++
@@ -1,10 +1,10 @@
-import os, io
+import io
from setuptools import setup, find_packages
-long_description = (
- io.open('README.rst', encoding='utf-8').read()
- + '\n' +
- io.open('CHANGES.txt', encoding='utf-8').read())
+long_description = '\n'.join((
+ io.open('README.rst', encoding='utf-8').... |
7d475a44f2584396890360d1545abfa585dfdda8 | setup.py | setup.py | from setuptools import setup, find_packages
setup(name='django-forge',
version=__import__('forge').__version__,
author='Justin Bronn',
author_email='jbronn@gmail.com',
description='A Django implementation of the Puppet Forge web API.',
url='https://github.com/jbronn/django-forge',
... | from setuptools import setup, find_packages
setup(name='django-forge',
version=__import__('forge').__version__,
author='Justin Bronn',
author_email='jbronn@gmail.com',
description='A Django implementation of the Puppet Forge API.',
url='https://github.com/jbronn/django-forge',
down... | Simplify description and MANIFEST.in suits me fine. | Simplify description and MANIFEST.in suits me fine.
| Python | apache-2.0 | jbronn/django-forge,jbronn/django-forge,ocadotechnology/django-forge,ocadotechnology/django-forge | ---
+++
@@ -5,7 +5,7 @@
version=__import__('forge').__version__,
author='Justin Bronn',
author_email='jbronn@gmail.com',
- description='A Django implementation of the Puppet Forge web API.',
+ description='A Django implementation of the Puppet Forge API.',
url='https://github.com... |
2e850a22d0fcf8441d47928f5d758e3cb6b6bbaa | setup.py | setup.py | #!/usr/bin/env python
from setuptools import find_packages, setup
setup(
name='Flask-uWSGI-WebSocket',
version='0.6.1',
url='https://github.com/zeekay/flask_uwsgi_websocket',
license='MIT',
author='Zach Kelling',
author_email='zk@monoid.io',
description='High-performance WebSockets for your... | #!/usr/bin/env python
from setuptools import find_packages, setup
setup(
name='Flask-uWSGI-WebSocket',
version='0.6.1',
url='https://github.com/zeekay/flask-uwsgi-websocket',
license='MIT',
author='Zach Kelling',
author_email='zk@monoid.io',
description='High-performance WebSockets for your... | Fix homepage url to point to the correct repo | Fix homepage url to point to the correct repo | Python | mit | zeekay/flask-uwsgi-websocket | ---
+++
@@ -4,7 +4,7 @@
setup(
name='Flask-uWSGI-WebSocket',
version='0.6.1',
- url='https://github.com/zeekay/flask_uwsgi_websocket',
+ url='https://github.com/zeekay/flask-uwsgi-websocket',
license='MIT',
author='Zach Kelling',
author_email='zk@monoid.io', |
fbb0708aebf437de8a5d2e8faf6334fc46d89b45 | setup.py | setup.py | from setuptools import setup
from rohrpost import __version__
def read(filepath):
with open(filepath, "r", encoding="utf-8") as f:
return f.read()
setup(
name="rohrpost",
version=__version__,
description="rohrpost WebSocket protocol for ASGI",
long_description=read("README.rst"),
ur... | from setuptools import setup
from rohrpost import __version__
def read(filepath):
with open(filepath, "r", encoding="utf-8") as f:
return f.read()
setup(
name="rohrpost",
version=__version__,
description="rohrpost WebSocket protocol for ASGI",
long_description=read("README.rst"),
ur... | Add 'Python :: 3 :: Only' classifier | Add 'Python :: 3 :: Only' classifier
| Python | mit | axsemantics/rohrpost,axsemantics/rohrpost | ---
+++
@@ -29,6 +29,7 @@
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
+ "Programming Language :: Python :: 3 :: Only",
"Topic :: Internet :: WWW/HTTP",
],
packages=["rohrpost"], |
fab75e9c6c6e4ebfffaeb5594f206022cadd5f31 | setup.py | setup.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='pymisp',
version='1.1.2',
author='Raphaël Vinot',
author_email='raphael.vinot@circl.lu',
maintainer='Raphaël Vinot',
url='https://github.com/MISP/PyMISP',
description='Python API for MISP.',
packages=['p... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='pymisp',
version='1.2',
author='Raphaël Vinot',
author_email='raphael.vinot@circl.lu',
maintainer='Raphaël Vinot',
url='https://github.com/MISP/PyMISP',
description='Python API for MISP.',
packages=['pym... | Increase flexibility of upload sample | Increase flexibility of upload sample
| Python | bsd-2-clause | pombredanne/PyMISP,grolinet/PyMISP,iglocska/PyMISP | ---
+++
@@ -4,7 +4,7 @@
setup(
name='pymisp',
- version='1.1.2',
+ version='1.2',
author='Raphaël Vinot',
author_email='raphael.vinot@circl.lu',
maintainer='Raphaël Vinot', |
8c228a79450c49ee1d494ca1e3cf61ea7bcc8177 | setup.py | setup.py | """
Copyright (c) 2010-2013, Anthony Garcia <anthony@lagg.me>
Distributed under the ISC License (see LICENSE)
"""
from distutils.core import setup, Command
from distutils.errors import DistutilsOptionError
from unittest import TestLoader, TextTestRunner
import os
import steam
class run_tests(Command):
description... | """
Copyright (c) 2010-2013, Anthony Garcia <anthony@lagg.me>
Distributed under the ISC License (see LICENSE)
"""
from distutils.core import setup, Command
from distutils.errors import DistutilsOptionError
from unittest import TestLoader, TextTestRunner
import steam
class run_tests(Command):
description = "Run th... | Set API key directly in test runner | Set API key directly in test runner
| Python | isc | miedzinski/steamodd,Lagg/steamodd | ---
+++
@@ -6,7 +6,6 @@
from distutils.core import setup, Command
from distutils.errors import DistutilsOptionError
from unittest import TestLoader, TextTestRunner
-import os
import steam
class run_tests(Command):
@@ -23,7 +22,7 @@
if not self.key:
raise DistutilsOptionError("API key is r... |
17956eb2b8089432ff2a0fcec5ce56884f904db1 | setup.py | setup.py | #
# Copyright 2013 Cisco Systems
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | #
# Copyright 2013 Cisco Systems
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | Add south as a dependency. | Add south as a dependency.
| Python | apache-2.0 | sorenh/python-django-cloudslave | ---
+++
@@ -28,7 +28,8 @@
keywords='django openstack cloud',
install_requires=[
'django',
- 'python-novaclient'
+ 'python-novaclient',
+ 'south'
],
test_suite='tests.main',
classifiers=[ |
5f58d9f73b3b674d1d39ea7027a2e6de6dc8ff44 | setup.py | setup.py | # -*- coding: utf-8 -*-
from distutils.core import setup
setup(
name='nutshell',
packages=['nutshell'],
version='0.1.1',
description='A minimal python library to access Nutshell CRM:s JSON-RPC API.',
author=u'Emil Stenström',
author_email='em@kth.se',
url='https://github.com/EmilStenstrom/p... | # -*- coding: utf-8 -*-
from distutils.core import setup
setup(
name='nutshell',
packages=['nutshell'],
version='0.1.1',
description='A minimal python library to access Nutshell CRM:s JSON-RPC API.',
author=u'Emil Stenström',
author_email='em@kth.se',
url='https://github.com/EmilStenstrom/p... | Add requests as installation dependency. | Add requests as installation dependency. | Python | mit | EmilStenstrom/python-nutshell | ---
+++
@@ -10,6 +10,7 @@
author_email='em@kth.se',
url='https://github.com/EmilStenstrom/python-nutshell',
download_url='https://github.com/EmilStenstrom/python-nutshell/tarball/0.1.1',
+ install_requires=["requests"],
keywords=['nutshell', 'nutshell-crm', 'json-rpc'],
classifiers=[],
) |
c04e740db80792076c5a7299da8e552dfa3603bf | setup.py | setup.py | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = 'django-helpline-faq',
version = '1.1',
description = 'A simple FAQ application for Django sites.',
long_description = read('README.rst'),
lic... | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = 'django-helpline-faq',
version = '1.1',
description = 'A simple FAQ application for Django sites.',
long_description = read('README.rst'),
lic... | Include Package Data was missing. | Include Package Data was missing.
| Python | bsd-3-clause | Kirembu/django-helpline-faq,Kirembu/django-helpline-faq | ---
+++
@@ -16,6 +16,7 @@
url = 'http://django-fack.rtfd.org/',
packages = find_packages(exclude=['example']),
+ include_package_data=True,
zip_safe = False,
classifiers = [ |
67a0f6c0aa8015f5dea7dcc8c7bc6cae809016f5 | setup.py | setup.py | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(name='windpowerlib',
version='0.1.2dev',
description='Creating time series of wind power plants.',
url='http://github.com/wind-python/windpowerlib',
author='oe... | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(name='windpowerlib',
version='0.1.2dev',
description='Creating time series of wind power plants.',
url='http://github.com/wind-python/windpowerlib',
author='oe... | Add upper limit of pandas | Add upper limit of pandas
| Python | mit | wind-python/windpowerlib | ---
+++
@@ -18,7 +18,7 @@
'windpowerlib': [os.path.join('data', '*.csv')]},
long_description=read('README.rst'),
zip_safe=False,
- install_requires=['pandas >= 0.19.1',
+ install_requires=['pandas >= 0.19.1, < 0.25.0',
'requests'],
extras_require={
... |
199c421742c054129bc07ecfdf8b255482c4ad28 | setup.py | setup.py | from setuptools import setup, find_packages
import sys, os
version = '0.1.0'
description = "CKAN extension for creating/distributing budget data packages"
with open('README.rst') as readme:
long_description = readme.read()
setup(
name='ckanext-budgets',
version=version,
description=description,
l... | from setuptools import setup, find_packages
import sys, os
version = '0.1.1'
description = "CKAN extension for creating/distributing budget data packages"
with open('README.rst') as readme:
long_description = readme.read()
setup(
name='ckanext-budgets',
version=version,
description=description,
l... | Update dependencies and bump patch version | Update dependencies and bump patch version
budgetdatapackage was missing from the dependencies and has now
been added.
| Python | agpl-3.0 | openspending/ckanext-budgets,openspending/ckanext-budgets | ---
+++
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import sys, os
-version = '0.1.0'
+version = '0.1.1'
description = "CKAN extension for creating/distributing budget data packages"
with open('README.rst') as readme:
@@ -34,6 +34,7 @@
'requests',
'six',
'py-dateutil',
+ 'b... |
72d01a13761afbdcdfeb4fabb9095fa786403b18 | setup.py | setup.py | from setuptools import find_packages, setup
setup(
name='ngx-task',
version='0.1',
description='Testimonial for candidates to show up their code-foo',
author='Dmitry Shulyak',
author_email='dmitri.shulyak@gmail.com',
url='https://github.com/shudmi/ngx-task',
classifiers=[
'License :... | from setuptools import find_packages, setup
setup(
name='ngx-task',
version='0.2',
description='Testimonial for candidates to show up their code-foo',
author='Dmitry Shulyak',
author_email='dmitri.shulyak@gmail.com',
url='https://github.com/shudmi/ngx-task',
classifiers=[
'License :... | Add tests requirements, fix console scripts definitions | Add tests requirements, fix console scripts definitions
| Python | apache-2.0 | shudmi/ngx-task | ---
+++
@@ -2,7 +2,7 @@
setup(
name='ngx-task',
- version='0.1',
+ version='0.2',
description='Testimonial for candidates to show up their code-foo',
author='Dmitry Shulyak',
author_email='dmitri.shulyak@gmail.com',
@@ -15,9 +15,12 @@
],
packages=find_packages(exclude=['tests', ... |
bebe2be26d21289bb43936d3895c4b29126d508c | setup.py | setup.py | from setuptools import setup
# "import" __version__
for line in open('nbsphinx.py'):
if line.startswith('__version__'):
exec(line)
break
setup(
name='nbsphinx',
version=__version__,
py_modules=['nbsphinx'],
install_requires=[
'docutils',
'jinja2',
'nbconvert... | from setuptools import setup
# "import" __version__
for line in open('nbsphinx.py'):
if line.startswith('__version__'):
exec(line)
break
setup(
name='nbsphinx',
version=__version__,
py_modules=['nbsphinx'],
install_requires=[
'docutils',
'jinja2',
'nbconvert... | Change rtfd -> readthedocs in package description | DOC: Change rtfd -> readthedocs in package description
| Python | mit | spatialaudio/nbsphinx,spatialaudio/nbsphinx,spatialaudio/nbsphinx | ---
+++
@@ -24,7 +24,7 @@
long_description=open('README.rst').read(),
license='MIT',
keywords='Sphinx Jupyter notebook'.split(),
- url='http://nbsphinx.rtfd.io/',
+ url='http://nbsphinx.readthedocs.io/',
platforms='any',
classifiers=[
'Framework :: Sphinx', |
9d19fb7ada5caaa2dc74736cd12635bed3d8516a | setup.py | setup.py | import os
from setuptools import setup, find_packages
setup(name='morepath',
version = '0.1dev',
description="A micro web-framework with superpowers",
author="Martijn Faassen",
author_email="faassen@startifact.com",
license="BSD",
packages=find_packages(),
include_package_data... | import os
from setuptools import setup, find_packages
setup(name='morepath',
version = '0.1dev',
description="A micro web-framework with superpowers",
author="Martijn Faassen",
author_email="faassen@startifact.com",
license="BSD",
packages=find_packages(),
include_package_data... | Put in some version requirements. | Put in some version requirements.
| Python | bsd-3-clause | taschini/morepath,faassen/morepath,morepath/morepath | ---
+++
@@ -12,9 +12,9 @@
zip_safe=False,
install_requires=[
'setuptools',
- 'venusian',
+ 'venusian >= 1.0a8',
'reg',
- 'werkzeug',
+ 'werkzeug >= 0.9.4',
],
extras_require = dict(
test=['pytest >= 2.0', |
cbbcbb5707a90929da8d47f6b3322cebec983279 | setup.py | setup.py | from setuptools import setup
from distutils.core import Command
import os
import sys
class TestCommand(Command):
description = "Run tests"
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import subprocess
errno... | from setuptools import setup
from distutils.core import Command
import os
import sys
class TestCommand(Command):
description = "Run tests"
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import subprocess
errno... | Add jianfan to python package installation | Add jianfan to python package installation
| Python | mit | hermanschaaf/mafan,cychiang/mafan | ---
+++
@@ -21,10 +21,15 @@
setup(
name='mafan',
- version='0.2.7',
+ version='0.2.10',
author='Herman Schaaf',
author_email='herman@ironzebra.com',
- packages=['mafan', 'mafan.hanzidentifier'],
+ packages=[
+ 'mafan',
+ 'mafan.hanzidentifier',
+ 'mafan.third_party',... |
ba2e263e40e1324f8fd6c3ee012a8d9ada46bdd1 | setup.py | setup.py | #!/usr/local/bin/python3
from distutils.core import setup, Extension
setup(
name = 'lazy',
version = '1.0',
description = 'Lazy',
ext_modules = [
Extension(
name = 'b._collections',
sources = [
'src/collections.c',
],
),
Exten... | #!/usr/local/bin/python3
from distutils.core import setup, Extension
# Workaround -Werror=statement-after-declaration
# http://bugs.python.org/issue18211
import os
os.environ['CFLAGS'] = '-Wno-unused-result'
setup(
name = 'lazy',
version = '1.0',
description = 'Lazy',
ext_modules = [
Extensio... | Disable strict C90 flag that appears to be accidentally being used by distutils | Disable strict C90 flag that appears to be accidentally being used by distutils
| Python | apache-2.0 | blake-sheridan/py,blake-sheridan/py | ---
+++
@@ -1,6 +1,11 @@
#!/usr/local/bin/python3
from distutils.core import setup, Extension
+
+# Workaround -Werror=statement-after-declaration
+# http://bugs.python.org/issue18211
+import os
+os.environ['CFLAGS'] = '-Wno-unused-result'
setup(
name = 'lazy',
@@ -17,7 +22,7 @@
name = 'b._typ... |
ce0f4a30cad570557ad67122333041806d411adc | tasks.py | tasks.py | from invoke import Collection
from invocations import docs
from invocations.checks import blacken
from invocations.packaging import release
from invocations.pytest import test, coverage
ns = Collection(test, coverage, release, blacken, docs)
ns.configure({"packaging": {"sign": True}})
| from invoke import Collection
from invocations import docs
from invocations.checks import blacken
from invocations.packaging import release
from invocations.pytest import test, coverage
ns = Collection(test, coverage, release, blacken, docs)
ns.configure(
{"packaging": {"sign": True, "changelog_file": "docs/chang... | Set changelog_file for invocations release task, which now dry-runs ok | Set changelog_file for invocations release task, which now dry-runs ok
| Python | bsd-2-clause | bitprophet/lexicon | ---
+++
@@ -6,4 +6,6 @@
ns = Collection(test, coverage, release, blacken, docs)
-ns.configure({"packaging": {"sign": True}})
+ns.configure(
+ {"packaging": {"sign": True, "changelog_file": "docs/changelog.rst"}}
+) |
35fab0222543a2f32ef395bf6b622bad29533ceb | tests.py | tests.py | import unittest
from gtlaunch import Launcher
class MockOptions(object):
def __init__(self):
self.verbose = False
self.config = ''
self.project = ''
class LauncherTestCase(unittest.TestCase):
def setUp(self):
self.options = MockOptions()
def test_lazy_init(self):
... | import unittest
from gtlaunch import Launcher
class MockOptions(object):
def __init__(self):
self.verbose = False
self.config = ''
self.project = ''
class LauncherTestCase(unittest.TestCase):
def setUp(self):
self.options = MockOptions()
self.launcher = Launcher(self... | Create lazy launcher in setUp. | Create lazy launcher in setUp.
| Python | mit | GoldenLine/gtlaunch | ---
+++
@@ -13,17 +13,16 @@
class LauncherTestCase(unittest.TestCase):
def setUp(self):
self.options = MockOptions()
+ self.launcher = Launcher(self.options, lazy=True)
def test_lazy_init(self):
- launcher = Launcher(self.options, lazy=True)
- self.assertIsNone(launcher.proj... |
f7852806c3198d58162b66e18bfd9998ef33b63c | lexos/receivers/stats_receiver.py | lexos/receivers/stats_receiver.py | from lexos.receivers.base_receiver import BaseReceiver
class StatsReceiver(BaseReceiver):
def __init__(self):
"""So far there is no frontend option for statistics analysis"""
super().__init__()
def options_from_front_end(self):
"""So far there is no frontend option for statistics anal... | from lexos.receivers.base_receiver import BaseReceiver
class StatsReceiver(BaseReceiver):
def __init__(self):
"""So far there is no frontend option for statistics analysis"""
super().__init__()
def options_from_front_end(self):
"""So far there is no frontend option for statistics anal... | Modify receiver to prevent using in future | Modify receiver to prevent using in future
| Python | mit | WheatonCS/Lexos,WheatonCS/Lexos,WheatonCS/Lexos | ---
+++
@@ -8,4 +8,4 @@
def options_from_front_end(self):
"""So far there is no frontend option for statistics analysis"""
- pass
+ raise NotImplementedError |
addee67fbf46a795c9de4669c9951c84b6590d98 | cartoframes/context/base_context.py | cartoframes/context/base_context.py | from abc import ABCMeta, abstractmethod
class BaseContext():
__metaclass__ = ABCMeta
@abstractmethod
def download(self):
pass
@abstractmethod
def upload(self):
pass
@abstractmethod
def execute_query(self):
pass
@abstractmethod
def execute_long_running_qu... | from abc import ABCMeta, abstractmethod
class BaseContext():
__metaclass__ = ABCMeta
@abstractmethod
def download(self, query, retry_times=0):
pass
@abstractmethod
def upload(self, query, data):
pass
@abstractmethod
def execute_query(self, query, parse_json=True, do_post... | Add params in BaseContext abtract methods | Add params in BaseContext abtract methods
| Python | bsd-3-clause | CartoDB/cartoframes,CartoDB/cartoframes | ---
+++
@@ -5,17 +5,17 @@
__metaclass__ = ABCMeta
@abstractmethod
- def download(self):
+ def download(self, query, retry_times=0):
pass
@abstractmethod
- def upload(self):
+ def upload(self, query, data):
pass
@abstractmethod
- def execute_query(self):
+ ... |
b084e02dd2cf7b492c69090b6acd548066c7c34f | pos_picking_state_fix/models/pos_picking.py | pos_picking_state_fix/models/pos_picking.py | # -*- coding: utf-8 -*-
# See README file for full copyright and licensing details.
from openerp import models, api
class PosPicking(models.Model):
_inherit = 'pos.order'
@api.multi
def create_picking(self):
try:
super(PosPicking, self).create_picking()
except:
# ... | # -*- coding: utf-8 -*-
# See README file for full copyright and licensing details.
import time
from openerp import models, api
from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT
class PosPicking(models.Model):
_inherit = 'pos.order'
@api.multi
def create_picking(self):
try:
su... | Check if quants are moved and pass moves to done to avoid duplication | [FIX] Check if quants are moved and pass moves to done to avoid duplication
| Python | agpl-3.0 | rgbconsulting/rgb-addons,rgbconsulting/rgb-pos,rgbconsulting/rgb-pos,rgbconsulting/rgb-addons | ---
+++
@@ -1,7 +1,9 @@
# -*- coding: utf-8 -*-
# See README file for full copyright and licensing details.
+import time
from openerp import models, api
+from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT
class PosPicking(models.Model):
@@ -12,8 +14,12 @@
try:
super(PosPicking, s... |
5b011488b5fcfd17f2029e833b757d24d437908e | document_page_project/__manifest__.py | document_page_project/__manifest__.py | # Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com) - Lois Rilo
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Document Page Project",
"summary": "This module links document pages to projects",
"version": "13.0.1.0.1",
"development_status": "Production/Stable",... | # Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com) - Lois Rilo
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Document Page Project",
"summary": "This module links document pages to projects",
"version": "13.0.1.0.1",
"development_status": "Beta",
"categor... | Revert to Beta as document_page is Beta | [REV] document_page_project: Revert to Beta as document_page is Beta
| Python | agpl-3.0 | OCA/knowledge,OCA/knowledge,OCA/knowledge | ---
+++
@@ -5,7 +5,7 @@
"name": "Document Page Project",
"summary": "This module links document pages to projects",
"version": "13.0.1.0.1",
- "development_status": "Production/Stable",
+ "development_status": "Beta",
"category": "Project",
"author": "ForgeFlow, Odoo Community Associati... |
f40bf1441121c138877e27bd23bcef73cf5c2cef | cisco_olt_http/tests/test_operations.py | cisco_olt_http/tests/test_operations.py |
import os
import pytest
import requests
from cisco_olt_http import operations
from cisco_olt_http.client import Client
@pytest.fixture
def data_dir():
return os.path.abspath(
os.path.join(os.path.dirname(__file__), 'data'))
def test_get_data():
client = Client('http://base-url')
show_equipment_... |
import os
import pytest
import requests
from cisco_olt_http import operations
from cisco_olt_http.client import Client
@pytest.fixture
def data_dir():
return os.path.abspath(
os.path.join(os.path.dirname(__file__), 'data'))
@pytest.fixture
def ok_response(data_dir, mocker):
response = mocker.Mock(a... | Move ok response creation to pytest fixture | Move ok response creation to pytest fixture
| Python | mit | Vnet-as/cisco-olt-http-client,beezz/cisco-olt-http-client | ---
+++
@@ -12,6 +12,14 @@
os.path.join(os.path.dirname(__file__), 'data'))
+@pytest.fixture
+def ok_response(data_dir, mocker):
+ response = mocker.Mock(autospec=requests.Response)
+ with open(os.path.join(data_dir, 'ok_response.xml')) as of:
+ response.content = of.read()
+ return respo... |
19af4b5c8c849750dd0885ea4fcfb651545b7985 | migrations/002_add_month_start.py | migrations/002_add_month_start.py | """
Add _week_start_at field to all documents in all collections
"""
from backdrop.core.bucket import utc
from backdrop.core.records import Record
import logging
log = logging.getLogger(__name__)
def up(db):
for name in db.collection_names():
log.info("Migrating collection: {0}".format(name))
col... | """
Add _week_start_at field to all documents in all collections
"""
from backdrop.core.bucket import utc
from backdrop.core.records import Record
import logging
log = logging.getLogger(__name__)
def up(db):
for name in db.collection_names():
log.info("Migrating collection: {0}".format(name))
col... | Remove disallowed fields before resaving on migrations. | Remove disallowed fields before resaving on migrations.
- TODO: fix this properly.
| Python | mit | alphagov/backdrop,alphagov/backdrop,alphagov/backdrop | ---
+++
@@ -20,6 +20,8 @@
document['_timestamp'] = utc(document['_timestamp'])
if '_week_start_at' in document:
document.pop('_week_start_at')
+ if '_updated_at' in document:
+ document.pop('_updated_at')
record = Record(document)
... |
de5c0c9107156a073670d68fcb04e575e08f9b80 | sympy/__init__.py | sympy/__init__.py |
__version__ = "0.5.0"
from sympy.core import *
from series import *
from simplify import *
from solvers import *
from matrices import *
from geometry import *
from polynomials import *
from utilities import *
#from specfun import *
from integrals import *
try:
from plotting import Plot
except ImportError, e:
... |
__version__ = "0.5.0"
from sympy.core import *
from series import *
from simplify import *
from solvers import *
from matrices import *
from geometry import *
from polynomials import *
from utilities import *
#from specfun import *
from integrals import *
try:
from plotting import Plot
except ImportError, e:
... | Hide ctypes import error until Plot() is called. | Hide ctypes import error until Plot() is called.
| Python | bsd-3-clause | kmacinnis/sympy,Curious72/sympy,meghana1995/sympy,MechCoder/sympy,saurabhjn76/sympy,VaibhavAgarwalVA/sympy,Designist/sympy,lidavidm/sympy,skidzo/sympy,beni55/sympy,Davidjohnwilson/sympy,jaimahajan1997/sympy,kmacinnis/sympy,MridulS/sympy,mcdaniel67/sympy,jbbskinny/sympy,pandeyadarsh/sympy,jaimahajan1997/sympy,mattpap/sy... | ---
+++
@@ -12,7 +12,10 @@
from utilities import *
#from specfun import *
from integrals import *
+
try:
from plotting import Plot
except ImportError, e:
- print str(e)
+ class Plot(object):
+ def __init__(*args, **kwargs):
+ raise e |
b82dbd63aedf8a6a6af494b6d6be697a9f4230d5 | tests/test_utils.py | tests/test_utils.py | import pickle
from six.moves import range
from fuel.utils import do_not_pickle_attributes
@do_not_pickle_attributes("non_pickable", "bulky_attr")
class TestClass(object):
def __init__(self):
self.load()
def load(self):
self.bulky_attr = list(range(100))
self.non_pickable = lambda x: ... | import pickle
from six.moves import range
from fuel.utils import do_not_pickle_attributes, expand_axis_label
@do_not_pickle_attributes("non_pickable", "bulky_attr")
class TestClass(object):
def __init__(self):
self.load()
def load(self):
self.bulky_attr = list(range(100))
self.non_pi... | Add unit test for expand_axis_label | Add unit test for expand_axis_label
| Python | mit | dwf/fuel,ejls/fuel,udibr/fuel,rizar/fuel,capybaralet/fuel,rizar/fuel,EderSantana/fuel,EderSantana/fuel,orhanf/fuel,aalmah/fuel,mila-udem/fuel,mjwillson/fuel,glewis17/fuel,orhanf/fuel,dhruvparamhans/fuel,hantek/fuel,lamblin/fuel,jbornschein/fuel,dribnet/fuel,markusnagel/fuel,udibr/fuel,harmdevries89/fuel,dribnet/fuel,gl... | ---
+++
@@ -1,7 +1,7 @@
import pickle
from six.moves import range
-from fuel.utils import do_not_pickle_attributes
+from fuel.utils import do_not_pickle_attributes, expand_axis_label
@do_not_pickle_attributes("non_pickable", "bulky_attr")
@@ -22,3 +22,13 @@
loaded = pickle.loads(dump)
assert loaded... |
3e6f835a88183182b6ebba25c61666735a69fc81 | tests/vaultshell.py | tests/vaultshell.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
class VaultShellTests(unittest.TestCase):
def test_basic(self):
print "test basic. Pass"
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import vault_shell.vault_commandhelper as VaultHelper
class VaultShellTests(unittest.TestCase):
def test_basic(self):
print "test basic. Pass"
vaulthelper = VaultHelper.VaultCommandHelper()
self.failUnless(vaulthelper is not Non... | Add more tests for the vault commandhelper | Add more tests for the vault commandhelper
| Python | apache-2.0 | bdastur/vault-shell | ---
+++
@@ -2,7 +2,22 @@
# -*- coding: utf-8 -*-
import unittest
+import vault_shell.vault_commandhelper as VaultHelper
class VaultShellTests(unittest.TestCase):
def test_basic(self):
print "test basic. Pass"
+ vaulthelper = VaultHelper.VaultCommandHelper()
+ self.failUnless(vaulthe... |
7b50c9290a8c8d3481d9147ebb66d3b7868ad7fc | bouncer-plumbing/mlab-to-bouncer/makeconfig.py | bouncer-plumbing/mlab-to-bouncer/makeconfig.py | #!/usr/bin/env python
import sys
import yaml
def read_parts_from_stdin():
data = sys.stdin.read()
parts_string = data.split("----")
parts_parsed = []
for part in parts_string:
part_parsed = yaml.safe_load(part)
parts_parsed.append(part_parsed)
return parts_parsed
def assemble_boun... | #!/usr/bin/env python
import sys
import yaml
def read_parts_from_stdin():
data = sys.stdin.read()
parts_string = data.split("----")
parts_parsed = []
for part in parts_string:
part_parsed = yaml.safe_load(part)
parts_parsed.append(part_parsed)
return parts_parsed
def assemble_boun... | Write to bouncer config file | Write to bouncer config file
| Python | apache-2.0 | m-lab/ooni-support,hellais/ooni-support,m-lab/ooni-support,hellais/ooni-support | ---
+++
@@ -19,10 +19,21 @@
bouncer_config = { 'collector': merged_parts }
return yaml.dump(bouncer_config)
-def write_bouncer_config(bouncer_config, path):
- print bouncer_config
+def write_bouncer_config(path, bouncer_config_contents):
+ try:
+ f = open(path, 'w')
+ f.write(bouncer_c... |
8170ad6cdfd2346bc24a3d743663b4866416ca83 | Engine.py | Engine.py | #Imports
import pygame
from pygame.locals import *
from OpenGL.GL import *
from OpenGL.GLU import *
from shapes import Shape, Cube
#Create a game class
class Game(object):
#Constructor
def __init__(self, title, width, height, bgcolour):
#Initialise pygame
pygame.init()
#Set the size of the window
sel... | #Imports
import pygame
from pygame.locals import *
from OpenGL.GL import *
from OpenGL.GLU import *
from shapes import Shape, Cube
#Create a game class
class Game(object):
#Constructor
def __init__(self, title, width, height, bgcolour):
#Initialise pygame
pygame.init()
#Set the size of the window
sel... | Add functions to add shapes and iterate over each shape to render. | Add functions to add shapes and iterate over each shape to render.
| Python | mit | thebillington/pyPhys3D | ---
+++
@@ -39,4 +39,16 @@
#Set the perspective
gluPerspective(self.fov, self.aspectratio, self.minrender, self.maxrender)
+
+ #Create a function to add a shape
+ def addshape(self, s):
+ self.shapes.append(s)
+
+ #Create a function to render the shapes
+ def render(self):
+ #For each of the shapes, c... |
53e1ff21bb219495f1b99f84dbb31624fdd35231 | lpthw/ex33.py | lpthw/ex33.py | #i = 0
#numbers = []
#while i < 6:
# print "At the top i is %d" % i
# numbers.append(i)
#
# i += 1
# print "Numbers now: ", numbers
# print "At the bottom i is %d" % i
#
#
#print "The numbers: "
#
#for num in numbers:
# print num
#Study Drills
print "What's the limit of the list?"
a = raw_input("> "... | #i = 0
#numbers = []
#while i < 6:
# print "At the top i is %d" % i
# numbers.append(i)
#
# i += 1
# print "Numbers now: ", numbers
# print "At the bottom i is %d" % i
#
#
#print "The numbers: "
#
#for num in numbers:
# print num
#Study Drills
print "What's the limit of the list?"
a = int(raw_input(... | Fix that crazy error that would cause enless looping... | Fix that crazy error that would cause enless looping...
| Python | mit | jaredmanning/learning,jaredmanning/learning | ---
+++
@@ -17,7 +17,7 @@
#Study Drills
print "What's the limit of the list?"
-a = raw_input("> ")
+a = int(raw_input("> "))
def list_numbers(a):
"""This function might add numbers to a list?""" |
92adc02daae13f6ef24ae1ec2eafac77ce528a74 | setup/timvideos/streaming/list_aws_hosts.py | setup/timvideos/streaming/list_aws_hosts.py | # list_aws_hosts.py
# list all active ec2 hosts
from boto import ec2
import pw
creds = pw.stream['aws']
ec2conn = ec2.connection.EC2Connection(creds['id'], creds['key'] )
reservations = ec2conn.get_all_instances()
instances = [i for r in reservations for i in r.instances]
for i in instances:
if not i.dns_name:
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# list_aws_hosts.py
# list all active ec2 hosts
"""
Start / stop by name.
Start mission "list_aws_hosts.py start mission"
Stop mission "list_aws_hosts.py stop mission"
Status mission "list_aws_hosts.py status mission"
mission i-b59966c7 **OFF** stopped
"""
from boto imp... | Update script to start, stop and status by name. | Update script to start, stop and status by name.
| Python | mit | EricSchles/veyepar,CarlFK/veyepar,yoe/veyepar,yoe/veyepar,xfxf/veyepar,EricSchles/veyepar,yoe/veyepar,xfxf/veyepar,CarlFK/veyepar,xfxf/veyepar,CarlFK/veyepar,EricSchles/veyepar,CarlFK/veyepar,xfxf/veyepar,xfxf/veyepar,CarlFK/veyepar,yoe/veyepar,yoe/veyepar,EricSchles/veyepar,EricSchles/veyepar | ---
+++
@@ -1,15 +1,61 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
# list_aws_hosts.py
# list all active ec2 hosts
+
+"""
+Start / stop by name.
+Start mission "list_aws_hosts.py start mission"
+Stop mission "list_aws_hosts.py stop mission"
+Status mission "list_aws_hosts.py status mission"
+ mission i-b599... |
6da69eb8f13dc56cc19d06a09d74005395de8989 | fedmsg_meta_umb/tps.py | fedmsg_meta_umb/tps.py | # Copyright (C) 2017 Red Hat, Inc.
#
# fedmsg_meta_umb is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# fedmsg_meta_umb is ... | # Copyright (C) 2017 Red Hat, Inc.
#
# fedmsg_meta_umb is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# fedmsg_meta_umb is ... | Add missing attributes in TPSProcessor. | Add missing attributes in TPSProcessor.
Signed-off-by: shanks <4508bc7244505cbe28c7ec6ff0c99c8246ca3de6@redhat.com>
| Python | lgpl-2.1 | release-engineering/fedmsg_meta_umb | ---
+++
@@ -23,6 +23,10 @@
topic_prefix_re = r'/topic/VirtualTopic\.eng'
__name__ = 'tps'
+ __description__ = 'package sanity testing of brew builds'
+ __obj__ = 'Test Package Sanity'
+ __docs__ = 'https://mojo.redhat.com/docs/DOC-0000000'
+ __link__ = 'https://sometpslink.engineering.redhat.c... |
153ed6a519d6836adb02b934cff44974a7132b6d | flake8/parseDocTest.py | flake8/parseDocTest.py | def parseFailDetails(failDetails):
""" Parse the line number of the doctest failure"""
import re
failDetails = failDetails.split(',')
lineNo = -1
if len(failDetails) == 3:
match = re.search("line.*?(\d+)", failDetails[1])
if match is None:
return lineNo
lineNo = i... | def parseFailDetails(failDetails):
""" Parse the line number of the doctest failure
>>> parseFailDetails("blah")
-1
"""
import re
failDetails = failDetails.split(',')
lineNo = -1
if len(failDetails) == 3:
match = re.search("line.*?(\d+)", failDetails[1])
if match is None:... | Fix doc test failure parsing | Fix doc test failure parsing
| Python | mit | softwaredoug/flake8_doctest | ---
+++
@@ -1,5 +1,8 @@
def parseFailDetails(failDetails):
- """ Parse the line number of the doctest failure"""
+ """ Parse the line number of the doctest failure
+ >>> parseFailDetails("blah")
+ -1
+ """
import re
failDetails = failDetails.split(',')
lineNo = -1
@@ -19,3 +22,7 @@
... |
808d089b2b93671ef3d4331007fc1c3da2dea0b5 | example/urls.py | example/urls.py | from django.conf.urls import patterns
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
# Example:
# (r'^example/', include('example.foo.urls')),
# Uncomment the admin/doc line below and add 'django.contrib.admindocs' ... | from django.conf.urls import patterns
from rpc4django.views import serve_rpc_request
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
# Example:
# (r'^example/', include('example.foo.urls')),
# Uncomment the admin/doc... | Use django 1.10 patterns style | Use django 1.10 patterns style | Python | bsd-3-clause | davidfischer/rpc4django,davidfischer/rpc4django,davidfischer/rpc4django | ---
+++
@@ -1,4 +1,5 @@
from django.conf.urls import patterns
+from rpc4django.views import serve_rpc_request
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
@@ -15,5 +16,5 @@
# Uncomment the next line to enable the admin:
# (r'^admin/(.*)', admin.site.root),
... |
8e225f890fd90112a125648cbd49507340cd3224 | events/search_indexes.py | events/search_indexes.py | from haystack import indexes
from .models import Event, Place, PublicationStatus
from django.utils.html import strip_tags
class EventIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.CharField(document=True, use_template=True)
autosuggest = indexes.EdgeNgramField(model_attr='name')
start_time ... | from haystack import indexes
from .models import Event, Place, PublicationStatus
from django.utils.html import strip_tags
class EventIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.CharField(document=True, use_template=True)
autosuggest = indexes.EdgeNgramField(model_attr='name')
start_time ... | Fix type of EventIndex fields | Fix type of EventIndex fields
| Python | mit | tuomas777/linkedevents,aapris/linkedevents,aapris/linkedevents,City-of-Helsinki/linkedevents,City-of-Helsinki/linkedevents,tuomas777/linkedevents,aapris/linkedevents,tuomas777/linkedevents,City-of-Helsinki/linkedevents | ---
+++
@@ -6,8 +6,8 @@
class EventIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.CharField(document=True, use_template=True)
autosuggest = indexes.EdgeNgramField(model_attr='name')
- start_time = indexes.DateField(model_attr='start_time')
- end_time = indexes.DateField(model_attr='end... |
40905893c296e2c812539079925adfd25e39d44f | wger/wsgi.py | wger/wsgi.py | """
WSGI config for workout_manager project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLIC... | """
WSGI config for workout_manager project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLIC... | Change location of default settings in WSGI | Change location of default settings in WSGI
| Python | agpl-3.0 | petervanderdoes/wger,rolandgeider/wger,DeveloperMal/wger,rolandgeider/wger,wger-project/wger,kjagoo/wger_stark,DeveloperMal/wger,wger-project/wger,petervanderdoes/wger,rolandgeider/wger,wger-project/wger,kjagoo/wger_stark,DeveloperMal/wger,DeveloperMal/wger,kjagoo/wger_stark,wger-project/wger,petervanderdoes/wger,rolan... | ---
+++
@@ -15,7 +15,7 @@
"""
import os
-os.environ.setdefault("DJANGO_SETTINGS_MODULE", "workout_manager.settings")
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
# This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if th... |
98fad1af84abe13eb64baad58c8a2faf3cd6cccb | tt_dailyemailblast/tasks.py | tt_dailyemailblast/tasks.py | from celery.task import task
from . import models
from . import send_backends
@task
def send_daily_email_blasts(blast_pk):
blast = models.DailyEmailBlast.objects.get(pk=blast_pk)
send_backends.sync_daily_email_blasts(blast)
@task
def send_recipients_list(recipients_list_pk, blast_pk):
blast = models.Da... | from celery.task import task
from . import models
from .send_backends import sync
@task
def send_daily_email_blasts(blast_pk):
blast = models.DailyEmailBlast.objects.get(pk=blast_pk)
sync.sync_daily_email_blasts(blast)
@task
def send_recipients_list(recipients_list_pk, blast_pk):
blast = models.DailyEm... | Fix every single async task was broken | Fix every single async task was broken
| Python | apache-2.0 | texastribune/tt_dailyemailblast,texastribune/tt_dailyemailblast | ---
+++
@@ -1,20 +1,20 @@
from celery.task import task
from . import models
-from . import send_backends
+from .send_backends import sync
@task
def send_daily_email_blasts(blast_pk):
blast = models.DailyEmailBlast.objects.get(pk=blast_pk)
- send_backends.sync_daily_email_blasts(blast)
+ sync.sync... |
d33a624fa6aedb93ae43ba1d2c0f6a76d90ff4a6 | foldermd5sums.py | foldermd5sums.py | #!/usr/bin/env python
"""Script to read data files in a directory, compute their md5sums, and output
them to a JSON file."""
import json
import os
import sys
import hashlib
def get_md5sums(directory):
md5sums = []
for filename in os.listdir(directory):
md5 = hashlib.md5()
with open(os.path.jo... | #!/usr/bin/env python
"""Script to read data files in a directory, compute their md5sums, and output
them to a JSON file."""
import json
import os
import sys
import hashlib
def get_relative_filepaths(base_directory):
""" Return a list of file paths without the base_directory prefix"""
file_list = []
for ... | Allow directory of files to be indexed | ENH: Allow directory of files to be indexed
In the Data directory, there may be sub-directories of files that need to
be kept separate, but all of them need to be indexed.
| Python | apache-2.0 | zivy/SimpleITK-Notebooks,InsightSoftwareConsortium/SimpleITK-Notebooks,InsightSoftwareConsortium/SimpleITK-Notebooks,zivy/SimpleITK-Notebooks,InsightSoftwareConsortium/SimpleITK-Notebooks,thewtex/SimpleITK-Notebooks,zivy/SimpleITK-Notebooks,thewtex/SimpleITK-Notebooks,thewtex/SimpleITK-Notebooks | ---
+++
@@ -8,16 +8,26 @@
import sys
import hashlib
-def get_md5sums(directory):
+def get_relative_filepaths(base_directory):
+ """ Return a list of file paths without the base_directory prefix"""
+ file_list = []
+ for root, subFolders, files in os.walk('Data'):
+ relative_path="/".join(root.spli... |
cbefb84542d9dfddd0f2fdf8bd0cb2fc89d5b824 | jupytext/__init__.py | jupytext/__init__.py | """Read and write Jupyter notebooks as text files"""
from .jupytext import readf, writef, writes, reads
from .formats import NOTEBOOK_EXTENSIONS, guess_format, get_format_implementation
from .version import __version__
try:
from .contentsmanager import TextFileContentsManager
except ImportError as err:
class ... | """Read and write Jupyter notebooks as text files"""
from .jupytext import readf, writef, writes, reads
from .formats import NOTEBOOK_EXTENSIONS, guess_format, get_format_implementation
from .version import __version__
try:
from .contentsmanager import TextFileContentsManager
except ImportError as err:
class ... | Allow "jupyter nbextension install/enable --py jupytext" | Allow "jupyter nbextension install/enable --py jupytext"
| Python | mit | mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext | ---
+++
@@ -14,6 +14,21 @@
def __init__(self):
raise self.err
+def _jupyter_nbextension_paths():
+ """Allows commands like
+ jupyter nbextension install --py jupytext
+ jupyter nbextension enable --py jupytext
+ jupyter labextension install jupyterlab-jupytext"""
+ return [di... |
20d21b851d02bbcf8c6a0f065b9f05f5e0bfc662 | geodj/youtube.py | geodj/youtube.py | from gdata.youtube.service import YouTubeService, YouTubeVideoQuery
from django.utils.encoding import smart_str
import re
class YoutubeMusic:
def __init__(self):
self.service = YouTubeService()
def search(self, artist):
query = YouTubeVideoQuery()
query.vq = artist
query.orderb... | from gdata.youtube.service import YouTubeService, YouTubeVideoQuery
from django.utils.encoding import smart_str
import re
class YoutubeMusic:
def __init__(self):
self.service = YouTubeService()
def search(self, artist):
query = YouTubeVideoQuery()
query.vq = artist
query.orderb... | Use format=5 in YT search to prevent "embedding disabled" | Use format=5 in YT search to prevent "embedding disabled"
| Python | mit | 6/GeoDJ,6/GeoDJ | ---
+++
@@ -11,6 +11,7 @@
query.vq = artist
query.orderby = 'relevance'
query.racy = 'exclude'
+ query.format = '5'
query.categories.append("/Music")
feed = self.service.YouTubeQuery(query)
results = [] |
1d6bb5e7ce706c8f54599f98744f3a5d62ce104e | src/config.py | src/config.py | import os
import ConfigParser as configparser
class Config(object):
def __init__(self):
self.config = configparser.RawConfigParser()
self.configfile = os.path.expanduser('~/.mmetering-clirc')
if not os.path.isfile(self.configfile):
# setup a new config file
self.ini... | import os
import ConfigParser as configparser
class Config(object):
def __init__(self):
self.config = configparser.RawConfigParser()
self.configfile = os.path.expanduser('~/.mmetering-clirc')
if not os.path.isfile(self.configfile):
# setup a new config file
self.ini... | Replace get_base_dir and set_base_dir with more abstract methods get and set | Replace get_base_dir and set_base_dir with more abstract methods get and set
| Python | mit | mmetering/mmetering-cli | ---
+++
@@ -23,19 +23,18 @@
with open(self.configfile, 'wb') as configfile:
self.config.write(configfile)
- def get_base_dir(self):
+ def set(self, section, name, value):
+ val = os.path.expanduser(value)
+
+ self.read()
+ self.config.set(section, name, val)
+ ... |
e966ddd804eee2f1b053de6f0bbf943d80dccc59 | django_elastipymemcache/client.py | django_elastipymemcache/client.py | from pymemcache.client.hash import HashClient
class Client(HashClient):
def get_many(self, keys, gets=False, *args, **kwargs):
# pymemcache's HashClient may returns {'key': False}
end = super(Client, self).get_many(keys, gets, args, kwargs)
return {key: end[key] for key in end if end[key]... | from pymemcache.client.hash import HashClient
class Client(HashClient):
def get_many(self, keys, gets=False, *args, **kwargs):
# pymemcache's HashClient may returns {'key': False}
end = super(Client, self).get_many(keys, gets, args, kwargs)
return {key: end.get(key) for key in end if end.... | Fix get value more safe | Fix get value more safe
| Python | mit | uncovertruth/django-elastipymemcache | ---
+++
@@ -6,6 +6,6 @@
# pymemcache's HashClient may returns {'key': False}
end = super(Client, self).get_many(keys, gets, args, kwargs)
- return {key: end[key] for key in end if end[key]}
+ return {key: end.get(key) for key in end if end.get(key)}
get_multi = get_many |
60daa277d5c3f1d9ab07ff5beccdaa323996068b | feincmstools/templatetags/feincmstools_tags.py | feincmstools/templatetags/feincmstools_tags.py | import os
from django import template
register = template.Library()
@register.filter
def is_parent_of(page1, page2):
"""
Determines whether a given page is the parent of another page
Example:
{% if page|is_parent_of:feincms_page %} ... {% endif %}
"""
if page1 is None:
return False
... | import os
from django import template
from feincms.templatetags.feincms_tags import feincms_render_content
register = template.Library()
@register.filter
def is_parent_of(page1, page2):
"""
Determines whether a given page is the parent of another page
Example:
{% if page|is_parent_of:feincms_page ... | Add assignment tag util for rendering chunks to tpl context | Add assignment tag util for rendering chunks to tpl context
| Python | bsd-3-clause | ixc/glamkit-feincmstools,ixc/glamkit-feincmstools | ---
+++
@@ -1,6 +1,9 @@
import os
from django import template
+
+from feincms.templatetags.feincms_tags import feincms_render_content
+
register = template.Library()
@register.filter
@@ -43,3 +46,8 @@
def get_extension(filename):
""" Return the extension from a file name """
return os.path.splitext... |
1e5102d8bafb3b4d2cb07822129397aa56f30bbe | devicecloud/examples/example_helpers.py | devicecloud/examples/example_helpers.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/.
#
# Copyright (c) 2015 Digi International, Inc.
from getpass import getpass
import os
from devicecloud import DeviceCloud... | # 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/.
#
# Copyright (c) 2015 Digi International, Inc.
from getpass import getpass
import os
from six.moves import input
from de... | Handle using the input function in python 2 for getting username for examples | Handle using the input function in python 2 for getting username for examples
Previously this used the builtin input function to get the username. In
python 3 this is fine, but if python 2 this is equivalent to
eval(raw_input(prompt))
and thus tried to evaluate the username as a variable and typically failed.
| Python | mpl-2.0 | michaelcho/python-devicecloud,michaelcho/python-devicecloud,digidotcom/python-devicecloud,brucetsao/python-devicecloud,ctrlaltdel/python-devicecloud,digidotcom/python-devicecloud,brucetsao/python-devicecloud,ctrlaltdel/python-devicecloud | ---
+++
@@ -5,6 +5,7 @@
# Copyright (c) 2015 Digi International, Inc.
from getpass import getpass
import os
+from six.moves import input
from devicecloud import DeviceCloud
|
4a41b33286cf881f0b3aa09c29a4aaa3568b5259 | website/stats/plots/mimp.py | website/stats/plots/mimp.py | from analyses.mimp import glycosylation_sub_types, run_mimp
from helpers.plots import stacked_bar_plot
from ..store import counter
@counter
@stacked_bar_plot
def gains_and_losses_for_glycosylation_subtypes():
results = {}
effects = 'loss', 'gain'
for source_name in ['mc3', 'clinvar']:
for site_ty... | from analyses.mimp import glycosylation_sub_types, run_mimp
from helpers.plots import stacked_bar_plot
from ..store import counter
@counter
@stacked_bar_plot
def gains_and_losses_for_glycosylation_subtypes():
results = {}
effects = 'loss', 'gain'
for source_name in ['mc3', 'clinvar']:
for site_ty... | Convert numpy int to native int for JSON serialization | Convert numpy int to native int for JSON serialization
| Python | lgpl-2.1 | reimandlab/Visualisation-Framework-for-Genome-Mutations,reimandlab/ActiveDriverDB,reimandlab/ActiveDriverDB,reimandlab/ActiveDriverDB,reimandlab/Visualisation-Framework-for-Genome-Mutations,reimandlab/Visualisation-Framework-for-Genome-Mutations,reimandlab/Visualistion-Framework-for-Genome-Mutations,reimandlab/Visualis... | ---
+++
@@ -15,5 +15,8 @@
if result.empty:
continue
effect_counts = result.effect.value_counts()
- results[source_name] = effects, [effect_counts.get(effect, 0) for effect in effects]
+ results[source_name] = effects, [
+ int(effect_count... |
d7232d855d406a26b2485b5c1fcd587e90fddf39 | tests/test_aio.py | tests/test_aio.py | import pytest
from ratelimiter import RateLimiter
@pytest.mark.asyncio
async def test_alock():
rl = RateLimiter(max_calls=10, period=0.01)
assert rl._alock is None
async with rl:
pass
alock = rl._alock
assert alock
async with rl:
pass
assert rl._alock is alock
| import pytest
from ratelimiter import RateLimiter
@pytest.mark.asyncio
async def test_alock(event_loop):
rl = RateLimiter(max_calls=10, period=0.01)
assert rl._alock is None
async with rl:
pass
alock = rl._alock
assert alock
async with rl:
pass
assert rl._alock is aloc... | Fix Runtime warnings on async tests | Fix Runtime warnings on async tests
| Python | apache-2.0 | RazerM/ratelimiter | ---
+++
@@ -3,7 +3,7 @@
from ratelimiter import RateLimiter
@pytest.mark.asyncio
-async def test_alock():
+async def test_alock(event_loop):
rl = RateLimiter(max_calls=10, period=0.01)
assert rl._alock is None |
d47d56525f85c5fa8b1f6b817a85479b9eb07582 | sqlalchemy_utils/functions/__init__.py | sqlalchemy_utils/functions/__init__.py | from .defer_except import defer_except
from .mock import create_mock_engine, mock_engine
from .render import render_expression, render_statement
from .sort_query import sort_query, QuerySorterException
from .database import (
database_exists,
create_database,
drop_database,
escape_like,
is_auto_assi... | from .defer_except import defer_except
from .mock import create_mock_engine, mock_engine
from .render import render_expression, render_statement
from .sort_query import sort_query, QuerySorterException
from .database import (
database_exists,
create_database,
drop_database,
escape_like,
is_auto_assi... | Add query_entities to functions module import | Add query_entities to functions module import
| Python | bsd-3-clause | joshfriend/sqlalchemy-utils,joshfriend/sqlalchemy-utils,cheungpat/sqlalchemy-utils,marrybird/sqlalchemy-utils,rmoorman/sqlalchemy-utils,spoqa/sqlalchemy-utils,tonyseek/sqlalchemy-utils,tonyseek/sqlalchemy-utils,JackWink/sqlalchemy-utils,konstantinoskostis/sqlalchemy-utils | ---
+++
@@ -17,6 +17,7 @@
has_changes,
identity,
naturally_equivalent,
+ query_entities,
primary_keys,
table_name,
) |
244a8ef2d3976970f8647e5fdd3979932cebe6d7 | webserver/celery.py | webserver/celery.py | from __future__ import absolute_import
import os
from celery import Celery
from django.conf import settings
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'webserver.settings')
app = Celery('webserver')
# Using a string here means the worker will n... | from __future__ import absolute_import
import os
from celery import Celery
from django.conf import settings
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'webserver.settings')
app = Celery('webserver')
# Using a string here means the worker will n... | Remove debug task from Celery | Remove debug task from Celery
| Python | mit | fengthedroid/heroes-of-the-storm-replay-parser,fengthedroid/heroes-of-the-storm-replay-parser,Oize/heroes-of-the-storm-replay-parser,Oize/heroes-of-the-storm-replay-parser,karlgluck/heroes-of-the-storm-replay-parser,Oize/heroes-of-the-storm-replay-parser | ---
+++
@@ -14,7 +14,3 @@
app.config_from_object('django.conf:settings')
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
-
-@app.task(bind=True)
-def debug_task(self):
- print('Request: {0!r}'.format(self.request)) |
13ec50a7e2187edb03174ed4a9dbf8767f4c6ad4 | version.py | version.py | major = 0
minor=0
patch=0
branch="dev"
timestamp=1376412824.91 | major = 0
minor=0
patch=8
branch="master"
timestamp=1376412892.53 | Tag commit for v0.0.8-master generated by gitmake.py | Tag commit for v0.0.8-master generated by gitmake.py
| Python | mit | ryansturmer/gitmake | ---
+++
@@ -1,5 +1,5 @@
major = 0
minor=0
-patch=0
-branch="dev"
-timestamp=1376412824.91
+patch=8
+branch="master"
+timestamp=1376412892.53 |
c18884b10f345a8a094a3c4bf589888027d43bd5 | examples/django_app/example_app/urls.py | examples/django_app/example_app/urls.py | from django.conf.urls import include, url
from django.contrib import admin
from example_app.views import ChatterBotAppView, ChatterBotApiView
urlpatterns = [
url(r'^$', ChatterBotAppView.as_view(), name='main'),
url(r'^admin/', include(admin.site.urls), name='admin'),
url(r'^api/chatterbot/', ChatterBotAp... | from django.conf.urls import url
from django.contrib import admin
from example_app.views import ChatterBotAppView, ChatterBotApiView
urlpatterns = [
url(r'^$', ChatterBotAppView.as_view(), name='main'),
url(r'^admin/', admin.site.urls, name='admin'),
url(r'^api/chatterbot/', ChatterBotApiView.as_view(), n... | Remove url inlude for Django 2.0 | Remove url inlude for Django 2.0
| Python | bsd-3-clause | gunthercox/ChatterBot,vkosuri/ChatterBot | ---
+++
@@ -1,10 +1,10 @@
-from django.conf.urls import include, url
+from django.conf.urls import url
from django.contrib import admin
from example_app.views import ChatterBotAppView, ChatterBotApiView
urlpatterns = [
url(r'^$', ChatterBotAppView.as_view(), name='main'),
- url(r'^admin/', include(admi... |
3243f199fb46d2d6f95ae9afd18b1570f9b5f529 | astatsscraper/parsing.py | astatsscraper/parsing.py | def parse_app_page(response):
# Should always be able to grab a title
title = response.xpath('//div[@class = "panel panel-default panel-gameinfo"]/div[@class = "panel-heading"]/text()').extract()[0].strip()
# Parse times into floats
time_to_hundo = response.xpath('//table[@class = "Default1000"]/tr/td[s... | def parse_app_page(response):
# Should always be able to grab a title
title = response.xpath('//div[@class = "panel panel-default panel-gameinfo"]/div[@class = "panel-heading"]/text()').extract()[0].strip()
# Parse times into floats
time_to_hundo = response.xpath('//table[@class = "Default1000"]/tr/td[s... | Fix up bad last commit | Fix up bad last commit
| Python | mit | SingingTree/AStatsScraper,SingingTree/AStatsScraper | ---
+++
@@ -18,8 +18,11 @@
'points': points,
}
+
def parse_search_result_for_apps(response):
for href in response.xpath('//table//table//a/@href'):
relative_url = href.extract()
if relative_url.startswith('Steam_Game_Info.php?AppID='):
- yield relative_url[:len('... |
cd41fdbdb53008c9701213d4f223bb8df0514ecb | byceps/util/datetime/timezone.py | byceps/util/datetime/timezone.py | """
byceps.util.datetime.timezone
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Timezone helpers
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from datetime import datetime
from flask import current_app
import pendulum
def local_tz_to_utc(dt: datetime):
"""Convert date... | """
byceps.util.datetime.timezone
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Timezone helpers
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from flask import current_app
def get_timezone_string() -> str:
"""Return the configured default timezone as a string."""
re... | Remove unused custom functions `local_tz_to_utc`, `utc_to_local_tz` | Remove unused custom functions `local_tz_to_utc`, `utc_to_local_tz`
| Python | bsd-3-clause | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps | ---
+++
@@ -8,28 +8,7 @@
:License: Revised BSD (see `LICENSE` file for details)
"""
-from datetime import datetime
-
from flask import current_app
-import pendulum
-
-
-
-def local_tz_to_utc(dt: datetime):
- """Convert date/time object from configured default local time to UTC."""
- tz_str = get_timezone_s... |
61fdbe0dba79dc19cda5320a0ad1352facf12d3d | twine/__init__.py | twine/__init__.py | # Copyright 2018 Donald Stufft and individual contributors
#
# 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 la... | # Copyright 2018 Donald Stufft and individual contributors
#
# 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 la... | Rework imports and ignore known mypy issues | Rework imports and ignore known mypy issues
| Python | apache-2.0 | pypa/twine | ---
+++
@@ -18,19 +18,22 @@
__copyright__ = "Copyright 2019 Donald Stufft and individual contributors"
+
try:
- import importlib.metadata as importlib_metadata
+ # https://github.com/python/mypy/issues/1393
+ from importlib.metadata import metadata # type: ignore
except ImportError:
- import impor... |
1bc4507234d87b1ed246501165fa1d8138bf5ca6 | cheddar/exceptions.py | cheddar/exceptions.py | """
Shared exception.
"""
class BadRequestError(Exception):
pass
class ConflictError(Exception):
pass
class NotFoundError(Exception):
def __init__(self, status_code=None):
self.status_code = status_code
| """
Shared exception.
"""
class BadRequestError(Exception):
pass
class ConflictError(Exception):
pass
class NotFoundError(Exception):
def __init__(self, status_code=None):
super(NotFoundError, self).__init__()
self.status_code = status_code
| Fix for pypy compatibility: must super's __init__ | Fix for pypy compatibility: must super's __init__
| Python | apache-2.0 | jessemyers/cheddar,jessemyers/cheddar | ---
+++
@@ -14,5 +14,6 @@
class NotFoundError(Exception):
def __init__(self, status_code=None):
+ super(NotFoundError, self).__init__()
self.status_code = status_code
|
ac9cd5ff007ee131e97f70c49c763f79f06ebf5a | green/test/test_integration.py | green/test/test_integration.py | import multiprocessing
import os
from pathlib import PurePath
import subprocess
import sys
import tempfile
from textwrap import dedent
import unittest
try:
from unittest.mock import MagicMock
except:
from mock import MagicMock
from green import cmdline
class TestFinalizer(unittest.TestCase):
def setUp(s... | import copy
import multiprocessing
import os
from pathlib import PurePath
import subprocess
import sys
import tempfile
from textwrap import dedent
import unittest
try:
from unittest.mock import MagicMock
except:
from mock import MagicMock
from green import cmdline
class TestFinalizer(unittest.TestCase):
... | Include the entire existing environment for integration tests subprocesses | Include the entire existing environment for integration tests subprocesses
| Python | mit | CleanCut/green,CleanCut/green | ---
+++
@@ -1,3 +1,4 @@
+import copy
import multiprocessing
import os
from pathlib import PurePath
@@ -48,12 +49,15 @@
]
pythonpath = str(PurePath(__file__).parent.parent.parent)
+ env = copy.deepcopy(os.environ)
+ env["PYTHONPATH"] = pythonpath
+
output = subprocess.run(... |
290a1f7a2c6860ec57bdb74b9c97207e93e611f0 | visualize_data.py | visualize_data.py | from __future__ import division
import argparse
import cv2
import h5py
import util
def main():
parser = argparse.ArgumentParser()
parser.add_argument('hdf5_fname', type=str)
parser.add_argument('--vis_scale', '-r', type=int, default=10, metavar='R', help='rescale image by R for visualization')
args =... | from __future__ import division
import argparse
import cv2
import h5py
import util
def main():
parser = argparse.ArgumentParser()
parser.add_argument('hdf5_fname', type=str)
parser.add_argument('--vis_scale', '-r', type=int, default=10, metavar='R', help='rescale image by R for visualization')
parser.... | Add option to visualize data in reverse | Add option to visualize data in reverse
| Python | mit | alexlee-gk/visual_dynamics | ---
+++
@@ -9,11 +9,15 @@
parser = argparse.ArgumentParser()
parser.add_argument('hdf5_fname', type=str)
parser.add_argument('--vis_scale', '-r', type=int, default=10, metavar='R', help='rescale image by R for visualization')
+ parser.add_argument('--reverse', action='store_true')
args = pars... |
bf6d6cdaf946af7ce8d1aa6831e7da9b47fef54f | user_deletion/managers.py | user_deletion/managers.py | from dateutil.relativedelta import relativedelta
from django.utils import timezone
class UserDeletionManagerMixin:
def users_to_notify(self):
"""Finds all users who have been inactive and not yet notified."""
from django.apps import apps
user_deletion_config = apps.get_app_config('user_de... | from dateutil.relativedelta import relativedelta
from django.apps import apps
from django.utils import timezone
class UserDeletionManagerMixin:
def users_to_notify(self):
"""Finds all users who have been inactive and not yet notified."""
user_deletion_config = apps.get_app_config('user_deletion')
... | Put import back on top | Put import back on top
| Python | bsd-2-clause | incuna/django-user-deletion | ---
+++
@@ -1,12 +1,11 @@
from dateutil.relativedelta import relativedelta
+from django.apps import apps
from django.utils import timezone
class UserDeletionManagerMixin:
def users_to_notify(self):
"""Finds all users who have been inactive and not yet notified."""
- from django.apps import... |
6a767780253ef981e78b00bb9937e9aaa0f9d1b8 | motobot/core_plugins/network_handlers.py | motobot/core_plugins/network_handlers.py | from motobot import hook
from time import sleep
@hook('PING')
def handle_ping(bot, context, message):
""" Handle the server's pings. """
bot.send('PONG :' + message.params[-1])
@hook('439')
def handle_wait(bot, context, message):
""" Handles too fast for server message and waits 1 second. """
bot.id... | from motobot import hook
from time import sleep
@hook('PING')
def handle_ping(bot, context, message):
""" Handle the server's pings. """
bot.send('PONG :' + message.params[-1])
@hook('439')
def handle_wait(bot, context, message):
""" Handles too fast for server message and waits 1 second. """
bot.id... | Add sleep after nickserv identify | Add sleep after nickserv identify
| Python | mit | Motoko11/MotoBot | ---
+++
@@ -29,6 +29,7 @@
""" At server welcome message 004 identify to nickserv and join channels. """
if bot.nickserv_password is not None:
bot.send('PRIVMSG nickserv :identify ' + bot.nickserv_password)
+ sleep(1)
@hook('ERROR') |
c2d3c2c471dfb504626509a34256eb2d9898cfa2 | rest_framework_nested/viewsets.py | rest_framework_nested/viewsets.py | class NestedViewSetMixin(object):
def get_queryset(self):
"""
Filter the `QuerySet` based on its parents as defined in the
`serializer_class.parent_lookup_kwargs`.
"""
queryset = super(NestedViewSetMixin, self).get_queryset()
if hasattr(self.serializer_class, 'parent_... | class NestedViewSetMixin(object):
def get_queryset(self):
"""
Filter the `QuerySet` based on its parents as defined in the
`serializer_class.parent_lookup_kwargs`.
"""
queryset = super(NestedViewSetMixin, self).get_queryset()
serializer_class = self.get_serializer_cla... | Fix to use get_serializer_class method instead of serializer_class | Fix to use get_serializer_class method instead of serializer_class
| Python | apache-2.0 | alanjds/drf-nested-routers | ---
+++
@@ -5,9 +5,10 @@
`serializer_class.parent_lookup_kwargs`.
"""
queryset = super(NestedViewSetMixin, self).get_queryset()
- if hasattr(self.serializer_class, 'parent_lookup_kwargs'):
+ serializer_class = self.get_serializer_class()
+ if hasattr(serializer_class, '... |
3b7328dd7d9d235bf32b3cfb836b49e50b70be77 | oz/plugins/redis_sessions/__init__.py | oz/plugins/redis_sessions/__init__.py | from __future__ import absolute_import, division, print_function, with_statement, unicode_literals
import os
import binascii
import hashlib
import oz.app
from .middleware import *
from .options import *
from .tests import *
def random_hex(length):
"""Generates a random hex string"""
return binascii.hexlify(o... | from __future__ import absolute_import, division, print_function, with_statement, unicode_literals
import os
import binascii
import hashlib
import oz.app
from .middleware import *
from .options import *
from .tests import *
def random_hex(length):
"""Generates a random hex string"""
return binascii.hexlify(o... | Allow for non-ascii characters in password_hash | Allow for non-ascii characters in password_hash
| Python | bsd-3-clause | dailymuse/oz,dailymuse/oz,dailymuse/oz | ---
+++
@@ -16,4 +16,5 @@
def password_hash(password, password_salt=None):
"""Hashes a specified password"""
password_salt = password_salt or oz.app.settings["session_salt"]
- return u"sha256!%s" % hashlib.sha256(unicode(password_salt) + unicode(password)).hexdigest()
+ salted_password = "".join([uni... |
442f21bfde16f72d4480fa7fd9dea2eac741a857 | src/analyses/views.py | src/analyses/views.py | from django.contrib import messages
from django.contrib.auth import get_user_model
from django.contrib.auth.mixins import LoginRequiredMixin
from django.utils.translation import ugettext_lazy as _
from django.views.generic import CreateView, TemplateView
from .forms import AbstractAnalysisCreateForm
from .pipelines i... | from django.contrib import messages
from django.contrib.auth import get_user_model
from django.contrib.auth.mixins import LoginRequiredMixin
from django.utils.translation import ugettext_lazy as _
from django.views.generic import CreateView, TemplateView
from .forms import AbstractAnalysisCreateForm
from .pipelines i... | Include analysis detail view URL in message | Include analysis detail view URL in message
| Python | mit | ccwang002/biocloud-server-kai,ccwang002/biocloud-server-kai,ccwang002/biocloud-server-kai | ---
+++
@@ -40,8 +40,13 @@
response = super().form_valid(form)
messages.add_message(
self.request, messages.INFO,
- _('You just created a %(analysis_type)s analysis!') % {
- 'analysis_type': self.analysis_type
- }
+ _(
+ 'Yo... |
2bc95d90db15160f9c4869c03f9dadb6cd8d56fa | seleniumbase/config/proxy_list.py | seleniumbase/config/proxy_list.py | """
Proxy Server "Phone Book".
Simplify running browser tests through a proxy server
by adding your frequently-used proxies here.
Now you can do something like this on the command line:
"pytest SOME_TEST.py --proxy=proxy1"
Format of PROXY_LIST server entries:
* "ip_address:port" OR "username:password@ip_address:po... | """
Proxy Server "Phone Book".
Simplify running browser tests through a proxy server
by adding your frequently-used proxies here.
Now you can do something like this on the command line:
"pytest SOME_TEST.py --proxy=proxy1"
Format of PROXY_LIST server entries:
* "ip_address:port" OR "username:password@ip_address:po... | Add another proxy server example string | Add another proxy server example string
| Python | mit | seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase | ---
+++
@@ -20,6 +20,7 @@
PROXY_LIST = {
"example1": "159.122.164.163:8080", # (Example) - set your own proxy here
+ "example2": "158.69.138.8:1080", # (Example) - set your own proxy here
"proxy1": None,
"proxy2": None,
"proxy3": None, |
1a15a08abd7c7b5313402be4574ca6811044fd75 | launch_control/models/hw_device.py | launch_control/models/hw_device.py | """
Module with the HardwareDevice model.
"""
from launch_control.utils.json import PlainOldData
class HardwareDevice(PlainOldData):
"""
Model representing any HardwareDevice
A device is just a "device_type" attribute with a bag of properties
and a human readable description. Individual device types... | """
Module with the HardwareDevice model.
"""
from launch_control.utils.json import PlainOldData
class HardwareDevice(PlainOldData):
"""
Model representing any HardwareDevice
A device is just a "device_type" attribute with a bag of properties
and a human readable description. Individual device types... | Fix HardwareDevice constructor to provide 'description' argument | Fix HardwareDevice constructor to provide 'description' argument
| Python | agpl-3.0 | Linaro/lava-server,Linaro/lava-server,OSSystems/lava-server,Linaro/lava-server,Linaro/lava-server,OSSystems/lava-server,OSSystems/lava-server | ---
+++
@@ -36,7 +36,7 @@
__slots__ = ('device_type', 'desc', 'attributes')
- def __init__(self, device_type, desc, attributes=None):
+ def __init__(self, device_type, description, attributes=None):
self.device_type = device_type
self.description = description
self.attributes... |
8fff587b9fd7e2cd0ca4d45e869345cbfb248045 | troposphere/workspaces.py | troposphere/workspaces.py | # Copyright (c) 2015, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from . import AWSObject
class Workspace(AWSObject):
resource_type = "AWS::WorkSpaces::Workspace"
props = {
'BundleId': (basestring, True),
'DirectoryId': (basestring, True),
... | # Copyright (c) 2015, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from . import AWSObject
from .validators import boolean
class Workspace(AWSObject):
resource_type = "AWS::WorkSpaces::Workspace"
props = {
'BundleId': (basestring, True),
'DirectoryI... | Add encryption properties to Workspace | Add encryption properties to Workspace
| Python | bsd-2-clause | 7digital/troposphere,dmm92/troposphere,horacio3/troposphere,ikben/troposphere,alonsodomin/troposphere,pas256/troposphere,cloudtools/troposphere,dmm92/troposphere,ikben/troposphere,Yipit/troposphere,cloudtools/troposphere,johnctitus/troposphere,amosshapira/troposphere,johnctitus/troposphere,pas256/troposphere,alonsodomi... | ---
+++
@@ -4,6 +4,7 @@
# See LICENSE file for full license.
from . import AWSObject
+from .validators import boolean
class Workspace(AWSObject):
@@ -13,4 +14,7 @@
'BundleId': (basestring, True),
'DirectoryId': (basestring, True),
'UserName': (basestring, True),
+ 'RootVolum... |
b4e106271f96b083644b27d313ad80c240fcb0a5 | gapipy/resources/booking/booking.py | gapipy/resources/booking/booking.py | # Python 2 and 3
from __future__ import unicode_literals
from gapipy.resources.checkin import Checkin
from ..base import Resource
from .transaction import Payment, Refund
from .document import Invoice, Document
from .override import Override
from .service import Service
class Booking(Resource):
_resource_name =... | # Python 2 and 3
from __future__ import unicode_literals
from gapipy.resources.checkin import Checkin
from ..base import Resource
from .agency_chain import AgencyChain
from .document import Invoice, Document
from .override import Override
from .service import Service
from .transaction import Payment, Refund
class B... | Add agency chain to Booking | Add agency chain to Booking
| Python | mit | gadventures/gapipy | ---
+++
@@ -4,10 +4,11 @@
from gapipy.resources.checkin import Checkin
from ..base import Resource
-from .transaction import Payment, Refund
+from .agency_chain import AgencyChain
from .document import Invoice, Document
from .override import Override
from .service import Service
+from .transaction import Payme... |
8ba94b216531f249a7097f10eb74f363af6151e2 | xmlrpc2/client.py | xmlrpc2/client.py | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import urllib.parse
class BaseTransport(object):
@property
def scheme(self):
raise NotImplementedError("Transports must have a scheme")
class HTTPTransport(BaseTransport):
scheme = "... | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import urllib.parse
class BaseTransport(object):
@property
def scheme(self):
raise NotImplementedError("Transports must have a scheme")
class HTTPTransport(BaseTransport):
scheme = "... | Rename internal variables to start with a _ | Rename internal variables to start with a _
| Python | bsd-2-clause | dstufft/xmlrpc2 | ---
+++
@@ -24,20 +24,20 @@
transports = [HTTPTransport]
# Initialize transports
- self.transports = {}
+ self._transports = {}
for transport in transports:
t = transport()
- self.transports[t.scheme] = t
+ self._transports[t.scheme] = ... |
e64195a005be583f32754e49e870b198ee7bc396 | corehq/pillows/mappings/case_search_mapping.py | corehq/pillows/mappings/case_search_mapping.py | from corehq.pillows.mappings.case_mapping import CASE_ES_TYPE
from corehq.pillows.mappings.utils import mapping_from_json
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo
CASE_SEARCH_INDEX = es_index("case_search_2016-03-15")
CASE_SEARCH_ALIAS = "case_search"
CASE_SEARCH_... | from corehq.pillows.mappings.case_mapping import CASE_ES_TYPE
from corehq.pillows.mappings.utils import mapping_from_json
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo
CASE_SEARCH_INDEX = es_index("case_search_2016-03-15")
CASE_SEARCH_ALIAS = "case_search"
CASE_SEARCH_... | Increase case search limit to 100 results | Increase case search limit to 100 results
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | ---
+++
@@ -6,7 +6,7 @@
CASE_SEARCH_INDEX = es_index("case_search_2016-03-15")
CASE_SEARCH_ALIAS = "case_search"
-CASE_SEARCH_MAX_RESULTS = 10
+CASE_SEARCH_MAX_RESULTS = 100
CASE_SEARCH_MAPPING = mapping_from_json('case_search_mapping.json')
|
db20fc6b7a21efbd7de0f5b0d1aa754c19c1a21f | race/management/commands/update_leaderboard.py | race/management/commands/update_leaderboard.py | from django.core.management.base import BaseCommand
from django.conf import settings
from ...models import OverallDriverPrediction, OverallConstructorPrediction
class Command(BaseCommand):
can_import_settings = True
def handle(self, *args, **kwargs):
conn = settings.REDIS_CONN
num_ranks = con... | from django.core.management.base import BaseCommand
from django.conf import settings
from ...models import OverallDriverPrediction, OverallConstructorPrediction
class Command(BaseCommand):
can_import_settings = True
def handle(self, *args, **kwargs):
conn = settings.REDIS_CONN
num_ranks = con... | Remove all scores before populating the sorted set. | Remove all scores before populating the sorted set.
| Python | bsd-3-clause | theju/f1oracle,theju/f1oracle | ---
+++
@@ -9,7 +9,7 @@
def handle(self, *args, **kwargs):
conn = settings.REDIS_CONN
num_ranks = conn.zcard("ranks")
- conn.zremrangebyscore("ranks", 0, num_ranks)
+ conn.zremrangebyscore("ranks", 0, num_ranks + 1)
for driver_prediction in OverallDriverPrediction.objects... |
0f0e0e91db679f18ad9dc7568047b76e447ac589 | stock_inventory_chatter/__openerp__.py | stock_inventory_chatter/__openerp__.py | # -*- coding: utf-8 -*-
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# (http://www.eficent.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
'name': 'Stock Inventory Chatter',
'version': '9.0.1.0.0',
'author': "Eficent, "
"Odoo Community Assoc... | # -*- coding: utf-8 -*-
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# Copyright 2018 initOS GmbH
# (http://www.eficent.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
'name': 'Stock Inventory Chatter',
'version': '8.0.1.0.0',
'author': "Eficent, "
... | Change of the module version | Change of the module version
| Python | agpl-3.0 | kmee/stock-logistics-warehouse,acsone/stock-logistics-warehouse,open-synergy/stock-logistics-warehouse | ---
+++
@@ -1,12 +1,14 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
+# Copyright 2018 initOS GmbH
# (http://www.eficent.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
'name': 'Stock Inventory Chatter',
- 'version': '9.0.1.0... |
d3227e87b658b4ee634dd273a97d1a8fba4c96c9 | lc461_hamming_distance.py | lc461_hamming_distance.py | """Leetcode 461. Hamming Distance
Medium
URL: https://leetcode.com/problems/hamming-distance/description/
The Hamming distance between two integers is the number of positions at which
the corresponding bits are different.
Given two integers x and y, calculate the Hamming distance.
Note:
0 ≤ x, y < 231.
Example:
... | """Leetcode 461. Hamming Distance
Medium
URL: https://leetcode.com/problems/hamming-distance/description/
The Hamming distance between two integers is the number of positions at which
the corresponding bits are different.
Given two integers x and y, calculate the Hamming distance.
Note:
0 ≤ x, y < 231.
Example:
... | Revise docstring and add space line | Revise docstring and add space line
| Python | bsd-2-clause | bowen0701/algorithms_data_structures | ---
+++
@@ -22,7 +22,8 @@
4 (0 1 0 0)
↑ ↑
-The above arrows point to positions where the corresponding bits are different.
+The above arrows point to positions where the corresponding bits
+are different.
"""
class Solution(object):
@@ -41,5 +42,6 @@
def main():
print Solution().hammingDista... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.