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
68860fcc9d5fc201017ca910577620e9d833c2c3
modify SO
ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo
addons/stock_dropshipping/models/sale.py
addons/stock_dropshipping/models/sale.py
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models, fields class SaleOrderLine(models.Model): _inherit = "sale.order.line" purchase_line_ids = fields.One2many('purchase.order.line', 'sale_line_id') @api.multi def _get_qty_...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models, fields class SaleOrderLine(models.Model): _inherit = "sale.order.line" purchase_line_ids = fields.One2many('purchase.order.line', 'sale_line_id') @api.multi def _get_qty_...
agpl-3.0
Python
3c77617141542fe6bb6aac897aff554cd3c1ec08
fix missing pbx frameworks
kivy/kivy-ios,kivy/kivy-ios,kivy/kivy-ios
recipes/sdl2/__init__.py
recipes/sdl2/__init__.py
from toolchain import Recipe, shprint import sh class LibSDL2Recipe(Recipe): version = "2.0.8" url = "https://www.libsdl.org/release/SDL2-{version}.tar.gz" #version = "iOS-improvements" #url = "https://bitbucket.org/slime73/sdl-experiments/get/{version}.tar.gz" library = "Xcode-iOS/SDL/build/Relea...
from toolchain import Recipe, shprint import sh class LibSDL2Recipe(Recipe): version = "2.0.8" url = "https://www.libsdl.org/release/SDL2-{version}.tar.gz" #version = "iOS-improvements" #url = "https://bitbucket.org/slime73/sdl-experiments/get/{version}.tar.gz" library = "Xcode-iOS/SDL/build/Relea...
mit
Python
595218c33892facf0cf26e5e6b3e16b2c02e737e
Add a stub for fts_updates
pavel-paulau/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner
spring/settings.py
spring/settings.py
from urlparse import urlparse from logger import logger class WorkloadSettings(object): def __init__(self, options): self.creates = options.creates self.reads = options.reads self.updates = options.updates self.deletes = options.deletes self.cases = 0 # Stub for library ...
from urlparse import urlparse from logger import logger class WorkloadSettings(object): def __init__(self, options): self.creates = options.creates self.reads = options.reads self.updates = options.updates self.deletes = options.deletes self.cases = 0 # Stub for library ...
apache-2.0
Python
10b5182bd5ee2a2dc8fa1d13c8db1237077b0209
Fix linting error
PRX/Infrastructure,PRX/Infrastructure,PRX/Infrastructure,PRX/Infrastructure,PRX/Infrastructure
bin/prxtransfer-dns-station-migration.py
bin/prxtransfer-dns-station-migration.py
import boto3 client = boto3.client("route53") # List the FTP subdomains that should have explicit DNS records added subdomains = [ "wxyz", ] changes = [] name = "infra-FtpSe-1W1OF5U4X8M3Z-284373e0ff42a3aa.elb.us-east-1.amazonaws.com" for subdomain in subdomains: changes.append( { "Acti...
import boto3 client = boto3.client("route53") # List the FTP subdomains that should have explicit DNS records added subdomains = [ "wxyz", ] changes = [] for subdomain in subdomains: changes.append( { "Action": "UPSERT", "ResourceRecordSet": { "Name": f"{subd...
mit
Python
4f9dd639566515e956812d38f2932237a487a4e6
Fix typo
bit-bots/bitbots_misc,bit-bots/bitbots_misc,bit-bots/bitbots_misc
bitbots_common/scripts/launch_warning.py
bitbots_common/scripts/launch_warning.py
#!/usr/bin/env python3 import rospy rospy.logerr("###\n###\n###\n###\n###\nYou didn't specifiy which robot you want to start!\nPlease add minibot:=true or wolfgang:=true or davros:=true behind you roslaunch.\n###\n###\n###\n###\n###")
#!/usr/bin/env python3 import rospy rospy.logerr("###\n###\n###\n###\n###\nYou didn't specifiy which robot you want to start!\nPlease add minibot:=true or woflgang:=true or davros:=true behind you roslaunch.\n###\n###\n###\n###\n###")
mit
Python
ad19f15ed4609c67c1325a02005062b15d503705
customize plot style
abonaca/gary,abonaca/gary,adrn/gala,adrn/gala,abonaca/gary,adrn/gary,adrn/gary,adrn/gary,adrn/gala
streamteam/integrate/tests/helpers.py
streamteam/integrate/tests/helpers.py
# coding: utf-8 """ Test helpers """ from __future__ import division, print_function __author__ = "adrn <adrn@astro.columbia.edu>" # Standard library import os, sys # Third-party import matplotlib.pyplot as plt import numpy as np def plot(ts, q, p, marker='.', alpha=0.75, linestyle='-'): """ Make some helpful...
# coding: utf-8 """ Test helpers """ from __future__ import division, print_function __author__ = "adrn <adrn@astro.columbia.edu>" # Standard library import os, sys # Third-party import matplotlib.pyplot as plt import numpy as np def plot(ts, q, p): """ Make some helpful plots for testing the integrators. """...
mit
Python
cfad3e375dc57e6b4b59c3892d31773221255686
use `eden prefetch` on windows
ReactiveSocket/reactivesocket-cpp,ReactiveSocket/reactivesocket-cpp,ReactiveSocket/reactivesocket-cpp,rsocket/rsocket-cpp,rsocket/rsocket-cpp,rsocket/rsocket-cpp,rsocket/rsocket-cpp
build/fbcode_builder/getdeps/copytree.py
build/fbcode_builder/getdeps/copytree.py
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals import os import shutil import subprocess from .platform ...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals import os import shutil import subprocess from .platform ...
unknown
Python
bf69e6d248f58245258c350a6f427d9dc2f05343
Correct transit test failure
mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource
test/469-transit-features.py
test/469-transit-features.py
# way 91806504 assert_has_feature( 16, 10470, 25316, 'transit', { 'kind': 'bus_stop' }) # node 1241518350 assert_has_feature( 16, 10480, 25332, 'pois', { 'kind': 'bus_stop' }) # way 196670577 assert_has_feature( 16, 10486, 25326, 'transit', { 'kind': 'platform' })
# way 91806504 assert_has_feature( 16, 10470, 25316, 'transit', { 'kind': 'bus_stop' }) # node 1241518350 assert_has_feature( 16, 10480, 25332, 'transit', { 'kind': 'bus_stop' }) # way 196670577 assert_has_feature( 16, 10486, 25326, 'transit', { 'kind': 'platform' })
mit
Python
3cca42d17c7bdcd250df3723240c760434a08a60
update create cloud account command example
cloudsidekick/catoclient,cloudsidekick/catoclient
catoclient/commands/createcloudaccount.py
catoclient/commands/createcloudaccount.py
######################################################################### # Copyright 2011 Cloud Sidekick # # 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...
######################################################################### # Copyright 2011 Cloud Sidekick # # 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...
apache-2.0
Python
a2adce3bb374acf7e2eef1fd6dfc6648027ab06d
Modify the views according to the modification of models
ZhibinCH/my3MW,ZhibinCH/my3MW
sites/views.py
sites/views.py
from django.http import HttpResponse from django.template import loader from django.shortcuts import render,render_to_response from django.http import Http404 from sites.models import * def sites_overview(request): # if not Sites.objects.all(): # # site = Sites(site_name='Demo Site', site_id='1',date='...
from django.http import HttpResponse from django.template import loader from django.shortcuts import render,render_to_response from django.http import Http404 from sites.models import * def sites_overview(request): # if not Sites.objects.all(): # # site = Sites(site_name='Demo Site', site_id='1',date='...
bsd-2-clause
Python
4fb65741f91224c22ad504313f513a76f12f08a5
update errors.py doc
waliens/sldc
sldc/errors.py
sldc/errors.py
# -*- coding: utf-8 -*- __author__ = "Romain Mormont <romainmormont@hotmail.com>" __version__ = "0.1" class TileExtractionException(Exception): """Thrown when a tile is requested but cannot be fetched""" pass class ImageExtractionException(Exception): """Thrown when an image is requested cannot be extr...
# -*- coding: utf-8 -*- class TileExtractionException(Exception): """ Thrown when a tile is requested but cannot be fetched """ pass class ImageExtractionException(Exception): """ Thrown when an image is requested cannot be extracted """ pass
mit
Python
6dcbaa509546678666cfe74c7b58993bc0bfacb9
update tests to use the cluster arg
SUSE/ceph-deploy-to-be-deleted,osynge/ceph-deploy,SUSE/ceph-deploy,codenrhoden/ceph-deploy,imzhulei/ceph-deploy,ddiss/ceph-deploy,SUSE/ceph-deploy-to-be-deleted,isyippee/ceph-deploy,branto1/ceph-deploy,shenhequnying/ceph-deploy,ceph/ceph-deploy,shenhequnying/ceph-deploy,trhoden/ceph-deploy,alfredodeza/ceph-deploy,SUSE/...
ceph_deploy/tests/unit/util/test_paths.py
ceph_deploy/tests/unit/util/test_paths.py
from ceph_deploy.util import paths class TestMonPaths(object): def test_base_path(self): assert paths.mon._base.endswith('/ceph-') def test_path(self): result = paths.mon.path('ceph', 'myhostname') assert result.startswith('/') assert result.endswith('/ceph-myhostname') ...
from ceph_deploy.util import paths class TestMonPaths(object): def test_base_path(self): assert paths.mon._base.endswith('/ceph-') def test_path(self): result = paths.mon.path('myhostname') assert result.startswith('/') assert result.endswith('/ceph-myhostname') def test...
mit
Python
0647264a7c9ac410a0d342250d4933b1ba5c7fb1
print in main
SebastianCallh/kartoffel-tsea29,SebastianCallh/kartoffel-tsea29
pi/main.py
pi/main.py
import signal import sys import traceback import datetime from datetime import timedelta from bus import Bus from navigator import Navigator from driver import Driver from messages import read_messages, subscribe_to_cmd from outbound import request_sensor_data, CMD_RETURN_SENSOR_DATA, \ set_motor_speed, set_right_mot...
import signal import sys import traceback import datetime from datetime import timedelta from bus import Bus from navigator import Navigator from driver import Driver from messages import read_messages, subscribe_to_cmd from outbound import request_sensor_data, CMD_RETURN_SENSOR_DATA, \ set_motor_speed, set_right_mot...
mit
Python
a578e2e738a77f8ca0073b2b337a8fa79794500b
Change default SERVER_NAME to localhost:5000
peterhil/skeleton,peterhil/ninhursag,peterhil/skeleton,peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag,peterhil/skeleton
skeleton/settings.py
skeleton/settings.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Flask application default config: # http://flask.pocoo.org/docs/config/#configuring-from-files # https://github.com/mbr/flask-appconfig DEBUG = True TESTING = False JS_LOG_LEVEL = 3 # log (1) < debug (2) < info (3) < warn (4) < error (5) APP_NAME = 'Skeleton' # Serv...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Flask application default config: # http://flask.pocoo.org/docs/config/#configuring-from-files # https://github.com/mbr/flask-appconfig DEBUG = True TESTING = False JS_LOG_LEVEL = 3 # log (1) < debug (2) < info (3) < warn (4) < error (5) APP_NAME = 'Skeleton' # Serv...
mit
Python
9c53de5034d1f7184eba5f1d5414884386901cd9
add empty return type test
dwillmer/jedi,tjwei/jedi,jonashaag/jedi,WoLpH/jedi,dwillmer/jedi,WoLpH/jedi,flurischt/jedi,mfussenegger/jedi,tjwei/jedi,jonashaag/jedi,flurischt/jedi,mfussenegger/jedi
test/completion/docstring.py
test/completion/docstring.py
""" Test docstrings in functions and classes, which are used to infer types """ # ----------------- # sphinx style # ----------------- def f(a, b, c, d): """ asdfasdf :param a: blablabla :type a: str :type b: (str, int) :type c: threading.Thread :type d: :class:`threading.Thread` :rtype: di...
""" Test docstrings in functions and classes, which are used to infer types """ # ----------------- # sphinx style # ----------------- def f(a, b, c, d): """ asdfasdf :param a: blablabla :type a: str :type b: (str, int) :type c: threading.Thread :type d: :class:`threading.Thread` :rtype: di...
mit
Python
d574cd0f50a5f1771ebb7f0cbc0295746108c937
Add nitpicky
ongr-io/docs.ongr.io
source/conf.py
source/conf.py
# -*- coding: utf-8 -*- execfile("conf-travis.py") # Check that all links are linking to existing documents nitpicky = True # Pulling all repository components. execfile("pull.py")
# -*- coding: utf-8 -*- execfile("conf-travis.py") # Pulling all repository components. execfile("pull.py")
mit
Python
52338a07bba66da549a55391747d74a4a7e6aba3
Set version to v3.0.0.dev13
spacy-io/spaCy,honnibal/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,honnibal/spaCy,explosion/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,honnibal/spaCy
spacy/about.py
spacy/about.py
# fmt: off __title__ = "spacy" __version__ = "3.0.0.dev13" __release__ = True __download_url__ = "https://github.com/explosion/spacy-models/releases/download" __compatibility__ = "https://raw.githubusercontent.com/explosion/spacy-models/master/compatibility.json" __shortcuts__ = "https://raw.githubusercontent.com/explo...
# fmt: off __title__ = "spacy" __version__ = "3.0.0.dev12" __release__ = True __download_url__ = "https://github.com/explosion/spacy-models/releases/download" __compatibility__ = "https://raw.githubusercontent.com/explosion/spacy-models/master/compatibility.json" __shortcuts__ = "https://raw.githubusercontent.com/explo...
mit
Python
8af4b9e4dfd6e8e273be5613c7dde017ae2a3354
Fix compatibility.json link
explosion/spaCy,oroszgy/spaCy.hu,recognai/spaCy,oroszgy/spaCy.hu,explosion/spaCy,spacy-io/spaCy,aikramer2/spaCy,aikramer2/spaCy,raphael0202/spaCy,recognai/spaCy,raphael0202/spaCy,oroszgy/spaCy.hu,spacy-io/spaCy,raphael0202/spaCy,aikramer2/spaCy,recognai/spaCy,explosion/spaCy,explosion/spaCy,oroszgy/spaCy.hu,honnibal/sp...
spacy/about.py
spacy/about.py
# inspired from: # https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/ # https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py __title__ = 'spacy' __version__ = '1.6.0' __summary__ = 'Industrial-strength Natural Language Processing (NLP) with Python and Cython' __uri__ =...
# inspired from: # https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/ # https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py __title__ = 'spacy' __version__ = '1.6.0' __summary__ = 'Industrial-strength Natural Language Processing (NLP) with Python and Cython' __uri__ =...
mit
Python
dad97a33179d6b7cb2c7024ea46983618162dc24
Switch to verified https requests
DavidHHShao/slack
slack/http_client.py
slack/http_client.py
# Copyright (c) 2014 Katsuya Noguchi # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis...
# Copyright (c) 2014 Katsuya Noguchi # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis...
mit
Python
cf4436b69922b55bd612ad83cce0ff7ebf34a1d0
Bump version
smarkets/smk_python_sdk
smarkets/__init__.py
smarkets/__init__.py
# Copyright (C) 2011 Smarkets Limited <support@smarkets.com> # # This module is released under the MIT License: # http://www.opensource.org/licenses/mit-license.php __version__ = '1.0.9' def private(something): something.__private__ = True return something __all__ = ()
# Copyright (C) 2011 Smarkets Limited <support@smarkets.com> # # This module is released under the MIT License: # http://www.opensource.org/licenses/mit-license.php __version__ = '1.0.8' def private(something): something.__private__ = True return something __all__ = ()
mit
Python
e71bb55c2db45a8743c7e3b47f823d454319b317
add poster to video
arkarkark/feedapp,arkarkark/feedapp,arkarkark/feedapp,arkarkark/feedapp
src/server/instagram.py
src/server/instagram.py
# Copyright 2017 Alex K (wtwf.com) __author__ = 'wtwf.com (Alex K)' import cgi import datetime import json import logging import re import PyRSS2Gen as rss from google.appengine.api import urlfetch from google.appengine.ext import webapp class RssFeed(webapp.RequestHandler): """Make RSS Feed for a (public) insta...
# Copyright 2017 Alex K (wtwf.com) __author__ = 'wtwf.com (Alex K)' import cgi import datetime import json import logging import re import PyRSS2Gen as rss from google.appengine.api import urlfetch from google.appengine.ext import webapp class RssFeed(webapp.RequestHandler): """Make RSS Feed for a (public) insta...
mit
Python
025a2d28fffcb178d35127b5ed76306a9f0f9818
Include Django migrations in Python package (fixes #9)
muccg/django-iprestrict,whyflyru/django-iprestrict,whyflyru/django-iprestrict,whyflyru/django-iprestrict,muccg/django-iprestrict,whyflyru/django-iprestrict,muccg/django-iprestrict
setup.py
setup.py
import os import re from setuptools import setup def get_package_version(package): version = re.compile(r"(?:__)?version(?:__)?\s*=\s\"(.*)\"", re.I) initfile = os.path.join(os.path.dirname(__file__), package, "__init__.py") for line in open(initfile): m = version.match(line) if m: ...
import os import re from setuptools import setup def get_package_version(package): version = re.compile(r"(?:__)?version(?:__)?\s*=\s\"(.*)\"", re.I) initfile = os.path.join(os.path.dirname(__file__), package, "__init__.py") for line in open(initfile): m = version.match(line) if m: ...
bsd-3-clause
Python
1e710cde77cab75946ac290578230ece09a1e0d8
fix name and package the same
Lab-317/NewsParser
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: bustta # @Date: 2014-11-04 00:47:53 # @Last Modified by: kenny.tsai # @Last Modified time: 2014-11-05 10:10:37 from distutils.core import setup setup( name = 'newsParser', packages = ['newsParser'], version = '0.0.4', description = 'Taiwan N...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: bustta # @Date: 2014-11-04 00:47:53 # @Last Modified by: bustta # @Last Modified time: 2014-11-05 01:13:27 from distutils.core import setup setup( name = 'NewsParser', packages = ['newsParser'], scripts = [''], version = '0.0.3', descrip...
mit
Python
23b15ebead9c5818dc94471d5b56feaa1fcf24a7
Bump version to 0.3.3
fuller-inc/bqx
setup.py
setup.py
import os import sys from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand from bqx._func_generator import generate_funcpy here = os.path.abspath(os.path.dirname(__file__)) if 'build' in sys.argv: import pypandoc with open(os.path.join(here, 'README.md')) as f: ...
import os import sys from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand from bqx._func_generator import generate_funcpy here = os.path.abspath(os.path.dirname(__file__)) if 'build' in sys.argv: import pypandoc with open(os.path.join(here, 'README.md')) as f: ...
bsd-3-clause
Python
fb8ded55a0e09c2f953770e6bc1c7968c57f0c47
Bump to version 1.12.
dimagi/django-digest,trey0/django-digest
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup setup( name='django-digest', version='1.12', description=('An implementation of HTTP Digest Authentication for Django.'), long_description=( """ django-digest supplies a middleware (HttpDigestMiddleware) that may installed to protect access to all URL...
#!/usr/bin/env python from setuptools import setup setup( name='django-digest', version='1.11', description=('An implementation of HTTP Digest Authentication for Django.'), long_description=( """ django-digest supplies a middleware (HttpDigestMiddleware) that may installed to protect access to all URL...
bsd-3-clause
Python
1b8a9cabd5f329f59f19572c34e1df4f5bfa0302
Make Pygame a dependency.
zeth/ledgrid
setup.py
setup.py
from __future__ import with_statement try: from setuptools import setup except ImportError: from distutils.core import setup ledgrid_classifiers = [ "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Intended Audience :: Developers", "License :: OSI Approved :: BS...
from __future__ import with_statement try: from setuptools import setup except ImportError: from distutils.core import setup ledgrid_classifiers = [ "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Intended Audience :: Developers", "License :: OSI Approved :: BS...
bsd-3-clause
Python
d4c064f150ac506c7b8f0dc9ea2103b1cb8cab0e
Fix license description
liuyug/django-alipay,liuyug/django-alipay
setup.py
setup.py
#!/usr/bin/env python import os from distutils.core import setup README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-alipay', version='0.1', ...
#!/usr/bin/env python import os from distutils.core import setup README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-alipay', version='0.1', ...
mit
Python
ba14198b7ed847a26cb548710ef46ff83563abe8
Bump version to 2.1.1
bcb/jsonrpcclient
setup.py
setup.py
"""setup.py""" from codecs import open as codecs_open from setuptools import setup with codecs_open('README.rst', 'r', 'utf-8') as f: readme = f.read() with codecs_open('HISTORY.rst', 'r', 'utf-8') as f: history = f.read() setup( name='jsonrpcclient', version='2.1.1', description='Send JSON-RPC ...
"""setup.py""" from codecs import open as codecs_open from setuptools import setup with codecs_open('README.rst', 'r', 'utf-8') as f: readme = f.read() with codecs_open('HISTORY.rst', 'r', 'utf-8') as f: history = f.read() setup( name='jsonrpcclient', version='2.1.0', description='Send JSON-RPC ...
mit
Python
2e6d862b26848ce182ab3ed82cf56b5e56a1b90f
Add the back buffer blit in the update function
fjacob21/pycon2015
elpiwear/watchout_screen.py
elpiwear/watchout_screen.py
import Image import ImageDraw import ImageFont import screen class watchout_screen(screen.screen): def __init__(self): screen.screen.__init__(self) self.image = Image.open('maximus.jpg') self.image = self.image.resize((320,240)) self.draw_image(self.image , (0,0)) self.bfo...
import Image import ImageDraw import ImageFont import screen class watchout_screen(screen.screen): def __init__(self): screen.screen.__init__(self) self.image = Image.open('maximus.jpg') self.image = self.image.resize((320,240)) self.draw_image(self.image , (0,0)) self.bfo...
mit
Python
2026f1fd5b46ac98b9a26206beb036147a787e64
update author email
CI-WATER/tethys,CI-WATER/tethys,CI-WATER/tethys
setup.py
setup.py
""" ******************************************************************************** * Name: setup.py * Author: Nathan Swain * Created On: 2014 * Copyright: (c) Brigham Young University 2014 * License: BSD 2-Clause ******************************************************************************** """ import os from setup...
""" ******************************************************************************** * Name: setup.py * Author: Nathan Swain * Created On: 2014 * Copyright: (c) Brigham Young University 2014 * License: BSD 2-Clause ******************************************************************************** """ import os from setup...
bsd-2-clause
Python
3a6e9b2a0c5806f0e39bbadd768e9e9cbe503479
Add RST `long_description` to setup.py for nice layout on Pypi.
dockermeetupsinbordeaux/docker-zabbix-sender,dockermeetupsinbordeaux/docker-zabbix-sender
setup.py
setup.py
#!/usr/bin/env python import os import sys from setuptools import setup from textwrap import dedent NAME = "docker-zabbix-sender" GITHUB_ORG_URL = "https://github.com/dockermeetupsinbordeaux" ROOT_DIR = os.path.dirname(__file__) SOURCE_DIR = os.path.join(ROOT_DIR) exec(open('docker_zabbix_sender/version.py').read()) ...
#!/usr/bin/env python import os import sys from setuptools import setup ROOT_DIR = os.path.dirname(__file__) SOURCE_DIR = os.path.join(ROOT_DIR) requirements = [ 'docker-py >= 1.0.0', ] exec(open('docker_zabbix_sender/version.py').read()) setup( name="docker-zabbix-sender", version=version, author="...
apache-2.0
Python
3aae6bc4eabd934c2c5ee60f43b649715f63b3b3
Declare ourselves zip-sage
walles/px,walles/px
setup.py
setup.py
#!/usr/bin/env python import subprocess from setuptools import setup requirements = None with open('requirements.txt') as reqsfile: requirements = reqsfile.readlines() setup( name='px', version=subprocess.check_output(['git', 'describe', '--dirty']).decode('utf-8').strip(), description='Cross Functi...
#!/usr/bin/env python import subprocess from setuptools import setup requirements = None with open('requirements.txt') as reqsfile: requirements = reqsfile.readlines() setup( name='px', version=subprocess.check_output(['git', 'describe', '--dirty']).decode('utf-8').strip(), description='Cross Functi...
mit
Python
89a871c76207b5354fe00e7e0cdb401020e0461a
add python 3.5 support
thefab/tornadis,thefab/tornadis
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of tornadis library released under the MIT license. # See the LICENSE file for more information. from setuptools import setup, find_packages DESCRIPTION = "tornadis is an async minimal redis client for tornado " \ "ioloop designed for p...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of tornadis library released under the MIT license. # See the LICENSE file for more information. from setuptools import setup, find_packages DESCRIPTION = "tornadis is an async minimal redis client for tornado " \ "ioloop designed for p...
mit
Python
572fef2fb200369bcd2090f1e7d000928ba3926e
Replace `17.5.31` => `2017.5.31`
sgaynetdinov/py-vkontakte
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup setup( name='py-vkontakte', version='2017.5.31', packages=['vk'], url='https://github.com/sgaynetdinov/py-vkontakte', license='MIT License', author='Sergey Gaynetdinov', author_email='s.gaynetdinov@gmail.com', description='Python API wr...
#!/usr/bin/env python from setuptools import setup setup( name='py-vkontakte', version='17.5.31', packages=['vk'], url='https://github.com/sgaynetdinov/py-vkontakte', license='MIT License', author='Sergey Gaynetdinov', author_email='s.gaynetdinov@gmail.com', description='Python API wrap...
mit
Python
f57cf6b7f29904196e4d7c4bd290c4a6b11ed0fa
Update setup.py
michalbachowski/pylogging_utils,michalbachowski/pylogging_utils,michalbachowski/pylogging_utils
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import codecs try: from setuptools import setup except ImportError: from distutils.core import setup __version__ = '0.0.1' def read(fname): return codecs.open( os.path.join(os.path.dirname(__file__), fname), 'r', 'utf-8').read() readme = ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import codecs try: from setuptools import setup except ImportError: from distutils.core import setup __version__ = '0.0.1' def read(fname): return codecs.open( os.path.join(os.path.dirname(__file__), fname), 'r', 'utf-8').read() readme = ...
mit
Python
dc88f21b61ee55e737c827d098ce36d9e1cb9fa9
Bump version as instructed by bamboo. Switch to increase the minor instead of patch
pbs/django-cms-smartsnippets,pbs/django-cms-smartsnippets,pbs/django-cms-smartsnippets,pbs/django-cms-smartsnippets
setup.py
setup.py
import os from setuptools import setup, find_packages README_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.rst') dependencies = [ 'django>=1.3,<1.5', 'django-cms>=2.3,<2.3.6', 'django-admin-extend' ] dependency_links = [ 'http://github.com/pbs/djan...
import os from setuptools import setup, find_packages README_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.rst') dependencies = [ 'django>=1.3,<1.5', 'django-cms>=2.3,<2.3.6', 'django-admin-extend' ] dependency_links = [ 'http://github.com/pbs/djan...
bsd-3-clause
Python
0a4acdff376f3798b9d53023c51a54f7ffee7dc7
Update profile.py, allow process_exception middleware to fire
omarish/django-cprofile-middleware,alexsanduk/django-cprofile-middleware
profile.py
profile.py
try: import cProfile as profile except ImportError: import profile import pstats from cStringIO import StringIO from django.conf import settings class ProfilerMiddleware(object): """ Simple profile middleware to profile django views. To run it, add ?prof to the URL like this: http://local...
try: import cProfile as profile except ImportError: import profile import pstats from cStringIO import StringIO from django.conf import settings class ProfilerMiddleware(object): """ Simple profile middleware to profile django views. To run it, add ?prof to the URL like this: http://local...
mit
Python
e13b8bfc0871414c6547d795cea2a5224161a4c9
Update __init__.py
genkosta/django-editor-ymaps,genkosta/django-editor-ymaps,genkosta/django-editor-ymaps
djeym/__init__.py
djeym/__init__.py
# coding: utf-8 """ $$$$$___$$$$$$__$$$$$__$$__$$__$$___$$ $$__$$______$$__$$______$$$$___$$$_$$$ $$__$$______$$__$$$$_____$$____$$_$_$$ $$__$$__$$__$$__$$_______$$____$$___$$ $$$$$____$$$$___$$$$$____$$____$$___$$ """ __title__ = 'DjEYM (django-editor-ymaps)' __version__ = '1.0.10' __author__ = 'genkosta' __license__...
# coding: utf-8 """ $$$$$___$$$$$$__$$$$$__$$__$$__$$___$$ $$__$$______$$__$$______$$$$___$$$_$$$ $$__$$______$$__$$$$_____$$____$$_$_$$ $$__$$__$$__$$__$$_______$$____$$___$$ $$$$$____$$$$___$$$$$____$$____$$___$$ """ __title__ = 'DjEYM (django-editor-ymaps)' __version__ = '1.0.9' __author__ = 'genkosta' __license__ ...
mit
Python
2aed3674c6bfa352d5bda02307bed837843ad1cf
update file for description
paolodragone/PyMzn
setup.py
setup.py
import re import os import codecs from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) def find_version(*parts): # Open in Latin-1 so that we avoid encoding errors. # Use codecs.open for Python 2 compatibility with codecs.open(os.path.join(here, *parts), 'r', 'l...
import re import os import codecs from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) def find_version(*parts): # Open in Latin-1 so that we avoid encoding errors. # Use codecs.open for Python 2 compatibility with codecs.open(os.path.join(here, *parts), 'r', 'l...
mit
Python
d1bacfc2331e7c06e5fefccdc5b5f527e7eb9d02
add gffutils requirement
kipoi/kipoiseq,kipoi/kipoiseq
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages requirements = [ "kipoi>=0.4.2", # "genomelake", "pybedtools", "pyfaidx", "numpy", "pandas", "tqdm", "colorlog", "related>=0.6.0", # sometimes required "h5py", "gffutils" ] test_r...
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages requirements = [ "kipoi>=0.4.2", # "genomelake", "pybedtools", "pyfaidx", "numpy", "pandas", "tqdm", "colorlog", "related>=0.6.0", # sometimes required "h5py", ] test_requirements = [...
mit
Python
eca68b722ce52f987eb07f03e60daf9a1f64bd96
bump version
vipints/hgvs,counsyl/hgvs,vipints/hgvs,DasAllFolks/hgvs,DasAllFolks/hgvs
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup from pip.req import parse_requirements import sys description = ("This library provides a simple to use Python API for parsing, " "formatting, and normalizing variant names specified in the " "standard recommended by the Human Genome Var...
#!/usr/bin/env python from setuptools import setup from pip.req import parse_requirements import sys description = ("This library provides a simple to use Python API for parsing, " "formatting, and normalizing variant names specified in the " "standard recommended by the Human Genome Var...
mit
Python
fef30e00b2123ee9acbbee916fc87f11936b964d
update setup.py
mrGeen/metaseq,mrGeen/metaseq,agrimaldi/metaseq,agrimaldi/metaseq,mrGeen/metaseq,daler/metaseq,agrimaldi/metaseq,daler/metaseq,daler/metaseq
setup.py
setup.py
import ez_setup ez_setup.use_setuptools() from setuptools import setup import sys import os import numpy version_py = os.path.join(os.path.dirname(__file__), 'metaseq', 'version.py') version = open(version_py).read().split('=')[-1].strip().replace('"','') long_description = """ metaseq is a Python framework for gen...
import ez_setup ez_setup.use_setuptools() from setuptools import setup from distutils.extension import Extension from Cython.Distutils import build_ext import sys import os import numpy if 'setuptools.extension' in sys.modules: m = sys.modules['setuptools.extension'] m.Extension.__dict__ = m._Extension.__dict_...
mit
Python
9c3bc4f2a141502b4121109d814fc18e90974744
Bump the Development Status to Stable
dmtucker/keysmith
setup.py
setup.py
#!/usr/bin/env python3 # coding: utf-8 """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ from setuptools import setup, find_packages import keysmith with open('README.rst') as readme_file: README = readme_file.read() setu...
#!/usr/bin/env python3 # coding: utf-8 """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ from setuptools import setup, find_packages import keysmith with open('README.rst') as readme_file: README = readme_file.read() setu...
bsd-3-clause
Python
c2a7bf92a0e7b0c1d02e238b50c701aabad9162e
bump version: 0.4.0
petergardfjall/garminexport
setup.py
setup.py
"""Setup information for the Garmin Connect activity exporter.""" from setuptools import setup, Extension from os import path # needed for Python 2.7 (ensures open() defaults to text mode with universal # newlines, and accepts an argument to specify the text encoding. from io import open here = path.abspath(path.dirn...
"""Setup information for the Garmin Connect activity exporter.""" from setuptools import setup, Extension from os import path # needed for Python 2.7 (ensures open() defaults to text mode with universal # newlines, and accepts an argument to specify the text encoding. from io import open here = path.abspath(path.dirn...
apache-2.0
Python
963857463cd706260667995bd8817bd2facea5f0
Include the official nydus release
numan/sunspear
setup.py
setup.py
#!/usr/bin/python from setuptools import setup, find_packages tests_require=[ 'nose', 'mock', ] setup( name="sunspear", license='Apache License 2.0', version="0.1.0a", description="Activity streams backed by Riak.", zip_safe=False, long_description=open('README.rst', 'r').read(), ...
#!/usr/bin/python from setuptools import setup, find_packages tests_require=[ 'nose', 'mock', ] setup( name="sunspear", license='Apache License 2.0', version="0.1.0a", description="Activity streams backed by Riak.", zip_safe=False, long_description=open('README.rst', 'r').read(), ...
apache-2.0
Python
42f963ba0f015e8aa08586bdd42f8e39cfb5b8dd
bump up version
hermantai/sorno-py-scripts,hermantai/sorno-py-scripts
setup.py
setup.py
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup import os dependency_libs = [ "beautifulsoup4", "dropbox", "feedparser", "google_api_python_client", "humanfriendly", "humanize", "ipython", "lxml", # https://githu...
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup import os dependency_libs = [ "beautifulsoup4", "dropbox", "feedparser", "google_api_python_client", "humanfriendly", "humanize", "ipython", "lxml", # https://githu...
apache-2.0
Python
a8e472cfdec472d24e1f7b3b73c2c637a86e85dd
Fix xmldoc example
jaredly/pyjamas,jaredly/pyjamas,jaredly/pyjamas,jaredly/pyjamas
examples/xmldoc/XMLload.py
examples/xmldoc/XMLload.py
import pyjd from pyjamas.ui.Button import Button from pyjamas.ui.RootPanel import RootPanel from pyjamas.ui.HTML import HTML from pyjamas.ui.DockPanel import DockPanel from pyjamas.ui import HasAlignment from pyjamas.ui.Hyperlink import Hyperlink from pyjamas.ui.VerticalPanel import VerticalPanel from pyjamas.ui.Scrol...
import pyjd from pyjamas.ui.Button import Button from pyjamas.ui.RootPanel import RootPanel from pyjamas.ui.HTML import HTML from pyjamas.ui.DockPanel import DockPanel from pyjamas.ui import HasAlignment from pyjamas.ui.Hyperlink import Hyperlink from pyjamas.ui.VerticalPanel import VerticalPanel from pyjamas.ui.Scrol...
apache-2.0
Python
0e92abaf74fd79de127d783bd6a3814a3a23e08b
Include visualization component in setup.py
orbingol/NURBS-Python,orbingol/NURBS-Python
setup.py
setup.py
try: from setuptools import setup except ImportError: from distutils.core import setup import os import re def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() # Implemented from http://stackoverflow.com/a/41110107 def get_property(prop, project): result ...
try: from setuptools import setup except ImportError: from distutils.core import setup import os import re def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() # Implemented from http://stackoverflow.com/a/41110107 def get_property(prop, project): result ...
mit
Python
78526e31cd18ac710ff74002741dd6e65b105233
Use include_dirs in setup.py
terrelln/python-zstandard,indygreg/python-zstandard,indygreg/python-zstandard,terrelln/python-zstandard,indygreg/python-zstandard,terrelln/python-zstandard,terrelln/python-zstandard,indygreg/python-zstandard
setup.py
setup.py
#!/usr/bin/env python # Copyright (c) 2016-present, Gregory Szorc # All rights reserved. # # This software may be modified and distributed under the terms # of the BSD license. See the LICENSE file for details. from setuptools import setup, Extension zstd_sources = ['zstd/%s' % p for p in ( 'common/entropy_common...
#!/usr/bin/env python # Copyright (c) 2016-present, Gregory Szorc # All rights reserved. # # This software may be modified and distributed under the terms # of the BSD license. See the LICENSE file for details. from setuptools import setup, Extension zstd_sources = ['zstd/%s' % p for p in ( 'common/entropy_common...
bsd-3-clause
Python
ce5ec0555c80b79f0d329b7b0b58e33d5226cd41
Update our support list.
jeamland/wsproto,jeamland/wsproto,python-hyper/wsproto
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import sys try: from setuptools import setup except ImportError: from distuitls.core import setup # Get the version version_regex = r'__version__ = ["\']([^"\']*)["\']' with open('wsproto/__init__.py', 'r') as f: text = f.read() match ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import sys try: from setuptools import setup except ImportError: from distuitls.core import setup # Get the version version_regex = r'__version__ = ["\']([^"\']*)["\']' with open('wsproto/__init__.py', 'r') as f: text = f.read() match ...
mit
Python
9bc56a273804cf48a282b266d8206179f7b09ede
include all files on install and some minor fixes
kimus/django-blocks,kimus/django-blocks
setup.py
setup.py
#!/usr/bin/env python import os from setuptools import setup # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name = "django-blocks", version = "1.0", packages = ['blocks'], include_package_data=True, author = "Helder Rossa", autho...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name = "django-blocks", version = "1.0", packages = find_packages(), author = "Helder Rossa", author_email = "kimus.linuxus@gmail.com", description = "An easier way to build Web apps more quickly and with almost no code.", license = "MI...
mit
Python
04c21325c15a7100b4bce154e06d6eda8b468778
Fix 'TypeError: a bytes-like object is required, not 'str'' issue
marteinn/Skeppa,marteinn/Skeppa
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys from setuptools import setup, find_packages import skeppa if sys.argv[-1] == "publish": os.system("python setup.py sdist upload") sys.exit() package_exclude = ("tests*", "examples*") packages = find_packages(exclude=package_exclude) # Han...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys from setuptools import setup, find_packages import skeppa if sys.argv[-1] == "publish": os.system("python setup.py sdist upload") sys.exit() package_exclude = ("tests*", "examples*") packages = find_packages(exclude=package_exclude) # Han...
mit
Python
e70bf63ad7d7067b5cf940b7ad1888ad2033c30c
Mejora :P
carlosplanchon/outfancy
py-test.py
py-test.py
#!/usr/bin/python3 # -*- coding: utf-8 -*- import outfancy recordset = [(1, 'Feisbuk', '18-10-2015', '21:57:17', '18-10-2015', '21:57:17', 1234, 'Red social bla bla bla utilizada gente bla bla'), (2, 'Gugle', '18-10-2015', '21:57:44', '18-10-2015', '21:57:44', 12323, 'Motor de busqueda que categoriza resultados por l...
#!/usr/bin/python3 # -*- coding: utf-8 -*- import outfancy recordset = [(1, 'Google', '18-10-2015', '21:56:51', '18-10-2015', '21:56:51', 0, ''), (2, 'Feisbuk', '18-10-2015', '21:57:17', '18-10-2015', '21:57:17', 0, 'Red social bla bla bla utilizada gente bla bla'), (3, 'Gugle', '18-10-2015', '21:57:44', '18-10-2015'...
cc0-1.0
Python
427292a82aea2a2291833ca0cb3f30cee2afd497
Fix NR deploy notification bug
infoxchange/ixdjango
ixdjango/management/commands/newrelic_notify_deploy.py
ixdjango/management/commands/newrelic_notify_deploy.py
""" Management command to enable New Relic notification of deployments .. moduleauthor:: Infoxchange Development Team <development@infoxchange.net.au> """ import os from subprocess import call, Popen, PIPE from django.conf import settings from django.core.management.base import NoArgsCommand class Command(NoArgsC...
""" Management command to enable New Relic notification of deployments .. moduleauthor:: Infoxchange Development Team <development@infoxchange.net.au> """ import os from subprocess import call, Popen, PIPE from django.conf import settings from django.core.management.base import NoArgsCommand class Command(NoArgsC...
mit
Python
153955d3c8ca8db233c073f4f3288efd2a16c828
Update nessus_invoker.py
fedex279/OpenDXL
Nessus/nessus_invoker.py
Nessus/nessus_invoker.py
/* =================================================== * Copyright 2017 Uha Durbha * * 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 * * ...
/*Copyright 2017 Uha Durbha * *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, softwar...
apache-2.0
Python
6d1dc290ec02f756d83ed7f0a69070943e273c5f
Fix api time format
TornikeNatsvlishvili/skivri.ge,TornikeNatsvlishvili/skivri.ge,TornikeNatsvlishvili/skivri.ge,TornikeNatsvlishvili/skivri.ge
frontend/app/blueprints/analytics.py
frontend/app/blueprints/analytics.py
from flask import Blueprint from flask import request, abort, jsonify import model.analytics as analytics from playhouse.shortcuts import model_to_dict import config analytic_api = Blueprint('analytic_api', __name__) PageViewTable, UserTable = analytics.initialize(config.settings['MYSQL_DB'], config.settings['MYSQL_U...
from flask import Blueprint from flask import request, abort, jsonify import model.analytics as analytics from playhouse.shortcuts import model_to_dict import config analytic_api = Blueprint('analytic_api', __name__) PageViewTable, UserTable = analytics.initialize(config.settings['MYSQL_DB'], config.settings['MYSQL_U...
mit
Python
72ad6a987923c75ea97119dc4238d7d832c596a3
Update AudioCapture.py
MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab
service/AudioCapture.py
service/AudioCapture.py
audiocapture = Runtime.createAndStart("audiocapture","AudioCapture") #it starts capturing audio audiocapture.captureAudio() # it will record for 5 seconds sleep(5) #then it stops recording audio audiocapture.stopAudioCapture() #it plays audio recorded audiocapture.playAudio() sleep(5) # setting the recording audio fo...
from org.myrobotlab.service import Runtime from org.myrobotlab.service import AudioCapture from time import sleep audiocapture = Runtime.createAndStart("audiocapture","AudioCapture") #it starts capturing audio audiocapture.captureAudio() # it will record for 5 seconds sleep(5) #then it stops recording audio audiocaptur...
apache-2.0
Python
658745b45ae46753b3894edc011947c8092f96a9
Update motion_sensor.py
jdp7689/motion_security,jdp7689/motion_security
src/motion_sensor.py
src/motion_sensor.py
#!/usr/bin/python ''' MIT License Copyright (c) 2016 Joshua Palmer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify...
#!/usr/bin/python import RPi.GPIO as GPIO import time INPUT_PIN = 7 SLEEP_TIME_SECONDS = .1 class MotionSensorTimeoutException(Exception): pass class MotionSensor(): def __init__(self, input_pin=INPUT_PIN): self.input_pin = input_pin GPIO.setmode(GPIO.BOARD) GPIO.setup(input_pin, GP...
mit
Python
1b8ad8da3d42b38ef1a2a6bbcc156e8fc820db0c
add dbaccessor to get full reverse indices from a list of case ids
dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/ex-submodules/casexml/apps/case/dbaccessors/related.py
corehq/ex-submodules/casexml/apps/case/dbaccessors/related.py
from collections import namedtuple from casexml.apps.case.sharedmodels import CommCareCaseIndex def get_indexed_case_ids(domain, case_ids): """ Given a base list of case ids, gets all ids of cases they reference (parent cases) """ from casexml.apps.case.models import CommCareCase keys = [[domain, ...
from casexml.apps.case.sharedmodels import CommCareCaseIndex def get_indexed_case_ids(domain, case_ids): """ Given a base list of case ids, gets all ids of cases they reference (parent cases) """ from casexml.apps.case.models import CommCareCase keys = [[domain, case_id, 'index'] for case_id in ca...
bsd-3-clause
Python
2555d56010df92a4a76e56522e9576cfb0e5446b
Remove junk and fix wrong method name
midokura/python-midonetclient,midonet/python-midonetclient,midokura/python-midonetclient,midonet/python-midonetclient
test/functional/test_dhcp.py
test/functional/test_dhcp.py
# Copyright 2012 Midokura Japan KK import os import sys import unittest from webob import exc TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), os.pardir, os.pardir, os.pardir)) sys.path.insert(...
# Copyright 2012 Midokura Japan KK import os import sys import unittest from webob import exc TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), os.pardir, os.pardir, os.pardir)) sys.path.insert(...
apache-2.0
Python
f6f9ce94c33ad959cfd3f9cbb1b19e8bff17126d
Fix python object searilization problem in yaml
torgartor21/solar,Mirantis/solar,torgartor21/solar,loles/solar,zen/solar,openstack/solar,pigmej/solar,Mirantis/solar,loles/solar,dshulyak/solar,loles/solar,pigmej/solar,zen/solar,zen/solar,Mirantis/solar,Mirantis/solar,openstack/solar,CGenie/solar,pigmej/solar,openstack/solar,dshulyak/solar,CGenie/solar,loles/solar,zen...
solar/solar/utils.py
solar/solar/utils.py
import io import glob import yaml import logging import os from uuid import uuid4 from jinja2 import Template logger = logging.getLogger(__name__) def create_dir(dir_path): logger.debug(u'Creating directory %s', dir_path) if not os.path.isdir(dir_path): os.makedirs(dir_path) def yaml_load(file_pa...
import io import glob import yaml import logging import os from uuid import uuid4 from jinja2 import Template logger = logging.getLogger(__name__) def create_dir(dir_path): logger.debug(u'Creating directory %s', dir_path) if not os.path.isdir(dir_path): os.makedirs(dir_path) def yaml_load(file_pa...
apache-2.0
Python
bef1a3311d1bee0597690a7e7b7c0024ac499463
update test
Yubico/yubikey-manager,Yubico/yubikey-manager
test/on_yubikey/test_fido.py
test/on_yubikey/test_fido.py
import unittest from ykman.util import TRANSPORT from .util import (DestructiveYubikeyTestCase, missing_mode, ykman_cli) @unittest.skipIf(*missing_mode(TRANSPORT.U2F)) class TestFidoFunctions(DestructiveYubikeyTestCase): def test_fido_set_pin(self): output = ykman_cli('fido', 'info') self.assertI...
import unittest from ykman.util import TRANSPORT from .util import (DestructiveYubikeyTestCase, missing_mode, ykman_cli) @unittest.skipIf(*missing_mode(TRANSPORT.U2F)) class TestFidoFunctions(DestructiveYubikeyTestCase): def test_fido_set_pin(self): output = ykman_cli('--log-level', 'DEBUG', 'fido', 'inf...
bsd-2-clause
Python
e055bf11abb78919a4a4dc08a40cfc9a0a209656
fix credentials retrieval from xml file
lakewik/storj-gui-client
UI/utilities/account_manager.py
UI/utilities/account_manager.py
import xml.etree.cElementTree as ET class AccountManager: def __init__(self, login_email=None, password=None): self.login_email = login_email self.password = password def save_account_credentials(self): root = ET.Element("account") doc = ET.SubElement(root, "credentials") ...
import xml.etree.cElementTree as ET class AccountManager: def __init__(self, login_email=None, password=None): self.login_email = login_email self.password = password def save_account_credentials(self): root = ET.Element("account") doc = ET.SubElement(root, "credentials") ...
mit
Python
572dff2273532a39d797a63008522fd632c62a3b
fix unit tests.
tobyqin/testcube,tobyqin/testcube,tobyqin/testcube,tobyqin/testcube
testcube/tests/test_utils.py
testcube/tests/test_utils.py
from django.test import TestCase as TC from testcube.core.models import * from testcube.utils import * class ModelsTestCase(TC): def setUp(self): pass def test_get_domain(self): assert get_domain() == 'company.com' Configuration.objects.create(key='domain', value='my.com') as...
from django.test import TestCase as TC from testcube.utils import * class ModelsTestCase(TC): def setUp(self): pass def test_get_domain(self): assert get_domain() == 'company.com' Configuration.objects.create(key='domain', value='my.com') assert get_domain() == 'my.com' ...
mit
Python
e771ae7cba6bca2082dbfd000f6726f53e6f7eb1
bump version
John-Lin/snortunsock
snortunsock/__init__.py
snortunsock/__init__.py
__author__ = 'John Lin' __author_email__ = 'linton.tw@gmail.com' __license__ = 'Apache License 2.0' __url__ = 'https://github.com/John-Lin/snortunsock' __version__ = '0.0.3'
__author__ = 'John Lin' __author_email__ = 'linton.tw@gmail.com' __license__ = 'Apache License 2.0' __url__ = 'https://github.com/John-Lin/snortunsock' __version__ = '0.0.2'
apache-2.0
Python
5dfcd4e8cea8d821d2476700f2c661c27cae3557
make CI pass for now
plotly/plotly.py,plotly/plotly.py,plotly/plotly.py
packages/python/plotly/plotly/tests/test_core/test_px/test_pandas_backend.py
packages/python/plotly/plotly/tests/test_core/test_px/test_pandas_backend.py
import plotly.express as px import numpy as np import pandas as pd import pytest @pytest.mark.skipif( not hasattr(pd.options.plotting, "backend"), reason="Currently installed pandas doesn't support plotting backends.", ) @pytest.mark.parametrize( "pandas_fn,px_fn", [ (lambda df: df.plot(), px....
import plotly.express as px import numpy as np import pandas as pd import pytest @pytest.mark.parametrize( "pandas_fn,px_fn", [ (lambda df: df.plot(), px.line), (lambda df: df.plot.scatter("A", "B"), lambda df: px.scatter(df, "A", "B"),), (lambda df: df.plot.line(), px.line), (...
mit
Python
3fc20d745ee67e4784645f27ec433fd0c7f9ae61
fix errors
silenius/amnesia,silenius/amnesia,silenius/amnesia
amnesia/modules/account/views/login.py
amnesia/modules/account/views/login.py
# -*- coding: utf-8 -*- from marshmallow import ValidationError from pyramid.httpexceptions import HTTPFound from pyramid.security import remember from pyramid.view import view_defaults from pyramid.view import view_config from amnesia.utils.forms import render_form from amnesia.modules.account.validation import Lo...
# -*- coding: utf-8 -*- from marshmallow import ValidationError from pyramid.httpexceptions import HTTPFound from pyramid.security import remember from pyramid.view import view_defaults from pyramid.view import view_config from amnesia.utils.forms import render_form from amnesia.modules.account.validation import Lo...
bsd-2-clause
Python
da3c7132f5baef052c290cf0e70587ca05e96443
Bump version to 0.7.0-alpha-3
thombashi/tcconfig,thombashi/tcconfig
tcconfig/__init__.py
tcconfig/__init__.py
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ VERSION = "0.7.0-alpha-3"
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ VERSION = "0.7.0-alpha-2"
mit
Python
9bdd0d5189b3f81183869bf678836631f85c2ca4
send notif only if it is an insert not an update
UrLab/DocHub,UrLab/DocHub,UrLab/beta402,UrLab/DocHub,UrLab/beta402,UrLab/DocHub,UrLab/beta402
telepathy/signals.py
telepathy/signals.py
import models from notify.models import PreNotification from django.core.urlresolvers import reverse def thread_save(**kwargs): assert kwargs['sender'] == models.Thread if kwargs['created']: thread = kwargs['instance'] #TODO: use truncate instead of str[:N] PreNotification.objects.crea...
import models from notify.models import PreNotification from django.core.urlresolvers import reverse def thread_save(**kwargs): assert kwargs['sender'] == models.Thread thread = kwargs['instance'] #TODO: use truncate instead of str[:N] PreNotification.objects.create( node=thread, text=...
agpl-3.0
Python
4eb9cb10943e1b1b25aa1fa89686d3fa41d535b8
Make CACHE_KEY_PREFIX work for RedisCache. It is available for Werkzeug >= 0.8.1.
thadeusb/flask-cache,kazeeki/mezmorize,thadeusb/flask-cache,alexey-sveshnikov/flask-cache,kazeeki/mezmorize,j-fuentes/flask-cache,ordbogen/flask-cache,alexey-sveshnikov/flask-cache,gerasim13/flask-cache,j-fuentes/flask-cache,gerasim13/flask-cache,ordbogen/flask-cache
flaskext/cache/backends.py
flaskext/cache/backends.py
from werkzeug.contrib.cache import (NullCache, SimpleCache, MemcachedCache, GAEMemcachedCache, FileSystemCache) def null(app, args, kwargs): return NullCache() def simple(app, args, kwargs): kwargs.update(dict(threshold=app.config['CACHE_THRESHOLD'])) return SimpleCache...
from werkzeug.contrib.cache import (NullCache, SimpleCache, MemcachedCache, GAEMemcachedCache, FileSystemCache) def null(app, args, kwargs): return NullCache() def simple(app, args, kwargs): kwargs.update(dict(threshold=app.config['CACHE_THRESHOLD'])) return SimpleCache...
bsd-3-clause
Python
13a26fce9640122006e7c4bd7ea35eb40ed78f67
Remove unused import
vladimirgamalian/pictools
renamer.py
renamer.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import click import os from utils import TempDir @click.command() @click.argument('path', type=click.Path(exists=True, file_okay=False)) @click.option('--start', type=click.IntRange(min=0), prompt=True) def renamer(path, start): files = sorted([f for f in os.listdir(...
#!/usr/bin/env python # -*- coding: utf-8 -*- import click import os import shutil from utils import TempDir @click.command() @click.argument('path', type=click.Path(exists=True, file_okay=False)) @click.option('--start', type=click.IntRange(min=0), prompt=True) def renamer(path, start): files = sorted([f for f ...
mit
Python
5ccbec054c01cda00f3b4ef94c393f57c5bafb42
Tidy up FlaskMustache class
bradwright/flask-mustachejs,bradleywright/flask-mustachejs,bradwright/flask-mustachejs,bradleywright/flask-mustachejs
flask_mustache/__init__.py
flask_mustache/__init__.py
# flask-mustache Flask plugin import os from jinja2 import Template from flask import current_app __all__ = ('FlaskMustache',) class FlaskMustache(object): "Wrapper to inject Mustache stuff into Flask" def __init__(self, app=None): self.app = app if app is not None: self.init_ap...
# flask-mustache Flask plugin import os from jinja2 import Template from flask import current_app class FlaskMustache(object): "Wrapper to inject Mustache stuff into Flask" def __init__(self, app=None, configure_jinja=True): self._configure_jinja = configure_jinja self.app = app if a...
bsd-3-clause
Python
1873f8eca4ff96ff987d50e119882bfee363d0b4
return better Changes and support test=True
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/states/nfs_export.py
salt/states/nfs_export.py
# -*- coding: utf-8 -*- ''' Management of NFS exports =============================================== To ensure an NFS export exists: .. code-block:: yaml add_simple_export: nfs_export.present: - name: '/srv/nfs' - hosts: '10.0.2.0/24' - options: 'rw' For more complex expo...
# -*- coding: utf-8 -*- ''' Management of NFS exports =============================================== To ensure an NFS export exists: .. code-block:: yaml add_simple_export: nfs_export.present: - name: '/srv/nfs' - hosts: '10.0.2.0/24' - options: 'rw' For more complex expo...
apache-2.0
Python
7a0ec66727644e26948d237e62c3ed69c47931bc
Update main.py
gameplex/game
src/client/main.py
src/client/main.py
#!/usr/bin/env python from __future__ import print_function def main(): print("Running main loop") if __name__ == "__main__": print("Hello Client!") main() print("Goodbye Client!")
#!/usr/bin/env python from __future__ import print_function if __name__ == "__main__": print("Hello Client")
agpl-3.0
Python
622967954d3813f6b40c4fdb869becbf663733d1
Fix global import cards
rdsathene/SchoolIdolAPI,rdsathene/SchoolIdolAPI,SchoolIdolTomodachi/SchoolIdolAPI,dburr/SchoolIdolAPI,SchoolIdolTomodachi/SchoolIdolAPI,SchoolIdolTomodachi/SchoolIdolAPI,dburr/SchoolIdolAPI,dburr/SchoolIdolAPI,rdsathene/SchoolIdolAPI
api/management/commands/importcards.py
api/management/commands/importcards.py
# -*- coding: utf-8 -*- from api.management.commands.importbasics import * from api.management.commands.importcardstats import importcardstats from api.management.commands.import_jp_events import import_jp_events from api.management.commands.import_en_events import import_en_events from api.management.commands.import_w...
# -*- coding: utf-8 -*- from api.management.commands.importbasics import * from api.management.commands.importcardstats import importcardstats from api.management.commands.import_jp_events import import_jp_events from api.management.commands.import_en_events import import_en_events from api.management.commands.import_w...
apache-2.0
Python
97c200c3b242b8794b14642099ba51e0085b0ff2
Remove debugging lines
eregs/regulations-parser,tadhg-ohiggins/regulations-parser,cmc333333/regulations-parser,tadhg-ohiggins/regulations-parser,cmc333333/regulations-parser,eregs/regulations-parser
regparser/eregs_index.py
regparser/eregs_index.py
"""The eregs_index directory contains the output for many of the shell commands. This module provides a quick interface to this index""" import os from lxml import etree ROOT = ".eregs_index" class Path(object): """Encapsulates access to a particular directory within the index""" def __init__(self, *dirs):...
"""The eregs_index directory contains the output for many of the shell commands. This module provides a quick interface to this index""" import os from lxml import etree ROOT = ".eregs_index" class Path(object): """Encapsulates access to a particular directory within the index""" def __init__(self, *dirs):...
cc0-1.0
Python
d71b5207d7ae22a26006b6e4f67e9e3ee0200a77
Update plot history.
benigls/spam,benigls/spam
spam/common/utils.py
spam/common/utils.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import random import matplotlib.pyplot as plt from sklearn.cross_validation import train_test_split from spam.common.collections import Dataset, Data def split_dataset(x, y, seed=0): """ Split the dataset into unlabel, train, and test sets. """ # split the dat...
#!/usr/bin/env python # -*- coding: utf-8 -*- import matplotlib.pyplot as plt from sklearn.cross_validation import train_test_split from spam.common.collections import Dataset, Data def split_dataset(x, y, seed=0): """ Split the dataset into unlabel, train, and test sets. """ # split the data into label an...
mit
Python
2de4a2e3ddc304cbc6e68cd8ccfda75d06ef9514
Add related_name to part_of field
stefanw/froide,fin/froide,fin/froide,fin/froide,stefanw/froide,fin/froide,stefanw/froide,stefanw/froide,stefanw/froide
froide/georegion/models.py
froide/georegion/models.py
from django.utils.translation import ugettext_lazy as _ from django.contrib.gis.db import models class GeoRegion(models.Model): name = models.CharField(_('Name'), max_length=255) slug = models.SlugField(_('Slug'), max_length=255) description = models.TextField(blank=True) kind = models.CharField(_('...
from django.utils.translation import ugettext_lazy as _ from django.contrib.gis.db import models class GeoRegion(models.Model): name = models.CharField(_('Name'), max_length=255) slug = models.SlugField(_('Slug'), max_length=255) description = models.TextField(blank=True) kind = models.CharField(_('...
mit
Python
ba022365174ea6037c76e909f05cb0ed5bd4addb
Set raster plotter in __init__.py
spectralpython/spectral
spectral/__init__.py
spectral/__init__.py
######################################################################### # # spectral/__init__.py - This file is part of the Spectral Python (SPy) # package. # # Copyright (C) 2001-2010 Thomas Boggs # # Spectral Python is free software; you can redistribute it and/ # or modify it under the terms of t...
######################################################################### # # spectral/__init__.py - This file is part of the Spectral Python (SPy) # package. # # Copyright (C) 2001-2010 Thomas Boggs # # Spectral Python is free software; you can redistribute it and/ # or modify it under the terms of t...
mit
Python
98ec51a18c96bc68b9a088a7d23d8aae058ed1f5
Create tmp dir if it does not exist
20tab/django-spoolgore
spoolgore/backend.py
spoolgore/backend.py
from django.conf import settings from django.core.mail.backends.base import BaseEmailBackend import threading import os import time spoolgore_local = threading.local() class EmailBackend(BaseEmailBackend): __tmp__ = "%s/tmp" % settings.SPOOLGORE_DIRECTORY def send_messages(self, email_messages): pid...
from django.conf import settings from django.core.mail.backends.base import BaseEmailBackend import threading import os import time spoolgore_local = threading.local() class EmailBackend(BaseEmailBackend): __tmp__ = "%s/tmp" % settings.SPOOLGORE_DIRECTORY def send_messages(self, email_messages): pid...
mit
Python
551abd09046b613cdd187ffeef4f2448fc60001a
Fix test
delta2323/chainer-deepmark,delta2323/chainer-deepmark
tests/net_tests/test_alex.py
tests/net_tests/test_alex.py
import unittest import numpy import chainer from chainer import cuda from chainer.testing import attr from deepmark_chainer.net import alex class TestAlex(unittest.TestCase): def setUp(self): self.x = numpy.random.uniform(-1, 1, (1, 3, 224, 224)).astype(numpy.float32) self.l = alex.Alex() ...
import unittest import numpy import chainer from chainer import cuda from chainer.testing import attr from deepmark_chainer.net import alex class TestAlex(unittest.TestCase) def setUp(self): self.x = numpy.random.uniform(-1, 1, (1, 3, 224, 224)).astype(numpy.float32) self.l = alex.Alex() ...
mit
Python
8959c0146470e27e494573df0c3ceb370da70305
Implement Domains on Nameserver API
krmaxwell/spyonweb
spyonweb/spyonweb.py
spyonweb/spyonweb.py
import os from argparse import ArgumentParser import requests class spyonweb(object): def __init__(self, token, url=None): self.token = token if url: self.url = url else: self.url = "https://api.spyonweb.com/v1/" def summary(self, domain_name): data =...
import os from argparse import ArgumentParser import requests class spyonweb(object): def __init__(self, token, url=None): self.token = token if url: self.url = url else: self.url = "https://api.spyonweb.com/v1/" def summary(self, domain_name): data =...
apache-2.0
Python
94c3a5df4e5634cf256e52a2fcbc1ffc38bf6770
Add GlassDataSetTest
lucasdavid/Manifold-Learning,lucasdavid/Manifold-Learning
tests/real/1_dataset_in_r.py
tests/real/1_dataset_in_r.py
import os from unittest import TestCase from manifold.infrastructure import Retriever, Displayer class GlassDataSetTest(TestCase): def test_display_dimensions(self): data_sets_dir = '../datasets' data_set = 'glass/glass.data' file = os.path.join(data_sets_dir, data_set) print('D...
import os from manifold.infrastructure import Retriever, Displayer DATA_SETS_DIR = '../datasets' DATA_SET = 'glass/glass.data' def main(): data_set_file = os.path.join(DATA_SETS_DIR, DATA_SET) print('Displaying data set {%s} in the Rn' % data_set_file) glass = Retriever(data_set_file, delimiter=',') ...
mit
Python
329e74f280537aab41d5b810f8650bfd8d6d81f5
Add teardown specific to the former TestCase class
michaeljoseph/cookiecutter,christabor/cookiecutter,cguardia/cookiecutter,janusnic/cookiecutter,michaeljoseph/cookiecutter,cguardia/cookiecutter,vincentbernat/cookiecutter,drgarcia1986/cookiecutter,Vauxoo/cookiecutter,cichm/cookiecutter,benthomasson/cookiecutter,0k/cookiecutter,terryjbates/cookiecutter,atlassian/cookiec...
tests/test_generate_files.py
tests/test_generate_files.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_generate_files ------------------- Test formerly known from a unittest residing in test_generate.py named TestGenerateFiles.test_generate_files_nontemplated_exception """ from __future__ import unicode_literals import os import pytest from cookiecutter import g...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_generate_files ------------------- Test formerly known from a unittest residing in test_generate.py named TestGenerateFiles.test_generate_files_nontemplated_exception """ import pytest from cookiecutter import generate from cookiecutter import exceptions @pyte...
bsd-3-clause
Python
cfe013915332b7d1d6d5fa208f2dc476dcc3afba
Backup to new hard drive
cmu-delphi/operations,cmu-delphi/operations,cmu-delphi/operations
src/backup.py
src/backup.py
"""Makes backups of Delphi files and databases.""" # standard library import datetime import os import subprocess import time # first party import delphi.operations.secrets as secrets #General setup dest = '/home/automation/backups' tag = datetime.datetime.today().strftime('%Y%m%d_%H%M%S') print('Destination: %s | ...
"""Makes backups of Delphi files and databases.""" # standard library import datetime import os import subprocess import time # first party import delphi.operations.secrets as secrets #General setup dest = '/home/automation/backups' tag = datetime.datetime.today().strftime('%Y%m%d_%H%M%S') print('Destination: %s | ...
mit
Python
2c0947fcba8e260e01420182fe0da307af5a8426
Rename sys modules access to web module
thatsIch/sublime-rainmeter
tests/test_online_checker.py
tests/test_online_checker.py
"""This module is for testing the online checker.""" import sys from unittest import TestCase ONLINE_CHECKER = sys.modules["Rainmeter.web.online_checker"] class TestRmDocOnlineChecker(TestCase): """Test of the online checks for Rainmeter Documentation using unittest.""" def test_is_rm_doc_online(self): ...
"""This module is for testing the online checker.""" import sys from unittest import TestCase ONLINE_CHECKER = sys.modules["Rainmeter.http.online_checker"] class TestRmDocOnlineChecker(TestCase): """Test of the online checks for Rainmeter Documentation using unittest.""" def test_is_rm_doc_online(self): ...
mit
Python
a4ade93206171559fa2558a70635d336d0c4b9c8
Fix docker build invocation.
markrcote/pulseguardian,mozilla/pulseguardian,markrcote/pulseguardian,mozilla/pulseguardian,markrcote/pulseguardian,mozilla/pulseguardian,mozilla/pulseguardian,markrcote/pulseguardian
test/docker_setup.py
test/docker_setup.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from subprocess import call, Popen, PIPE def create_image(): create_image_command = 'docker build -t=pulse:testing...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from subprocess import call, Popen, PIPE def create_image(): create_image_command = 'docker build -t="pulse:testin...
mpl-2.0
Python
dbf43ddd75a9c634eb00c8cf548d32b782baa9af
correct 404 handling
nbio/nbio-django
views.py
views.py
__license__ = "Apache 2.0" __copyright__ = "Copyright 2008 nb.io" __author__ = "Randy Reddig - ydnar@nb.io" from django.template import RequestContext from django.shortcuts import render_to_response from django.http import HttpResponse, Http404 from django.template import loader import os.path import re DEFAULT_CON...
__license__ = "Apache 2.0" __copyright__ = "Copyright 2008 nb.io" __author__ = "Randy Reddig - ydnar@nb.io" from django.template import RequestContext from django.shortcuts import render_to_response from django.http import HttpResponse, Http404 from django.template import loader import os.path import re DEFAULT_CON...
apache-2.0
Python
ca9f4391c0bb0d0484ffce822f11a938a2e5f1d8
Add to records queue as they come in from the vehicle.
openxc/web-logging-example,openxc/web-logging-example
views.py
views.py
import json from collections import deque from flask import request, render_template from flask import current_app as app, abort from util import make_status_response, generate_filename, jsonify RECORDS_QUEUE = deque(maxlen=100) def _prime_records_queue(q): with open(generate_filename(app.config), 'r') as trac...
import json from collections import deque from flask import request, render_template from flask import current_app as app, abort from util import make_status_response, generate_filename, jsonify RECORDS_QUEUE = deque(maxlen=100) def _prime_records_queue(q): with open(generate_filename(app.config), 'r') as trac...
bsd-3-clause
Python
1c6480a9b46acb3966af7fe5fb4146aa99335756
Fix the test script path in the awesome JSON script
quicktype/quicktype,quicktype/quicktype,quicktype/quicktype,quicktype/quicktype,quicktype/quicktype
test/test-awesome.py
test/test-awesome.py
#!/usr/bin/env python3 from urllib.request import urlopen from urllib.error import URLError import hashlib import os import json import subprocess test_dir = os.path.dirname(os.path.realpath(__file__)) list_file = os.path.join(test_dir, "awesome-json-datasets") outdir = os.path.join(test_dir, "awesome-json-results") ...
#!/usr/bin/env python3 from urllib.request import urlopen from urllib.error import URLError import hashlib import os import json import subprocess test_dir = os.path.dirname(os.path.realpath(__file__)) list_file = os.path.join(test_dir, "awesome-json-datasets") outdir = os.path.join(test_dir, "awesome-json-results") ...
apache-2.0
Python
59dd2d1b8db23fd00058f343317f6eaa5e18618b
Fix UnknownLocaleError on pt-BR
indictranstech/Das_frappe,vjFaLk/frappe,RicardoJohann/frappe,praba230890/frappe,sbkolate/sap_frappe_v6,bohlian/frappe,hatwar/buyback-frappe,indictranstech/fbd_frappe,chdecultot/frappe,sbktechnology/sap_frappe,paurosello/frappe,indictranstech/omnitech-frappe,tundebabzy/frappe,yashodhank/frappe,gangadharkadam/saloon_frap...
frappe/geo/country_info.py
frappe/geo/country_info.py
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # all country info from __future__ import unicode_literals import os, json, frappe from frappe.utils.momentjs import get_all_timezones def get_country_info(country=None): data = get_all() data = frappe._dict(data.ge...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # all country info from __future__ import unicode_literals import os, json, frappe from frappe.utils.momentjs import get_all_timezones def get_country_info(country=None): data = get_all() data = frappe._dict(data.ge...
mit
Python
ebcb55fe8ad4028bd6699fdc5db60f9dc7d7c6e4
Add color to Slack notifications
rshk/freight,rshk/freight,klynton/freight,klynton/freight,klynton/freight,getsentry/freight,rshk/freight,klynton/freight,getsentry/freight,getsentry/freight,getsentry/freight,getsentry/freight,rshk/freight
freight/notifiers/slack.py
freight/notifiers/slack.py
from __future__ import absolute_import __all__ = ['SlackNotifier'] import json from freight import http from freight.models import App, TaskStatus from .base import Notifier, NotifierEvent STATUS_TO_COLOR = { 'finished': '#2ab27b', 'failed': '#f43f20', } class SlackNotifier(Notifier): def get_option...
from __future__ import absolute_import __all__ = ['SlackNotifier'] import json from freight import http from freight.models import App, TaskStatus from .base import Notifier, NotifierEvent class SlackNotifier(Notifier): def get_options(self): return { 'webhook_url': {'required': True}, ...
apache-2.0
Python
52243269fc080af7094debc63121357035af9c82
Make test/test_logging work on python 2.6
multikatt/beets,moodboom/beets,parapente/beets,dfc/beets,madmouser1/beets,mosesfistos1/beetbox,YetAnotherNerd/beets,jcoady9/beets,ibmibmibm/beets,sampsyo/beets,imsparsh/beets,kelvinhammond/beets,mathstuf/beets,shamangeorge/beets,moodboom/beets,sampsyo/beets,Freso/beets,PierreRust/beets,dfc/beets,MyTunesFreeMusic/privac...
test/test_logging.py
test/test_logging.py
"""Stupid tests that ensure logging works as expected""" import logging as log from StringIO import StringIO import beets.logging as blog from _common import unittest, TestCase class LoggingTest(TestCase): def test_logging_management(self): l1 = log.getLogger("foo123") l2 = blog.getLogger("foo123...
"""Stupid tests that ensure logging works as expected""" import logging as log from StringIO import StringIO import beets.logging as blog from _common import unittest, TestCase class LoggingTest(TestCase): def test_logging_management(self): l1 = log.getLogger("foo123") l2 = blog.getLogger("foo123...
mit
Python
c640143c726f63c09a721247bdca1ae5c9ed847a
fix byte+str error on python3.x
hhatto/poyonga
test/test_poyonga.py
test/test_poyonga.py
import struct import unittest from mock import patch, Mock from poyonga import Groonga, GroongaResult class PoyongaHTTPTestCase(unittest.TestCase): def setUp(self): self.g = Groonga() @patch('poyonga.client.urlopen') def test_json_result_with_http(self, mock_urlopen): m = Mock() ...
import struct import unittest from mock import patch, Mock from poyonga import Groonga, GroongaResult class PoyongaHTTPTestCase(unittest.TestCase): def setUp(self): self.g = Groonga() @patch('poyonga.client.urlopen') def test_json_result_with_http(self, mock_urlopen): m = Mock() ...
mit
Python
3dc59aa4c999f477c45edb2dcb6c5b9302fd8ac7
Remove useless compatible code
what-studio/profiling,what-studio/profiling
test/test_tracing.py
test/test_tracing.py
# -*- coding: utf-8 -*- import sys import pytest import six from _utils import factorial, find_stats, foo from profiling.stats import RecordingStatistics from profiling.tracing import TracingProfiler def test_setprofile(): profiler = TracingProfiler() assert sys.getprofile() is None with profiler: ...
# -*- coding: utf-8 -*- import sys import pytest import six from _utils import factorial, find_stats, foo from profiling.stats import RecordingStatistics from profiling.tracing import TracingProfiler if six.PY3: map = lambda *x: list(six.moves.map(*x)) def test_setprofile(): profiler = TracingProfiler() ...
bsd-3-clause
Python
aa4d4cdfb646a53c59790d29066fddca6fec688b
Fix and extend tests
zamiam69/otc
tests/00_test_otc.py
tests/00_test_otc.py
import otc def test_shade_works(): """Test shade works""" cloud = otc.OtcCloud(cloud='test') def test_otc(): """Basic Test""" cloud = otc.OtcCloud(cloud='test') images = cloud.list_images() assert len(images) >= 0 def test_otcclient(): """Test otcclient""" cloud = otc.OtcCloud(cloud='...
import otc def test_shade_works(): """Test shade works""" cloud = otc.OTCCloud() def test_otc(): """Basic Test""" cloud = otc.OTCCloud() images = cloud.list_images() assert len(images) >= 0 # vim: sts=4 sw=4 ts=4 et:
apache-2.0
Python
2046a04c9f6dbba4d1f327b1202a36624dc2e8f5
Update main.py
samshadwell/TrumpScript,samshadwell/TrumpScript
src/trumpscript/main.py
src/trumpscript/main.py
import argparse import os import sys from trumpscript.compiler import * from trumpscript.utils import * __author__ = 'github.com/samshadwell' def main(): parser = argparse.ArgumentParser(prog='TRUMP', description='Making programming great again') parser.add_argument('--Wall', action='store_true', help='If se...
import argparse import os import sys from trumpscript.compiler import * from trumpscript.utils import * __author__ = 'github.com/samshadwell' def main(): parser = argparse.ArgumentParser(prog='TRUMP', description='Making programming great again') parser.add_argument('--Wall', action='store_true', help='If se...
mit
Python
c8b2327cae9a04a97cfd051fe37a47c94459a5b3
fix test docstring
infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore
tests/font/BULLET.py
tests/font/BULLET.py
#!/usr/bin/env python '''Test that rendering of bullet glyphs works. You should see 5 bullet glyphs rendered in the bottom-left of the window. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest from pyglet import font import base_text class TEST_HALIGN(base_text.TextTestBase): font...
#!/usr/bin/env python '''Test that font.Text horizontal alignment works. Three labels will be rendered aligned left, center and right. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest from pyglet import font import base_text class TEST_HALIGN(base_text.TextTestBase): font_name = ...
bsd-3-clause
Python
c309be03dba1c257275cceae9bf383105629fbf6
add comment
ckaus/EpiPy
src/utils/csvmanager.py
src/utils/csvmanager.py
# -*- coding: utf-8 -*- import os.path import csv import logger current_dir = os.path.abspath(os.path.dirname(__file__)) resources_dir = os.path.abspath(current_dir + "/../../resources/data") class Template: """Valid CSV templates""" from collections import OrderedDict # python sort dictionary keys, thats why I...
# -*- coding: utf-8 -*- import os.path import csv import logger current_dir = os.path.abspath(os.path.dirname(__file__)) resources_dir = os.path.abspath(current_dir + "/../../resources/data") class Template: """Valid CSV templates""" from collections import OrderedDict # python sort dictionary keys, thats why I...
mit
Python
465587e9a1c2dba14ea4f060a4f5b5d1be03ee54
connect to mysql database
varnish/zipnish,varnish/zipnish,varnish/zipnish,varnish/varnish-microservice-monitor,varnish/zipnish,varnish/varnish-microservice-monitor,varnish/varnish-microservice-monitor,varnish/varnish-microservice-monitor,varnish/zipnish,varnish/varnish-microservice-monitor
zipkin/zipkin-generate-false-data.py
zipkin/zipkin-generate-false-data.py
import time import random import MySQLdb def ts_microseconds(): return int( time.time() * 1000000 ) def generate_id(): return random.getrandbits(64) # reference to database connector def get_db_connection(): return MySQLdb.connect('localhost', 'zipkin', 'kinect', 'zipkin') db = get_db_connection() pri...
import time import random def ts_microseconds(): return int( time.time() * 1000000 ) def generate_id(): return random.getrandbits(64) print 'timestamp: ' + str(ts_microseconds()) print 'random id: ' + str(generate_id())
bsd-2-clause
Python