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
42a6b8a5c547cf678900bd1f9d4852361edfe75b
Update tests
billvsme/videoSpider
tests/test_start.py
tests/test_start.py
import pytest import webs class TestVideoSpider(): def test_entry_points(self): webs.douban.parsers.movie webs.douban.parsers.celebrity webs.douban.parsers.douban_api webs.douban.parsers.movie_photo webs.douban.tasks.get_main_movies_base_data webs.douban.tasks.get_m...
def test_start(): pass
mit
Python
c894bf9754a44cb4a0de26bdc95da65db0d08401
test for create_task
kacchan822/django-chatwork
tests/test_utils.py
tests/test_utils.py
from django.test import TestCase from chatwork.utils import send_chatwork, create_task class SendChatworkTests(TestCase): def test_send_chatwork(self): response = send_chatwork('test', 1234) self.assertEqual(response, {'message_id': '1234'}) class CreateTaskTests(TestCase): def test_create_...
from django.test import TestCase from chatwork.utils import send_chatwork class SendChatworkTests(TestCase): def test_send_chatwork(self): response = send_chatwork('test', 1234) self.assertEqual(response, {'message_id': '1234'})
mit
Python
207d4c71fbc40dd30c0099769d6f12fcb63f826e
Add missing username conf for mercurial.
thedrow/pytest-benchmark,SectorLabs/pytest-benchmark,ionelmc/pytest-benchmark,aldanor/pytest-benchmark
tests/test_utils.py
tests/test_utils.py
import subprocess from pytest import mark from pytest_benchmark.utils import clonefunc, get_commit_info pytest_plugins = 'pytester', f1 = lambda a: a def f2(a): return a @mark.parametrize('f', [f1, f2]) def test_clonefunc(f): assert clonefunc(f)(1) == f(1) assert clonefunc(f)(1) == f(1) def test_clo...
import subprocess from pytest import mark from pytest_benchmark.utils import clonefunc, get_commit_info f1 = lambda a: a def f2(a): return a @mark.parametrize('f', [f1, f2]) def test_clonefunc(f): assert clonefunc(f)(1) == f(1) assert clonefunc(f)(1) == f(1) def test_clonefunc_not_function(): ass...
bsd-2-clause
Python
51d0daa1535b4a1730d2122d8178fb1047a6ab9e
Update import test.
infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore
tests/top/IMPORT.py
tests/top/IMPORT.py
#!/usr/bin/env python '''Test that all public modules are accessible after importing just 'pyglet'. This _must_ be the first test run. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: TICK.py 310 2006-12-23 15:56:35Z Alex.Holkner $' import unittest import pyglet __noninteractive = True modules = [ ...
#!/usr/bin/env python '''Test that all public modules are accessible after importing just 'pyglet'. This _must_ be the first test run. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: TICK.py 310 2006-12-23 15:56:35Z Alex.Holkner $' import unittest import pyglet __noninteractive = True modules = [ ...
bsd-3-clause
Python
d18d8f2deb43a55b5898899dcfb2fd6d7fee45fe
Update label in test to match internal changes
aaronc-bixly/notifications,coldmind/pinax-notifications,affiliprint/pinax-notifications,synasius/pinax-notifications,pinax/pinax-notifications,affiliprint/pinax-notifications,aaronc-bixly/notifications,coldmind/pinax-notifications,pinax/pinax-notifications,sherzberg/django-notification,synasius/pinax-notifications,sher...
pinax/notifications/tests/test_views.py
pinax/notifications/tests/test_views.py
from django.core.urlresolvers import reverse from django.test import TestCase, RequestFactory from ..compat import get_user_model from ..models import NoticeType, NoticeSetting from ..views import NoticeSettingsView from . import get_backend_id class TestViews(TestCase): def setUp(self): self.factory = ...
from django.core.urlresolvers import reverse from django.test import TestCase, RequestFactory from ..compat import get_user_model from ..models import NoticeType, NoticeSetting from ..views import NoticeSettingsView from . import get_backend_id class TestViews(TestCase): def setUp(self): self.factory = ...
mit
Python
5f7d845fe65b9febc45d754a346dd749ab4e13bf
set AUTOSYNTH_MULTIPLE_COMMITS=true for context aware commits (#402)
googleapis/google-cloud-node,googleapis/google-cloud-node,googleapis/google-cloud-node,googleapis/google-cloud-node
packages/google-cloud-language/synth.py
packages/google-cloud-language/synth.py
import synthtool as s import synthtool.gcp as gcp import logging import subprocess logging.basicConfig(level=logging.DEBUG) AUTOSYNTH_MULTIPLE_COMMITS = True gapic = gcp.GAPICMicrogenerator() # tasks has two product names, and a poorly named artman yaml for version in ['v1', 'v1beta2']: library = gapic.typescri...
import synthtool as s import synthtool.gcp as gcp import logging import subprocess logging.basicConfig(level=logging.DEBUG) gapic = gcp.GAPICMicrogenerator() # tasks has two product names, and a poorly named artman yaml for version in ['v1', 'v1beta2']: library = gapic.typescript_library( 'language', ...
apache-2.0
Python
1068eb81a1e3bb6031cce536450694d159d55034
bump version number to 0.0.4
Christophe31/django-tickets,Christophe31/django-tickets,byteweaver/django-tickets,byteweaver/django-tickets
tickets/__init__.py
tickets/__init__.py
__version__ = '0.0.4'
__version__ = '0.0.3'
bsd-3-clause
Python
4e2b1c78102079c2138cd951289b5bb9f66205fc
Update __openerp__.py
elmonitor/workshop-td
product_price_margin_div/__openerp__.py
product_price_margin_div/__openerp__.py
{ "name": "Product price based on margin", "description": "Product price based on margin with formula (sale_price=cost_price/margin)" "version": "8.0.0.1", "author": "3nodus", 'category': 'Product', "website": "http://www.3nodus.com/", "license": "AGPL-3", "depends": [ "product",...
{ "name": "Product price based on margin with formula sale_price=cost_price/margin", "version": "8.0.0.1", "author": "3nodus", 'category': 'Product', "website": "http://www.3nodus.com/", "license": "AGPL-3", "depends": [ "product", ], "demo": [ ], "data": [ ...
agpl-3.0
Python
151cfae24b650b74a9a216be61c3e440369274d9
Fix 'website´ manifest key
kmee/department,OCA/department,acsone/department
project_issue_department/__openerp__.py
project_issue_department/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2012 Daniel Reis # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2012 Daniel Reis # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software...
agpl-3.0
Python
c2ea66556d52513c087f31401aacee907b2a6742
unify kernels
okuta/chainer,keisuke-umezawa/chainer,aonotas/chainer,okuta/chainer,tkerola/chainer,hvy/chainer,wkentaro/chainer,niboshi/chainer,chainer/chainer,ktnyt/chainer,okuta/chainer,jnishi/chainer,niboshi/chainer,chainer/chainer,niboshi/chainer,rezoo/chainer,ronekko/chainer,niboshi/chainer,chainer/chainer,wkentaro/chainer,jnish...
chainer/functions/math/maximum.py
chainer/functions/math/maximum.py
import numpy import chainer from chainer import cuda from chainer import function_node from chainer import utils from chainer.utils import type_check class Maximum(function_node.FunctionNode): """Element-wise maximum of input variables.""" def check_type_forward(self, in_types): type_check.expect( ...
import numpy import chainer from chainer import cuda from chainer import function_node from chainer import utils from chainer.utils import type_check class Maximum(function_node.FunctionNode): """Element-wise maximum of input variables.""" def check_type_forward(self, in_types): type_check.expect( ...
mit
Python
9b974a6395bc2ee35271d5f250684d54eab87c63
fix startDate
CERT-BDF/TheHive4py
TheHive4py/models.py
TheHive4py/models.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import time class CustomJsonEncoder(json.JSONEncoder): def default(self, o): if isinstance(o, JSONSerializable): return o.__dict__ else: return json.JSONEncoder.encode(self, o) class JSONSerializable(object): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import time class CustomJsonEncoder(json.JSONEncoder): def default(self, o): if isinstance(o, JSONSerializable): return o.__dict__ else: return json.JSONEncoder.encode(self, o) class JSONSerializable(object): ...
agpl-3.0
Python
a172a1d4c0458fa0c1e145b7d44971d631ac30c8
Bump version.
datajoint/datajoint-python,dimitri-yatsenko/datajoint-python
datajoint/version.py
datajoint/version.py
__version__ = "0.13.dev6" assert len(__version__) <= 10 # The log table limits version to the 10 characters
__version__ = "0.13.dev5" assert len(__version__) <= 10 # The log table limits version to the 10 characters
lgpl-2.1
Python
0549ad0bd541f4b32e522e62a007358f580faedd
Fix blueprints helper
DataViva/dataviva-api
app/helpers/blueprints_helper.py
app/helpers/blueprints_helper.py
from os import getcwd, path from importlib import import_module from pkgutil import walk_packages def register_blueprints(flask, package): package_dir = path.join(getcwd(), flask.name, package) blueprints = [import_module(f"{flask.name}.{package}.{module.name}").blueprint for module in walk...
from os import getcwd, path from importlib import import_module from pkgutil import walk_packages def register_blueprints(flask, package): package_dir = path.join(getcwd(), flask.name, package) blueprints = [import_module(f"{__name__}.{module.name}").blueprint for module in walk_packages(pa...
mit
Python
e3dcb3497b921786db581571ef129cba80536c2e
Bump to 3.1.0
ZuluPro/django-dbbackup,mjs7231/django-dbbackup,django-dbbackup/django-dbbackup,mjs7231/django-dbbackup,django-dbbackup/django-dbbackup,ZuluPro/django-dbbackup
dbbackup/__init__.py
dbbackup/__init__.py
"Management commands to help backup and restore a project database and media" VERSION = (3, 1, 0) __version__ = '.'.join([str(i) for i in VERSION]) __author__ = 'Michael Shepanski' __email__ = 'mjs7231@gmail.com' __url__ = 'https://github.com/django-dbbackup/django-dbbackup' default_app_config = 'dbbackup.apps.Dbbackup...
"Management commands to help backup and restore a project database and media" VERSION = (3, 0, 4) __version__ = '.'.join([str(i) for i in VERSION]) __author__ = 'Michael Shepanski' __email__ = 'mjs7231@gmail.com' __url__ = 'https://github.com/django-dbbackup/django-dbbackup' default_app_config = 'dbbackup.apps.Dbbackup...
bsd-3-clause
Python
f86b502746d303900061ba33b58135f5730988e6
Update doc for Snake activation to match literature and return statement (#2572)
tensorflow/addons,tensorflow/addons,tensorflow/addons
tensorflow_addons/activations/snake.py
tensorflow_addons/activations/snake.py
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
Python
5b6935487f0740b56cdeb6d85d5d95d4702e10a6
Update filtering.py
krzjoa/sciquence,krzjoa/sciquence
sciquence/sequences/filtering.py
sciquence/sequences/filtering.py
def parallel_filter(condition, *lists): ''' Parallelly filter multiple lists. Parameters ---------- condition: callable A function, which has as many arguments as the number of lists lists: list of list Returns ------- filtered_lists: Filtered accordingly s...
def parallel_filter(condition, *lists): ''' Parallelly filter multiple lists. Parameters ---------- condition: callable A function, which has as many arguments as the number of lists lists: list of list Returns ------- filtered_lists: Filtered accordingly s...
mit
Python
ebe21ae853f8fafa6fbbe07dfbf5dc98c3b887ee
Add Persian Wikivoyage
magul/pywikibot-core,darthbhyrava/pywikibot-local,hasteur/g13bot_tools_new,happy5214/pywikibot-core,npdoty/pywikibot,xZise/pywikibot-core,Darkdadaah/pywikibot-core,hasteur/g13bot_tools_new,happy5214/pywikibot-core,valhallasw/pywikibot-core,smalyshev/pywikibot-core,h4ck3rm1k3/pywikibot-core,jayvdb/pywikibot-core,hasteur...
pywikibot/families/wikivoyage_family.py
pywikibot/families/wikivoyage_family.py
# -*- coding: utf-8 -*- """Family module for Wikivoyage.""" __version__ = '$Id$' # The new wikivoyage family that is hosted at wikimedia from pywikibot import family class Family(family.WikimediaFamily): """Family class for Wikivoyage.""" def __init__(self): """Constructor.""" super(Famil...
# -*- coding: utf-8 -*- """Family module for Wikivoyage.""" __version__ = '$Id$' # The new wikivoyage family that is hosted at wikimedia from pywikibot import family class Family(family.WikimediaFamily): """Family class for Wikivoyage.""" def __init__(self): """Constructor.""" super(Famil...
mit
Python
967cf8774a5033f310ca69e7ad86fc79b2628882
Tag provisioning instances to make them easier to identify
bill-mccloskey/searchfox,bill-mccloskey/searchfox,bill-mccloskey/searchfox,bill-mccloskey/searchfox,bill-mccloskey/searchfox,bill-mccloskey/searchfox
infrastructure/aws/trigger-provision.py
infrastructure/aws/trigger-provision.py
# trigger-provision.py <indexer-provision.sh | web-server-provision.sh> import boto3 from datetime import datetime, timedelta import sys import os.path provisioners = sys.argv[1:] ec2 = boto3.resource('ec2') client = boto3.client('ec2') script = '' for provisioner in provisioners: script += open(provisioner).re...
# trigger-provision.py <indexer-provision.sh | web-server-provision.sh> import boto3 from datetime import datetime, timedelta import sys import os.path provisioners = sys.argv[1:] ec2 = boto3.resource('ec2') client = boto3.client('ec2') script = '' for provisioner in provisioners: script += open(provisioner).re...
mpl-2.0
Python
1fd6d7243cbbba95a747327d9c21ec0972b97e16
Update tests
josuemontano/API-platform,josuemontano/pyramid-angularjs-starter,josuemontano/pyramid-angularjs-starter,josuemontano/API-platform,josuemontano/pyramid-angularjs-starter,josuemontano/api-starter,josuemontano/API-platform,josuemontano/api-starter,josuemontano/API-platform,josuemontano/api-starter
demonstrare/tests.py
demonstrare/tests.py
import unittest from pyramid import testing class ViewTests(unittest.TestCase): def setUp(self): self.config = testing.setUp() def tearDown(self): testing.tearDown() def test_my_view(self): from .views import index request = testing.DummyRequest() info = index(re...
import unittest from pyramid import testing class ViewTests(unittest.TestCase): def setUp(self): self.config = testing.setUp() def tearDown(self): testing.tearDown() def test_my_view(self): from .views import my_view request = testing.DummyRequest() info = my_vie...
mit
Python
15d4f03471c7b34feab05ec725ccb536923aae6b
add methods to call ruby library
SmartDeveloperHub/gitlab-api-generator,SmartDeveloperHub/gitlab-api-generator,SmartDeveloperHub/gitlab-api-generator,SmartDeveloperHub/gitlab-api-generator
utils/repository.py
utils/repository.py
""" #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# This file is part of the Smart Developer Hub Project: http://www.smartdeveloperhub.org Center for Open Middleware http://www.centeropenmiddleware.com/ #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-...
""" #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# This file is part of the Smart Developer Hub Project: http://www.smartdeveloperhub.org Center for Open Middleware http://www.centeropenmiddleware.com/ #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-...
apache-2.0
Python
eceacfc149948c6d5c618e8ec609c05de66d939d
Update largest-number.py
kamyu104/LeetCode,yiwen-luo/LeetCode,yiwen-luo/LeetCode,jaredkoontz/leetcode,jaredkoontz/leetcode,githubutilities/LeetCode,jaredkoontz/leetcode,githubutilities/LeetCode,githubutilities/LeetCode,yiwen-luo/LeetCode,yiwen-luo/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,githubutilities/LeetCode,kamyu104/LeetCode,jared...
Python/largest-number.py
Python/largest-number.py
# Time: O(nlogn) # Space: O(1) # # Given a list of non negative integers, arrange them such that they form the largest number. # # For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330. # # Note: The result may be very large, so you need to return a string instead of an integer. # class Solutio...
# Time: O(n^2) # Space: O(n) # # Given a list of non negative integers, arrange them such that they form the largest number. # # For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330. # # Note: The result may be very large, so you need to return a string instead of an integer. # class Solution:...
mit
Python
2f31af1ea22e0bfefe2042f8d2ba5ad6ce365116
Clear S3 API key from code
jcnelson/syndicate,iychoi/syndicate,iychoi/syndicate,jcnelson/syndicate,iychoi/syndicate,jcnelson/syndicate,jcnelson/syndicate,iychoi/syndicate,iychoi/syndicate,jcnelson/syndicate,iychoi/syndicate,jcnelson/syndicate,jcnelson/syndicate,iychoi/syndicate,jcnelson/syndicate,iychoi/syndicate
RG/drivers/s3/secrets.py
RG/drivers/s3/secrets.py
#!/usr/bin/python SECRETS = { "AWS_ACCESS_KEY_ID": "XXX", "AWS_SECRET_ACCESS_KEY": "XXX" }
#!/usr/bin/python SECRETS = { "AWS_ACCESS_KEY_ID": "AKIAI2TRFQV2HZIHUD4A", "AWS_SECRET_ACCESS_KEY": "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" }
apache-2.0
Python
9f1a546a4a2b044b9b2513c4a653faaab299a76c
Add queryset for create channel API (#3534)
mitodl/micromasters,mitodl/micromasters,mitodl/micromasters,mitodl/micromasters
discussions/views.py
discussions/views.py
"""APIs for discussions""" from django.conf import settings from django.contrib.auth.decorators import login_required from django.http import HttpResponse from django.shortcuts import redirect from rest_framework import status from rest_framework.authentication import SessionAuthentication, TokenAuthentication from res...
"""APIs for discussions""" from django.conf import settings from django.contrib.auth.decorators import login_required from django.http import HttpResponse from django.shortcuts import redirect from rest_framework import status from rest_framework.authentication import SessionAuthentication, TokenAuthentication from res...
bsd-3-clause
Python
6bdc9af31bda7a429a457445c16b0df7cc800239
Allow get_new_id to take sets and lists
igboyes/virtool,igboyes/virtool,virtool/virtool,virtool/virtool
virtool/db/utils.py
virtool/db/utils.py
import virtool.utils def apply_projection(document, projection): """ Apply a Mongo-style projection to a document and return it. :param document: the document to project :type document: dict :param projection: the projection to apply :type projection: Union[dict,list] :return: the proje...
import virtool.utils def apply_projection(document, projection): """ Apply a Mongo-style projection to a document and return it. :param document: the document to project :type document: dict :param projection: the projection to apply :type projection: Union[dict,list] :return: the proje...
mit
Python
1a26df87bdae0b8ccc93047b535f87d9daa2bf84
update incident script
FireCARES/fire-risk,garnertb/fire-risk,FireCARES/fire-risk,garnertb/fire-risk
Scripts/fire_incident.py
Scripts/fire_incident.py
#Weinschenk #12-14 from __future__ import division import numpy as np import pandas as pd from pylab import * from matplotlib import rcParams rcParams.update({'figure.autolayout': True}) import random incident = pd.read_csv('../Data/arlington_incidents.csv', header=0) total_incidents = len(incident['incident_class_co...
#Weinschenk #12-14 from __future__ import division import numpy as np import pandas as pd from pylab import * from matplotlib import rcParams rcParams.update({'figure.autolayout': True}) incident = pd.read_csv('../Data/arlington_incidents.csv', header=0) total_incidents = len(incident['incident_class_code']) total_fi...
mit
Python
7835b9e6d6c35fcfd38b0fdebe6cdf92a38e3c3a
Make necessary directories
PixxxeL/django-ffmpeg
django_ffmpeg/app.py
django_ffmpeg/app.py
import os from django.apps import AppConfig from django.conf import settings from django.utils.translation import ugettext_lazy as _ from django_ffmpeg import defaults as ffmpeg_settings class DjangoFfmpegConfig(AppConfig): name = 'django_ffmpeg' verbose_name = _('Videos') def ready(self): self...
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class DjangoFfmpegConfig(AppConfig): name = 'django_ffmpeg' verbose_name = _('Videos')
mit
Python
1375cece723b9627be1413f2eb25aa53b6a918ec
Update __init__.py
Koed00/django-q
django_q/__init__.py
django_q/__init__.py
from .tasks import async, schedule, result, fetch from .models import Task, Schedule VERSION = (0, 3, q) default_app_config = 'django_q.apps.DjangoQConfig'
from .tasks import async, schedule, result, fetch from .models import Task, Schedule VERSION = (0, 3, 0) default_app_config = 'django_q.apps.DjangoQConfig'
mit
Python
5c1833f8d056015d86ef1ef726a8097269db9d84
bump version -> 0.3.0-dev
jmcarp/webargs,stas/webargs,nealrs/webargs,sloria/webargs,jmcarp/webargs,yufeiminds/webargs,Basis/webargs,hyunchel/webargs
webargs/__init__.py
webargs/__init__.py
# -*- coding: utf-8 -*- __version__ = '0.3.0-dev' __author__ = 'Steven Loria' __license__ = "MIT" from webargs.core import Arg, WebargsError, ValidationError
# -*- coding: utf-8 -*- __version__ = '0.2.0' __author__ = 'Steven Loria' __license__ = "MIT" from webargs.core import Arg, WebargsError, ValidationError
mit
Python
0af39adef5a4c3453b7adb95a793f3d2720a67b2
fix import bug
BeanYoung/beanstalkw
beanstalkw/client.py
beanstalkw/client.py
#!/usr/bin/python # -*- coding: utf-8 -*- import json import thread import beanstalkc import job class Client(object): def __init__(self, host, port): self.connection = beanstalkc.Connection(host, port) self.current_tube = 'default' self.write_lock = thread.allocate_lock() def _pu...
#!/usr/bin/python # -*- coding: utf-8 -*- import json import thread.allocate_lock import beanstalkc import job class Client(object): def __init__(self, host, port): self.connection = beanstalkc.Connection(host, port) self.current_tube = 'default' self.write_lock = thread.allocate_lock(...
mit
Python
195032a3ece262bcec2a8bebc7f443979caa0d58
move function
qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq
corehq/apps/change_feed/topics.py
corehq/apps/change_feed/topics.py
from kafka.common import OffsetRequest from corehq.apps.change_feed.connection import get_kafka_client from .document_types import CASE, FORM, DOMAIN, META, APP # this is redundant but helps avoid import warnings until nothing references these CASE = CASE FORM = FORM DOMAIN = DOMAIN META = META APP = APP # new model...
from kafka.common import OffsetRequest from corehq.apps.change_feed.connection import get_kafka_client from .document_types import CASE, FORM, DOMAIN, META, APP # this is redundant but helps avoid import warnings until nothing references these CASE = CASE FORM = FORM DOMAIN = DOMAIN META = META APP = APP # new model...
bsd-3-clause
Python
1093fe0328fb722d05a5d84afff7494e5df21216
Update clean_mac_info_plist.py
TacoCoin/tacocoin,TacoCoin/tacocoin,TacoCoin/tacocoin,TacoCoin/tacocoin,TacoCoin/tacocoin
share/qt/clean_mac_info_plist.py
share/qt/clean_mac_info_plist.py
#!/usr/bin/env python # Jonas Schnelli, 2013 # make sure the Tacocoin-Qt.app contains the right plist (including the right version) # fix made because of serval bugs in Qt mac deployment (https://bugreports.qt-project.org/browse/QTBUG-21267) from string import Template from datetime import date bitcoinDir = "./"; in...
#!/usr/bin/env python # Jonas Schnelli, 2013 # make sure the Litecoin-Qt.app contains the right plist (including the right version) # fix made because of serval bugs in Qt mac deployment (https://bugreports.qt-project.org/browse/QTBUG-21267) from string import Template from datetime import date bitcoinDir = "./"; in...
mit
Python
9cb694e3ca0f5c0296579f427c59558ac7bfa59b
Update python example
xgfone/snippet,xgfone/snippet,xgfone/snippet,xgfone/snippet,xgfone/snippet,xgfone/snippet,xgfone/snippet
snippet/example/python/gunicorn-conf.py
snippet/example/python/gunicorn-conf.py
# -*- encoding: utf-8 -*- # Notice: This config file is a Python module file. import multiprocessing appname = "{APPNAME}" # [Gunicorn Setting] daemon = True bind = "0.0.0.0:10100" errorlog = "/log/{appname}/{appname}.log".format(appname=appname) pidfile = "/log/{appname}/{appname}.pid".format(appname=appname) proc_...
# -*- encoding: utf-8 -*- # Notice: This config file is a Python module file. import multiprocessing appname = "sgapi" # [Gunicorn Setting] daemon = True bind = "0.0.0.0:10100" errorlog = "/log/sgapi/{}.log".format(appname) pidfile = "/log/sgapi/{}.pid".format(appname) proc_name = appname worker_class = "gevent" wor...
mit
Python
f63a174dd35731b6737e4f653139d92bd2f57aef
Add a location destroyed hook
sangoma/pytestlab
lab/hookspec.py
lab/hookspec.py
import pytest @pytest.hookspec def pytest_lab_configure(envmanager): """pytestlab startup""" @pytest.hookspec(historic=True) def pytest_lab_addroles(config, rolemanager): """new role registered""" # TODO: Hook for publishing new role **should not** be historic - this # no longer makes sense. Roles can now...
import pytest @pytest.hookspec def pytest_lab_configure(envmanager): """pytestlab startup""" @pytest.hookspec(historic=True) def pytest_lab_addroles(config, rolemanager): """new role registered""" # TODO: Hook for publishing new role **should not** be historic - this # no longer makes sense. Roles can now...
mpl-2.0
Python
fbe7b34c575e30114c54587952c9aa919bc28d81
Add import of django-annoying patch
theatlantic/django-south,theatlantic/django-south
south/introspection_plugins/__init__.py
south/introspection_plugins/__init__.py
# This module contains built-in introspector plugins for various common # Django apps. # These imports trigger the lower-down files import south.introspection_plugins.geodjango import south.introspection_plugins.django_tagging import south.introspection_plugins.django_taggit import south.introspection_plugins.django_o...
# This module contains built-in introspector plugins for various common # Django apps. # These imports trigger the lower-down files import south.introspection_plugins.geodjango import south.introspection_plugins.django_tagging import south.introspection_plugins.django_taggit import south.introspection_plugins.django_o...
apache-2.0
Python
b94286de30fdd154cfcd1c88889819c047693f7a
Fix regression test
explosion/spaCy,spacy-io/spaCy,honnibal/spaCy,recognai/spaCy,oroszgy/spaCy.hu,raphael0202/spaCy,recognai/spaCy,aikramer2/spaCy,Gregory-Howard/spaCy,honnibal/spaCy,raphael0202/spaCy,oroszgy/spaCy.hu,oroszgy/spaCy.hu,spacy-io/spaCy,explosion/spaCy,recognai/spaCy,Gregory-Howard/spaCy,spacy-io/spaCy,spacy-io/spaCy,aikramer...
spacy/tests/regression/test_issue595.py
spacy/tests/regression/test_issue595.py
# coding: utf-8 from __future__ import unicode_literals from ...symbols import POS, VERB, VerbForm_inf from ...vocab import Vocab from ...lemmatizer import Lemmatizer from ..util import get_doc import pytest def test_issue595(): """Test lemmatization of base forms""" words = ["Do", "n't", "feed", "the", "do...
# coding: utf-8 from __future__ import unicode_literals from ...symbols import POS, VERB, VerbForm_inf from ...vocab import Vocab from ...lemmatizer import Lemmatizer from ..util import get_doc import pytest def test_issue595(): """Test lemmatization of base forms""" words = ["Do", "n't", "feed", "the", "do...
mit
Python
79a78eed1198b83a785682f0adcbf1a6b9bf09ae
Fix Dinner donor subscription names.
astrobin/astrobin,astrobin/astrobin,astrobin/astrobin,astrobin/astrobin
astrobin_apps_donations/utils.py
astrobin_apps_donations/utils.py
from subscription.models import UserSubscription SUBSCRIPTION_NAMES = ( 'AstroBin Donor Coffee Monthly', 'AstroBin Donor Snack Monthly', 'AstroBin Donor Pizza Monthly', 'AstroBin Donor Movie Monthly', 'AstroBin Donor Dinner Monthly', 'AstroBin Donor Coffee Yearly', 'AstroBin Donor Snack Ye...
from subscription.models import UserSubscription SUBSCRIPTION_NAMES = ( 'AstroBin Donor Coffee Monthly', 'AstroBin Donor Snack Monthly', 'AstroBin Donor Pizza Monthly', 'AstroBin Donor Movie Monthly', 'AstorBin Donor Dinner Monthly', 'AstroBin Donor Coffee Yearly', 'AstroBin Donor Snack Ye...
agpl-3.0
Python
1947d222830803093a37f7ca90ff889908692fcb
add explicit check against Python 3.0/3.1.
jwilk/anorack,jwilk/anorack
lib/__init__.py
lib/__init__.py
''' anorack's private modules ''' import sys type(...) # Python >= 3 is required if sys.version_info < (3, 2): raise RuntimeError('Python >= 3.2 is required') __all__ = [] # vim:ts=4 sts=4 sw=4 et
''' anorack's private modules ''' type(...) # Python >= 3 is required
mit
Python
23ac4ade910b664f3fbb9fd634da6a8a32b620c7
Add specific failing string detail to datetime format test (#148)
cdubz/babybuddy,cdubz/babybuddy,cdubz/babybuddy
babybuddy/tests/tests_formats.py
babybuddy/tests/tests_formats.py
# -*- coding: utf-8 -*- import datetime from django.core.exceptions import ValidationError from django.forms.fields import DateTimeField from django.test import TestCase class FormatsTestCase(TestCase): def test_datetime_input_formats(self): field = DateTimeField() supported_custom_examples = [ ...
# -*- coding: utf-8 -*- import datetime from django.core.exceptions import ValidationError from django.forms.fields import DateTimeField from django.test import TestCase class FormatsTestCase(TestCase): def test_datetime_input_formats(self): field = DateTimeField() supported_custom_examples = [ ...
bsd-2-clause
Python
b8526da20e215e883da78a42d8034b2d9a4d2f82
update simple_client.py
cit/libtorrent-peer-idol,cit/libtorrent-peer-idol,cit/libtorrent-peer-idol,kuro/libtorrent,kuro/libtorrent,kuro/libtorrent,cscheid/libtorrent,cit/libtorrent-peer-idol,kuro/libtorrent,cscheid/libtorrent,cscheid/libtorrent,cscheid/libtorrent,cit/libtorrent-peer-idol,cscheid/libtorrent,cit/libtorrent-peer-idol,cscheid/lib...
bindings/python/simple_client.py
bindings/python/simple_client.py
#!/bin/python # Copyright Arvid Norberg 2008. Use, modification and distribution is # subject to the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) import libtorrent as lt import time ses = lt.session() ses.listen_on(6881, 6891) e = lt....
#!/bin/python # Copyright Arvid Norberg 2008. Use, modification and distribution is # subject to the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) import libtorrent as lt import time ses = lt.session() ses.listen_on(6881, 6891) e = lt....
bsd-3-clause
Python
0d8585a2ab57ca4d8f3f4ee2429a2137f2045c6a
Return 0 as an int rather than a string.
tobi-wan-kenobi/bumblebee-status,tobi-wan-kenobi/bumblebee-status
bumblebee/modules/arch-update.py
bumblebee/modules/arch-update.py
"""Check updates to Arch Linux.""" import subprocess import bumblebee.input import bumblebee.output import bumblebee.engine class Module(bumblebee.engine.Module): def __init__(self, engine, config): widget = bumblebee.output.Widget(full_text=self.utilization) super(Module, self).__init__(engine,...
"""Check updates to Arch Linux.""" import subprocess import bumblebee.input import bumblebee.output import bumblebee.engine class Module(bumblebee.engine.Module): def __init__(self, engine, config): widget = bumblebee.output.Widget(full_text=self.utilization) super(Module, self).__init__(engine,...
mit
Python
5d89191538f2fb2a45e8fbb2c50c1500b3cd1a4a
Bump version to 3.1.1
mar10/wsgidav,mar10/wsgidav,mar10/wsgidav,mar10/wsgidav
wsgidav/__init__.py
wsgidav/__init__.py
# -*- coding: utf-8 -*- """ Current WsgiDAV version number. See https://www.python.org/dev/peps/pep-0440 Examples Pre-releases (alpha, beta, release candidate): '3.0.0a1', '3.0.0b1', '3.0.0rc1' Final Release: '3.0.0' Developmental release (to mark 3.0.0 as 'used'. Don't publish this): ...
# -*- coding: utf-8 -*- """ Current WsgiDAV version number. See https://www.python.org/dev/peps/pep-0440 Examples Pre-releases (alpha, beta, release candidate): '3.0.0a1', '3.0.0b1', '3.0.0rc1' Final Release: '3.0.0' Developmental release (to mark 3.0.0 as 'used'. Don't publish this): ...
mit
Python
0c43c2305ea5ba81011dfc95593d7c725212760a
Bump version
python-hyper/wsproto
wsproto/__init__.py
wsproto/__init__.py
# -*- coding: utf-8 -*- """ wsproto ~~~ A WebSocket implementation. """ __version__ = "0.11.0"
# -*- coding: utf-8 -*- """ wsproto ~~~ A WebSocket implementation. """ __version__ = "0.10.0"
mit
Python
7e5fd0ad1f9e6f77e602d0bb9e2757d239df46f6
Allow empty location.
cfengine/documentation-generator,michaelclelland/documentation-generator,michaelclelland/documentation-generator,nickanderson/documentation-generator,stweil/documentation-generator,cfengine/documentation-generator,stweil/documentation-generator,cfengine/documentation-generator,stweil/documentation-generator,nickanderso...
_scripts/cfdoc_qa.py
_scripts/cfdoc_qa.py
# The MIT License (MIT) # # Copyright (c) 2013 CFEngine AS # # 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, modif...
# The MIT License (MIT) # # Copyright (c) 2013 CFEngine AS # # 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, modif...
mit
Python
89ebf52fa951091304fe18b8cdfb939b2da9f602
remove extra quotes in bullet_train key
masschallenge/django-accelerator,masschallenge/django-accelerator
accelerator/utils.py
accelerator/utils.py
from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import Permission from bullet_train import BulletTrain from django.conf import settings def create_mc_permission(permission): ct, _ = ContentType.objects.get_or_create( app_label="mc", model=permission.conte...
from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import Permission from bullet_train import BulletTrain from django.conf import settings def create_mc_permission(permission): ct, _ = ContentType.objects.get_or_create( app_label="mc", model=permission.conte...
mit
Python
5c828795ad9b3322cad817914826dfc8cbe82b22
fix import bug
Answeror/aip,Answeror/aip
aip/imfs/__init__.py
aip/imfs/__init__.py
from .base import ImfsError, NotFoundError, ConnectionError
mit
Python
5f422542135a5009a02815ece5c1cade2fbe9ba7
fix up normalize_utf8 method
nikken1/patentprocessor,funginstitute/patentprocessor,nikken1/patentprocessor,yngcan/patentprocessor,funginstitute/patentprocessor,yngcan/patentprocessor,funginstitute/patentprocessor,nikken1/patentprocessor,yngcan/patentprocessor
lib/xml_util.py
lib/xml_util.py
#!/usr/bin/env python """ Collection of useful functions and tools for working with XML documents """ import re from itertools import chain, izip from unicodedata import normalize def flatten(ls_of_ls): """ Takes in a list of lists, returns a new list of lists where list `i` contains the `i`th element fr...
#!/usr/bin/env python """ Collection of useful functions and tools for working with XML documents """ import re from itertools import chain, izip from unicodedata import normalize def flatten(ls_of_ls): """ Takes in a list of lists, returns a new list of lists where list `i` contains the `i`th element fr...
bsd-2-clause
Python
21b405f1968dd75a663b253feb19d730af34d380
Revert to old entry point.
danmcp/pman,FNNDSC/pman,danmcp/pman,FNNDSC/pman
docker-entrypoint.py
docker-entrypoint.py
#!/usr/bin/env python3 # Single entry point / dispatcher for simplified running of 'pman' import os from argparse import RawTextHelpFormatter from argparse import ArgumentParser str_desc = """ NAME docker-entrypoint.py SYNOPSIS docker-entrypoint.py [optional cmd args for...
#!/usr/bin/env python3 # Single entry point / dispatcher for simplified running of 'pman' import os from argparse import RawTextHelpFormatter from argparse import ArgumentParser str_desc = """ NAME docker-entrypoint.py SYNOPSIS docker-entrypoint.py [optional cmd args for...
mit
Python
624430e4571ee85e935c24b39cfe9520ef5499ce
Use new basekey location
mindw/libnacl,johnttan/libnacl,saltstack/libnacl,coinkite/libnacl,RaetProtocol/libnacl,cachedout/libnacl
libnacl/dual.py
libnacl/dual.py
''' The dual key system allows for the creation of keypairs that contain both cryptographic and signing keys ''' # import libnacl libs import libnacl import libnacl.base import libnacl.public import libnacl.sign class DualSecret(libnacl.base.BaseKey): ''' Manage crypt and sign keys in one object ''' d...
''' The dual key system allows for the creation of keypairs that contain both cryptographic and signing keys ''' # import libnacl libs import libnacl import libnacl.utils import libnacl.public import libnacl.sign class DualSecret(libnacl.utils.BaseKey): ''' Manage crypt and sign keys in one object ''' ...
apache-2.0
Python
548b740bc34b502fb965a93dc66382e1dd9f623c
Remove unused import
ASCIT/donut-python,ASCIT/donut,ASCIT/donut-python,ASCIT/donut,ASCIT/donut
donut/email_utils.py
donut/email_utils.py
import smtplib from email.mime.text import MIMEText def send_email(to, text, subject, use_prefix=True, group=None): """ Sends an email to a user. Expects 'to' to be a comma separated string of emails, and for 'msg' and 'subject' to be strings. If group is not none, the email is sent to a newsgroup and...
import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart def send_email(to, text, subject, use_prefix=True, group=None): """ Sends an email to a user. Expects 'to' to be a comma separated string of emails, and for 'msg' and 'subject' to be strings. If group is...
mit
Python
6b98eb3a036f470eccb31bb12c378c55e56fdeb4
Update __init__.py
gfilla/dsxtools
dsxtools/__init__.py
dsxtools/__init__.py
from io import StringIO from dsxtools.objectStore import objectStore
from dsxtools.objectStore import objectStore
apache-2.0
Python
ff882c0b55bb46836d86189f2353a3806bbfa4ec
Bump version to 0.4
grampajoe/django-tenant-templates
django_tenant_templates/__init__.py
django_tenant_templates/__init__.py
""" Django Tenant Templates """ from threading import local as _local version = '0.4' local = _local() local.tenant_slug = None
""" Django Tenant Templates """ from threading import local as _local version = '0.3' local = _local() local.tenant_slug = None
mit
Python
151b78036067e2b8cec7bd0eabaad5d27b2c37c1
Handle upstream timeouts gracefully
urfonline/api,urfonline/api,urfonline/api
api/streams/views.py
api/streams/views.py
from api.streams.models import StreamConfiguration from django.http import JsonResponse, Http404 from django.http.request import HttpRequest import requests def get_stream_status(request: HttpRequest, stream_slug: str): try: stream = StreamConfiguration.objects.get(slug=stream_slug) r = requests.g...
from api.streams.models import StreamConfiguration from django.http import JsonResponse, Http404 from django.http.request import HttpRequest import requests def get_stream_status(request: HttpRequest, stream_slug: str): try: stream = StreamConfiguration.objects.get(slug=stream_slug) except StreamConfig...
mit
Python
85106ebec37381abadc508f3495a92ca06cb8aa3
Implement embedded property functionality
VoxelDavid/elixir
elixir/processors.py
elixir/processors.py
import os.path from elixir import rbxmx class BaseProcessor: """The primary processor class. A processor is what compilers use to determine what happens when they encounter a file or folder. All of the `process` methods return a new instance from `elixir.rbx`. For example, when processing a file...
import os.path from elixir import rbxmx class BaseProcessor: """The primary processor class. A processor is what compilers use to determine what happens when they encounter a file or folder. All of the `process` methods return a new instance from `elixir.rbx`. For example, when processing a file...
mit
Python
ef63d85d887bc350f9df14acf8ea952384da4017
Improve discriminator command formatting
Harmon758/Harmonbot,Harmon758/Harmonbot
Discord/cogs/user.py
Discord/cogs/user.py
import discord from discord.ext import commands import inspect from typing import Optional from modules import utilities from utilities import checks def setup(bot): bot.add_cog(User(bot)) class User(commands.Cog): def __init__(self, bot): self.bot = bot for name, command in inspect.getmembers(self): if...
import discord from discord.ext import commands import inspect from typing import Optional from modules import utilities from utilities import checks def setup(bot): bot.add_cog(User(bot)) class User(commands.Cog): def __init__(self, bot): self.bot = bot for name, command in inspect.getmembers(self): if...
mit
Python
67dea90ed39225f600988ea8eaa2906caca5e915
Use cog check for wows cog
Harmon758/Harmonbot,Harmon758/Harmonbot
Discord/cogs/wows.py
Discord/cogs/wows.py
from discord.ext import commands import datetime from utilities import checks def setup(bot): bot.add_cog(WoWS(bot)) class WoWS(commands.Cog): def __init__(self, bot): self.bot = bot self.api_urls = {"asia": "https://api.worldofwarships.asia/wows/", "eu": "https://api.worldofwarships.eu/wows/", ...
from discord.ext import commands import datetime from utilities import checks def setup(bot): bot.add_cog(WoWS(bot)) class WoWS(commands.Cog): def __init__(self, bot): self.bot = bot self.api_urls = {"asia": "https://api.worldofwarships.asia/wows/", "eu": "https://api.worldofwarships.eu/wows/", ...
mit
Python
3dede50c099bfc340114c9b7448b8644e59112e1
define cache_date_format in backend
ekeih/OmNomNom,ekeih/OmNomNom,sattelite/OmNomNom
backend/backend.py
backend/backend.py
from celery import Celery from celery.utils.log import get_task_logger from os import environ from redis import Redis logger = get_task_logger(__name__) redis_host = environ.get('OMNOMNOM_REDIS_HOST') or 'localhost' redis_port = environ.get('OMNOMNOM_REDIS_PORT') or 6379 cache_interval = environ.get('OMNOMNOM_CACHE_...
from celery import Celery from celery.utils.log import get_task_logger from os import environ from redis import Redis logger = get_task_logger(__name__) redis_host = environ.get('OMNOMNOM_REDIS_HOST') or 'localhost' redis_port = environ.get('OMNOMNOM_REDIS_PORT') or 6379 cache_interval = environ.get('OMNOMNOM_CACHE_...
agpl-3.0
Python
64652f603c89d8871ce11af938ec3bf8a872f5d0
use Template.set_metadata instead of add_metadata (#1864)
cloudtools/troposphere,cloudtools/troposphere
examples/Metadata.py
examples/Metadata.py
from troposphere import Template t = Template() t.set_description("Example to show adding a Metadata section to the template") t.set_metadata({ "Comments": "Initial Draft", "LastUpdated": "Jan 1st 2015", "UpdatedBy": "First Last", "Version": "V1.0", }) print(t.to_json())
from troposphere import Template t = Template() t.set_description("Example to show adding a Metadata section to the template") t.add_metadata({ "Comments": "Initial Draft", "LastUpdated": "Jan 1st 2015", "UpdatedBy": "First Last", "Version": "V1.0", }) print(t.to_json())
bsd-2-clause
Python
045ef7b801e99a07b179694285aa104881f307bf
Add docstring to satisfy pylint
mininet/mininet,mininet/mininet,mininet/mininet
examples/__init__.py
examples/__init__.py
""" Mininet Examples See README for details """
# Mininet Examples
bsd-3-clause
Python
4228574868a2ab72214ed5d2f3fab55134d9c1bb
add traited example to debug script
fprados/nipype,carlohamalainen/nipype,grlee77/nipype,carolFrohlich/nipype,mick-d/nipype_source,iglpdc/nipype,wanderine/nipype,gerddie/nipype,rameshvs/nipype,carolFrohlich/nipype,fprados/nipype,glatard/nipype,FCP-INDI/nipype,carlohamalainen/nipype,mick-d/nipype,Leoniela/nipype,Leoniela/nipype,dgellis90/nipype,blakedewey...
examples/pe_debug.py
examples/pe_debug.py
import nipype.pipeline.engine as pe import nipype.interfaces.spm as spm import nipype.interfaces.fsl as fsl reload(pe) realign = pe.Node(spm.Realign(), name = 'spmrealign') coreg = pe.Node(spm.Coregister(), name = 'coreg') realign2 = pe.Node(spm.Realign(), name = 'spmrealign2') bet = pe.MapNode(fsl.Bet(), iterfield=[...
import nipype.pipeline.engine as pe import nipype.interfaces.spm as spm import nipype.interfaces.fsl as fsl reload(pe) realign = pe.Node(spm.Realign(), name = 'spmrealign') coreg = pe.Node(spm.Coregister(), name = 'coreg') realign2 = pe.Node(spm.Realign(), name = 'spmrealign2') bet = pe.MapNode(fsl.Bet(), iterfield=[...
bsd-3-clause
Python
de209b4add50c900a78b828d1df6a3b6d0d58ff2
fix flake8 error
jakevdp/altair,altair-viz/altair
altair/utils/__init__.py
altair/utils/__init__.py
from .core import ( infer_vegalite_type, sanitize_dataframe, parse_shorthand, use_signature, update_subtraits, update_nested, display_traceback, SchemaBase, Undefined ) from .html import spec_to_html from .plugin_registry import PluginRegistry __all__ = ( 'infer_vegalite_type',...
from .core import ( infer_vegalite_type, sanitize_dataframe, parse_shorthand, use_signature, update_subtraits, update_nested, display_traceback, SchemaBase, Undefined ) from .html import spec_to_html from .plugin_registry import PluginRegistry __all__ = ( 'infer_vegalite_type',...
bsd-3-clause
Python
9ff63d002293da44871307960d5b439b5e6ba48f
Remove 'lights' command for a while
alwye/spark-pi,alwye/spark-pi
app/commands/help.py
app/commands/help.py
def proc(command, message): return { "data": { "status": "ok", "html": """ <p> Hi! I can control your Raspberry Pi. Send me the commands <b>in bold</b> to make me do stuff.<br><br> &#128247; camera controls<br> ...
def proc(command, message): return { "data": { "status": "ok", "html": """ <p> Hi! I can control your Raspberry Pi. Send me the commands <b>in bold</b> to make me do stuff.<br><br> &#128247; camera controls<br> ...
mit
Python
0a6b43f2202cb63aad18c119d7d46916b4d54873
Make it easier to load the initial page
chadnickbok/librtcdcpp,chadnickbok/librtcdcpp
examples/site-api.py
examples/site-api.py
#!/usr/bin/env python # Sets up a basic site that can allow two browsers to connect to each # other via WebRTC DataChannels, sending connection events via WebSockets. from flask import Flask, send_from_directory from flask_sockets import Sockets import json app = Flask(__name__) sockets = Sockets(app) channels = {}...
#!/usr/bin/env python # Sets up a basic site that can allow two browsers to connect to each # other via WebRTC DataChannels, sending connection events via WebSockets. from flask import Flask, send_from_directory from flask_sockets import Sockets import json app = Flask(__name__) sockets = Sockets(app) channels = {}...
bsd-3-clause
Python
38f9b888539996fdfa7dfa3ca26f8545d535b7fd
Print statement as function call
goshippo/shippo-python-client
examples/tracking.py
examples/tracking.py
import shippo ''' In this tutorial we have an order with a sender address, recipient address and parcel information that we need to ship. ''' # Replace <API-KEY> with your key shippo.config.api_key = "<API-KEY>" # Tracking based on a Shippo transaction transaction_id = '<TRANSACTION-ID>' transaction = shippo.Transac...
import shippo ''' In this tutorial we have an order with a sender address, recipient address and parcel information that we need to ship. ''' # Replace <API-KEY> with your key shippo.config.api_key = "<API-KEY>" # Tracking based on a Shippo transaction transaction_id = '<TRANSACTION-ID>' transaction = shippo.Transac...
mit
Python
13b65b7ddcb84d6a214cb3858070c6706b034e5b
Add transaction verification API
achamely/omniwallet,OmniLayer/omniwallet,Nevtep/omniwallet,Nevtep/omniwallet,VukDukic/omniwallet,habibmasuro/omniwallet,OmniLayer/omniwallet,habibmasuro/omniwallet,OmniLayer/omniwallet,habibmasuro/omniwallet,Nevtep/omniwallet,achamely/omniwallet,achamely/omniwallet,habibmasuro/omniwallet,VukDukic/omniwallet,OmniLayer/o...
api/mastercoin_verify.py
api/mastercoin_verify.py
import os import glob from flask import Flask, request, jsonify, abort, json data_dir_root = os.environ.get('DATADIR') app = Flask(__name__) app.debug = True @app.route('/addresses') def addresses(): currency_id = request.args.get('currency_id') response = [] addr_glob = glob.glob(data_dir_root + '/addr/*.jso...
import os import glob from flask import Flask, request, jsonify, abort, json data_dir_root = os.environ.get('DATADIR') app = Flask(__name__) app.debug = True @app.route('/addresses') def addresses(): currency_id = request.args.get('currency_id') response = [] addr_glob = glob.glob(data_dir_root + '/addr/*.jso...
agpl-3.0
Python
72222dd7dcf08ad13937edd1b01a75df0a71f67f
Bump app version to 2018.12
kernelci/kernelci-backend,kernelci/kernelci-backend
app/handlers/__init__.py
app/handlers/__init__.py
__version__ = "2018.12" __versionfull__ = __version__
__version__ = "2018.11" __versionfull__ = __version__
lgpl-2.1
Python
073859067bcdd684d78eb0ddc2c4ecd1ed1b92f6
Increase chunk size
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/apps/userreports/const.py
corehq/apps/userreports/const.py
from __future__ import absolute_import from datetime import timedelta from django.utils.translation import ugettext_lazy as _ from corehq.apps.change_feed import topics REPORT_BUILDER_EVENTS_KEY = 'REPORT_BUILDER_EVENTS_KEY' DATA_SOURCE_NOT_FOUND_ERROR_MESSAGE = _( 'Sorry! There was a problem viewing your report....
from __future__ import absolute_import from datetime import timedelta from django.utils.translation import ugettext_lazy as _ from corehq.apps.change_feed import topics REPORT_BUILDER_EVENTS_KEY = 'REPORT_BUILDER_EVENTS_KEY' DATA_SOURCE_NOT_FOUND_ERROR_MESSAGE = _( 'Sorry! There was a problem viewing your report....
bsd-3-clause
Python
087a0e23dc6387fbb622779e2ce174d6b3c8281f
raise version
xiezhen/brilws,xiezhen/brilws
brilws/_version.py
brilws/_version.py
__version__ = "0.10.6"
__version__ = "0.10.5"
mit
Python
c9363986cb36fd73e5b9dcb1718292f1eed8af82
Fix choice options for status and permission in ChallengeHost model. (#119)
taranjeet/EvalAI,taranjeet/EvalAI,taranjeet/EvalAI,taranjeet/EvalAI
apps/hosts/models.py
apps/hosts/models.py
from __future__ import unicode_literals from django.db import models from django.contrib.auth.models import User from accounts.models import (TimeStampedModel, ) # from challenges.models import (Challenge, ) class ChallengeHostTeam(TimeStampedModel): """ Model representing the Host Team for a partiuclar cha...
from __future__ import unicode_literals from django.db import models from django.contrib.auth.models import User from accounts.models import (TimeStampedModel, ) # from challenges.models import (Challenge, ) class ChallengeHostTeam(TimeStampedModel): """ Model representing the Host Team for a partiuclar cha...
bsd-3-clause
Python
87116a8f14f948d9c1fb00cc1281bf71e6746158
Update version to 9.2.4.dev0 [ci skip]
angr/archinfo
archinfo/__init__.py
archinfo/__init__.py
""" archinfo is a collection of classes that contain architecture-specific information. It is useful for cross-architecture tools (such as pyvex). """ __version__ = "9.2.4.dev0" if bytes is str: raise Exception("This module is designed for python 3 only. Please install an older version to use python 2.") # NewTy...
""" archinfo is a collection of classes that contain architecture-specific information. It is useful for cross-architecture tools (such as pyvex). """ __version__ = "9.2.3.dev0" if bytes is str: raise Exception("This module is designed for python 3 only. Please install an older version to use python 2.") # NewTy...
bsd-2-clause
Python
0e73156e1868cf9800b71fcd425cd29aa17134d9
Update __init__.py
franziz/artagger
artagger/__init__.py
artagger/__init__.py
# -*- coding: utf-8 -*- from .Utility.Utils import getWordTag, readDictionary from .InitialTagger.InitialTagger import initializeSentence from .SCRDRlearner.SCRDRTree import SCRDRTree from .SCRDRlearner.Object import FWObject import os import copy import pickle import codecs class Word: def __init__(self, **kwargs...
# -*- coding: utf-8 -*- from .Utility.Utils import getWordTag, readDictionary from .InitialTagger.InitialTagger import initializeSentence from .SCRDRlearner.SCRDRTree import SCRDRTree from .SCRDRlearner.Object import FWObject import os import copy import pickle class Word: def __init__(self, **kwargs): sel...
apache-2.0
Python
93612081ecaf5e8f99744e49762d88a95b3ec707
Add Context to __init__.py
craigahobbs/chisel
chisel/__init__.py
chisel/__init__.py
# # Copyright (C) 2012-2015 Craig Hobbs # # 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, ...
# # Copyright (C) 2012-2015 Craig Hobbs # # 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, ...
mit
Python
7d8bab4d1af012e98b0bab8d72bb180814b13c83
Set version to 0.1.27a1
d9pouces/django-powerdns-manager,gnotaras/django-powerdns-manager,d9pouces/django-powerdns-manager,gnotaras/django-powerdns-manager
src/powerdns_manager/__init__.py
src/powerdns_manager/__init__.py
# -*- coding: utf-8 -*- # # This file is part of django-powerdns-manager. # # django-powerdns-manager is a web based PowerDNS administration panel. # # Development Web Site: # - http://www.codetrax.org/projects/django-powerdns-manager # Public Source Code Repository: # - https://source.codetrax.org/hgroot/dja...
# -*- coding: utf-8 -*- # # This file is part of django-powerdns-manager. # # django-powerdns-manager is a web based PowerDNS administration panel. # # Development Web Site: # - http://www.codetrax.org/projects/django-powerdns-manager # Public Source Code Repository: # - https://source.codetrax.org/hgroot/dja...
apache-2.0
Python
0031c83a571341f3031a4acb1b723658f64d4e9e
Update to v1.3.19
jackzhao-mj/ok-client,jathak/ok-client,Cal-CS-61A-Staff/ok-client
client/__init__.py
client/__init__.py
__version__ = 'v1.3.19' import os import sys sys.path.insert(0, '') # Add directory in which the ok.zip is stored to sys.path. sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
__version__ = 'v1.3.18' import os import sys sys.path.insert(0, '') # Add directory in which the ok.zip is stored to sys.path. sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
apache-2.0
Python
f481a03a8985f6731bcf9314d72467abab4b1ed2
change default freeglut library name to glut
tuttleofx/sconsProject
autoconf/freeglut.py
autoconf/freeglut.py
from _external import * from gl import * from glu import * freeglut = LibWithHeaderChecker( 'glut', ['GL/freeglut.h'], 'c', dependencies=[gl,glu] )
from _external import * from gl import * from glu import * freeglut = LibWithHeaderChecker( 'freeglut', ['GL/freeglut.h'], 'c', dependencies=[gl,glu] )
mit
Python
78d2e811051e1b52c6e5915e7c4d80134d4a7cbb
Optimize prime-number check for Python (#33)
mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-inter...
problems/prime-number/prime-number.py
problems/prime-number/prime-number.py
from math import sqrt def is_prime(n): if n <= 1: return False elif n in [2, 3]: return True # To understand the statement below, please visit https://github.com/mre/the-coding-interview/pull/33 elif n % 6 not in [1, 5]: return False for i in range(3, int(sqrt(n))+1, 2):...
from math import sqrt def is_prime(n): if n <= 1: return False elif n == 2: return True elif n % 2 == 0: return False for i in xrange(3, int(sqrt(n))+1, 2): if n % i == 0: return False return True
mit
Python
d577c02a706bac1ed94aa91fbe2494f8d0c0f581
add in import
thomasyu888/Genie,thomasyu888/Genie,thomasyu888/Genie,thomasyu888/Genie
processing/example_filetype_format.py
processing/example_filetype_format.py
import logging import multiprocessing import pandas as pd import os #import packages logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) class FileTypeFormat(object): _process_kwargs = ["newPath", "databaseSynId"] _fileType = "fileType" _validation_kwargs = [] def __init__(self, syn, c...
import logging import multiprocessing import pandas as pd #import packages logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) class FileTypeFormat(object): _process_kwargs = ["newPath", "databaseSynId"] _fileType = "fileType" _validation_kwargs = [] def __init__(self, syn, center, poo...
mit
Python
b85e16177b08fcf57ede8f670472e9540c661d13
FIX prod ref required
ingadhoc/account-analytic,ingadhoc/sale,adhoc-dev/account-financial-tools,ingadhoc/odoo-addons,ingadhoc/product,sysadminmatmoz/ingadhoc,adhoc-dev/odoo-addons,ingadhoc/product,ClearCorp/account-financial-tools,ingadhoc/sale,ingadhoc/sale,adhoc-dev/odoo-addons,ingadhoc/sale,ingadhoc/partner,dvitme/odoo-addons,sysadminmat...
product_reference_required/product.py
product_reference_required/product.py
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import models, fields, api class pr...
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import models, fields class product...
agpl-3.0
Python
6017a7e5de6fc0d0ef9797d980e634e8fe88cd89
Create stock data dictionary
jrn223/Freestyle
Stock_market_data.py
Stock_market_data.py
# for email functionality, credit @s2t2 import os import sendgrid from sendgrid.helpers.mail import * # source of Email, Content, Mail, etc. # for day of week import datetime # to query Google stock data from pandas_datareader import data from datetime import date, timedelta stock_data = [] #Stock data for Apple, A...
# for email functionality, credit @s2t2 import os import sendgrid from sendgrid.helpers.mail import * # source of Email, Content, Mail, etc. # for day of week import datetime # to query Google stock data from pandas_datareader import data from datetime import date, timedelta #Stock data for Apple, Amazon, Activision...
mit
Python
988ce79b3de76d46c482995bb4b8dc724e89c718
Add configuration parameter whether or not to use astropy's coordinate transformations where relevant
jobovy/galpy,jobovy/galpy,jobovy/galpy,jobovy/galpy
galpy/util/config.py
galpy/util/config.py
import os, os.path try: import configparser except: from six.moves import configparser _APY_LOADED= True try: from astropy import units except ImportError: _APY_LOADED= False # The default configuration default_configuration= {'astropy-units':'False', 'astropy-coords':'True', ...
import os, os.path try: import configparser except: from six.moves import configparser _APY_LOADED= True try: from astropy import units except ImportError: _APY_LOADED= False # The default configuration default_configuration= {'astropy-units':'False', 'ro':'8.', ...
bsd-3-clause
Python
dae9d7d67aaf2ab8d39b232d243d860d9597bbd2
Add error when serializer setup has error
NorakGithub/django-excel-tools
django_excel_tools/exceptions.py
django_excel_tools/exceptions.py
class BaseExcelError(Exception): def __init__(self, message): super(BaseExcelError, self).__init__() self.message = message class ValidationError(BaseExcelError): pass class ColumnNotEqualError(BaseExcelError): pass class FieldNotExist(BaseExcelError): pass class SerializerConfi...
class BaseExcelError(Exception): def __init__(self, message): super(BaseExcelError, self).__init__() self.message = message class ValidationError(BaseExcelError): pass class ColumnNotEqualError(BaseExcelError): pass class FieldNotExist(BaseExcelError): pass
mit
Python
b0ce49d2ceb93b9a31472582e513b4a7a3c33a3e
Fix warn
klen/fquest,klen/tweetchi,klen/Flask-Foundation
base/auth/manager.py
base/auth/manager.py
from flask import Blueprint from flask_login import LoginManager, login_required, logout_user, login_user, current_user from flask_principal import Principal, identity_changed, Identity, AnonymousIdentity, identity_loaded, UserNeed, RoleNeed from ..ext import db from .models import User class UserManager(Blueprint):...
from flask import Blueprint from flask_login import LoginManager, login_required, logout_user, login_user, current_user from flask_principal import Principal, identity_changed, Identity, AnonymousIdentity, identity_loaded, UserNeed, RoleNeed from ..ext import db from .models import User class UserManager(Blueprint):...
bsd-3-clause
Python
edde0e7ba52d3f2e7b1c5d15f0c92a0545df33fd
fix rosbag_helper script executer
startcode/apollo,startcode/apollo,startcode/apollo,startcode/apollo,startcode/apollo,startcode/apollo
docs/demo_guide/rosbag_helper.py
docs/demo_guide/rosbag_helper.py
#!/usr/bin/env python ############################################################################### # Copyright 2018 The Apollo Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy ...
#!/usr/bin/env bash ############################################################################### # Copyright 2018 The Apollo Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of...
apache-2.0
Python
3c33e0379b278f21e7d8d149312bd4f2eef48f1f
add fix in function node.clone()
elastic-event-components/e2c,elastic-event-components/e2c,elastic-event-components/e2c,elastic-event-components/e2c
e2c/python/e2c/node.py
e2c/python/e2c/node.py
from inspect import getfullargspec from typing import Callable, Any, Dict, List class Node(object): def __init__(self, comp, name: str, callable: Callable) -> None: self.name = name self.comp = comp self.callable = callable self.nodes: Dict[str, List['Node']] = {} self._spe...
from inspect import getfullargspec from typing import Callable, Any, Dict, List class Node(object): def __init__(self, comp, name: str, callable: Callable) -> None: self.name = name self.comp = comp self.callable = callable self.nodes: Dict[str, List['Node']] = {} self._spe...
apache-2.0
Python
617a8d208c0f6e9af36f9e90ea15ca36a46384d2
Fix line too long
Alignak-monitoring-contrib/alignak-webui,Alignak-monitoring-contrib/alignak-webui,Alignak-monitoring-contrib/alignak-webui
bin/alignak_webui.py
bin/alignak_webui.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This file is used to run the application in production environment with WSGI server. With uWSGI: uwsgi --plugin python --wsgi-file bin/alignak_webui.py --callable app \ --socket 0.0.0.0:5001 --protocol=http --enable-threads -p 1 """ impor...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This file is used to run the application in production environment with WSGI server. With uWSGI: uwsgi --wsgi-file alignak_webui.py --callable app --socket 0.0.0.0:8868 --protocol=http --enable-threads """ import alignak_webui.app from alignak_webui im...
agpl-3.0
Python
369b7412f237d7d8e7280b7c4ba03b86655d45aa
fix some issues with nonstandard module imports
CI-Connect/connect-client,CI-Connect/connect-client,CI-Connect/connect-client
connect/lib/connect/extensions/debug.py
connect/lib/connect/extensions/debug.py
def run(opts, args, **kwargs): from IPython.Shell import IPShellEmbed as embed if htcondor: import classad schedd = htcondor.Schedd() r = schedd.query() params = {} for result in r: for k in result.keys(): if k in params: params[k] += 1 else: params[k] = 1 common = [] for k, v in params.it...
import htcondor import classad def run(opts, args, **kwargs): from IPython.Shell import IPShellEmbed as embed schedd = htcondor.Schedd() r = schedd.query() params = {} for result in r: for k in result.keys(): if k in params: params[k] += 1 else: params[k] = 1 common = [] for k, v in params.i...
apache-2.0
Python
80d6c3de821a77985d434fcbe50b379f255b1b2e
set version to 1.1.0
femueller/python-n26
n26/__init__.py
n26/__init__.py
__version__ = '1.1.0'
__version__ = '1.0.0'
mit
Python
3feeddcf34928e9c1bca4c9de0f5028686085c25
Update messages API
Grum-Hackdee/grum-web,Grum-Hackdee/grum-web,Grum-Hackdee/grum-web,Grum-Hackdee/grum-web
grum/api/messages.py
grum/api/messages.py
from flask import jsonify from flask.ext.restful import Resource from .models import Message class Messages(Resource): def get(self, message_id): msg = Message.query.filter_by(id=message_id).first_or_404() return jsonify(message={ 'id': msg.id, 'from': msg.sender, ...
from flask.ext.restful import Resource class Messages(Resource): def get(self): return "hello friend"
mit
Python
33f050149cbb4d89f45505322511b65797456e74
Remove filter_list from ndb
PinaeOS/ndb-py,node-db/ndb-py
ndb/__init__.py
ndb/__init__.py
#coding=utf-8 import statement import common import operate __version__ = "1.0" def read(filename): return common.read(filename) def read_string(data): return common.read_string(data) def write_node(filename, name, node, indent_flag = '\t'): common.write_node(filename, name, node, indent_flag) def pri...
#coding=utf-8 import statement import common import operate __version__ = "1.0" def read(filename): return common.read(filename) def read_string(data): return common.read_string(data) def write_node(filename, name, node, indent_flag = '\t'): common.write_node(filename, name, node, indent_flag) def pri...
apache-2.0
Python
385f6593fa71f2de120e431fbed12f88565b2f46
remove basename from AtomicBlobs.put as well
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/blobs/atomic.py
corehq/blobs/atomic.py
from corehq.blobs import DEFAULT_BUCKET from corehq.blobs.exceptions import InvalidContext class AtomicBlobs(object): """A blob db wrapper that can put and delete blobs atomically Usage: with AtomicBlobs(get_blob_db()) as db: # do stuff here that puts or deletes blobs db.dele...
from corehq.blobs import DEFAULT_BUCKET from corehq.blobs.exceptions import InvalidContext class AtomicBlobs(object): """A blob db wrapper that can put and delete blobs atomically Usage: with AtomicBlobs(get_blob_db()) as db: # do stuff here that puts or deletes blobs db.dele...
bsd-3-clause
Python
769c7dffb5938b02b681cc4718589ef79ff68b7b
Update Mopsa.py to handle additional options passed through benchexec's xml files
ultimate-pa/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,sosy-lab/benchexec
benchexec/tools/mopsa.py
benchexec/tools/mopsa.py
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2022 Raphaël Monat # # SPDX-License-Identifier: Apache-2.0 import benchexec.tools.template import benchexec.result as result class Tool(benchexec.tools.template.BaseTool2): ...
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2022 Raphaël Monat # # SPDX-License-Identifier: Apache-2.0 import benchexec.tools.template import benchexec.result as result class Tool(benchexec.tools.template.BaseTool2): ...
apache-2.0
Python
959f766b1fced4f27c30251f1b78b694a2415326
Bump version back to 2.0.0b5.dev0
rigetticomputing/pyquil
pyquil/__init__.py
pyquil/__init__.py
__version__ = "2.0.0b5.dev0" from pyquil.quil import Program from pyquil.api import list_quantum_computers, get_qc
__version__ = "2.0.0b4" from pyquil.quil import Program from pyquil.api import list_quantum_computers, get_qc
apache-2.0
Python
2e6f0934c67baf27cdf3930d48d6b733995e413f
Make the query docstring a bit clearer
ClusterHQ/benchmark-server,ClusterHQ/benchmark-server
benchmark/_interfaces.py
benchmark/_interfaces.py
# Copyright ClusterHQ Inc. See LICENSE file for details. """ Interfaces for the benchmarking results server. """ from zope.interface import Interface class IBackend(Interface): """ A backend for storing and querying the results. """ def store(result): """ Store a single benchmarking...
# Copyright ClusterHQ Inc. See LICENSE file for details. """ Interfaces for the benchmarking results server. """ from zope.interface import Interface class IBackend(Interface): """ A backend for storing and querying the results. """ def store(result): """ Store a single benchmarking...
apache-2.0
Python
33c33b792dc1ed9acdd3f5331afd5a42385d20ce
Use Write Event in echoserver.py
eriol/circuits,treemo/circuits,nizox/circuits,treemo/circuits,eriol/circuits,eriol/circuits,treemo/circuits
examples/echoserver.py
examples/echoserver.py
#!/usr/bin/env python from circuits.net.sockets import TCPServer, Write class EchoServer(TCPServer): def read(self, sock, data): self.push(Write(sock, data)) EchoServer(8000).run()
#!/usr/bin/env python from circuits.net.sockets import TCPServer class EchoServer(TCPServer): def read(self, sock, data): self.write(sock, data) EchoServer(8000).run()
mit
Python
3122965316a6d8f99d737fa46450ed9aeb5c4811
make item_number unique
byteweaver/django-eca-catalogue
eca_catalogue/abstract_models.py
eca_catalogue/abstract_models.py
from django.db import models from django.utils.translation import ugettext_lazy as _ from treebeard.mp_tree import MP_Node class NSDMixin(models.Model): name = models.CharField(_("Name"), max_length=128) slug = models.SlugField(_("Slug"), max_length=128, unique=True) description = models.TextField(_("Des...
from django.db import models from django.utils.translation import ugettext_lazy as _ from treebeard.mp_tree import MP_Node class NSDMixin(models.Model): name = models.CharField(_("Name"), max_length=128) slug = models.SlugField(_("Slug"), max_length=128, unique=True) description = models.TextField(_("Des...
bsd-3-clause
Python
857897a88811153f7460472219fd78d4e68bdc12
bump pkg version
sckott/habanero
habanero/__init__.py
habanero/__init__.py
# -*- coding: utf-8 -*- # habanero """ habanero library ~~~~~~~~~~~~~~~~~~~~~ habanero is a low level client for the Crossref search API. Usage:: from habanero import Crossref cr = Crossref() # setup a different base URL Crossref(base_url = "http://some.other.url") # setup an api key Crossref(a...
# -*- coding: utf-8 -*- # habanero """ habanero library ~~~~~~~~~~~~~~~~~~~~~ habanero is a low level client for the Crossref search API. Usage:: from habanero import Crossref cr = Crossref() # setup a different base URL Crossref(base_url = "http://some.other.url") # setup an api key Crossref(a...
mit
Python
85fa2d64a697cb4049f20414426183738ee7ebc5
Add key-word arguments to layout.Layout
cortesi/countershape,mhils/countershape,samtaufa/countershape,cortesi/countershape,mhils/countershape,samtaufa/countershape
countershape/layout.py
countershape/layout.py
import html, template _dtd = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n' class Layout: """ A basic framework for layout objects. """ bodyClass = "" components = ("pageTitle", "body", "header") def __init__(self, path = No...
import html, template _dtd = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n' class Layout: """ A basic framework for layout objects. """ bodyClass = "" components = ("pageTitle", "body", "header") def __init__(self, path = No...
mit
Python
da548f7d2e69b76901f4f68ae2112946bb9632f6
Bump version to 3.0.1
pystorm/pystorm
pystorm/version.py
pystorm/version.py
# -*- coding: utf-8 -*- # Copyright 2014-2015 Parsely, 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 ...
# -*- coding: utf-8 -*- # Copyright 2014-2015 Parsely, 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 ...
apache-2.0
Python
b2befc496741a904f8988b2ec8fa5b57aba96a91
Fix the path to read the sample file from
e-mission/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server
bin/deploy/giles_conf.py
bin/deploy/giles_conf.py
import json sample_path = "conf/net/int_service/giles_conf.json.sample" f = open(sample_path, "r") data = json.loads(f.read()) f.close() real_path = "conf/net/int_service/giles_conf.json" data['giles_base_url'] = 'http://50.17.111.19:8079' f = open(real_path, "w") f.write(json.dumps(data)) f.close()
import json sample_path = "conf/net/int_service/giles_conf.json.sample" f = open(path, "r") data = json.loads(f.read()) f.close() real_path = "conf/net/int_service/giles_conf.json" data['giles_base_url'] = 'http://50.17.111.19:8079' f = open(real_path, "w") f.write(json.dumps(data)) f.close()
bsd-3-clause
Python
86636212c38592769abb421c9338174673fdbcaa
remove make_purchase_invoice from demo script
gsnbng/erpnext,gsnbng/erpnext,gsnbng/erpnext,gsnbng/erpnext
erpnext/demo/user/fixed_asset.py
erpnext/demo/user/fixed_asset.py
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.make_random import get_random from erpnext.assets.doctype.asset.asset import make_sales_invoice from erpnext.assets.do...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.make_random import get_random from erpnext.assets.doctype.asset.asset import make_purchase_invoice, make_sales_invoice...
agpl-3.0
Python
472d626fcc87b7495967ca41bbed500d6d63f593
Add NoLogger, a Logger that does not logs
alvarogzp/telegram-bot,alvarogzp/telegram-bot
bot/logger/logger.py
bot/logger/logger.py
import time from bot.action.util.textformat import FormattedText from bot.logger.message_sender import MessageSender LOG_ENTRY_FORMAT = "{time} [{tag}] {text}" TEXT_SEPARATOR = " | " class Logger: def __init__(self, sender: MessageSender): self.sender = sender def log(self, tag, *texts): t...
import time from bot.action.util.textformat import FormattedText from bot.logger.message_sender import MessageSender LOG_ENTRY_FORMAT = "{time} [{tag}] {text}" TEXT_SEPARATOR = " | " class Logger: def __init__(self, sender: MessageSender): self.sender = sender def log(self, tag, *texts): t...
agpl-3.0
Python