commit stringlengths 40 40 | subject stringlengths 4 1.73k | repos stringlengths 5 127k | old_file stringlengths 2 751 | new_file stringlengths 2 751 | new_contents stringlengths 1 8.98k | old_contents stringlengths 0 6.59k | license stringclasses 13
values | lang stringclasses 23
values |
|---|---|---|---|---|---|---|---|---|
f0d36493e69ac29ba0b201cae1dadfe6e7f8f44d | Add octave_kernel to install_requires | blink1073/oct2py,blink1073/oct2py | setup.py | setup.py | """Setup script for oct2py package.
"""
DISTNAME = 'oct2py'
DESCRIPTION = 'Python to GNU Octave bridge --> run m-files from python.'
LONG_DESCRIPTION = open('README.rst', 'rb').read().decode('utf-8')
MAINTAINER = 'Steven Silvester'
MAINTAINER_EMAIL = 'steven.silvester@ieee.org'
URL = 'http://github.com/blink1073... | """Setup script for oct2py package.
"""
DISTNAME = 'oct2py'
DESCRIPTION = 'Python to GNU Octave bridge --> run m-files from python.'
LONG_DESCRIPTION = open('README.rst', 'rb').read().decode('utf-8')
MAINTAINER = 'Steven Silvester'
MAINTAINER_EMAIL = 'steven.silvester@ieee.org'
URL = 'http://github.com/blink1073... | mit | Python |
0a44e7eeaac6c3b237c55b358fef551166763b35 | Add homepage URL to point to GitHub page | ARM-software/daq-server | setup.py | setup.py | # Copyright 2013-2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | # Copyright 2013-2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | apache-2.0 | Python |
281028ebde55aec25a525b0f789da263a73486b2 | Include long description in package metadata | django-dbbackup/django-dbbackup,mjs7231/django-dbbackup,django-dbbackup/django-dbbackup,mjs7231/django-dbbackup | setup.py | setup.py | #!/usr/bin/env python
from pathlib import Path
from setuptools import setup, find_packages
import dbbackup
def get_requirements():
return open('requirements.txt').read().splitlines()
def get_test_requirements():
return open('requirements-tests.txt').read().splitlines()
project_dir = Path(__file__).paren... | #!/usr/bin/env python
from setuptools import setup, find_packages
import dbbackup
def get_requirements():
return open('requirements.txt').read().splitlines()
def get_test_requirements():
return open('requirements-tests.txt').read().splitlines()
keywords = [
'django', 'database', 'media', 'backup',
... | bsd-3-clause | Python |
9fc97fb717df7632ee44db823f4ec6178e4ce279 | Add Python 2.7 trove classifier to setup.py | cgvarela/fabric,rbramwell/fabric,itoed/fabric,fernandezcuesta/fabric,haridsv/fabric,kmonsoor/fabric,cmattoon/fabric,mathiasertl/fabric,StackStorm/fabric,likesxuqiang/fabric,MjAbuz/fabric,opavader/fabric,qinrong/fabric,sdelements/fabric,tolbkni/fabric,pgroudas/fabric,hrubi/fabric,bitprophet/fabric,rodrigc/fabric,TarasRu... | setup.py | setup.py | #!/usr/bin/env python
import sys
from setuptools import setup, find_packages
from fabric.version import get_version
readme = open('README.rst').read()
long_description = """
To find out what's new in this version of Fabric, please see `the changelog
<http://docs.fabfile.org/en/%s/changelog.html>`_.
You can also ... | #!/usr/bin/env python
import sys
from setuptools import setup, find_packages
from fabric.version import get_version
readme = open('README.rst').read()
long_description = """
To find out what's new in this version of Fabric, please see `the changelog
<http://docs.fabfile.org/en/%s/changelog.html>`_.
You can also ... | bsd-2-clause | Python |
d394ada45d9d16cc081d416ad2bcbcc9cd707b1a | Add dependencies | fausecteam/ctf-gameserver,fausecteam/ctf-gameserver,fausecteam/ctf-gameserver,fausecteam/ctf-gameserver,fausecteam/ctf-gameserver | setup.py | setup.py | #!/usr/bin/python3
from setuptools import setup
setup(name='CTF Gameserver',
include_package_data=True,
version='0.1-rc0',
description='FAUST CTF Gameserver',
author='Christoph Egger, Felix Dreissig',
author_email='Christoph.Egger@fau.de, Felix.Dreissig@fau.de',
url='http://faustct... | #!/usr/bin/python3
from setuptools import setup
setup(name='CTF Gameserver',
include_package_data=True,
version='0.1-rc0',
description='FAUST CTF Gameserver',
author='Christoph Egger, Felix Dreissig',
author_email='Christoph.Egger@fau.de, Felix.Dreissig@fau.de',
url='http://faustct... | isc | Python |
d37397841a0800241c05417d42ac528ec31bc0bf | Update author information. | its-dirg/Flask-pyoidc,zamzterz/Flask-pyoidc,zamzterz/Flask-pyoidc | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='Flask-pyoidc',
version='1.0.0',
packages=find_packages('src'),
package_dir={'': 'src'},
url='https://github.com/zamzterz/flask-pyoidc',
license='Apache 2.0',
author='Samuel Gulliksson',
author_email... | from setuptools import setup, find_packages
setup(
name='Flask-pyoidc',
version='1.0.0',
packages=find_packages('src'),
package_dir={'': 'src'},
url='https://github.com/its-dirg/flask-pyoidc',
license='Apache 2.0',
author='Rebecka Gulliksson',
author_emai... | apache-2.0 | Python |
b792bcc3e17a3b8da2a766403c8d69dcdaeb2118 | Update version and download link | rjagerman/shoelace | setup.py | setup.py | from setuptools import setup
setup(
name='lace',
version='0.1.1',
description='Neural Learning to Rank using Chainer',
url='https://github.com/rjagerman/lace',
download_url = 'https://github.com/rjagerman/lace/archive/v0.1.1.tar.gz',
author='Rolf Jagerman',
author_email='rjagerman@gmail.com... | from setuptools import setup
setup(
name='lace',
version='0.1',
description='Neural Learning to Rank using Chainer',
url='https://github.com/rjagerman/lace',
download_url = 'https://github.com/rjagerman/lace/archive/v0.1.0.tar.gz',
author='Rolf Jagerman',
author_email='rjagerman@gmail.com',... | mit | Python |
1b15f15beb040f571bee998c936a75b72c059f5a | Fix version_info for pythpn 2.6 | urielarg/pyramid_crud,urielarg/pyramid_crud,Javex/pyramid_crud,Javex/pyramid_crud,Javex/pyramid_crud | setup.py | setup.py | import os
import sys
import re
from setuptools import setup, find_packages, Command
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.rst')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
except:
README = CHANGES = ''
v = open(os.path.join(os.... | import os
import sys
import re
from setuptools import setup, find_packages, Command
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.rst')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
except:
README = CHANGES = ''
v = open(os.path.join(os.... | mit | Python |
b147e548fcea759cc7878bb84ed4f460d9c4458d | Remove migration from setup | izberg-marketplace/django-izberg,Iceberg-Marketplace/django-iceberg,izberg-marketplace/django-izberg,Iceberg-Marketplace/django-iceberg | setup.py | setup.py | #!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import os
import sys
if sys.version < '3':
execfile(os.path.join('django_iceberg', 'version.py'))
else:
exec(open("django_iceberg/version.py").read())
install_requires = []
install_requires.a... | #!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import os
import sys
if sys.version < '3':
execfile(os.path.join('django_iceberg', 'version.py'))
else:
exec(open("django_iceberg/version.py").read())
install_requires = []
install_requires.a... | mit | Python |
c13b8d88b6a152a93b478f691654d6cbd018ae74 | Remove python 2.x from trove classifiers | CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer | setup.py | setup.py | from glob import glob
import subprocess
import sys
from setuptools import find_packages, setup
REQUIRES = [
'Django>=1.11',
'django-crispy-forms',
'django-nose',
'django-registration-redux',
'djangorestframework',
'drf-extensions',
'jsonfield',
'pillow',
'diff-match-patch',
'py... | from glob import glob
import subprocess
import sys
from setuptools import find_packages, setup
REQUIRES = [
'Django>=1.11',
'django-crispy-forms',
'django-nose',
'django-registration-redux',
'djangorestframework',
'drf-extensions',
'jsonfield',
'pillow',
'diff-match-patch',
'py... | isc | Python |
8a29fbbb6a1319b07cf043d477e0a2d15228b708 | comment out | singingwolfboy/flask-dance-slack | slack.py | slack.py | import os
import sys
from werkzeug.contrib.fixers import ProxyFix
from flask import Flask, redirect, url_for
from flask_dance.consumer import OAuth2ConsumerBlueprint
from raven.contrib.flask import Sentry
app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app)
sentry = Sentry(app)
app.secret_key = os.environ.get("... | import os
import sys
from werkzeug.contrib.fixers import ProxyFix
from flask import Flask, redirect, url_for
from flask_dance.consumer import OAuth2ConsumerBlueprint
from raven.contrib.flask import Sentry
app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app)
sentry = Sentry(app)
app.secret_key = os.environ.get("... | mit | Python |
60a5e9ddac4a651a75219d371f608ae138248928 | bump version number | drtyrsa/django-cached-modelforms | setup.py | setup.py | # -*- coding: utf-8 -*-
import os
import sys
import codecs
import subprocess
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
class TestRunner(TestCommand):
user_options = []
def run(self):
raise SystemExit(subprocess.call([sys.executable, 'runtest... | # -*- coding: utf-8 -*-
import os
import sys
import codecs
import subprocess
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
class TestRunner(TestCommand):
user_options = []
def run(self):
raise SystemExit(subprocess.call([sys.executable, 'runtest... | bsd-2-clause | Python |
bea49611b71bb7cdc03d5fda9546bdef35ce836c | Update Trove classifier to indicate Python 3 support | jawilson/pmxbot,jawilson/pmxbot | setup.py | setup.py | # -*- coding: utf-8 -*-
# vim:ts=4:sw=4:noexpandtab
# c-basic-indent: 4; tab-width: 4; indent-tabs-mode: true;
import sys
import setuptools
py26reqs = ['importlib'] if sys.version_info < (2, 7) else []
setup_params = dict(
name="pmxbot",
use_hg_version=True,
packages=setuptools.find_packages(),
include_package_d... | # -*- coding: utf-8 -*-
# vim:ts=4:sw=4:noexpandtab
# c-basic-indent: 4; tab-width: 4; indent-tabs-mode: true;
import sys
import setuptools
py26reqs = ['importlib'] if sys.version_info < (2, 7) else []
setup_params = dict(
name="pmxbot",
use_hg_version=True,
packages=setuptools.find_packages(),
include_package_d... | bsd-3-clause | Python |
fcec76552b3d2aac0c2c7c5c89705cf68c461bb5 | bump version | nathants/py-util,nathants/s | setup.py | setup.py | import os
import setuptools
package_data = {'': ['/'.join(os.path.join(path, file).split('/')[1:])
for n in os.listdir('.')
if os.path.isdir(n)
and '__init__.py' in os.listdir(n)
for path, dirs, files in os.walk(n)
... | import os
import setuptools
package_data = {'': ['/'.join(os.path.join(path, file).split('/')[1:])
for n in os.listdir('.')
if os.path.isdir(n)
and '__init__.py' in os.listdir(n)
for path, dirs, files in os.walk(n)
... | mit | Python |
aa66469c3d7aaf91c6bf127afdbbbec4be1c47a8 | update version 0.3.10 | Duke-GCB/DukeDSClient,Duke-GCB/DukeDSClient | setup.py | setup.py | from setuptools import setup
setup(name='DukeDSClient',
version='0.3.10',
description='Command line tool(ddsclient) to upload/manage projects on the duke-data-service.',
url='https://github.com/Duke-GCB/DukeDSClient',
keywords='duke dds dukedataservice',
author='John Bradley',
... | from setuptools import setup
setup(name='DukeDSClient',
version='0.3.9',
description='Command line tool(ddsclient) to upload/manage projects on the duke-data-service.',
url='https://github.com/Duke-GCB/DukeDSClient',
keywords='duke dds dukedataservice',
author='John Bradley',
... | mit | Python |
ceb5f375f031b9629822ea8ac26b11ed797df621 | Add moar classifiers | jurismarches/chopper | setup.py | setup.py | # -*- coding: utf-8 -*-
from setuptools import setup
VERSION = '0.1.3'
with open('README.rst', 'r') as f:
long_description = f.read()
setup(
name='tree_extractor',
version=VERSION,
description="Lib to extract html elements by preserving ancestors and cleaning CSS",
long_description=long_descripti... | # -*- coding: utf-8 -*-
from setuptools import setup
VERSION = '0.1.3'
with open('README.rst', 'r') as f:
long_description = f.read()
setup(
name='tree_extractor',
version=VERSION,
description="Lib to extract html elements by preserving ancestors and cleaning CSS",
long_description=long_descripti... | mit | Python |
6707acf4c09c6aae6abf78a325a08ddd72377e6f | Add requests[security] extras to install_requires | bu-ist/bux-grader-framework,abduld/bux-grader-framework | setup.py | setup.py | #!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='bux-grader-framework',
version='0.4.3',
author='Boston University',
author_email='webteam@bu.edu',
url='https://github.com/bu-ist/bux-grader-framework/',
descriptio... | #!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='bux-grader-framework',
version='0.4.3',
author='Boston University',
author_email='webteam@bu.edu',
url='https://github.com/bu-ist/bux-grader-framework/',
descriptio... | agpl-3.0 | Python |
ac65ef18c13b44a4b9dcc500df540fb35ce3f558 | Bump version to 0.1.1 | hamaxx/uasparser2 | setup.py | setup.py | """
uasparser2
----------
Fast and reliable User Agent parser.
Easy to use
```````````
::
from uasparser2 import UASparser
uas_parser = UASparser('/path/to/your/cache/folder', mem_cache_size=1000)
result = uas_parser.parse('YOUR_USERAGENT_STRING')
# If input data is not avaible in cache folde, UA... | """
uasparser2
----------
Fast and reliable User Agent parser.
Easy to use
```````````
::
from uasparser2 import UASparser
uas_parser = UASparser('/path/to/your/cache/folder', mem_cache_size=1000)
result = uas_parser.parse('YOUR_USERAGENT_STRING')
# If input data is not avaible in cache folde, UA... | bsd-3-clause | Python |
0460e6e955f2ed22c111e842dcac32484d1c0889 | Add pdb subpackage to setup.py | samirelanduk/atomium,samirelanduk/atomium,samirelanduk/molecupy | setup.py | setup.py | from setuptools import setup
setup(
name="molecupy",
version="2.0.0",
description="A Python molecular modeller with PDB parsing.",
url="https://molecupy.readthedocs.io",
author="Sam Ireland",
author_email="mail@samireland.com",
license="MIT",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audien... | from setuptools import setup
setup(
name="molecupy",
version="2.0.0",
description="A Python molecular modeller with PDB parsing.",
url="https://molecupy.readthedocs.io",
author="Sam Ireland",
author_email="mail@samireland.com",
license="MIT",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audien... | mit | Python |
9faa963c6b47f0346eb9df7ed05353173858cb0d | update setup.py | autosportlabs/podium-api | setup.py | setup.py | from distutils.core import setup
setup(
name = 'podium_api',
packages = ['podium_api','podium_api.types'],
version = '0.0.12',
description = 'API for Podium Motorsports Platform http://podium.live',
author = 'Autosport Labs',
author_email = 'sales@autosportlabs.com',
url = 'https://github.com/autosportla... | from distutils.core import setup
setup(
name = 'podium_api',
packages = ['podium_api','podium_api.types'],
version = '0.0.11',
description = 'API for Podium Motorsports Platform http://podium.live',
author = 'Autosport Labs',
author_email = 'sales@autosportlabs.com',
url = 'https://github.com/autosportla... | mit | Python |
0306ecd942ca78bc748948138b9f11843e6b7660 | Update version for release 0.2.12 | wendbv/pluvo-python,wendbv/pluvo-python | setup.py | setup.py | from setuptools import setup
setup(
name='pluvo',
packages=['pluvo'],
package_data={},
version='0.2.12',
description='Python library to access the Pluvo REST API.',
author='Wend BV',
author_email='info@wend.nl',
license='MIT',
url='https://github.com/wendbv/pluvo-python',
keywo... | from setuptools import setup
setup(
name='pluvo',
packages=['pluvo'],
package_data={},
version='0.2.11',
description='Python library to access the Pluvo REST API.',
author='Wend BV',
author_email='info@wend.nl',
license='MIT',
url='https://github.com/wendbv/pluvo-python',
keywo... | mit | Python |
526dcc51876ca7ffec36508695721dc1a7d9bf2c | increment version | gemerden/wildpath | setup.py | setup.py | import os
from codecs import open
from setuptools import setup
here = os.path.abspath(os.path.dirname(__file__))
# Get the long description from the README file
with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(name='wildpath',
version='0.1.3',
descr... | import os
from codecs import open
from setuptools import setup
here = os.path.abspath(os.path.dirname(__file__))
# Get the long description from the README file
with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(name='wildpath',
version='0.1.1',
descr... | mit | Python |
d430bab7353691241eff1120df297672250e6479 | Bump to version 0.2.2 | getcircle/protobuf-to-dict | setup.py | setup.py | from setuptools import setup
setup(
name='protobuf-to-dict',
description='A teeny Python library for creating Python dicts from '
'protocol buffers and the reverse. Useful as an intermediate step '
'before serialisation (e.g. to JSON).',
version='0.2.2',
author='Ben Hodgson',
author... | from setuptools import setup
setup(
name='protobuf-to-dict',
description='A teeny Python library for creating Python dicts from '
'protocol buffers and the reverse. Useful as an intermediate step '
'before serialisation (e.g. to JSON).',
version='0.2.1',
author='Ben Hodgson',
author... | unlicense | Python |
86ad145f192cab4c98c58e39ceb37aa5c8ffe84e | update min and max django version | AltSchool/django-scheduler,AltSchool/django-scheduler,AltSchool/django-scheduler | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from setuptools import setup
setup(
name='django-scheduler',
version='10.7.15',
description='A calendaring app for Django.',
author='Leonardo Lazzaro',
author_email='lazzaroleonardo@gmail.com',
url='https://g... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from setuptools import setup
setup(
name='django-scheduler',
version='10.7.15',
description='A calendaring app for Django.',
author='Leonardo Lazzaro',
author_email='lazzaroleonardo@gmail.com',
url='https://g... | bsd-3-clause | Python |
d8927d61398f6e369375b6918c1c416b38eb35f8 | Bump version (v1.23.1) | harrystech/arthur-redshift-etl,harrystech/arthur-redshift-etl,harrystech/arthur-redshift-etl,harrystech/arthur-redshift-etl,harrystech/arthur-redshift-etl | setup.py | setup.py | from setuptools import find_packages, setup
setup(
name="redshift_etl",
version="1.23.1",
author="Harry's Data Engineering and Analytics Engineering",
description="ETL code to ferry data from PostgreSQL databases or S3 files to Redshift clusters",
license="MIT",
keywords="redshift postgresql E... | from setuptools import find_packages, setup
setup(
name="redshift_etl",
version="1.23.0",
author="Harry's Data Engineering and Analytics Engineering",
description="ETL code to ferry data from PostgreSQL databases or S3 files to Redshift clusters",
license="MIT",
keywords="redshift postgresql E... | mit | Python |
6091f12542840813abd163ea149b3abf7d446549 | Remove github2pypi | wkentaro/fcn | setup.py | setup.py | #!/usr/bin/env python
from __future__ import print_function
import distutils.spawn
import shlex
import subprocess
import sys
from setuptools import find_packages
from setuptools import setup
import github2pypi
version = '6.4.12'
if sys.argv[1] == 'release':
if not distutils.spawn.find_executable('twine'):
... | #!/usr/bin/env python
from __future__ import print_function
import distutils.spawn
import shlex
import subprocess
import sys
from setuptools import find_packages
from setuptools import setup
import github2pypi
version = '6.4.12'
if sys.argv[1] == 'release':
if not distutils.spawn.find_executable('twine'):
... | mit | Python |
aa942050300f8387540060a95f69c70dc3d29c00 | Bump to v1.0.0 | gisce/primestg | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='primestg',
version='1.0.0',
packages=find_packages(),
url='https://github.com/gisce/primestg',
license='GNU Affero General Public License v3',
author='GISCE-TI, S.L.',
author_email='devel@gisce.net',
install_requires=[
'l... | from setuptools import setup, find_packages
setup(
name='primestg',
version='0.2.1',
packages=find_packages(),
url='https://github.com/gisce/primestg',
license='GNU Affero General Public License v3',
author='GISCE-TI, S.L.',
author_email='devel@gisce.net',
install_requires=[
'l... | agpl-3.0 | Python |
cc9d23142be989662c8fedd0124fe6f99de360bb | Add python_requires to help pip | auth0/auth0-python,auth0/auth0-python | setup.py | setup.py | import io
import os
import re
from setuptools import setup, find_packages
def find_version():
file_dir = os.path.dirname(__file__)
with io.open(os.path.join(file_dir, 'auth0', '__init__.py')) as f:
version = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', f.read())
if version:
ret... | import io
import os
import re
from setuptools import setup, find_packages
def find_version():
file_dir = os.path.dirname(__file__)
with io.open(os.path.join(file_dir, 'auth0', '__init__.py')) as f:
version = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', f.read())
if version:
ret... | mit | Python |
775e0663ba57cbf44943c23618d7748c5ed88525 | test update | AhuPersonal/524_lab1_Exercise1 | ahupythonpackage/test.py | ahupythonpackage/test.py | import unittest
from ahupythonpackage import standard_deviation
from ahupythonpackage import standard_error
class MyTest(unittest.TestCase):
def test_valid_cases_1(self):
self.assertAlmostEqual(standard_deviation([0]), 0)
self.assertAlmostEqual(standard_error([0]), 0)
def test_valid_cases_2(self):
self.assert... | import unittest
from ahupythonpackage import standard_deviation
from ahupythonpackage import standard_error
class MyTest(unittest.TestCase):
def test_valid_cases_1(self):
self.assertAlmostEqual(standard_deviation([0]), 0)
self.assertAlmostEqual(standard_error([0]), 0)
def test_valid_cases_2(self):
self.assert... | mit | Python |
4fb9895c08cf9a8fafe469b91b23cf4c78684955 | Add setup.py | AlexFridman/visits-detector | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='visits-detector',
version='',
packages=find_packages(),
url='',
license='',
author='Alexander Fridman',
author_email='alexfridman@outlook.com',
description=''
)
| from distutils.core import setup
setup(
name='visits-detector',
version='',
packages=['visits_detector'],
url='',
license='',
author='Alexander Fridman',
author_email='alexfridman@outlook.com',
description=''
)
| mit | Python |
dc70bacb9a5ac0a275c7f82bfbec61618bc61c53 | Include github repo url in setup.py | ema/nubo | setup.py | setup.py | """
nubo
----
An easy way to deploy Linux VMs on different cloud providers.
Links
`````
* `GitHub Repository <https://github.com/ema/nubo>`_
* `Development Version
<http://github.com/ema/nubo/zipball/master#egg=nubo-dev>`_
"""
from setuptools import setup
setup(
name='nubo',
version='0.3',
url='http://... | """
nubo
----
An easy way to deploy Linux VMs on different cloud providers.
Links
`````
* `documentation <http://pythonhosted.org/nubo>`_
* `development version
<http://github.com/ema/nubo/zipball/master#egg=nubo-dev>`_
"""
from setuptools import setup
setup(
name='nubo',
version='0.3',
url='http://pyt... | bsd-3-clause | Python |
b3065f43f8f93fcae3d1006d41c4f98db0a49402 | Modify the Model for AlexNet on CIFAR10. | zhangjunpeng9354/Learning-Tensorflow-by-Models | alexnet_cifar10/input.py | alexnet_cifar10/input.py | import os
import tensorflow as tf
import numpy as np
'''Routines for reading the CIFAR-10 python batch files.'''
# Global constants describing the CIFAR-10 data set.
NUM_CLASSES = 10
NUM_EXAMPLES_PER_EPOCH_FOR_TRAIN = 50000
DEFALFT_DATASET_DIR = '/datasets/cifar-10-batches-py'
def load_cifar10(path=DEFALFT_DATASE... |
import numpy as np
'''Routines for reading the CIFAR-10 python batch files.'''
# Global constants describing the CIFAR-10 data set.
NUM_CLASSES = 10
NUM_EXAMPLES_PER_EPOCH_FOR_TRAIN = 50000
TRAINSET_NAME_LIST = ['data_batch_1', 'data_batch_2', 'data_batch_3', 'data_batch_4', 'data_batch_5']
TESTSET_NAME = 'test_batc... | mit | Python |
3e5b28aba796a0b3ed7e7efe8711080086e29826 | Update settings.py | sarsiz/alien-attack | alien-attack/settings.py | alien-attack/settings.py | class Settings():
"""A class to store all the settings for the Alien Invasion."""
def __init__(self):
"""Initialize the game's settings."""
self.screen_width = 1200
self.screen_height = 800
self.bg_color = (230, 230, 230)
# Ship settings
self.ship_speed_... | class Settings():
"""A class to store all the settings for the Alien Invasion"""
def __init__(self):
"""Initialize the game's settings."""
self.screen_width = 1200
self.screen_height = 800
self.bg_color = (230, 230, 230)
# Ship settings
self.ship_speed_f... | mit | Python |
afbb0a95557861f45c308e4ab784e3f2a5293d1d | fix usage doc | tos-kamiya/giftplayer,tos-kamiya/giftplayer | giftplayer/__init__.py | giftplayer/__init__.py | from .gift_ast import Node, gift_parse
from .html_form_builder import html_escape_node_body_strs, build_form_content, build_html_with_answer_render
from .answer_scorer import build_quiz_answer, str_normalize, parse_form_content, score_submission
import html
__version__ = '0.1.5'
__doc__ = """Render/serve given GIFT... | from .gift_ast import Node, gift_parse
from .html_form_builder import html_escape_node_body_strs, build_form_content, build_html_with_answer_render
from .answer_scorer import build_quiz_answer, str_normalize, parse_form_content, score_submission
import html
__version__ = '0.1.5'
__doc__ = """Render/serve given GIFT... | bsd-3-clause | Python |
b021e637a77d1cb190d942e88f83ffe8fa7a5673 | allow new noarch key | ContinuumIO/anaconda-verify,mandeep/conda-verify | anaconda_verify/const.py | anaconda_verify/const.py | LICENSE_FAMILIES = set("""
AGPL
GPL2
GPL3
LGPL
BSD
MIT
Apache
PSF
Public-Domain
Proprietary
Other
""".split())
FIELDS = {
'package': {'name', 'version'},
'source': {'fn', 'url', 'md5', 'sha1', 'sha256',
'git_url', 'git_tag', 'git_branch',
'patches', 'hg_url', 'hg_tag'},
'build... | LICENSE_FAMILIES = set("""
AGPL
GPL2
GPL3
LGPL
BSD
MIT
Apache
PSF
Public-Domain
Proprietary
Other
""".split())
FIELDS = {
'package': {'name', 'version'},
'source': {'fn', 'url', 'md5', 'sha1', 'sha256',
'git_url', 'git_tag', 'git_branch',
'patches', 'hg_url', 'hg_tag'},
'build... | bsd-3-clause | Python |
65b4085feab44e931e303174e3fd885b087ad909 | change the version to acceptable version | WheatonCS/Lexos,WheatonCS/Lexos,WheatonCS/Lexos | proj_info.py | proj_info.py | """Used to store project information.
This file need to be stored in the project root dir"""
import os
SHORT_NAME = 'Lexos'
VERSION = '3.2.0.0'
ABOUT_URL = 'http://wheatoncollege.edu/lexomics/'
REPO_URL = 'https://github.com/WheatonCS/Lexos'
LIVE_URL = 'http://lexos.wheatoncollege.edu'
AUTHOR = 'WheatonCS/LexomicsRe... | """Used to store project information.
This file need to be stored in the project root dir"""
import os
SHORT_NAME = 'Lexos'
VERSION = '4.0rc1'
ABOUT_URL = 'http://wheatoncollege.edu/lexomics/'
REPO_URL = 'https://github.com/WheatonCS/Lexos'
LIVE_URL = 'http://lexos.wheatoncollege.edu'
AUTHOR = 'WheatonCS/LexomicsRes... | mit | Python |
72127731cdfb21496d3f4a5d8b47fbd39fa8a771 | Remove unused imports from test_initializer | sony/nnabla,sony/nnabla,sony/nnabla | python/test/test_initializer.py | python/test/test_initializer.py | # Copyright (c) 2017 Sony Corporation. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | # Copyright (c) 2017 Sony Corporation. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | apache-2.0 | Python |
1297ead6ebb77a849fea1b461be41cfd855a2f85 | test with quasar depth of 1 to test hops | Storj/storjnet,Storj/storjnet | swarm.py | swarm.py | #!/usr/bin/env python
# coding: utf-8
# always use faster native code
import os
os.environ["PYCOIN_NATIVE"] = "openssl"
import sys # NOQA
import time # NOQA
import threading # NOQA
import binascii # NOQA
import signal # NOQA
from storjnet.api import run_swarm # NOQA
from crochet import setup # NOQA
from twiste... | #!/usr/bin/env python
# coding: utf-8
# always use faster native code
import os
os.environ["PYCOIN_NATIVE"] = "openssl"
import sys # NOQA
import time # NOQA
import threading # NOQA
import binascii # NOQA
import signal # NOQA
from storjnet.api import run_swarm # NOQA
from crochet import setup # NOQA
from twiste... | mit | Python |
10259652f0cb66cf4b37187c94dbfb8d8571bd05 | set AUTOSYNTH_MULTIPLE_COMMITS=true for context aware commits (#201) | googleapis/nodejs-paginator,googleapis/nodejs-paginator | synth.py | synth.py | import synthtool as s
import synthtool.gcp as gcp
import logging
logging.basicConfig(level=logging.DEBUG)
AUTOSYNTH_MULTIPLE_COMMITS = True
common_templates = gcp.CommonTemplates()
templates = common_templates.node_library()
s.copy(templates)
| import synthtool as s
import synthtool.gcp as gcp
import logging
logging.basicConfig(level=logging.DEBUG)
common_templates = gcp.CommonTemplates()
templates = common_templates.node_library()
s.copy(templates)
| apache-2.0 | Python |
89166cf951030cf61241983337fd7ffd2536878a | Improve the monkey-patching library to replicate requests more closely | esben/requests-unixsocket,msabramo/requests-unixsocket | requests_unixsocket/__init__.py | requests_unixsocket/__init__.py | import requests
import sys
from .adapters import UnixAdapter
DEFAULT_SCHEME = 'http+unix://'
class Session(requests.Session):
def __init__(self, url_scheme=DEFAULT_SCHEME, *args, **kwargs):
super(Session, self).__init__(*args, **kwargs)
self.mount(url_scheme, UnixAdapter())
class monkeypatch(obj... | import requests
import sys
from .adapters import UnixAdapter
__all__ = ['monkeypatch', 'Session']
DEFAULT_SCHEME = 'http+unix://'
class Session(requests.Session):
def __init__(self, url_scheme=DEFAULT_SCHEME, *args, **kwargs):
super(Session, self).__init__(*args, **kwargs)
self.mount(url_scheme... | apache-2.0 | Python |
4103e508b66db211f50827945079ad982f162922 | Add build docs to tasks | robinandeer/chanjo | tasks.py | tasks.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from invoke import run, task
from invoke.util import log
@task
def test():
"""Run the test runner."""
run('python setup.py test', pty=True)
@task
def clean():
"""clean - remove build artifacts."""
run('rm -rf build/')
run... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from invoke import run, task
from invoke.util import log
@task
def test():
"""Run the test runner."""
run('python setup.py test', pty=True)
@task
def clean():
"""clean - remove build artifacts."""
run('rm -rf build/')
run... | mit | Python |
584bdbd3284a2afbf4bb723c74720dfa04b2cc82 | fix redirected urls | lino-framework/extjs6,lino-framework/extjs6,lsaffre/lino_extjs6,lsaffre/lino_extjs6,lsaffre/lino_extjs6,lsaffre/lino_extjs6,lsaffre/lino_extjs6,lino-framework/extjs6 | tasks.py | tasks.py | from atelier.invlib import setup_from_tasks
ns = setup_from_tasks(
globals(), "lino_extjs6",
languages="en de fr et".split(),
# tolerate_sphinx_warnings=True,
blogref_url = 'https://luc.lino-framework.org',
revision_control_system='git',
# locale_dir='lino_extjs/extjs/locale',
cleanable_file... | from atelier.invlib import setup_from_tasks
ns = setup_from_tasks(
globals(), "lino_extjs6",
languages="en de fr et".split(),
# tolerate_sphinx_warnings=True,
blogref_url = 'http://luc.lino-framework.org',
revision_control_system='git',
# locale_dir='lino_extjs/extjs/locale',
cleanable_files... | agpl-3.0 | Python |
f607cf2f024c299953a0d3eb523b6be493792d0f | Clean cache files after pytest & mypy | miso-belica/sumy,miso-belica/sumy | tasks.py | tasks.py | # -*- coding: utf-8 -*-
from invoke import task
@task
def clean(context):
context.run("rm -rf dist build .coverage .pytest_cache .mypy_cache")
@task(clean, default=True)
def test(context):
context.run("pytest")
@task(test)
def install(context):
context.run("python setup.py develop")
@task(test)
def... | # -*- coding: utf-8 -*-
from invoke import task
@task
def clean(context):
context.run("rm -rf .coverage dist build")
@task(clean, default=True)
def test(context):
context.run("pytest")
@task(test)
def install(context):
context.run("python setup.py develop")
@task(test)
def release(context):
con... | apache-2.0 | Python |
767a07f9e23774a8f1b3e634f5ee9ae9b54d063a | Clean up formatting to please linter | imajunryou/RealPython2,imajunryou/RealPython2 | flask-blog/blog.py | flask-blog/blog.py | # blog.py - controller
# imports
from flask import Flask, render_template, request, session, \
flash, redirect, url_for, g
import sqlite3
from functools import wraps
# configuration
DATABASE = "blog.db"
app = Flask(__name__)
# pulls in app configuration by looking for UPPERCASE variables in this file
app.config... | # blog.py - controller
# imports
from flask import Flask, render_template, request, session, \
flash, redirect, url_for, g
import sqlite3
from functools import wraps
# configuration
DATABASE = "blog.db"
app = Flask(__name__)
# pulls in app configuration by looking for UPPERCASE variables in this file
app.config... | mit | Python |
a872277f28145e2f0f78e0f75bc87f34478b7a50 | Copy over pkgdb pagination fixes... | jeremycline/fmn,jeremycline/fmn,fedora-infra/fmn.rules,jeremycline/fmn | fmn/rules/utils.py | fmn/rules/utils.py | """ Fedora Notifications pkgdb client """
import json
import logging
import requests
from dogpile.cache import make_region
log = logging.getLogger(__name__)
_cache = make_region()
def get_packages_of_user(config, username):
""" Retrieve the list of packages where the specified user some acl.
:arg config:... | """ Fedora Notifications pkgdb client """
import json
import logging
import requests
from dogpile.cache import make_region
log = logging.getLogger(__name__)
_cache = make_region()
def get_packages_of_user(config, username):
""" Retrieve the list of packages where the specified user some acl.
:arg config:... | lgpl-2.1 | Python |
4aaa607b8d227ac7acb335636f4bc4775a3440f5 | Add xmlns:xlink so SVGs are rendered properly as individual files | explosion/spaCy,explosion/spaCy,spacy-io/spaCy,aikramer2/spaCy,explosion/spaCy,recognai/spaCy,aikramer2/spaCy,spacy-io/spaCy,aikramer2/spaCy,spacy-io/spaCy,spacy-io/spaCy,recognai/spaCy,explosion/spaCy,recognai/spaCy,aikramer2/spaCy,honnibal/spaCy,aikramer2/spaCy,honnibal/spaCy,honnibal/spaCy,aikramer2/spaCy,recognai/s... | spacy/displacy/templates.py | spacy/displacy/templates.py | # coding: utf8
from __future__ import unicode_literals
# setting explicit height and max-width: none on the SVG is required for
# Jupyter to render it properly in a cell
TPL_DEP_SVG = """
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="{id}" class="displacy" width="{width}" hei... | # coding: utf8
from __future__ import unicode_literals
# setting explicit height and max-width: none on the SVG is required for
# Jupyter to render it properly in a cell
TPL_DEP_SVG = """
<svg xmlns="http://www.w3.org/2000/svg" id="{id}" class="displacy" width="{width}" height="{height}" style="max-width: none; heig... | mit | Python |
551431bfe2051f828bcf752eeac6f7449590c330 | Add demonstracao do uso | tonussi/makeshakey | keccak/demo.py | keccak/demo.py | #! /usr/bin/pythonw
# The Keccak sponge function, designed by Guido Bertoni, Joan Daemen,
# Michaël Peeters and Gilles Van Assche. For more information, feedback or
# questions, please refer to our website: http://keccak.noekeon.org/
#
# Implementation by Renaud Bauvin,
# hereby denoted as "the implementer".
#
# To t... | #! /usr/bin/pythonw
# The Keccak sponge function, designed by Guido Bertoni, Joan Daemen,
# Michaël Peeters and Gilles Van Assche. For more information, feedback or
# questions, please refer to our website: http://keccak.noekeon.org/
#
# Implementation by Renaud Bauvin,
# hereby denoted as "the implementer".
#
# To t... | mit | Python |
4ea93a445da23e112577d7f8c168d59b221fc4b5 | Update full_test.py | datasnakes/Datasnakes-Scripts,datasnakes/Datasnakes-Scripts,datasnakes/Datasnakes-Scripts,datasnakes/Datasnakes-Scripts,datasnakes/Datasnakes-Scripts,datasnakes/Datasnakes-Scripts | Tests/full_test.py | Tests/full_test.py | from Datasnakes.Manager.utils.mana import ProjectManagement
from Datasnakes.Orthologs.Blast.blastn import CompGenBLASTn
from Datasnakes.Orthologs.Genbank.genbank import GenBank
from Datasnakes.Orthologs.Align.msa import MultipleSequenceAlignment
#project='test-project'
#pm = ProjectManagement(repo='test-repo', user='... | from Datasnakes.Manager.utils.mana import ProjectManagement
from Datasnakes.Orthologs.Blast.blastn import CompGenBLASTn
from Datasnakes.Orthologs.Genbank.genbank import GenBank
from Datasnakes.Orthologs.Align.msa import MultipleSequenceAlignment
project='test-project'
pm = ProjectManagement(repo='test-repo', user='te... | mit | Python |
e200a322ee18e46b9c7387b2e02ee948d9cb2cdb | check for RESULTS_VERS just like in Bovy's APOGEE | henrysky/astroNN,henrysky/astroNN | astroNN/apogee/apogee_shared.py | astroNN/apogee/apogee_shared.py | # ---------------------------------------------------------#
# astroNN.apogee.apogee_shared: shared functions for apogee
# ---------------------------------------------------------#
import os
def apogee_env():
"""
Get APOGEE environment variable
:return: path to APOGEE local dir
:rtype: str
:H... | # ---------------------------------------------------------#
# astroNN.apogee.apogee_shared: shared functions for apogee
# ---------------------------------------------------------#
import os
def apogee_env():
"""
NAME:
apogee_env
PURPOSE:
get APOGEE environment variable
INPUT:
... | mit | Python |
c4b58e2e43b29c507cd97aeb4e9a9cd4963ec68f | add roles to cache | fatrix/django-golive,fatrix/django-golive | golive/layers/cache.py | golive/layers/cache.py | from golive.base import DjangoBaseTask, DebianPackageMixin
class RedisSetup(DjangoBaseTask, DebianPackageMixin):
# TODO: redis-server should be installed from squeeze-backports
package_name = 'redis-server'
roles = 'CACHE_HOST'
| from golive.base import DjangoBaseTask, DebianPackageMixin
class RedisSetup(DjangoBaseTask, DebianPackageMixin):
role = 'CACHE_HOST'
# TODO: redis-server should be installed from squeeze-backports
package_name = 'redis-server'
| bsd-2-clause | Python |
06113d958c81269012775672a88be6d9ad934152 | update db migration | airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo | knowledge_repo/app/migrations/versions/9715822acf6c_add_errorlog_table.py | knowledge_repo/app/migrations/versions/9715822acf6c_add_errorlog_table.py | """Add ErrorLog table.
Revision ID: 9715822acf6c
Revises: 860cb49889a9
Create Date: 2017-02-27 10:15:42.372833
"""
# revision identifiers, used by Alembic.
import sqlalchemy as sa
from alembic import op
revision = '9715822acf6c'
down_revision = '860cb49889a9'
def upgrade():
op.create_table('errorlog',
... | """Add ErrorLog table.
Revision ID: 9715822acf6c
Revises: 860cb49889a9
Create Date: 2017-02-27 10:15:42.372833
"""
# revision identifiers, used by Alembic.
revision = '9715822acf6c'
down_revision = '860cb49889a9'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table('errorlog',
... | apache-2.0 | Python |
6bfb724e7913e1e49dc7286664bd0afcf5145c8c | bump to 8.1.1 | mosquito/aio-pika | aio_pika/version.py | aio_pika/version.py | author_info = (("Dmitry Orlov", "me@mosquito.su"),)
package_info = "Wrapper for the aiormq for asyncio and humans."
package_license = "Apache Software License"
team_email = "me@mosquito.su"
version_info = (8, 1, 1)
__author__ = ", ".join("{} <{}>".format(*info) for info in author_info)
__version__ = ".".join(map(st... | author_info = (("Dmitry Orlov", "me@mosquito.su"),)
package_info = "Wrapper for the aiormq for asyncio and humans."
package_license = "Apache Software License"
team_email = "me@mosquito.su"
version_info = (8, 1, 0)
__author__ = ", ".join("{} <{}>".format(*info) for info in author_info)
__version__ = ".".join(map(st... | apache-2.0 | Python |
678898ebfb1c66170e956308a63f48c189370701 | Remove unused import | davidmogar/genderator | genderator/utils.py | genderator/utils.py | import unicodedata
class Normalizer:
def normalize(text):
"""
Normalize a given text applying all normalizations.
Params:
text: The text to be processed.
Returns:
The text normalized.
"""
text = Normalizer.remove_extra_whitespaces(text)
... | import unicodedata
from unidecode import unidecode
class Normalizer:
def normalize(text):
"""
Normalize a given text applying all normalizations.
Params:
text: The text to be processed.
Returns:
The text normalized.
"""
text = Normalizer.rem... | mit | Python |
8c8755459556067016830e665ecc1968c41a03da | bump version | GoogleCloudPlatform/dataflow-geobeam | geobeam/__init__.py | geobeam/__init__.py | # Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | # Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | Python |
544c8ff7b76ab79f021933f3242858a4403acbed | fix import_name | aioworkers/aioworkers,aamalev/aioworkers | aioworkers/utils.py | aioworkers/utils.py | import importlib
def import_name(stref: str):
package, name = stref.rsplit('.', maxsplit=1)
module = importlib.import_module(package)
return getattr(module, name)
| import importlib
def import_name(stref: str):
package, name = stref.rsplit(maxsplit=1)
module = importlib.import_module(package)
return getattr(module, name)
| apache-2.0 | Python |
b184c88725bf16f4ff98f735953e4649c8dd9309 | Add ability to specify debug interval to avoid inferring with the robot too much when training | matthiasplappert/pibot | src/debugger.py | src/debugger.py | import argparse
import logging
import timeit
import time
import curses
import cv2
from util import Action
from game import GameEnvironment
def main(args):
game = GameEnvironment(args.agent, host=args.host, port=args.port)
# Window for frame
cv2.namedWindow('frame')
cv2.namedWindow('processed-frame'... | import argparse
import logging
import timeit
import curses
import cv2
from util import Action
from game import GameEnvironment
def main(args):
game = GameEnvironment(args.agent, host=args.host, port=args.port)
# Window for frame
cv2.namedWindow('frame')
cv2.namedWindow('processed-frame')
# Int... | mit | Python |
8dfbf2284d405b7fe1b83c00ab14dee39cedea77 | Remove the reference implentation code | LemonPi/Pathtreker,LemonPi/Pathtreker,LemonPi/Pathtreker | solve.py | solve.py | import math
import route
import networkx
def solvefile(graph, filename):
"""
Load file with pairs of intersections and calculate shortest path between them
"""
with open(filename, "r", encoding="utf-8") as infile:
num = int(infile.readline())
costs = [0]*num
for i in range(num):
source = int(infile.readli... | import math
import route
import networkx
def solvefile(graph, filename, useRefImpl=False):
"""
Load file with pairs of intersections and calculate shortest path between them
"""
if useRefImpl:
print("WARNING: RUNNING WITH REFERENCE IMPL; REMOVE BEFORE SHIP!!!!111")
with open(filename, "r", encoding="utf-8") as ... | bsd-3-clause | Python |
9601e00812f4ac05fe6e8b4f7a78a0bcdb7c7f57 | Bump app version number. | joyxu/kernelci-backend,kernelci/kernelci-backend,joyxu/kernelci-backend,kernelci/kernelci-backend,joyxu/kernelci-backend | app/handlers/__init__.py | app/handlers/__init__.py | __version__ = "2015.4"
__versionfull__ = __version__
| __version__ = "2015.3.3"
__versionfull__ = __version__
| agpl-3.0 | Python |
764160e60d909e862423606ec5d3c9036107ab8e | Remove old main handler | xuru/substrate,xuru/substrate,xuru/substrate | api.py | api.py | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | mit | Python |
1f545f9e921e10448b4018550620f9dc4d56931c | Fix F401 'sys' imported but unused | Pierre-Sassoulas/django-survey,Pierre-Sassoulas/django-survey,Pierre-Sassoulas/django-survey | survey/models/__init__.py | survey/models/__init__.py | # -*- coding: utf-8 -*-
"""
Permit to import everything from survey.models without knowing the details.
"""
from .answer import Answer
from .category import Category
from .question import Question
from .response import Response
from .survey import Survey
__all__ = ["Category", "Answer", "Category", "Response", "Surv... | # -*- coding: utf-8 -*-
"""
Permit to import everything from survey.models without knowing the details.
"""
import sys
from .answer import Answer
from .category import Category
from .question import Question
from .response import Response
from .survey import Survey
__all__ = ["Category", "Answer", "Category", "... | agpl-3.0 | Python |
e0d7fb2ff4c69cbcc345f4634592ddefccfded12 | adjust Gaussian generation to take phase in radians | openmrslab/suspect,bennyrowland/suspect | suspect/basis/__init__.py | suspect/basis/__init__.py | import numpy
def gaussian(time_axis, frequency, phase, fwhm):
oscillatory_term = numpy.exp(2j * numpy.pi * (frequency * time_axis) + 1j * phase)
damping = numpy.exp(-time_axis ** 2 / 4 * numpy.pi ** 2 / numpy.log(2) * fwhm ** 2)
fid = oscillatory_term * damping
fid[0] /= 2.0
# normalise the fid so... | import numpy
def gaussian(time_axis, frequency, phase, fwhm):
oscillatory_term = numpy.exp(2j * numpy.pi * (frequency * time_axis + phase))
damping = numpy.exp(-time_axis ** 2 / 4 * numpy.pi ** 2 / numpy.log(2) * fwhm ** 2)
fid = oscillatory_term * damping
fid[0] /= 2.0
# normalise the fid so the ... | mit | Python |
42964d986a0e86c3c93ad152d99b5a4e5cbc2a8e | Revert "Maybe fixed weakref error by explicitly closing shelf." This did not fix the weakref error. Maybe it's something in cartopy. | janmedlock/HIV-95-vaccine | plots/mapplot/_shelve.py | plots/mapplot/_shelve.py | '''
Cache results to disk.
'''
import inspect
import os
import shelve
class shelved:
def __init__(self, func):
self._func = func
# Put the cache file in the same directory as the caller.
funcdir = os.path.dirname(inspect.getfile(self._func))
cachedir = os.path.join(funcdir, '_she... | '''
Cache results to disk.
'''
import inspect
import os
import shelve
class shelved:
def __init__(self, func):
self._func = func
# Put the cache file in the same directory as the caller.
funcdir = os.path.dirname(inspect.getfile(self._func))
cachedir = os.path.join(funcdir, '_she... | agpl-3.0 | Python |
be06a8e85c4afb0a59f2c51f9b7956fd7372b486 | add file open | ParkerMc/minecraft-map-gen | start.py | start.py | import sys, wx, file
from PyQt4 import QtCore, QtGui, uic
form_class = uic.loadUiType("ui/opening.ui")[0]
class MyWindowClass(QtGui.QMainWindow, form_class):
def __init__(self, parent=None):
QtGui.QMainWindow.__init__(self, parent)
self.setupUi(self)
self.open.clicked.connect(self.openc)
... | import sys
from PyQt4 import QtCore, QtGui, uic
form_class = uic.loadUiType("ui/opening.ui")[0]
class MyWindowClass(QtGui.QMainWindow, form_class):
def __init__(self, parent=None):
QtGui.QMainWindow.__init__(self, parent)
self.setupUi(self)
app = QtGui.QApplication(sys.argv)
myWindow = MyWindowCl... | mit | Python |
3736d7fb32e20a64591f949d6ff431430447d421 | Add a named tuple PriceEvent sub class and update methods accordingly. | bsmukasa/stock_alerter | stock.py | stock.py | import bisect
import collections
PriceEvent = collections.namedtuple("PriceEvent", ["timestamp", "price"])
class Stock:
def __init__(self, symbol):
self.symbol = symbol
self.price_history = []
@property
def price(self):
return self.price_history[-1].price if self.price_history el... | class Stock:
def __init__(self, symbol):
self.symbol = symbol
self.price_history = []
@property
def price(self):
return self.price_history[-1] if self.price_history else None
def update(self, timestamp, price):
if price < 0:
raise ValueError("price should no... | mit | Python |
b90fbbc9516aec3267b7443f13de721d145697f3 | add sale_delivery_report to manufacturing profile | alexcuellar/odoo,salaria/odoo,GauravSahu/odoo,salaria/odoo,charbeljc/OCB,spadae22/odoo,joariasl/odoo,oasiswork/odoo,dkubiak789/odoo,hoatle/odoo,apanju/GMIO_Odoo,numerigraphe/odoo,0k/odoo,apanju/GMIO_Odoo,abenzbiria/clients_odoo,bakhtout/odoo-educ,ingadhoc/odoo,Drooids/odoo,steedos/odoo,shingonoide/odoo,diagramsoftware/... | addons/profile_manufacturing/__terp__.py | addons/profile_manufacturing/__terp__.py | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
#... | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
#... | agpl-3.0 | Python |
a55fb7ad0c0223b42ab647035621ce8fba58522d | fix race condition on signature tour | ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo | addons/sale/tests/test_sale_signature.py | addons/sale/tests/test_sale_signature.py | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import odoo.tests
@odoo.tests.common.tagged('post_install', '-at_install')
class TestSaleSignature(odoo.tests.HttpCase):
def test_01_portal_sale_signature_tour(self):
"""The goal of this test is to make sur... | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import odoo.tests
@odoo.tests.common.tagged('post_install', '-at_install')
class TestSaleSignature(odoo.tests.HttpCase):
def test_01_portal_sale_signature_tour(self):
"""The goal of this test is to make sur... | agpl-3.0 | Python |
038706e1ec1afecad06d51e98241b82b52c291d0 | Set message timeout back to 60 | Dinoshauer/HelloWall,Dinoshauer/HelloWall | hellowall/api/forms.py | hellowall/api/forms.py | from datetime import timedelta
from uuid import uuid4 as uuid
from redis import StrictRedis
from redis.exceptions import ConnectionError
import bleach
__REDIS_HOST__ = 'localhost'
__REDIS_PORT__ = 6379
class WallException(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(s... | from datetime import timedelta
from uuid import uuid4 as uuid
from redis import StrictRedis
from redis.exceptions import ConnectionError
import bleach
__REDIS_HOST__ = 'localhost'
__REDIS_PORT__ = 6379
class WallException(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(s... | mit | Python |
b6c8dd224279ad0258b1130f8105059affa7553f | Refactor code, fix shebang path | HKuz/PythonChallenge | Challenges/chall_04.py | Challenges/chall_04.py | #!/usr/local/bin/python3
# Python challenge - 4
# http://www.pythonchallenge.com/pc/def/linkedlist.html
# http://www.pythonchallenge.com/pc/def/linkedlist.php
# Keyword: peak
import urllib.request
import re
def main():
'''
html page shows: linkedlist.php
php page comment: urllib may help. DON'T TRY ALL N... | #!/urs/local/bin/python3
# Python challenge - 4
# http://www.pythonchallenge.com/pc/def/linkedlist.php
import urllib.request
import re
def main():
'''
http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=12345
44827
45439
...
'''
base_url = 'http://www.pythonchallenge.com/pc/def/l... | mit | Python |
68fe89aa5d6d6d7b8feef02075d8fe1369bab7b4 | set AUTOSYNTH_MULTIPLE_COMMITS=true for context aware commits (#20) | googleapis/nodejs-service-directory,googleapis/nodejs-service-directory | synth.py | synth.py | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | apache-2.0 | Python |
eddd76d762a53d92f410f62fd295e9c3c0231934 | set AUTOSYNTH_MULTIPLE_COMMITS=true for context aware commits (#142) | googleapis/nodejs-datacatalog,googleapis/nodejs-datacatalog,googleapis/nodejs-datacatalog | synth.py | synth.py | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | apache-2.0 | Python |
97c1b0b3f14dae33ba3ab0291343f31079c54d2e | Add a stricter replacement for serviceAddress (#2243) | googleapis/google-cloud-php-pubsub,googleapis/google-cloud-php-pubsub | synth.py | synth.py | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | apache-2.0 | Python |
14db09b21a505c85317db6a6456f5a17fea0b594 | Create app.py | ashfaaq77/woo-commerce | app.py | app.py | from __future__ import print_function
from future.standard_library import install_aliases
install_aliases()
from urllib.parse import urlparse, urlencode
from urllib.request import urlopen, Request
from urllib.error import HTTPError
import json
import os
from flask import Flask
from flask import request
from flask im... | from __future__ import print_function
from future.standard_library import install_aliases
install_aliases()
from urllib.parse import urlparse, urlencode
from urllib.request import urlopen, Request
from urllib.error import HTTPError
import json
import os
from flask import Flask
from flask import request
from flask im... | apache-2.0 | Python |
25d222af2499ae982a44370cc9c97c748feea996 | convert port into int | Raizan/FlaskGrayscaleWebservice | app.py | app.py | __author__ = 'reisuke'
from flask import Flask
from flask_restful import Resource, Api, reqparse
import base64
import numpy as np
import cv2
from sys import argv
app = Flask(__name__)
api = Api(app)
class ImageConvert(Resource):
def __init__(self):
self.parser = reqparse.RequestParser()
self.par... | __author__ = 'reisuke'
from flask import Flask
from flask_restful import Resource, Api, reqparse
import base64
import numpy as np
import cv2
from sys import argv
app = Flask(__name__)
api = Api(app)
class ImageConvert(Resource):
def __init__(self):
self.parser = reqparse.RequestParser()
self.par... | mit | Python |
6e8e749768708a5c13ea99d27b3fe49be579ab4b | fix str to int error | deljuven/TimeseriesPlot-py,deljuven/TimeseriesPlot-py | app.py | app.py | # -*- coding: utf-8 -*-
import sys
from preprocess import pre_process
from process import process
if __name__ == '__main__':
args = sys.argv
if len(args) < 4:
print 'wtf'
else:
if args[1] == 'pre':
if len(args) > 5:
pre_process(args[2], args[3], args[4], int(arg... | # -*- coding: utf-8 -*-
import sys
from preprocess import pre_process
from process import process
if __name__ == '__main__':
args = sys.argv
if len(args) < 4:
print 'wtf'
else:
if args[1] == 'pre':
if len(args) > 5:
pre_process(args[2], args[3], args[4], args[5]... | apache-2.0 | Python |
00151ca79159797515b29165cf4eec1e879338e9 | change img to droplet | CapsLockHacks/do-server | app.py | app.py | import sys
from flask import Flask, render_template, jsonify, request, abort
import subprocess
from digitalocean import SSHKey, Manager
app = Flask(__name__)
@app.route('/login')
def login():
if request.args.get('token') is None and request.args.get('ssh') is None:
abort(404)
# Get from Chrome exten... | import sys
from flask import Flask, render_template, jsonify, request, abort
import subprocess
from digitalocean import SSHKey, Manager
app = Flask(__name__)
@app.route('/login')
def login():
if request.args.get('token') is None and request.args.get('ssh') is None:
abort(404)
# Get from Chrome exten... | mit | Python |
223243892c68918ac58b26774150819e63acd9de | Add blacken task | fabric/patchwork | tasks.py | tasks.py | from importlib import import_module
from invocations import docs, travis
from invocations.checks import blacken
from invocations.packaging import release
from invocations.pytest import test, coverage
from invoke import Collection, task
@task
def sanity(c):
"""
Quick sanity check to ensure we're installed su... | from importlib import import_module
from invocations import docs, travis
from invocations.packaging import release
from invocations.pytest import test, coverage
from invoke import Collection, task
@task
def sanity(c):
"""
Quick sanity check to ensure we're installed successfully. Mostly for CI.
"""
... | bsd-2-clause | Python |
971340c308b5d1776e5febb61ffceb9a4658f42f | Print Python version when running tests. | thor/django-localflavor,zarelit/django-localflavor,django/django-localflavor,infoxchange/django-localflavor,jieter/django-localflavor,rsalmaso/django-localflavor,maisim/django-localflavor,agustin380/django-localflavor,M157q/django-localflavor | tasks.py | tasks.py | import os
import os.path
import sys
from invoke import run, task
@task
def clean():
run('git clean -Xfd')
@task
def test(country='all'):
print('Python version: ' + sys.version)
test_cmd = 'coverage run `which django-admin.py` test --settings=tests.settings'
flake_cmd = 'flake8 --ignore=W801,E128,E50... | import os
import os.path
from invoke import run, task
@task
def clean():
run('git clean -Xfd')
@task
def test(country='all'):
test_cmd = 'coverage run `which django-admin.py` test --settings=tests.settings'
flake_cmd = 'flake8 --ignore=W801,E128,E501,W402'
country = os.environ.get('COUNTRY', country... | bsd-3-clause | Python |
ed4db159d4a0d95c543a9399a59ec0e1d0a95b6c | add config import | Queens-Hacks/thoughtboard,Queens-Hacks/thoughtboard | app.py | app.py | #!/usr/bin/env python
import os
from flask import Flask
app = Flask(__name__)
getenv = lambda *names: {v: os.environ.get(v) for v in names}
app.config.update(**getenv(
'AUTH_TOKEN',
'CELL_NUM',
'MONGOLAB_URI',
'TWILLIO_NUM',
))
@app.route('/')
def home():
return "yo"
if __name__ == '__main__'... | from flask import Flask
app = Flask(__name__)
@app.route('/')
def home():
return "yo"
if __name__ == '__main__':
app.run()
| mit | Python |
0099e44f1546d97f23aeca1718dbd58e16453485 | Handle credentials for CircleCI | Harmon758/Harmonbot,Harmon758/Harmonbot | Discord/credentials.py | Discord/credentials.py |
import os
import sys
if (os.getenv("CIRCLECI") or os.getenv("TRAVIS")) and os.getenv("CI"):
for credential in ("token", "owm_api_key", "twitter_consumer_key", "twitter_consumer_secret", "twitter_access_token", "twitter_access_token_secret", "wordnik_apikey", "imgur_client_id", "imgur_client_secret", "wolframalpha_ap... |
import os
import sys
if os.getenv("TRAVIS") and os.getenv("CI"):
for credential in ("token", "owm_api_key", "twitter_consumer_key", "twitter_consumer_secret", "twitter_access_token", "twitter_access_token_secret", "wordnik_apikey", "imgur_client_id", "imgur_client_secret", "wolframalpha_appid", "discord_bots_api_tok... | mit | Python |
aeecbec2d5cebacb740983f102306ef4394e8270 | Improve order approval sample | CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge | actions/cloudbolt_plugins/skeleton_order_approval_action/order_approval_skeleton.py | actions/cloudbolt_plugins/skeleton_order_approval_action/order_approval_skeleton.py | import sys
import time
from orders.models import Order
"""
Plug-in example for an Orchestration Action at the "Order Approval" trigger
point. May change CloudBolt's default approval behavior to implement custom
logic or integrate with an external change management system.
The context passed to the plug-in includes t... | import sys
import time
from orders.models import Order
"""
Skeleton Order Approval hook, which allows changing CloudBolt's default approval
behavior, possibly to integrate with a separate change management system.
If the order is already ACTIVE when this hook is executed, this indicates that
the order was previously ... | apache-2.0 | Python |
e53fa560d7fdb04760fbc517e3dbb39b202a9fd9 | Support multiple channels | adamcik/pycat,adamcik/pycat | bot.py | bot.py | #! /usr/bin/python
import asyncore
import logging
import subprocess
import sys
from irc import Bot
from listener import Listener
# FIXME figure out async subprocess
# FIXME use optparse and/or configreader
# FIXME reconncet on disconnect
logging.basicConfig(level=logging.DEBUG, format="%(asctime)s - %(message)s")
... | #! /usr/bin/python
import asyncore
import logging
import subprocess
import sys
from irc import Bot
from listener import Listener
# FIXME figure out async subprocess
# FIXME use optparse and/or configreader
# FIXME reconncet on disconnect
logging.basicConfig(level=logging.DEBUG, format="%(asctime)s - %(message)s")
... | mit | Python |
ac7a9a59c2909f267c5b7149e32a746a881d223a | Join ##powder-bots too | wolfy1339/Python-IRC-Bot | bot.py | bot.py | import zirc
import ssl
import socket
import utils
import commands
debug = False
class Bot(zirc.Client):
def __init__(self):
self.connection = zirc.Socket(family=socket.AF_INET6,
wrapper=ssl.wrap_socket)
self.config = zirc.IRCConfig(host="chat.freenode.net",
... | import zirc
import ssl
import socket
import utils
import commands
debug = False
class Bot(zirc.Client):
def __init__(self):
self.connection = zirc.Socket(family=socket.AF_INET6,
wrapper=ssl.wrap_socket)
self.config = zirc.IRCConfig(host="chat.freenode.net",
... | mit | Python |
1ed838df818302de499c1b2b5126ba1b983f8dd1 | Revert bot.py | elitan/mybot,cmarguel/skybot,craisins/wh2kbot,olslash/skybot,craisins/nascarbot,Jeebeevee/DouweBot_JJ15,andyeff/skybot,parkrrr/skybot,TeamPeggle/ppp-helpdesk,df-5/skybot,ddwo/nhl-bot,Jeebeevee/DouweBot,Teino1978-Corp/Teino1978-Corp-skybot,SophosBlitz/glacon,crisisking/skybot,jmgao/skybot,isislab/botbot,callumhogsden/au... | bot.py | bot.py | #!/usr/bin/python
network = "localhost"
nick = "skybot"
channel = "#test"
import sys
import os
import Queue
sys.path += ['plugins'] # so 'import hook' works without duplication
sys.path += ['lib']
os.chdir(sys.path[0]) # do stuff relative to the installation directory
class Bot(object):
pass
bot = Bot()
p... | #!/usr/bin/python
network = "irc.synirc.net"
nick = "skybotisgay"
channel = "#cobol"
import sys
import os
import Queue
sys.path += ['plugins'] # so 'import hook' works without duplication
sys.path += ['lib']
os.chdir(sys.path[0]) # do stuff relative to the installation directory
class Bot(object):
pass
bot... | unlicense | Python |
75da77eaecbce17a199e678476795c1b91ff7eb9 | Clean imports | adamcik/pycat,adamcik/pycat | bot.py | bot.py | #! /usr/bin/python
import asyncore
import logging
import subprocess
import sys
from irc import Bot
from listener import Listener
# FIXME figure out async subprocess
# FIXME use optparse and/or configreader
# FIXME reconncet on disconnect
logging.basicConfig(level=logging.DEBUG, format="%(asctime)s - %(message)s")
... | #! /usr/bin/python
import sys
import asyncore
import logging
from irc import Bot
from listener import Listener
# FIXME figure out async subprocess
# FIXME use optparse and/or configreader
# FIXME reconncet on disconnect
logging.basicConfig(level=logging.DEBUG, format="%(asctime)s - %(message)s")
channel = '#adamci... | mit | Python |
b85a92df83563e38b84340574cde2f9dc06b563c | Exclude Endpoints with a <format> parameter | ekonstantinidis/django-rest-framework-docs,manosim/django-rest-framework-docs,ekonstantinidis/django-rest-framework-docs,manosim/django-rest-framework-docs,manosim/django-rest-framework-docs,ekonstantinidis/django-rest-framework-docs | rest_framework_docs/api_docs.py | rest_framework_docs/api_docs.py | from django.conf import settings
from django.core.urlresolvers import RegexURLResolver, RegexURLPattern
from django.utils.module_loading import import_string
from rest_framework.views import APIView
from rest_framework_docs.api_endpoint import ApiEndpoint
class ApiDocumentation(object):
def __init__(self):
... | from django.conf import settings
from django.core.urlresolvers import RegexURLResolver, RegexURLPattern
from django.utils.module_loading import import_string
from rest_framework.views import APIView
from rest_framework_docs.api_endpoint import ApiEndpoint
class ApiDocumentation(object):
def __init__(self):
... | bsd-2-clause | Python |
69e126e58b6064fcdca47078b41e2331abd908d5 | use mixin class | eugene-eeo/prudent | ks/sequence.py | ks/sequence.py | """
ks.sequence
~~~~~~~~~~~
Implements a tuple-like object on top of the
standard stream class, for cases where the
values needed to be accessed by index, lazily.
"""
from collections import Sequence as _Seq
from ks.stream import Stream
class Sequence(Stream, _Seq):
"""
A sequence is a s... | """
ks.sequence
~~~~~~~~~~~
Implements a tuple-like object on top of the
standard stream class, for cases where the
values needed to be accessed by index, lazily.
"""
from ks.stream import Stream
class Sequence(Stream):
"""
A sequence is a special case of a stream where
the values ca... | mit | Python |
a22b21e4a06525f081c6a7ce92ddc2102d7ddce8 | Fix paths in LibreOffice and Perl converter | jamesmontalvo3/Sharepoint-to-MediaWiki,jamesmontalvo3/Sharepoint-to-MediaWiki | 5-convert-to-mw.py | 5-convert-to-mw.py | #!/usr/bin/python
from subprocess import call
import os
from os.path import join, getsize
scriptPath = os.path.realpath(__file__)
wikiHtml = scriptPath + "/usr/sharepoint-content"
LibreOfficeOutput = scriptPath + "/usr/LibreOfficeOutput"
WikitextOutput = scriptPath + "/usr/WikitextOutput"
for f in os.listdir(wikiHtm... | #!/usr/bin/python
from subprocess import call
import os
from os.path import join, getsize
wikiHtml = "/var/www/sp/wiki-html"
LOwikiHtml = "/var/www/sp/5-libre-wiki-html"
wikiFiles = "/var/www/sp/6-wiki-files"
for f in os.listdir(wikiHtml):
if f.endswith(".html"):
# soffice --headless --convert-to html:HTML /path... | mit | Python |
38f9d9851b6961f714ee6010c64c936ff8113c49 | change request format to json | OIdiotLin/ClassManager-backends | app/views/qiniuhelper.py | app/views/qiniuhelper.py | from django.http import HttpResponse
from django.http import JsonResponse
# Qiniu SDK
from qiniu import Auth
# Use when Http-Post
from django.views.decorators.csrf import csrf_exempt
# Use Token
from app.utils.token import token_check
import json
import classmanager.sensitive as key
@csrf_exempt
def get_upload_to... | from django.http import HttpResponse
from django.http import JsonResponse
# Qiniu SDK
from qiniu import Auth
# Use when Http-Post
from django.views.decorators.csrf import csrf_exempt
# Use Token
from app.utils.token import token_check
import classmanager.sensitive as key
@csrf_exempt
def get_upload_token(request... | mit | Python |
d7133922de24c6553417eb1e25c65bb51e7451f7 | Create a route for fetching grefs | richo/airship,richo/airship,richo/airship | airship/__init__.py | airship/__init__.py | import os
import json
from flask import Flask, render_template
def channels_json(station, escaped=False):
channels = [{"name": channel} for channel in station.channels()]
jsonbody = json.dumps(channels)
if escaped:
jsonbody = jsonbody.replace("</", "<\\/")
return jsonbody
def make_airship(s... | import os
import json
from flask import Flask, render_template
def channels_json(station, escaped=False):
channels = [{"name": channel} for channel in station.channels()]
jsonbody = json.dumps(channels)
if escaped:
jsonbody = jsonbody.replace("</", "<\\/")
return jsonbody
def make_airship(s... | mit | Python |
8e8f201f55c1ee79c4851185696f10286e83de54 | Add main() | bowen0701/algorithms_data_structures | alg_postfix_eval.py | alg_postfix_eval.py | from __future__ import print_function
from __future__ import division
from ds_stack import Stack
def eval_postfix(postfix_str):
operand_stack = Stack()
token_ls = postfix_str.split()
for token in token_ls:
if token in '0123456789':
operand_stack.push(int(token))
else:
... | from __future__ import print_function
from __future__ import division
from ds_stack import Stack
def eval_postfix(postfix_str):
operand_stack = Stack()
token_ls = postfix_str.split()
for token in token_ls:
if token in '0123456789':
operand_stack.push(int(token))
else:
... | bsd-2-clause | Python |
ad7873f7c68c2f4f2a0b3110e9331af9e13772c0 | Bump version | coolshop-com/AltaPay | altapay/__init__.py | altapay/__init__.py | __title__ = 'altapay'
__version__ = '0.1.dev3'
__author__ = 'Coolshop.com'
__license__ = 'MIT'
__github_url__ = 'https://github.com/coolshop-com/AltaPay'
__api_base_url__ = {
'test': 'https://testgateway.altapaysecure.com/merchant/',
'production': 'https://{shop_name}.altapaysecure.com/merchant/'
}
from .api i... | __title__ = 'altapay'
__version__ = '0.1.dev2'
__author__ = 'Coolshop.com'
__license__ = 'MIT'
__github_url__ = 'https://github.com/coolshop-com/AltaPay'
__api_base_url__ = {
'test': 'https://testgateway.altapaysecure.com/merchant/',
'production': 'https://{shop_name}.altapaysecure.com/merchant/'
}
from .api i... | mit | Python |
41f8a20275275e663eb3947d34021e072138d67d | Add docstrings to cpu module | richgieg/RichEmu86 | cpu.py | cpu.py | class Cpu():
"""Represents a computer system's CPU."""
def power_on(self):
"""Powers on this CPU."""
print("Cpu.power_on()")
| class Cpu():
def power_on(self):
print("Cpu.power_on()")
| mit | Python |
8555e42ea0a69df26c8b9c2ffd1937d5fa7cd8fd | Use new API method to map values | pedrobaeza/OpenUpgrade,damdam-s/OpenUpgrade,0k/OpenUpgrade,bwrsandman/OpenUpgrade,sebalix/OpenUpgrade,pedrobaeza/OpenUpgrade,grap/OpenUpgrade,damdam-s/OpenUpgrade,pedrobaeza/OpenUpgrade,kirca/OpenUpgrade,bwrsandman/OpenUpgrade,mvaled/OpenUpgrade,kirca/OpenUpgrade,grap/OpenUpgrade,mvaled/OpenUpgrade,csrocha/OpenUpgrade,... | addons/project_issue/migrations/8.0.1.0/post-migration.py | addons/project_issue/migrations/8.0.1.0/post-migration.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Odoo, a suite of business apps
# This module Copyright (C) 2014 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General... | # -*- coding: utf-8 -*-
##############################################################################
#
# Odoo, a suite of business apps
# This module Copyright (C) 2014 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General... | agpl-3.0 | Python |
df1fcd7f91c620b8daf0add4e9950f012f1a0723 | Update question_2.py | Nauqcaj/quiz-itp-w1 | quiz-questions/question_2.py | quiz-questions/question_2.py | """Intro to Python - Week 1 - Quiz."""
# Question 2
def question_2():
"""Return the correct answer for the following question.
What's the final result of the following operation:
result = True or ("" and False and []) or (1 and "hello world")
a) []
b) 1
c) True
d) False
e) "hello wo... | """Intro to Python - Week 1 - Quiz."""
# Question 2
def question_2():
"""Return the correct answer for the following question.
What's the final result of the following operation:
result = True or ("" and False and []) or (1 and "hello world")
a) []
b) 1
c) True
d) False
e) "hello wo... | mit | Python |
acdafdd8f629f506915e53a019f9f4b5a9a270f5 | Disable pagination for testapp titles-list view | harikvpy/django-popupcrud,harikvpy/django-popupcrud,harikvpy/django-popupcrud | testapp/library/views.py | testapp/library/views.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.urlresolvers import reverse_lazy
from django.shortcuts import render
from django.views import generic
from .models import Author, Book
from popupcrud.views import PopupCrudViewSet
# Create your views here.
class AuthorList(generic.List... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.urlresolvers import reverse_lazy
from django.shortcuts import render
from django.views import generic
from .models import Author, Book
from popupcrud.views import PopupCrudViewSet
# Create your views here.
class AuthorList(generic.List... | bsd-3-clause | Python |
693513aba8dd90d4ffb04b6bd4bf5779bb40b206 | add an alias .compat.izip returns iterator regardless of python version | ssato/python-anyconfig,ssato/python-anyconfig | anyconfig/compat.py | anyconfig/compat.py | #
# Author: Satoru SATOH <ssato redhat.com>
# License: MIT
#
# pylint: disable=unused-import,import-error,invalid-name,wrong-import-position
"""
Compatiblity module
"""
from __future__ import absolute_import
import itertools
import sys
try:
from logging import NullHandler
except ImportError: # python < 2.7 doesn... | #
# Author: Satoru SATOH <ssato redhat.com>
# License: MIT
#
# pylint: disable=unused-import,import-error,invalid-name,wrong-import-position
"""
Compatiblity module
"""
from __future__ import absolute_import
import itertools
import sys
try:
from logging import NullHandler
except ImportError: # python < 2.7 doesn... | mit | Python |
b24b32f8fa1519d6dd68eaf60e507b5668843f77 | Bump development version | saintbird/django-cms,liuyisiyisi/django-cms,sephii/django-cms,isotoma/django-cms,dhorelik/django-cms,wuzhihui1123/django-cms,andyzsf/django-cms,owers19856/django-cms,robmagee/django-cms,bittner/django-cms,DylannCordel/django-cms,Livefyre/django-cms,memnonila/django-cms,farhaadila/django-cms,robmagee/django-cms,vxsx/dja... | cms/__init__.py | cms/__init__.py | # -*- coding: utf-8 -*-
__version__ = '3.0.10.dev1'
default_app_config = 'cms.apps.CMSConfig'
| # -*- coding: utf-8 -*-
__version__ = '3.0.9'
default_app_config = 'cms.apps.CMSConfig'
| bsd-3-clause | Python |
72b502254a557cd430ee5c2967662b88b30d2d1d | add setting and deleting to lazy_property | briney/abtools | abtools/utils/properties.py | abtools/utils/properties.py | #!/usr/bin/env python
# filename: properties.py
#
# Copyright (c) 2015 Bryan Briney
# License: The MIT license (http://opensource.org/licenses/MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
# and associated documentation files (the "Software"), to deal in the So... | #!/usr/bin/env python
# filename: properties.py
#
# Copyright (c) 2015 Bryan Briney
# License: The MIT license (http://opensource.org/licenses/MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
# and associated documentation files (the "Software"), to deal in the So... | mit | Python |
40c70c1a5370680b0dbfa14858d5f3ba4d1d67fe | Add print to figure out what's going on on travis. | MISP/misp-modules,VirusTotal/misp-modules,VirusTotal/misp-modules,amuehlem/misp-modules,amuehlem/misp-modules,VirusTotal/misp-modules,MISP/misp-modules,MISP/misp-modules,amuehlem/misp-modules | tests/test_expansions.py | tests/test_expansions.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
import requests
from urllib.parse import urljoin
import json
class TestExpansions(unittest.TestCase):
def setUp(self):
self.maxDiff = None
self.headers = {'Content-Type': 'application/json'}
self.url = "http://127.0.0.1:6666/... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
import requests
from urllib.parse import urljoin
class TestExpansions(unittest.TestCase):
def setUp(self):
self.maxDiff = None
self.headers = {'Content-Type': 'application/json'}
self.url = "http://127.0.0.1:6666/"
def m... | agpl-3.0 | Python |
b976794eca937a151b2318de0a341de34de56b65 | Add alternate_direction attribute to Generator | dls-controls/scanpointgenerator | scanpointgenerator/generator.py | scanpointgenerator/generator.py |
class Generator(object):
"""Base class for all malcolm scan point generators
Attributes:
position_units (dict): Dict of str position_name -> str position_unit
for each scannable dimension. E.g. {"x": "mm", "y": "mm"}
index_dims (list): List of the int dimension sizes for the datas... |
class Generator(object):
"""Base class for all malcolm scan point generators
Attributes:
position_units (dict): Dict of str position_name -> str position_unit
for each scannable dimension. E.g. {"x": "mm", "y": "mm"}
index_dims (list): List of the int dimension sizes for the datas... | apache-2.0 | Python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.