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
532b0809b040318abbb8e62848f18ad0cdf72547
Make OrganizationWorkspaceManager ignore the original workspace when sharing workspaces with groups
rockneurotiko/wirecloud,jpajuelo/wirecloud,rockneurotiko/wirecloud,jpajuelo/wirecloud,jpajuelo/wirecloud,rockneurotiko/wirecloud,jpajuelo/wirecloud,rockneurotiko/wirecloud
src/workspace/workspace_managers.py
src/workspace/workspace_managers.py
from workspace.models import GroupPublishedWorkspace, PublishedWorkSpace, WorkSpace def ref_from_workspace(workspace): if isinstance(workspace, WorkSpace): return 'group/' + str(workspace.id) elif isinstance(workspace, PublishedWorkSpace): return 'group_published/' + str(workspace.id) class...
from workspace.models import GroupPublishedWorkspace, PublishedWorkSpace, WorkSpace def ref_from_workspace(workspace): if isinstance(workspace, WorkSpace): return 'group/' + str(workspace.id) elif isinstance(workspace, PublishedWorkSpace): return 'group_published/' + str(workspace.id) class...
agpl-3.0
Python
fd2dd866d0b9444073f07e43804fcb6bf82194ba
Add comment
Alex-Ian-Hamilton/sunpy,dpshelio/sunpy,Alex-Ian-Hamilton/sunpy,dpshelio/sunpy,Alex-Ian-Hamilton/sunpy,dpshelio/sunpy
sunpy/lightcurve/tests/test_goes.py
sunpy/lightcurve/tests/test_goes.py
""" GOES LightCurve Tests """ from __future__ import absolute_import import pytest import sunpy.lightcurve class TestGOESLightCurve(): #Temporary fix for disabled GOES API @pytest.mark.xfail @pytest.mark.online def test_goes_range(self): lc1 = sunpy.lightcurve.GOESLightCurve.create('2012/06/01...
""" GOES LightCurve Tests """ from __future__ import absolute_import import pytest import sunpy.lightcurve class TestGOESLightCurve(): @pytest.mark.xfail @pytest.mark.online def test_goes_range(self): lc1 = sunpy.lightcurve.GOESLightCurve.create('2012/06/01','2012/06/02') assert isinstance...
bsd-2-clause
Python
be4e471f8136aa5f53628302c2e5d60d2f15d777
Add test for issue 2555
ga7g08/sympy,yashsharan/sympy,Sumith1896/sympy,Vishluck/sympy,AkademieOlympia/sympy,atsao72/sympy,skidzo/sympy,MechCoder/sympy,mcdaniel67/sympy,moble/sympy,kumarkrishna/sympy,jaimahajan1997/sympy,sunny94/temp,drufat/sympy,pbrady/sympy,souravsingh/sympy,moble/sympy,mcdaniel67/sympy,jerli/sympy,Titan-C/sympy,asm666/sympy...
sympy/series/tests/test_residues.py
sympy/series/tests/test_residues.py
from sympy import residue, Symbol, Function, sin, S, I, pi, exp, log, pi, factorial from sympy.utilities.pytest import XFAIL, raises from sympy.abc import x, y, z, a, s def test_basic1(): assert residue(1/x, x, 0) == 1 assert residue(-2/x, x, 0) == -2 assert residue(81/x, x, 0) == 81 assert residue(1/...
from sympy import residue, Symbol, Function, sin, S, I, pi, exp, log, pi, factorial from sympy.utilities.pytest import XFAIL, raises from sympy.abc import x, y, z, a, s def test_basic1(): assert residue(1/x, x, 0) == 1 assert residue(-2/x, x, 0) == -2 assert residue(81/x, x, 0) == 81 assert residue(1/...
bsd-3-clause
Python
efbafb9ea733ea21f2b26471f29867d0636a684b
Introduce FT keystone client initialization retry
openstack/tacker,stackforge/tacker,openstack/tacker,stackforge/tacker,openstack/tacker
tacker/tests/functional/keystone.py
tacker/tests/functional/keystone.py
# Copyright 2016 Brocade Communications System, Inc. # 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 #...
# Copyright 2016 Brocade Communications System, Inc. # 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 #...
apache-2.0
Python
2db243de21a275fa1634b8deb9621c95f7970959
Adjust the item count for Gedit's Suggestions list to not include header
chrys87/orca-beep,GNOME/orca,GNOME/orca,chrys87/orca-beep,GNOME/orca,pvagner/orca,pvagner/orca,chrys87/orca-beep,chrys87/orca-beep,pvagner/orca,pvagner/orca,GNOME/orca
src/orca/scripts/apps/gedit/spellcheck.py
src/orca/scripts/apps/gedit/spellcheck.py
# Orca # # Copyright 2014 Igalia, S.L. # # Author: Joanmarie Diggs <jdiggs@igalia.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your o...
# Orca # # Copyright 2014 Igalia, S.L. # # Author: Joanmarie Diggs <jdiggs@igalia.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your o...
lgpl-2.1
Python
86761709ed222e0468eed9c57d29378523901070
Add security data import
ShaheenHossain/eagle-medical,ShaheenHossain/eagle-medical,laslabs/vertical-medical,laslabs/vertical-medical
medical_patient_ethnicity/__openerp__.py
medical_patient_ethnicity/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) LasLabs, Inc [https://laslabs.com]. All Rights Reserved # ############################################################################## # # Collaborators of this module: # Ported By: # ...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) LasLabs, Inc [https://laslabs.com]. All Rights Reserved # ############################################################################## # # Collaborators of this module: # Ported By: # ...
agpl-3.0
Python
167ce734464c6e0dcd478d7363f041fd301388cf
Revert "Read BigQuery data using query method so it works with views"
google/megalista,google/megalista
megalist_dataflow/sources/bq_api_dofn.py
megalist_dataflow/sources/bq_api_dofn.py
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
Python
fe58a8dd6446bd357d0bb0fb5e22f784aa10e0af
fix infinite refresh token
Amoki/Amoki-Music,Amoki/Amoki-Music,Amoki/Amoki-Music
player/signals.py
player/signals.py
# -*- coding: utf-8 -*- from django.db.models.signals import pre_save from django.dispatch import receiver from player.models import Room, events, generate_token @receiver(pre_save, sender=Room) def add_event(sender, instance, **kwargs): events[instance.name] = None @receiver(pre_save, sender=Room) def update_t...
# -*- coding: utf-8 -*- from django.db.models.signals import pre_save from django.dispatch import receiver from player.models import Room, events, generate_token @receiver(pre_save, sender=Room) def add_event(sender, instance, **kwargs): events[instance.name] = None @receiver(pre_save, sender=Room) def update_t...
mit
Python
96f5bd8ba552641f27094cf40c4947eaa91fc449
correct usage string
RhubarbSin/arin-reg-rws
org_create.py
org_create.py
#!/usr/bin/env python import sys from StringIO import StringIO import requests from apikey import APIKEY from regrws import OrgPayload, ErrorPayload NAMESPACEDEF = 'xmlns="http://www.arin.net/regrws/core/v1"' if len(sys.argv) != 2: print 'Usage: %s POCHANDLE' % sys.argv[0] sys.exit(2) pochandle = sys.argv...
#!/usr/bin/env python import sys from StringIO import StringIO import requests from apikey import APIKEY from regrws import OrgPayload, ErrorPayload NAMESPACEDEF = 'xmlns="http://www.arin.net/regrws/core/v1"' if len(sys.argv) != 2: print 'Usage: %s ORGHANDLE' % sys.argv[0] sys.exit(2) pochandle = sys.argv...
mit
Python
ff7e3309995a8960ac371741b2b00c6da40f7490
use f-strings in feature_filelock.py
jlopp/statoshi,fujicoin/fujicoin,lateminer/bitcoin,tecnovert/particl-core,anditto/bitcoin,MarcoFalke/bitcoin,anditto/bitcoin,achow101/bitcoin,GroestlCoin/bitcoin,sipsorcery/bitcoin,AkioNak/bitcoin,instagibbs/bitcoin,ajtowns/bitcoin,yenliangl/bitcoin,MarcoFalke/bitcoin,sstone/bitcoin,sipsorcery/bitcoin,anditto/bitcoin,n...
test/functional/feature_filelock.py
test/functional/feature_filelock.py
#!/usr/bin/env python3 # Copyright (c) 2018-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Check that it's not possible to start a second bitcoind instance using the same datadir or wallet.""" i...
#!/usr/bin/env python3 # Copyright (c) 2018-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Check that it's not possible to start a second bitcoind instance using the same datadir or wallet.""" i...
mit
Python
06e7cf66d37a34a33349e47c374e733b1f3006be
Remove race between connecting and shutdown on separate connections
chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin
test/functional/feature_shutdown.py
test/functional/feature_shutdown.py
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind shutdown.""" from test_framework.test_framework import BitcoinTestFramework from test_framewo...
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind shutdown.""" from test_framework.test_framework import BitcoinTestFramework from test_framewo...
mit
Python
63ca54e320b77501a304aa0520e133e1194e1324
Break delete_project into smaller tasks
vperron/sentry,BuildingLink/sentry,JTCunning/sentry,fotinakis/sentry,BuildingLink/sentry,zenefits/sentry,daevaorn/sentry,nicholasserra/sentry,hongliang5623/sentry,llonchj/sentry,mitsuhiko/sentry,TedaLIEz/sentry,alexm92/sentry,mvaled/sentry,jokey2k/sentry,fuziontech/sentry,ngonzalvez/sentry,looker/sentry,camilonova/sent...
src/sentry/tasks/deletion.py
src/sentry/tasks/deletion.py
""" sentry.tasks.deletion ~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from celery.task import task @task(name='sentry.tasks.deletion.delete_project', queue='cleanup') def delete_project(object_id, **kwargs): f...
""" sentry.tasks.deletion ~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from celery.task import task @task(name='sentry.tasks.deletion.delete_project', queue='cleanup') def delete_project(object_id, **kwargs): f...
bsd-3-clause
Python
400465d04987c194bef54f9d1cdebcd191dfaaec
add link to github issues
tschaume/ccsgp_get_started,tschaume/ccsgp_get_started
pyana/__init__.py
pyana/__init__.py
""" This package_ provides a sample setup to get started with ccsgp_. `ccsgp` is initialized as a module and its usage demonstrated with dedicated functions in the examples module. Helpful utility functions are also included to complement the features of `ccsgp`. The following use cases are currently implemented or wi...
""" This package_ provides a sample setup to get started with ccsgp_. `ccsgp` is initialized as a module and its usage demonstrated with dedicated functions in the examples module. Helpful utility functions are also included to complement the features of `ccsgp`. The following use cases are currently implemented or wi...
mit
Python
e04a7f7d30e4f73bc678dfbe94ebb09de67643c0
fix module name
tschaume/ccsgp_get_started,tschaume/ccsgp_get_started
pyana/__main__.py
pyana/__main__.py
import logging, argparse from examples.gp_datdir import gp_datdir # parse arguments parser = argparse.ArgumentParser() parser.add_argument("subname", help="input subdir with txt files") parser.add_argument("--log", help="show log output", action="store_true") args = parser.parse_args() loglevel = 'DEBUG' if args.log e...
import logging, argparse from examples.gp_from_txt import gp_from_txt # parse arguments parser = argparse.ArgumentParser() parser.add_argument("subname", help="input subdir with txt files") parser.add_argument("--log", help="show log output", action="store_true") args = parser.parse_args() loglevel = 'DEBUG' if args.l...
mit
Python
d73872b8bcc6c7c32fa10d4a8ffdd77fe568a954
Switch from optparase to argparse
ascarter/pyautotest
pyautotest/cli.py
pyautotest/cli.py
# -*- coding: utf-8 -*- import argparse import logging import os import signal import time from watchdog.observers import Observer from pyautotest.observers import Notifier, ChangeHandler # Configure logging logging.basicConfig(format='%(asctime)s (%(name)s) [%(levelname)s]: %(message)s', datefmt='%m-%d-%Y %H:%M:%S...
# -*- coding: utf-8 -*- import logging import os import signal import time from optparse import OptionParser from watchdog.observers import Observer from pyautotest.observers import Notifier, ChangeHandler # Configure logging logging.basicConfig(format='%(asctime)s (%(name)s) [%(levelname)s]: %(message)s', datefmt=...
mit
Python
0f29a9849246666bec3c8e9d9463da45c4456c94
bump version
emunsing/pyiso,davidkuep/pyiso,emunsing/pyiso
pyiso/__init__.py
pyiso/__init__.py
import imp import os.path __version__ = '0.1.8' def client_factory(client_name, **kwargs): """Return a client for an external data set""" # set up module_name = client_name.lower() class_name = '%sClient' % client_name.upper() dir_name = os.path.dirname(os.path.abspath(__file__)) error_msg =...
import imp import os.path __version__ = '0.1.7' def client_factory(client_name, **kwargs): """Return a client for an external data set""" # set up module_name = client_name.lower() class_name = '%sClient' % client_name.upper() dir_name = os.path.dirname(os.path.abspath(__file__)) error_msg =...
apache-2.0
Python
f6611bb4559b1c35eaf5baf7a5be8a82306e297e
bump version
emunsing/pyiso,davidkuep/pyiso,emunsing/pyiso
pyiso/__init__.py
pyiso/__init__.py
import imp import os.path __version__ = '0.2.4' def client_factory(client_name, **kwargs): """Return a client for an external data set""" # set up module_name = client_name.lower() class_name = '%sClient' % client_name.upper() dir_name = os.path.dirname(os.path.abspath(__file__)) error_msg =...
import imp import os.path __version__ = '0.2.3' def client_factory(client_name, **kwargs): """Return a client for an external data set""" # set up module_name = client_name.lower() class_name = '%sClient' % client_name.upper() dir_name = os.path.dirname(os.path.abspath(__file__)) error_msg =...
apache-2.0
Python
b94ca828755c61640c627fe44e4159f78afe56a2
fix error in open() and change flags
nvoron23/owasp-pysec,blabla1337/owasp-pysec,ebranca/owasp-pysec,ebranca/owasp-pysec,nvoron23/owasp-pysec,ebranca/owasp-pysec,cardoso010/owasp-pysec,cardoso010/owasp-pysec,cardoso010/owasp-pysec,blabla1337/owasp-pysec,nvoron23/owasp-pysec,blabla1337/owasp-pysec
pysec/__init__.py
pysec/__init__.py
# Python Security Project (PySec) and its related class files. # # PySec is a set of tools for secure application development under Linux # # Copyright 2014 PySec development team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You...
# Python Security Project (PySec) and its related class files. # # PySec is a set of tools for secure application development under Linux # # Copyright 2014 PySec development team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You...
apache-2.0
Python
08afcef56c4468a03b31cb8a8fefb6190cb2444c
update to v0.2rc0
pywren/pywren,pywren/pywren
pywren/version.py
pywren/version.py
from __future__ import print_function # we're following the version number guidelines # from https://www.python.org/dev/peps/pep-0386/ __version__ = "0.2rc0" if __name__ == "__main__": print(__version__)
from __future__ import print_function # we're following the version number guidelines # from https://www.python.org/dev/peps/pep-0386/ __version__ = "0.2dev" if __name__ == "__main__": print(__version__)
apache-2.0
Python
97896926df70eaa65b0ba9d99eae8571db637b4d
Fix import typo in server_thread.py
vuolter/pyload,vuolter/pyload,vuolter/pyload
src/pyload/webui/server_thread.py
src/pyload/webui/server_thread.py
# -*- coding: utf-8 -*- # AUTHOR: vuolter import logging import threading from cheroot import wsgi from cheroot.ssl.builtin import BuiltinSSLAdapter from .app import App # TODO: make configurable to serve API class WebServer(threading.Thread): def __init__(self, pycore): super().__init__() self...
# -*- coding: utf-8 -*- # AUTHOR: vuolter import logging import threading import cheroot from .app import App # TODO: make configurable to serve API class WebServer(threading.Thread): def __init__(self, pycore): super().__init__() self.daemon = True self.pyload = pycore self._ ...
agpl-3.0
Python
9660a40fca056cc96eea6b93d167d1ea8c849d82
Bump version
renalreg/radar,renalreg/radar,renalreg/radar,renalreg/radar
radar/__init__.py
radar/__init__.py
__version__ = '2.44.1'
__version__ = '2.44.0'
agpl-3.0
Python
ea1ea5d11c2423c3de5a946bebc5272669302c1d
bump version
renalreg/radar,renalreg/radar,renalreg/radar,renalreg/radar
radar/__init__.py
radar/__init__.py
__version__ = '2.48.03'
__version__ = '2.48.02'
agpl-3.0
Python
ab46fac39cee78a2d8b01609d69227d24c92ff0e
Bump to 0.4.5
rubik/radon
radon/__init__.py
radon/__init__.py
__version__ = '0.4.5' def main(): '''The entry point for Setuptools.''' from radon.cli import program, log_error try: program() except Exception as e: log_error(e) if __name__ == '__main__': main()
__version__ = '0.4.4' def main(): '''The entry point for Setuptools.''' from radon.cli import program, log_error try: program() except Exception as e: log_error(e) if __name__ == '__main__': main()
mit
Python
99003824b27b9081a0730763fa6aa44737988e3f
test create
pkimber/booking,pkimber/booking,pkimber/booking
booking/tests/test_view.py
booking/tests/test_view.py
from datetime import ( datetime, timedelta, ) from django.core.urlresolvers import reverse from django.test import TestCase from booking.models import Booking from booking.tests.scenario import default_scenario_booking from login.tests.scenario import ( default_scenario_login, get_user_staff, STAF...
from datetime import datetime from django.core.urlresolvers import reverse from django.test import TestCase from booking.models import Booking from booking.tests.scenario import default_scenario_booking from login.tests.scenario import ( default_scenario_login, get_user_staff, STAFF, ) class TestView(Te...
apache-2.0
Python
5e30bd1ae8218a6ad5a2582c15aed99258994d83
Write tests for swappable model.
schinckel/django-boardinghouse,schinckel/django-boardinghouse,schinckel/django-boardinghouse
tests/tests/test_swappable_model.py
tests/tests/test_swappable_model.py
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.test import TestCase, modify_settings from boardinghouse.schema import get_schema_model class TestSwappableModel(TestCase): @modify_settings() def test_schema_model_app_not_found(self): settings.BOAR...
from django.test import TestCase
bsd-3-clause
Python
38c3778b2701fb2cdd071d075c1a3af026eaccd7
Add test case where argument is not iterable.
kerneltask/micropython,kerneltask/micropython,ryannathans/micropython,pozetroninc/micropython,bvernoux/micropython,tralamazza/micropython,SHA2017-badge/micropython-esp32,cwyark/micropython,AriZuu/micropython,adafruit/circuitpython,micropython/micropython-esp32,swegener/micropython,cwyark/micropython,alex-robbins/microp...
tests/basics/string_join.py
tests/basics/string_join.py
print(','.join(())) print(','.join(('a',))) print(','.join(('a', 'b'))) print(','.join([])) print(','.join(['a'])) print(','.join(['a', 'b'])) print(''.join('')) print(''.join('abc')) print(','.join('abc')) print(','.join('abc' for i in range(5))) print(b','.join([b'abc', b'123'])) try: ''.join(None) except Typ...
print(','.join(())) print(','.join(('a',))) print(','.join(('a', 'b'))) print(','.join([])) print(','.join(['a'])) print(','.join(['a', 'b'])) print(''.join('')) print(''.join('abc')) print(','.join('abc')) print(','.join('abc' for i in range(5))) print(b','.join([b'abc', b'123'])) try: print(b','.join(['abc', ...
mit
Python
17e293a57703ea1341a81bc1447d699fb6699b97
Add the amount_to_text file
xrg/openerp-server,splbio/openobject-server,splbio/openobject-server,vnc-biz/openerp-server,gisce/openobject-server,MarkusTeufelberger/openobject-server,splbio/openobject-server,MarkusTeufelberger/openobject-server,MarkusTeufelberger/openobject-server,gisce/openobject-server,vnc-biz/openerp-server,ovnicraft/openerp-ser...
bin/tools/__init__.py
bin/tools/__init__.py
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2004-2008 Tiny SPRL (http://tiny.be) All Rights Reserved. # # $Id$ # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assess...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2004-2008 Tiny SPRL (http://tiny.be) All Rights Reserved. # # $Id$ # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assess...
agpl-3.0
Python
264fad9fbced67b3c840d9b6cc889c38696ab4dc
add resource to top level namespace
ChinaQuants/blaze,alexmojaki/blaze,nkhuyu/blaze,maxalbert/blaze,scls19fr/blaze,nkhuyu/blaze,jdmcbr/blaze,ChinaQuants/blaze,dwillmer/blaze,mrocklin/blaze,mrocklin/blaze,maxalbert/blaze,jcrist/blaze,jcrist/blaze,jdmcbr/blaze,scls19fr/blaze,alexmojaki/blaze,xlhtc007/blaze,cowlicks/blaze,caseyclements/blaze,cpcloud/blaze,c...
blaze/api/__init__.py
blaze/api/__init__.py
from .into import * from .table import * from .dplyr import inject, transform from .resource import resource
from .into import * from .table import * from .dplyr import inject, transform
bsd-3-clause
Python
b9f74dba719d42e1202581724f8cf6f4658c1a63
Handle blank descriptions from google in the google search plugin.
elitan/mybot,jmgao/skybot,rmmh/skybot,ddwo/nhl-bot,callumhogsden/ausbot,craisins/nascarbot,crisisking/skybot,andyeff/skybot,craisins/wh2kbot,Jeebeevee/DouweBot_JJ15,df-5/skybot,TeamPeggle/ppp-helpdesk,olslash/skybot,isislab/botbot,Jeebeevee/DouweBot,parkrrr/skybot,SophosBlitz/glacon,Teino1978-Corp/Teino1978-Corp-skybot...
plugins/google.py
plugins/google.py
import random from util import hook, http def api_get(kind, query): url = 'http://ajax.googleapis.com/ajax/services/search/%s?' \ 'v=1.0&safe=off' return http.get_json(url % kind, q=query) @hook.command def gis(inp): '''.gis <term> -- returns first google image result (safesearch off)''' ...
import random from util import hook, http def api_get(kind, query): url = 'http://ajax.googleapis.com/ajax/services/search/%s?' \ 'v=1.0&safe=off' return http.get_json(url % kind, q=query) @hook.command def gis(inp): '''.gis <term> -- returns first google image result (safesearch off)''' ...
unlicense
Python
54c3cb47554d882eab1f1469b82644b84bb7bb20
Upgrade to v0.2.29
biolink/ontobio,biolink/ontobio
ontobio/__init__.py
ontobio/__init__.py
from __future__ import absolute_import __version__ = '0.2.29' from .ontol_factory import OntologyFactory from .ontol import Ontology, Synonym, TextDefinition from .assoc_factory import AssociationSetFactory from .io.ontol_renderers import GraphRenderer
from __future__ import absolute_import __version__ = '0.2.28' from .ontol_factory import OntologyFactory from .ontol import Ontology, Synonym, TextDefinition from .assoc_factory import AssociationSetFactory from .io.ontol_renderers import GraphRenderer
bsd-3-clause
Python
4915a6642ac26578926783946dcf51964d885ef0
increment version #
lfairchild/PmagPy,lfairchild/PmagPy,lfairchild/PmagPy
pmagpy/version.py
pmagpy/version.py
""" Module contains current pmagpy version number. Version number is displayed by GUIs and used by setuptools to assign number to pmagpy/pmagpy-cli. """ "pmagpy-4.2.13" version = 'pmagpy-4.2.13'
""" Module contains current pmagpy version number. Version number is displayed by GUIs and used by setuptools to assign number to pmagpy/pmagpy-cli. """ "pmagpy-4.2.12" version = 'pmagpy-4.2.12'
bsd-3-clause
Python
315a68365956065b0850c0e6a22eed190a89d401
increment version #
lfairchild/PmagPy,lfairchild/PmagPy,lfairchild/PmagPy
pmagpy/version.py
pmagpy/version.py
""" Module contains current pmagpy version number. Version number is displayed by GUIs and used by setuptools to assign number to pmagpy/pmagpy-cli. """ "pmagpy-3.15.3" version = 'pmagpy-3.15.3'
""" Module contains current pmagpy version number. Version number is displayed by GUIs and used by setuptools to assign number to pmagpy/pmagpy-cli. """ "pmagpy-3.15.2" version = 'pmagpy-3.15.2'
bsd-3-clause
Python
e9260b556904e97ab49412dfdbd2c221b071ac62
Fix broken test
Yelp/paasta,somic/paasta,somic/paasta,gstarnberger/paasta,Yelp/paasta,gstarnberger/paasta
src/tests/paasta_cli/test_cmds_version.py
src/tests/paasta_cli/test_cmds_version.py
import subprocess import sys from mock import patch from StringIO import StringIO from service_deployment_tools.paasta_cli.cmds.version import paasta_version from service_deployment_tools.paasta_cli.paasta_cli import parse_args @patch('sys.stdout', new_callable=StringIO) def test_version(mock_stdout): # paasta_s...
import subprocess import sys from mock import patch from StringIO import StringIO from service_deployment_tools.paasta_cli.cmds.version import paasta_version from service_deployment_tools.paasta_cli.paasta_cli import parse_args @patch('sys.stdout', new_callable=StringIO) def test_version(mock_stdout): # paasta_s...
apache-2.0
Python
1b1652053213f3939b50b2ac66a775cd5d4beed9
Fix import order to avoid circular import
PMEAL/OpenPNM
openpnm/__init__.py
openpnm/__init__.py
r""" ======= OpenPNM ======= OpenPNM is a package for performing pore network simulations of transport in porous materials. OpenPNM consists of several key modules. Each module is consisted of several classes and each class is consisted of a few methods. Here, you'll find a comprehensive documentation of the modules,...
r""" ======= OpenPNM ======= OpenPNM is a package for performing pore network simulations of transport in porous materials. OpenPNM consists of several key modules. Each module is consisted of several classes and each class is consisted of a few methods. Here, you'll find a comprehensive documentation of the modules,...
mit
Python
32bf828445ed897609b908dff435191287f922f4
Clean up old code no longer used
adamlincoln/Bookie,charany1/Bookie,GreenLunar/Bookie,charany1/Bookie,skmezanul/Bookie,charany1/Bookie,adamlincoln/Bookie,GreenLunar/Bookie,pombredanne/Bookie,wangjun/Bookie,bookieio/Bookie,skmezanul/Bookie,pombredanne/Bookie,bookieio/Bookie,GreenLunar/Bookie,pombredanne/Bookie,teodesson/Bookie,skmezanul/Bookie,bookieio...
bookie/views/stats.py
bookie/views/stats.py
"""Basic views with no home""" import logging from pyramid.view import view_config from bookie.models import BmarkMgr from bookie.models.auth import ActivationMgr from bookie.models.auth import UserMgr LOG = logging.getLogger(__name__) @view_config( route_name="dashboard", renderer="/stats/dashboard.mako")...
"""Basic views with no home""" import logging from pyramid.view import view_config from bookie.bcelery import tasks from bookie.models import BmarkMgr from bookie.models.auth import ActivationMgr from bookie.models.auth import UserMgr LOG = logging.getLogger(__name__) @view_config( route_name="dashboard", ...
agpl-3.0
Python
5746ad3e57c476561c139288603c0283ba07adb9
Bump version to 0.5.0
opensistemas-hub/osbrain
osbrain/__init__.py
osbrain/__init__.py
import os import sys from pathlib import Path # While Python 3.4 is supported... if sys.version_info < (3, 5): def mkdir(directory, **kwargs): directory = str(directory) os.makedirs(directory, exist_ok=kwargs['exist_ok']) from os.path import expanduser Path.home = lambda: Path(expanduser('...
import os import sys from pathlib import Path # While Python 3.4 is supported... if sys.version_info < (3, 5): def mkdir(directory, **kwargs): directory = str(directory) os.makedirs(directory, exist_ok=kwargs['exist_ok']) from os.path import expanduser Path.home = lambda: Path(expanduser('...
apache-2.0
Python
b56148220e51dd843ced8be365d29c619a9c1e84
bump to version 2.0.4
peterbe/django-semanticui-form,patryk4815/django-jinja-bootstrap-form,jbzdak/django-bootstrap-form,imposeren/django-bootstrap-form,SunilMohanAdapa/django-bootstrap-form,druss16/danslist,jbzdak/django-bootstrap-form,samuelcolvin/django-jinja-bootstrap-form,druss16/danslist,peterbe/django-semanticui-form,nikolas/django-b...
bootstrapform/meta.py
bootstrapform/meta.py
from distutils.version import StrictVersion VERSION = StrictVersion('2.0.4')
from distutils.version import StrictVersion VERSION = StrictVersion('2.0.3')
bsd-3-clause
Python
4a172aac488382899504aa6a5dadf88c6eae42d9
fix bug with logfile finding
zpace/stellarmass_pca
pca_status.py
pca_status.py
from importer import * import os def log_file_exists(plateifu): status_file_dir = os.path.join( os.environ['STELLARMASS_PCA_RESULTSDIR'], 'results', plateifu) return os.path.exists(os.path.join(status_file_dir, '{}.log'.format(plateifu))) def write_log_file(plateifu, msg): '''write a log...
from importer import * import os def log_file_exists(plateifu): status_file_dir = os.path.join( os.environ['STELLARMASS_PCA_RESULTSDIR'], 'results', plateifu) if os.path.exists(os.path.join(status_file_dir, '{}.log'.format(plateifu))): return True def write_log_file(plateifu, msg): ...
mit
Python
7a4fa1545923e30b1166f4464e5078ef49b4592e
bump bersion
aocks/ox_herd,aocks/ox_herd,aocks/ox_herd
ox_herd/__init__.py
ox_herd/__init__.py
"""The ox_herd package provides a way for herding tests together (like oxen). """ VERSION = '0.6.5'
"""The ox_herd package provides a way for herding tests together (like oxen). """ VERSION = '0.6.4'
bsd-2-clause
Python
a29dad3b094b8d01a695e72cfc5e9b3bd51d6b6a
Use source file with license
proffK/CourseManager
DataBase.py
DataBase.py
''' Copyright 2015 RTeam (Edgar Kaziahmedov, Klim Kireev, Artem Yashuhin) 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 re...
apache-2.0
Python
130acde92df3b0f9aad2f28b61f45e37531f44ac
Make optional sherry.conf optional. Oops.
PaulMcMillan/sherry,PaulMcMillan/sherry
runserver.py
runserver.py
#!/usr/bin/env python from sherry import app # Load debug config app.config.from_pyfile('../sherry.conf', silent=True) app.run(host='0.0.0.0', port=5000, debug=True)
#!/usr/bin/env python from sherry import app # Load debug config app.config.from_pyfile('../sherry.conf', silent=False) app.run(host='0.0.0.0', port=5000, debug=True)
bsd-2-clause
Python
9cfa8e4ca6c2e3adbf47cdd9feb5b0afd0ee0adb
Increase timeout to 20 seconds for UI tests (#2884)
edmorley/treeherder,KWierso/treeherder,edmorley/treeherder,KWierso/treeherder,KWierso/treeherder,KWierso/treeherder,edmorley/treeherder,edmorley/treeherder
tests/jenkins/pages/base.py
tests/jenkins/pages/base.py
from pypom import Page, Region from selenium.webdriver.common.by import By class Base(Page): def __init__(self, driver, base_url=None, timeout=20, **url_kwargs): super(Base, self).__init__(driver, base_url, timeout, **url_kwargs) @property def header(self): return self.Header(self) ...
from pypom import Page, Region from selenium.webdriver.common.by import By class Base(Page): @property def header(self): return self.Header(self) class Header(Region): _root_locator = (By.ID, 'th-global-navbar') _dropdown_menu_switch_page_locator = (By.CSS_SELECTOR, '.open ul > ...
mpl-2.0
Python
6c9f02cb212d8a2567baa66c0020a322d8772d75
Update Clutter to 1.22.0
BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild
packages/clutter.py
packages/clutter.py
GnomeXzPackage ('clutter', version_major = '1.22', version_minor = '0')
GnuXzPackage ('clutter', '1.10.6', sources = [ 'http://source.clutter-project.org/sources/clutter/1.10/%{name}-%{version}.tar.xz' ], )
mit
Python
d984dfa53006b900d969eaa259f6dca9a2a2703e
make output a little more useful
Miserlou/django-zappa,Miserlou/django-zappa
django_zappa/management/commands/rollback.py
django_zappa/management/commands/rollback.py
from django.core.management.base import BaseCommand from zappa.zappa import Zappa class Command(BaseCommand): help = '''Rollback to specific version of a Zappa deploy. python manage.py rollback dev 3''' def add_arguments(self, parser): parser.add_argument('rollback_values', nargs='+', ty...
from django.core.management.base import BaseCommand from zappa.zappa import Zappa class Command(BaseCommand): help = '''Rollback to specific version of a Zappa deploy. python manage.py rollback dev 3''' def add_arguments(self, parser): parser.add_argument('rollback_values', nargs='+', ty...
mit
Python
61e47ca3517f4dd5ca21c9f14e200e758c914e53
bump version
LeadPages/gcloud_requests
gcloud_requests/__init__.py
gcloud_requests/__init__.py
import logging logger = logging.getLogger("gcloud_requests") __version__ = "0.6.0"
import logging logger = logging.getLogger("gcloud_requests") __version__ = "0.5.0"
mit
Python
617fbf072b6fc0983567e45d43124b3d2924d309
Remove leftovers, thanks @ericpre
hyperspy/start_jupyter_cm
start_jupyter_cm/__init__.py
start_jupyter_cm/__init__.py
__version__ = "2.0.dev"
import os import argparse __version__ = "2.0.dev"
bsd-3-clause
Python
a0d56fdf59c3e50c461b088ff8ac1367b0f19b20
Add test_trailing_slashes
Alir3z4/python-sanitize
tests/test_sanitize_html.py
tests/test_sanitize_html.py
from unittest import TestCase import sanitize class TestSanitizeHTML(TestCase): def _html(self, html_source, expected_data, base_uri=None, add_nofollow=False): """ :type html_source: str :type expected_data: str :type base_uri: str :type add_nofollow: bool """ ...
from unittest import TestCase import sanitize class TestSanitizeHTML(TestCase): def _html(self, html_source, expected_data, base_uri=None, add_nofollow=False): """ :type html_source: str :type expected_data: str :type base_uri: str :type add_nofollow: bool """ ...
bsd-2-clause
Python
c58030ee50ae6220670a9cd651f6d03136edfaa1
fix on parsed url
pablodav/burp_server_reports,pablodav/burp_server_reports
burp_reports/lib/urlget.py
burp_reports/lib/urlget.py
# -*- coding: utf8 -*- import requests # Doc from http://docs.python-requests.org/en/master/user/quickstart/ import socket # https://requests-cache.readthedocs.io/en/latest/user_guide.html#usage import requests_cache from datetime import timedelta from . files import temp_file # http://stackoverflow.com/questions/27062...
# -*- coding: utf8 -*- import requests # Doc from http://docs.python-requests.org/en/master/user/quickstart/ import socket # https://requests-cache.readthedocs.io/en/latest/user_guide.html#usage import requests_cache from datetime import timedelta from . files import temp_file # http://stackoverflow.com/questions/27062...
mit
Python
24973a1def9f4fdf9b5da639491ef01b59dddab5
add inline to occurrence from taxon
wabarr/census-paleo,wabarr/census-paleo,wabarr/census-paleo
census_paleo/admin.py
census_paleo/admin.py
from census_paleo.models import * from django.contrib import admin from ajax_select import make_ajax_form from ajax_select.admin import AjaxSelectAdmin, AjaxSelectAdminTabularInline #this is straight out of django docs class OccurrenceInline(AjaxSelectAdminTabularInline): model = occurrence form = make_ajax_f...
from census_paleo.models import * from django.contrib import admin from ajax_select import make_ajax_form from ajax_select.admin import AjaxSelectAdmin, AjaxSelectAdminTabularInline #this is straight out of django docs class taxonomyAdmin(admin.ModelAdmin): list_display = ("tclass","order","family","subFamily","t...
mit
Python
b7bdf4d9746fd61f2cacc104ece2c7eaf7189fc7
bump the version to 0.0.12
ceph/chacractl,alfredodeza/chacractl
chacractl/__init__.py
chacractl/__init__.py
config = {'verbosity': 'info'} __version__ = '0.0.12'
config = {'verbosity': 'info'} __version__ = '0.0.11'
mit
Python
adc95d58f523c71ca11c1084ee0c0230bb4ee3d9
Fix url
checkmyws/checkmyws-python
checkmyws/__init__.py
checkmyws/__init__.py
# -*- coding: utf-8 -*- __description__ = "Check my Website client" __author__ = "Check my Website Team" __author_email__ = "contact@checkmy.ws" __copyright__ = "Copyright 2014 Novateek" __license__ = "MIT License" __version__ = "0.1.2" __url__ = "https://github.com/checkmyws/checkmyws-python" from checkmyws.client ...
# -*- coding: utf-8 -*- __description__ = "Check my Website client" __author__ = "Check my Website Team" __author_email__ = "contact@checkmy.ws" __copyright__ = "Copyright 2014 Novateek" __license__ = "MIT License" __version__ = "0.1.2" __url__ = "http://www.checkmy.ws/" from checkmyws.client import CheckmywsClient ...
mit
Python
1a0dde69167a5d8761213485e11166e373641af4
Bump to version 0.8.0
reubano/ckanny,reubano/ckanny,reubano/ckanutils,luiscape/ckanutils,luiscape/ckanutils,reubano/ckanutils
ckanutils/__init__.py
ckanutils/__init__.py
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ ckanutils ~~~~~~~~~ Miscellaneous CKAN utility scripts Examples: literal blocks:: python example_google.py Attributes: module_level_variable1 (int): Module level variables may be documented in """ __title__ = 'CKAN Utils' __package_name__ = 'c...
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ ckanutils ~~~~~~~~~ Miscellaneous CKAN utility scripts Examples: literal blocks:: python example_google.py Attributes: module_level_variable1 (int): Module level variables may be documented in """ __title__ = 'CKAN Utils' __package_name__ = 'c...
mit
Python
059f213bb2ca67e3a82ab754aedd5ed2f61c13e8
Rename the YAML file to plugins.yml.
ClusterHQ/powerstrip,cilium-team/powerstrip,Metaswitch/powerstrip,cilium-team/powerstrip,intfrr/powerstrip,Metaswitch/powerstrip,intfrr/powerstrip,w4ngyi/powerstrip,w4ngyi/powerstrip,ClusterHQ/powerstrip,mattaitchison/powerstrip,mattaitchison/powerstrip
passthru/_config.py
passthru/_config.py
# Copyright ClusterHQ Limited. See LICENSE file for details. # -*- test-case-name: powerstrip.test.test_config -*- from collections import namedtuple class NoConfiguration(Exception): """ The configuration file was not found. """ class InvalidConfiguration(Exception): """ The configuration file ...
# Copyright ClusterHQ Limited. See LICENSE file for details. # -*- test-case-name: powerstrip.test.test_config -*- from collections import namedtuple class NoConfiguration(Exception): """ The configuration file was not found. """ class InvalidConfiguration(Exception): """ The configuration file ...
apache-2.0
Python
9a29d34b7580a7a699fb17e8b6287a4a8e858035
remove unused import from urls.py
byteweaver/django-posts,byteweaver/django-posts
posts/urls.py
posts/urls.py
from django.conf.urls import patterns, url from views import PostListView, PostDetailView urlpatterns = patterns('', url(r'^$', PostListView.as_view(), name='list'), url(r'^(?P<pk>[\d]+)/$', PostDetailView.as_view(), name='detail'), url(r'^(?P<slug>[-\w]+)/$', PostDetailView.as_view(), name='detail-by-sl...
from django.conf.urls import patterns, include, url from views import PostListView, PostDetailView urlpatterns = patterns('', url(r'^$', PostListView.as_view(), name='list'), url(r'^(?P<pk>[\d]+)/$', PostDetailView.as_view(), name='detail'), url(r'^(?P<slug>[-\w]+)/$', PostDetailView.as_view(), name='det...
bsd-3-clause
Python
46988192d020fa9f9f86879ee3efad3131f515cd
remove a debug print out
bfrog/whizzer
whizzer/__init__.py
whizzer/__init__.py
import signal import logging import pyev from .defer import Deferred, AlreadyCalledError, CancelledError, TimeoutError from .protocol import Protocol, ProtocolFactory from .server import SocketServer, TcpServer, UnixServer from .client import SocketClient, TcpClient, UnixClient from .transport import SocketTransport...
import signal import logging import pyev from .defer import Deferred, AlreadyCalledError, CancelledError, TimeoutError from .protocol import Protocol, ProtocolFactory from .server import SocketServer, TcpServer, UnixServer from .client import SocketClient, TcpClient, UnixClient from .transport import SocketTransport...
mit
Python
6cb7d0c5bf5a55e171c342b18a73c883c82cfc53
Fix v2.MediaFileContent bugs, use radio buttons for type
matthiask/django-content-editor,mjl/feincms,joshuajonah/feincms,matthiask/feincms2-content,mjl/feincms,matthiask/feincms2-content,nickburlett/feincms,joshuajonah/feincms,nickburlett/feincms,nickburlett/feincms,joshuajonah/feincms,michaelkuty/feincms,feincms/feincms,joshuajonah/feincms,matthiask/django-content-editor,mi...
feincms/content/medialibrary/v2.py
feincms/content/medialibrary/v2.py
from django.contrib import admin from django.db import models from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from feincms.admin.item_editor import FeinCMSInline from feincms.module.medialibrary.fields import ContentWithMediaFile class MediaFileContentInlin...
from django.db import models from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from feincms.module.medialibrary.fields import ContentWithMediaFile class MediaFileContent(ContentWithMediaFile): """ Rehashed, backwards-incompatible media file content wh...
bsd-3-clause
Python
9e1346534dccfee321e8d30e16b264a2a13541b0
Add persistent setting to mounting commands
CovenantEyes/py_win_unc,nithinphilips/py_win_unc
win_unc/mounting.py
win_unc/mounting.py
""" Contains classes for dealing with UNC paths on Windows. """ from win_unc.internal.shell import run, ShellCommandError from win_unc.internal.loggers import no_logging def get_mounting_command(unc_path, drive_letter, username=None, password=None, persistent=False): """ Returns the Windows com...
""" Contains classes for dealing with UNC paths on Windows. """ from win_unc.internal.shell import run, ShellCommandError from win_unc.internal.loggers import no_logging def get_mounting_command(unc_path, drive_letter, username=None, password=None): """ Returns the Windows command to be used to...
mit
Python
c96f98db97411fb3937c8896c81de1efb43cc1d3
fix alembic test
inveniosoftware/invenio-communities,inveniosoftware/invenio-communities,inveniosoftware/invenio-communities,inveniosoftware/invenio-communities
tests/communities/alembic/test_alembic.py
tests/communities/alembic/test_alembic.py
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016-2021 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Test alembic recipes for Invenio-RDM-Records.""" import pytest from invenio_db.ut...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016-2021 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Test alembic recipes for Invenio-RDM-Records.""" import pytest from invenio_db.ut...
mit
Python
ecfb898b8b8aae12ee2e31060aeb2971eec08707
fix type error
mk270/ktbh,mk270/ktbh
ktbh/importer.py
ktbh/importer.py
import json import subprocess import urllib import tempfile import requests import subprocess import os base_url = 'http://localhost:1237/hack_csv/' loadds = "/home/mk270/bin/loadds" def setup_import(model, url, date_formats): dataset_name = model["dataset"]["name"] filename = tempfile.mktemp() with file...
import json import subprocess import urllib import tempfile import requests import subprocess import os base_url = 'http://localhost:1237/hack_csv/' loadds = "/home/mk270/bin/loadds" def setup_import(model, url, date_formats): dataset_name = model["dataset"]["name"] filename = tempfile.mktemp() with file...
agpl-3.0
Python
57876d05c97008a65bc2ae7130984beaae42242d
check num shards is power of 2
qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq
corehq/sql_db/config.py
corehq/sql_db/config.py
from django.conf import settings from .exceptions import PartitionValidationError FORM_PROCESSING_GROUP = 'form_processing' PROXY_GROUP = 'proxy' MAIN_GROUP = 'main' class PartitionConfig(object): def __init__(self): self._validate() def _validate(self): for group, dbs in self.partition_con...
from django.conf import settings from .exceptions import PartitionValidationError FORM_PROCESSING_GROUP = 'form_processing' PROXY_GROUP = 'proxy' MAIN_GROUP = 'main' class PartitionConfig(object): def __init__(self): self._validate() def _validate(self): for group, dbs in self.partition_con...
bsd-3-clause
Python
c64149d3b1bb4998bddd6c05c85f0b3129f47020
Increase the default timeout to 1s.
LEW21/pydbus,LEW21/pydbus
pydbus/bus.py
pydbus/bus.py
from gi.repository import Gio from .proxy import ProxyMixin from .bus_names import OwnMixin, WatchMixin from .subscription import SubscriptionMixin from .registration import RegistrationMixin from .publication import PublicationMixin class Bus(ProxyMixin, OwnMixin, WatchMixin, SubscriptionMixin, RegistrationMixin, Pub...
from gi.repository import Gio from .proxy import ProxyMixin from .bus_names import OwnMixin, WatchMixin from .subscription import SubscriptionMixin from .registration import RegistrationMixin from .publication import PublicationMixin class Bus(ProxyMixin, OwnMixin, WatchMixin, SubscriptionMixin, RegistrationMixin, Pub...
lgpl-2.1
Python
bdaa1ed93db29d430b78495a82b17d7fb4ed363a
Update tasks.py
Aladom/django-libphon
libphon/tasks.py
libphon/tasks.py
# -*- coding: utf-8 -*- from celery import shared_task from .sms.backends import get_backend @shared_task def send_sms(phone, message, send_date=None): SMS = get_backend() sms = SMS(message, phone, send_date=send_date) sms.send() return sms
# -*- coding: utf-8 -*- from celery import shared_task from .sms.backend import get_backend @shared_task def send_sms(phone, message, send_date=None): SMS = get_backend() sms = SMS(message, phone, send_date=send_date) sms.send() return sms
mit
Python
c5a2c7e802d89ea17a7f0fd1a9194eaab8eaf61d
Use a env var to get config
pahumadad/weight-control,pahumadad/weight-control,pahumadad/weight-control,pahumadad/weight-control
wcontrol/src/main.py
wcontrol/src/main.py
import os from flask import Flask app = Flask(__name__) app.config.from_object(os.environ.get("WCONTROL_CONF"))
from flask import Flask app = Flask(__name__) app.config.from_object("config")
mit
Python
500773a40c08f7d1a7df75c82b730405dcce41ee
Add --filter-download
valohai/valohai-cli
valohai_cli/commands/execution/outputs.py
valohai_cli/commands/execution/outputs.py
import os import time from fnmatch import fnmatch import click import requests from valohai_cli.ctx import get_project from valohai_cli.messages import print_table, success, warn from valohai_cli.utils import force_text @click.command() @click.argument('counter') @click.option('--download', '-d', type=click.Path(fi...
import os import time import click import requests from valohai_cli.ctx import get_project from valohai_cli.messages import print_table, success, warn from valohai_cli.utils import force_text @click.command() @click.argument('counter') @click.option('--download', '-d', type=click.Path(file_okay=False), ...
mit
Python
bd2af8786f160d6ff7b15c56b2408aa1aba218c1
Update context in bulk instead of setting each attribute individually
mfcovington/djangocms-lab-data,mfcovington/djangocms-lab-data,mfcovington/djangocms-lab-data
cms_lab_data/views.py
cms_lab_data/views.py
from django.shortcuts import render from django.views.generic import DetailView, ListView from .helpers import get_data_file_list_tags from .models import DataFile, DataFileSet def data_view(request): context = { 'data_file_count': DataFile.objects.count(), 'data_file_set_count': DataFileSet.objec...
from django.shortcuts import render from django.views.generic import DetailView, ListView from .helpers import get_data_file_list_tags from .models import DataFile, DataFileSet def data_view(request): context = { 'data_file_count': DataFile.objects.count(), 'data_file_set_count': DataFileSet.objec...
bsd-3-clause
Python
8d669dc8b09b8d7c8bc9b4c123e2bdd7c3521521
Fix Tempest tests failing on gate-solum-devstack-dsvm
devdattakulkarni/test-solum,openstack/solum,ed-/solum,openstack/solum,ed-/solum,gilbertpilz/solum,ed-/solum,julienvey/solum,gilbertpilz/solum,stackforge/solum,ed-/solum,stackforge/solum,gilbertpilz/solum,gilbertpilz/solum,devdattakulkarni/test-solum,julienvey/solum
functionaltests/api/base.py
functionaltests/api/base.py
# -*- coding: utf-8 -*- # # Copyright 2013 - Noorul Islam K M # # 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 applic...
# -*- coding: utf-8 -*- # # Copyright 2013 - Noorul Islam K M # # 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 applic...
apache-2.0
Python
eff5e0e6203b11a3cc6d0068c17867e21b67eeb6
add argument for using mirrored rabbitmq.
spcs/synaps,spcs/synaps,spcs/synaps,spcs/synaps
synaps-api/synaps/rpc/__init__.py
synaps-api/synaps/rpc/__init__.py
# Copyright 2012 Samsung SDS # All Rights Reserved from synaps import flags from synaps.utils import strtime from synaps import log as logging from synaps.exception import RpcInvokeException import pika, json LOG = logging.getLogger(__name__) FLAGS = flags.FLAGS PUT_METRIC_DATA_MSG_ID = 0x0001 PUT_METRIC_ALARM_MSG_...
# Copyright 2012 Samsung SDS # All Rights Reserved from synaps import flags from synaps.utils import strtime from synaps import log as logging from synaps.exception import RpcInvokeException import pika, json LOG = logging.getLogger(__name__) FLAGS = flags.FLAGS PUT_METRIC_DATA_MSG_ID = 0x0001 PUT_METRIC_ALARM_MSG_...
apache-2.0
Python
79650f795f16e360338135e1d0819c3597c32eb6
enable ECDHE ciphers
iot-factory/synapse,matrix-org/synapse,iot-factory/synapse,matrix-org/synapse,illicitonion/synapse,matrix-org/synapse,howethomas/synapse,illicitonion/synapse,iot-factory/synapse,TribeMedia/synapse,illicitonion/synapse,matrix-org/synapse,TribeMedia/synapse,TribeMedia/synapse,howethomas/synapse,rzr/synapse,illicitonion/s...
synapse/crypto/context_factory.py
synapse/crypto/context_factory.py
from twisted.internet import reactor, ssl from OpenSSL import SSL from twisted.internet._sslverify import _OpenSSLECCurve, _defaultCurveName class ServerContextFactory(ssl.ContextFactory): """Factory for PyOpenSSL SSL contexts that are used to handle incoming connections and to make connections to remote serv...
from twisted.internet import reactor, ssl from OpenSSL import SSL class ServerContextFactory(ssl.ContextFactory): """Factory for PyOpenSSL SSL contexts that are used to handle incoming connections and to make connections to remote servers.""" def __init__(self, config): self._context = SSL.Contex...
apache-2.0
Python
1a4bb009f590a67a5ca701c4060c3560be73f6cf
Read for 5.29
johansteffner/raven-python,getsentry/raven-python,johansteffner/raven-python,johansteffner/raven-python,getsentry/raven-python,getsentry/raven-python
raven/__init__.py
raven/__init__.py
""" raven ~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import os import os.path __all__ = ('VERSION', 'Client', 'get_version') VERSION = '5.29.0.dev0' def _get_git_revision(path): revis...
""" raven ~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import os import os.path __all__ = ('VERSION', 'Client', 'get_version') VERSION = '5.28.0' def _get_git_revision(path): revision_f...
bsd-3-clause
Python
f29ec2bcadfbd7e46c98150215a3dbb3edc0ae0e
Add fileencoding decl to make non-utf8 people happy
mgorny/cpuid2cpuflags,mgorny/cpuid2cpuflags
cpuinfo2cpuflags-x86.py
cpuinfo2cpuflags-x86.py
#!/usr/bin/env python # vim:se fileencoding=utf8 # (c) 2015 Michał Górny # Released under the 2-clause BSD license import collections, errno, os, os.path, re, sys def main(*argv): if 'PORTDIR' in os.environ: portdir = os.environ['PORTDIR'] else: try: import portage except ImportError: return 'Unable to ...
#!/usr/bin/env python # (c) 2015 Michał Górny # Released under the 2-clause BSD license import collections, errno, os, os.path, re, sys def main(*argv): if 'PORTDIR' in os.environ: portdir = os.environ['PORTDIR'] else: try: import portage except ImportError: return 'Unable to determine PORTDIR, please s...
bsd-2-clause
Python
3b0b34da1ad83b12583d62bdc027d357d6ff9e12
add PyQuery python script
colddew/mix-python
crawler-demo/PyQuery.py
crawler-demo/PyQuery.py
# -*- coding:utf-8 -*- from pyquery import PyQuery as pq from lxml import etree # doc = pq(filename='hello.html') # doc = pq("<html></html>") # doc = pq(etree.fromstring("<html></html>")) # doc = pq('http://www.baidu.com') html = """ <div> <ul> <li class="item-0">first item</li> <li class="item...
# -*- coding:utf-8 -*-
mit
Python
98dfc5569fb1ae58905f8b6a36deeda324dcdd7b
Add deprecated flag for teachers and departments
LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr
cronos/teilar/models.py
cronos/teilar/models.py
from django.db import models class Departments(models.Model): urlid = models.IntegerField(unique = True) name = models.CharField("Department name", max_length = 200) deprecated = models.BooleanField(default = False) def __unicode__(self): return self.name class Teachers(models.Model): url...
from django.db import models class Departments(models.Model): urlid = models.IntegerField(unique = True) name = models.CharField("Department name", max_length = 200) class Teachers(models.Model): urlid = models.CharField("URL ID", max_length = 30, unique = True) name = models.CharField("Teacher name",...
agpl-3.0
Python
13eecb8d49f1663a0e1af3d53bb9d583f1231391
Update capability.py
Nateowami/flex-languagedepot-metadata,Nateowami/flex-languagedepot-metadata
src/capabilities/capability.py
src/capabilities/capability.py
from abc import ABCMeta, abstractmethod class capability(metaclass=ABCMeta): # used during initialization. returns a string for the single catergory # of information the capability will extract, or a list of strings for # each category the capability will extract. @abstractmethod def getColumns(x)...
from abc import ABCMeta, abstractmethod class capability(metaclass=ABCMeta): # used during initialization. returns a string for the single catergory # of information the capability will extract, or a list of strings for # each category the capability will extract. @abstractmethod def getColumns(x)...
mit
Python
2ac94aa922dbf2d07039bc6545e7b1d31c5c9e4e
Check to see if qt is loaded; if so, export QtProgress class
Clyde-fare/cclib,Schamnad/cclib,jchodera/cclib,ghutchis/cclib,gaursagar/cclib,berquist/cclib,andersx/cclib,ben-albrecht/cclib,Schamnad/cclib,cclib/cclib,ATenderholt/cclib,cclib/cclib,langner/cclib,berquist/cclib,Clyde-fare/cclib,langner/cclib,ben-albrecht/cclib,ATenderholt/cclib,ghutchis/cclib,jchodera/cclib,andersx/cc...
src/cclib/progress/__init__.py
src/cclib/progress/__init__.py
__revision__ = "$Revision$" from textprogress import TextProgress import sys if 'qt' in sys.modules.keys(): from qtprogress import QtProgress
__revision__ = "$Revision$" from textprogress import TextProgress try: import qt except ImportError: pass # import QtProgress will cause an error else: from qtprogress import QtProgress
lgpl-2.1
Python
23670bb0c8c6f0f59fc88b7edf41cd12ff22d2da
Fix default inbound max msg size (#5883)
googleapis/java-texttospeech,googleapis/java-texttospeech,googleapis/java-texttospeech
google-cloud-texttospeech/synth.py
google-cloud-texttospeech/synth.py
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
Python
9a85e61f7f4c0d02afcfe4953b47953c31af5acb
Change production static/media path
devunt/hydrocarbon,devunt/hydrocarbon,devunt/hydrocarbon
hydrocarbon/settings/production.py
hydrocarbon/settings/production.py
import os from hydrocarbon.settings.base import * # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '***REMOVED***' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = False TEMPLATE_DEBUG = False # ALLOWED HOSTS ALLOWED_HOSTS = ['herocomics.kr'] # Cache backend...
import os from hydrocarbon.settings.base import * # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '***REMOVED***' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = False TEMPLATE_DEBUG = False # ALLOWED HOSTS ALLOWED_HOSTS = ['herocomics.kr'] # Cache backend...
mit
Python
ec0a6b2a44dd061e7a2c1c5eafae3344a67389b1
Break up long lines.
ohsu-qin/qipipe
test/unit/interfaces/test_move.py
test/unit/interfaces/test_move.py
import os import shutil from nose.tools import (assert_equal, assert_false, assert_true) from qipipe.interfaces.move import Move from test import ROOT FIXTURE = os.path.join(ROOT, 'fixtures', 'interfaces', 'move', 'small.txt') """The test fixture file.""" RESULTS = os.path.join(ROOT, 'results', 'interfaces', 'move') ...
import os import shutil from nose.tools import (assert_equal, assert_false, assert_true) from qipipe.interfaces.move import Move from test import ROOT FIXTURE = os.path.join(ROOT, 'fixtures', 'interfaces', 'move', 'small.txt') """The test fixture file.""" RESULTS = os.path.join(ROOT, 'results', 'interfaces', 'move') ...
bsd-2-clause
Python
d692d820180ed224f18a75d8a57135d40f694730
add a simpler test
mldbai/mldb,mldbai/mldb,mldbai/mldb,mldbai/mldb,mldbai/mldb,mldbai/mldb,mldbai/mldb
testing/MLDB-2108-split-string.py
testing/MLDB-2108-split-string.py
# # MLDB-2108-split-string.py # Mathieu Marquis Bolduc, 2017-01-11 # This file is part of MLDB. Copyright 2017 Datacratic. All rights reserved. # mldb = mldb_wrapper.wrap(mldb) # noqa class MLDB2108SplitStringTest(MldbUnitTest): # noqa def test_row(self): res = mldb.query("SELECT token_split(x, '::') A...
# # MLDB-2108-split-string.py # Mathieu Marquis Bolduc, 2017-01-11 # This file is part of MLDB. Copyright 2017 Datacratic. All rights reserved. # mldb = mldb_wrapper.wrap(mldb) # noqa class MLDB2108SplitStringTest(MldbUnitTest): # noqa def test_row(self): res = mldb.query("SELECT token_split(x, '::') A...
apache-2.0
Python
3dff331c71b5a5416efd1a1d3877c74ab8e8cf73
Fix test
datosgobar/portal-andino,datosgobar/portal-andino
tests/configurations/tests_ssl.py
tests/configurations/tests_ssl.py
#! coding: utf-8 import unittest import requests import nose.tools as nt class TestSSL(unittest.TestCase): def test_ssl_port_returns_response_with_status_200(self): req = requests.get('https://localhost:7777', verify=False) nt.assert_equals(req.status_code, 200) def test_ssl_port_returns_re...
#! coding: utf-8 import unittest import requests import nose.tools as nt class TestSSL(unittest.TestCase): def test_ssl_port_returns_response_with_status_200(self): req = requests.get('https://localhost:7777', verify=False) nt.assert_equals(req.status_code, 200) def test_ssl_port_returns_re...
mit
Python
3dfea171f128baf1a3636376cfb3e7c7009fd003
fix F841 local variable 'stop' is assigned to but never used
LudwigKnuepfer/RIOT,kbumsik/RIOT,rfuentess/RIOT,lazytech-org/RIOT,jasonatran/RIOT,miri64/RIOT,LudwigKnuepfer/RIOT,jasonatran/RIOT,mtausig/RIOT,ant9000/RIOT,smlng/RIOT,x3ro/RIOT,rfuentess/RIOT,OTAkeys/RIOT,kYc0o/RIOT,kaspar030/RIOT,RIOT-OS/RIOT,biboc/RIOT,aeneby/RIOT,gebart/RIOT,kbumsik/RIOT,jasonatran/RIOT,biboc/RIOT,b...
tests/evtimer_msg/tests/01-run.py
tests/evtimer_msg/tests/01-run.py
#!/usr/bin/env python3 # Copyright (C) 2016 Freie Universität Berlin # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. from __future__ import print_function import os import sys sys.path.append(os....
#!/usr/bin/env python3 # Copyright (C) 2016 Freie Universität Berlin # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. from __future__ import print_function import os import sys sys.path.append(os....
lgpl-2.1
Python
9adf3bdc50d9f67b65f49df9f704730b2c9ac1c9
Fix casing test on Windows
kennethreitz/pipenv
tests/integration/test_windows.py
tests/integration/test_windows.py
import os from pipenv.project import Project from pipenv._compat import Path import pytest # This module is run only on Windows. pytestmark = pytest.mark.skipif(os.name != 'nt', reason="only relevant on windows") @pytest.mark.project def test_case_changes_windows(PipenvInstance, pypi): """Test project matchin...
import os from pipenv.project import Project from pipenv._compat import Path import pytest # This module is run only on Windows. pytestmark = pytest.mark.skipif(os.name != 'nt', reason="only relevant on windows") @pytest.mark.project def test_case_changes_windows(PipenvInstance, pypi): """Test project matchin...
mit
Python
eb4a1355426435a8df711fb3ae9bb0bbf9431f2d
Add additional test case
maxalbert/tohu
tests/v7/test_custom_generator.py
tests/v7/test_custom_generator.py
import pytest from tohu.v7.primitive_generators import Integer, FakerGenerator, HashDigest from tohu.v7.custom_generator import make_new_custom_generator def test_make_custom_generator(): # # Create empty custom generator. # g = make_new_custom_generator() assert g.fields == [] assert g.field_...
from tohu.v7.primitive_generators import Integer, FakerGenerator, HashDigest from tohu.v7.custom_generator import make_new_custom_generator def test_make_custom_generator(): # # Create empty custom generator. # g = make_new_custom_generator() assert g.fields == [] assert g.field_generators == ...
mit
Python
4948ac3e41e822088f47558a674acda2b9e397fa
Add helper methods
michaeljoseph/remarkable,michaeljoseph/remarkable,michaeljoseph/remarkable
remarkable/cli.py
remarkable/cli.py
""" remarkable. Usage: remarkable [options] remark <path-to-markdown-file> remarkable -h | --help Options: --debug Debug. -h --help Show this screen. """ import logging from docopt import docopt from jinja2 import Environment, PackageLoader import remarkable log = logging.getLog...
""" remarkable. Usage: remarkable [options] remark <path-to-markdown-file> remarkable -h | --help Options: --debug Debug. -h --help Show this screen. """ import logging from docopt import docopt from jinja2 import Environment, PackageLoader import remarkable log = logging.getLog...
apache-2.0
Python
7aa197abc967785714bc449a29f6804836305a0e
update model
SakiFu/django-imager,SakiFu/django-imager,SakiFu/django-imager
imagersite/imager_images/models.py
imagersite/imager_images/models.py
from django.db import models from django.contrib.auth.models import User from django.utils.encoding import python_2_unicode_compatible PUBLISHED_CHOICES = ( ('private', 'private'), ('shared', 'shared'), ('public', 'public') ) @python_2_unicode_compatible class Photo(models.Model): image = models.Imag...
from django.db import models from django.contrib.auth.models import User from django.utils.encoding import python_2_unicode_compatible PUBLISHED_CHOICES = ( ('private', 'private'), ('shared', 'shared'), ('public', 'public') ) @python_2_unicode_compatible class Photo(models.Model): image = models.Imag...
mit
Python
7ff136513c1cbc1c4c8de6a8a421e06a848a6796
Bump to 2.1.0
mar10/wsgidav,mar10/wsgidav,mar10/wsgidav,mar10/wsgidav
wsgidav/_version.py
wsgidav/_version.py
""" Current WsgiDAV version number. http://peak.telecommunity.com/DevCenter/setuptools#specifying-your-project-s-version http://peak.telecommunity.com/DevCenter/setuptools#tagging-and-daily-build-or-snapshot-releases Example "1.2.0b1", "1.2.0pre1" or "1.2.0" """ __version__ = "2.1.0"
""" Current WsgiDAV version number. http://peak.telecommunity.com/DevCenter/setuptools#specifying-your-project-s-version http://peak.telecommunity.com/DevCenter/setuptools#tagging-and-daily-build-or-snapshot-releases Example "1.2.0b1", "1.2.0pre1" or "1.2.0" """ __version__ = "2.0.2"
mit
Python
c10e66be6a6f3c51373386628dcd90b1b5c7ea5d
fix spacing
gatita/django-imager,gatita/django-imager,gatita/django-imager
imagersite/imager_images/models.py
imagersite/imager_images/models.py
from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.contrib.auth.models import User @python_2_unicode_compatible class Photo(models.Model): user = models.ForeignKey( User, related_name='photos', null=False ) img = models.ImageFiel...
from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.contrib.auth.models import User @python_2_unicode_compatible class Photo(models.Model): user = models.ForeignKey( User, related_name='photos', null=False ) img = models.ImageFiel...
mit
Python
26555f79936712e98c9b83cf3244d8af6cdf0bf0
Fix up __init__.py docstring
maxcountryman/wtforms,mfa/wtforms-clone,mfa/wtforms-clone
wtforms/__init__.py
wtforms/__init__.py
""" WTForms ======= WTForms is a forms handling library for web applications in python. For documentation and help please visit the `official website <http://wtforms.simplecodes.com/>`_. The `WTForms tip <http://dev.simplecodes.com/hg/wtforms/archive/tip.zip#egg=WTForms-dev>`_ is installable via `easy_install` with `...
""" wtforms ~~~~~~~ WTForms is a HTTP/HTML forms handling library, written in Python. It handles definition, validation and rendering in a flexible and i18n friendly way. It heavily reduces boilerplate and is completely unicode aware. Check out the hg repository at http://dev.simp...
bsd-3-clause
Python
0d9fb3684a5df00390423bcf226b31e10a6f93e9
add related_name to album cover
MigrantJ/django-imager,sjschmidt44/django-imager,MigrantJ/django-imager,sjschmidt44/django-imager,sjschmidt44/django-imager,MigrantJ/django-imager
imagersite/imager_images/models.py
imagersite/imager_images/models.py
from django.db import models from django.contrib.auth.models import User PUBLISHED_CHOICES = ( ('private', 'private'), ('shared', 'shared'), ('public', 'public') ) class Photos(models.Model): image = models.ImageField(upload_to='photo_files/%Y-%m-%d') user = models.ForeignKey( User, ...
from django.db import models from django.contrib.auth.models import User PUBLISHED_CHOICES = ( ('private', 'private'), ('shared', 'shared'), ('public', 'public') ) class Photos(models.Model): image = models.ImageField(upload_to='photo_files/%Y-%m-%d') user = models.ForeignKey( User, ...
mit
Python
3d0d5837055e089148034818f43c7276d5e9ae78
update test
sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana
test/gui/test_sequana_gui.py
test/gui/test_sequana_gui.py
import sys import unittest from sequana.gui import sequana_gui from PyQt5 import QtWidgets as QW from PyQt5.QtTest import QTest from PyQt5.QtCore import Qt app = QW.QApplication(sys.argv) class SequanaGUITest(unittest.TestCase): def setUp(self): self.form = sequana_gui.SequanaGUI(ipython=False) de...
import sys import unittest from sequana.gui import sequana_gui from PyQt5 import QtWidgets as QW from PyQt5.QtTest import QTest from PyQt5.QtCore import Qt app = QW.QApplication(sys.argv) class SequanaGUITest(unittest.TestCase): def setUp(self): self.form = sequana_gui.SequanaGUI(ipython=False) de...
bsd-3-clause
Python
ac4c0016ce6c12175abe8d437d36e69690b60a8e
Update abusehelper.py
aaronkaplan/intelmq,sch3m4/intelmq,sch3m4/intelmq,pkug/intelmq,robcza/intelmq,robcza/intelmq,certtools/intelmq,aaronkaplan/intelmq,certtools/intelmq,robcza/intelmq,pkug/intelmq,certtools/intelmq,pkug/intelmq,pkug/intelmq,sch3m4/intelmq,robcza/intelmq,sch3m4/intelmq,aaronkaplan/intelmq
src/bots/inputs/abusehelper/abusehelper.py
src/bots/inputs/abusehelper/abusehelper.py
import sys import xmpp from lib.bot import * from lib.utils import * from lib.event import * from lib.cache import * # Required parameters: # - jid # - password # - source_room # - force_tls class AbuseHelperBot(Bot): def handle_message(self, xmpp_connection, message): try: event = Event.from...
import sys import xmpp from lib.bot import * from lib.utils import * from lib.event import * from lib.cache import * # Required parameters: # - jid # - password # - source_room # - force_tls class AbuseHelperBot(Bot): def handle_message(self, xmpp_connection, message): try: event = Event.from...
agpl-3.0
Python
ce8bf61f7538a79c7dcb25ad648eb23089e112a9
optimize code for lead user removal
shankig/wye,shankig/wye,shankisg/wye,pythonindia/wye,pythonindia/wye,shankisg/wye,shankisg/wye,harisibrahimkv/wye,harisibrahimkv/wye,pythonindia/wye,harisibrahimkv/wye,pythonindia/wye,harisibrahimkv/wye,shankisg/wye,shankig/wye,shankig/wye
wye/regions/forms.py
wye/regions/forms.py
from django import forms from django.core.exceptions import ValidationError from wye.profiles.models import UserType, Profile from . import models class RegionalLeadForm(forms.ModelForm): class Meta: model = models.RegionalLead exclude = () def clean(self): error_message = [] ...
from django import forms from django.core.exceptions import ValidationError from wye.profiles.models import UserType, Profile from . import models class RegionalLeadForm(forms.ModelForm): class Meta: model = models.RegionalLead exclude = () def clean(self): error_message = [] ...
mit
Python
cb7219823a08c667841795c9c14ae17ff0c0a327
add espeak
refugee-phrasebook/py_rpb,refugee-phrasebook/py_rpb
py_rpb/iso6393.py
py_rpb/iso6393.py
iso6393dic ={'hbs':{'label':'Serbo-Croatian', 'for_espeak':'bs'}, #hr, #sr 'deu':{'label':'German', 'for_espeak':'de'}, 'swe':{'label':'Swedish', 'for_espeak':'sv'}, 'nor':{'label':'Norwegian', 'for_espeak':'no'}, 'fin':{'label':'Finnish', 'for_espeak':'fi'}, 'dan':{'label':'Danish', 'for_espeak':'da'}, 'tir':{'label':...
iso6393dic ={'hbs':{'label':'Serbo-Croatian'}, 'deu':{'label':'German'}, 'swe':{'label':'Swedish'}, 'nor':{'label':'Norwegian'}, 'fin':{'label':'Finnish'}, 'dan':{'label':'Danish'}, 'tir':{'label':'Tigrinya'}, 'spa':{'label':'Spanish'}, 'ita':{'label':'Italian'}, 'fra':{'label':'French'}, 'ell':{'label':'Greek'}, 'hun'...
mit
Python
ea1984c69cc418a86f847d31914d8c6f1525be20
Handle None
jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth
xclib/ejabberdctl.py
xclib/ejabberdctl.py
import logging import subprocess from xclib.utf8 import unutf8 class ejabberdctl: def __init__(self, ctx): self.ctx = ctx def execute(self, args): logging.debug(self.ctx.ejabberdctl_path + str(args)) try: return unutf8(subprocess.check_output([self.ctx.ejabberdctl_path] + a...
import logging import subprocess from xclib.utf8 import unutf8 class ejabberdctl: def __init__(self, ctx): self.ctx = ctx def execute(self, args): logging.debug(self.ctx.ejabberdctl_path + str(args)) try: return unutf8(subprocess.check_output([self.ctx.ejabberdctl_path] + a...
mit
Python
6f8e2c0f7bd0150fca9191525314c2cd158ec2fd
bump version number
pombredanne/pyfpm,martinblech/pyfpm
pyfpm/__init__.py
pyfpm/__init__.py
"""This module provides Scala-like functional pattern matching in Python.""" __version__ = '0.1.2' __author__ = 'Martin Blech' __copyright__ = '2012, ' + __author__
"""This module provides Scala-like functional pattern matching in Python.""" __version__ = '0.1' __author__ = 'Martin Blech' __copyright__ = '2012, ' + __author__
mit
Python
f25f9bcdbe78ba8e6035b77bfed0acd8dc4677ca
Update bob.py
mvader/exercism-solutions
python/bob/bob.py
python/bob/bob.py
#!/usr/bin/env python # -*- coding: utf-8 -*- class Bob(object): def hey(self, text): if not text.strip(): return "Fine. Be that way!" elif text.isupper(): return "Woah, chill out!" elif text.endswith('?'): return "Sure." else: return "Whatever."
#!/usr/bin/env python # -*- coding: utf-8 -*- import string def is_all_caps(t): t = filter(lambda x: x not in string.digits and x not in string.punctuation, t) if is_empty(t): return False return t.upper().encode('UTF-8') == t.encode('UTF-8') def is_empty(t): return filter(lambda x: x != ' ', t) == '' def is_...
unlicense
Python
67c2498dad18ea588caabf00b853d57bd3ef17c1
generalize tfrecord converter
conversationai/conversationai-models,conversationai/conversationai-models
experiments/tools/convert_csv_to_tfrecord.py
experiments/tools/convert_csv_to_tfrecord.py
# coding=utf-8 # Copyright 2018 The Conversation-AI.github.io Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
# coding=utf-8 # Copyright 2018 The Conversation-AI.github.io Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
Python
fbacc548f4e5e41470bac5efea03412a3d4774d9
Update animal.py
drom/animal,drom/animal,drom/animal,drom/animal,drom/animal,drom/animal
python3/animal.py
python3/animal.py
#!/usr/bin/python3 import sys import json TEXT_FILE_PATH = '../text.json' messages = None def traverse(parent, path): node = parent[path] if (isinstance(node, str)): if not ask_yes_no_question('{}{}'.format(messages.get('isItA'), node)): animal = input(messages.get('itWas')) ...
#!/usr/bin/python3 import sys import json TEXT_FILE_PATH = './text.json' messages = None def traverse(parent, path): node = parent[path] if (isinstance(node, str)): if not ask_yes_no_question('{}{}'.format(messages.get('isItA'), node)): animal = input(messages.get('itWas')) q...
mit
Python
51fa8b2bc1d5ffd688bbe61ab0d4d4ebe886cf34
Stop passing a default option to Setting().get
ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive
isic_archive/utility/mail_utils.py
isic_archive/utility/mail_utils.py
from email.mime.text import MIMEText from girder import logger from girder.models.group import Group from girder.models.setting import Setting from girder.settings import SettingKey from girder.utility import mail_utils def sendEmail(to, subject, text): if isinstance(to, str): to = (to,) msg = MIMET...
from email.mime.text import MIMEText from girder import logger from girder.models.group import Group from girder.models.setting import Setting from girder.settings import SettingKey from girder.utility import mail_utils def sendEmail(to, subject, text): if isinstance(to, str): to = (to,) msg = MIMET...
apache-2.0
Python
7b1deaec374f73c5e2f20d7a6f28d3f116a3ae32
raise version number
trichter/qopen
qopen/__init__.py
qopen/__init__.py
"""Qopen: Seperation of intrinsic and scattering Q by envelope inversion""" from qopen.core import run __version__ = '4.3-dev'
"""Qopen: Seperation of intrinsic and scattering Q by envelope inversion""" from qopen.core import run __version__ = '4.2'
mit
Python
f239fd08bb5536501b05ba6a81c99edffdea6f38
Use the correct name for the run script
permamodel/ILAMB,permamodel/ILAMB,permamodel/ILAMB
pylamb/bmi_ilamb.py
pylamb/bmi_ilamb.py
#! /usr/bin/env python import sys import subprocess class BmiIlamb(object): _command = 'run_ilamb.sh' _args = None _env = None def __init__(self): self._time = self.get_start_time() @property def args(self): return [self._command] + (self._args or []) def get_component_n...
#! /usr/bin/env python import sys import subprocess class BmiIlamb(object): _command = 'run_ilamb' _args = None _env = None def __init__(self): self._time = self.get_start_time() @property def args(self): return [self._command] + (self._args or []) def get_component_name...
mit
Python