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
ade06721e2f467f17fb344d2f8274ed65c8a563c
add devtoolset as build_requires
piratecrew/rez-openexr
package.py
package.py
name = "openexr" version = "3.1.3" @early() def build_requires(): # check if the system gcc is too old <9 # then we require devtoolset-9 from subprocess import check_output valid = check_output(r"expr `gcc -dumpversion | cut -f1 -d.` \>= 9 || true", shell=True).strip().decode() == "1" if not valid...
name = "openexr" version = "3.1.3" build_command = "make -f {root}/Makefile {install}" def commands(): env.LD_LIBRARY_PATH.append("{root}/lib64") if building: env.OpenEXR_ROOT="{root}" # CMake Hint
mit
Python
b1f0aa02ec1da9ef345187f49f323c2dd911ee7d
Fix a typo
jleclanche/pywow,jleclanche/pywow,jleclanche/pywow,jleclanche/pywow,jleclanche/pywow,jleclanche/pywow
game/talents/tabs.py
game/talents/tabs.py
# -*- coding: utf-8 -*- """ Talent tabs - TalentTab.dbc """ from .. import Model class TalentTab(Model): ROLE_TANK = 0x2 ROLE_HEALER = 0x4 ROLE_DAMAGE = 0x8 class TalentTabProxy(object): """ WDBC proxy for talent tabs """ def __init__(self, cls): from pywow import wdbc self.__file = wdbc.get("Talent...
# -*- coding: utf-8 -*- """ Talent tabs - TalentTab.dbc """ from .. import Model class TalentTab(Model): ROLE_TANK = 0x2 ROLE_HEALER = 0x4 ROLE_DAMAGE = 0x8 class TalentTabProxy(object): """ WDBC proxy for talent tabs """ def __init__(self, cls): from pywow import wdbc self.__file = wdbc.get("Talent...
cc0-1.0
Python
ba6e70b30b6fcefa2111192c27d4522eef13b0b3
Add note about use of re.VERBOSE
abarisain/mopidy,tkem/mopidy,bencevans/mopidy,kingosticks/mopidy,ali/mopidy,jcass77/mopidy,abarisain/mopidy,rawdlite/mopidy,glogiotatidis/mopidy,woutervanwijk/mopidy,diandiankan/mopidy,tkem/mopidy,ZenithDK/mopidy,glogiotatidis/mopidy,dbrgn/mopidy,pacificIT/mopidy,jmarsik/mopidy,quartz55/mopidy,ZenithDK/mopidy,pacificIT...
mopidy/frontends/mpd/protocol/__init__.py
mopidy/frontends/mpd/protocol/__init__.py
""" This is Mopidy's MPD protocol implementation. This is partly based upon the `MPD protocol documentation <http://www.musicpd.org/doc/protocol/>`_, which is a useful resource, but it is rather incomplete with regards to data formats, both for requests and responses. Thus, we have had to talk a great deal with the th...
""" This is Mopidy's MPD protocol implementation. This is partly based upon the `MPD protocol documentation <http://www.musicpd.org/doc/protocol/>`_, which is a useful resource, but it is rather incomplete with regards to data formats, both for requests and responses. Thus, we have had to talk a great deal with the th...
apache-2.0
Python
d3edae00d13f121f73244a46f6b4e65f57e5bb55
fix some dumb mistake I made
Ashvala/LineChain,Ashvala/LineChain
LineChain.py
LineChain.py
class Interp_text: def init(str): self.str_to_parse = str def parser(self,str): arr_str = self.tokenize(str) return str def tokenize(self, str): arr_str1 = str.split("->") #split signal chain direction for item in arr_str1: print item return arr_...
class Interp_text: def init(str): self.str_to_parse = str def parser(self,str): arr_str = tokenize(str) return str def tokenize(self, str): return str.split("->") string = "(midi)->(osc)->(adsr)-<[{->(stereo1), {->(reverbsc)->(ster...
mit
Python
683038f51bd3000bc5d395a07e628b51fd5a0b70
Add var_list kwarg to optimizer.minimize
neuroailab/tfutils
tfutils/optimizer.py
tfutils/optimizer.py
import tensorflow as tf class ClipOptimizer(object): def __init__(self, optimizer_class, clip=True, *optimizer_args, **optimizer_kwargs): self._optimizer = optimizer_class(*optimizer_args, **optimizer_kwargs) self.clip = clip def compute_gradients(self, *args, **kwargs): gvs = self._...
import tensorflow as tf class ClipOptimizer(object): def __init__(self, optimizer_class, clip=True, *optimizer_args, **optimizer_kwargs): self._optimizer = optimizer_class(*optimizer_args, **optimizer_kwargs) self.clip = clip def compute_gradients(self, *args, **kwargs): gvs = self._...
mit
Python
c856c3061e11e5716486aefe07a63fdff84d23fc
Bump version to 0.5.0
thorgate/tg-react,metsavaht/tg-react,metsavaht/tg-react,metsavaht/tg-react,thorgate/tg-react
tg_react/__init__.py
tg_react/__init__.py
from .settings import * __version__ = '0.5.0'
from .settings import * __version__ = '0.4.3'
bsd-3-clause
Python
736159b6d12130bccf66b1be2341e00c07547936
make _wait() with _timeout
kantale/Tomorrow,madisonmay/Tomorrow,DOTOCA/Tomorrow
tomorrow/tomorrow.py
tomorrow/tomorrow.py
from functools import wraps from concurrent.futures import ThreadPoolExecutor class Tomorrow(): def __init__(self, future, timeout): self._future = future self._timeout = timeout def __getattr__(self, name): result = self._future.result(self._timeout) return result.__getattr...
from functools import wraps from concurrent.futures import ThreadPoolExecutor class Tomorrow(): def __init__(self, future, timeout): self._future = future self._timeout = timeout self._wait = self._future.result def __getattr__(self, name): result = self._future.result(s...
mit
Python
8209f590938204da39373de9eaeb2ba7c0991975
Fix unicode string
Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org
Instanssi/admin_auth/forms.py
Instanssi/admin_auth/forms.py
# -*- coding: utf-8 -*- from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout, Fieldset, ButtonHolder class LoginForm(forms.Form): username = forms.CharField(label=u"Käyttäjätunnus", help_text=u"Admin-paneelin käyttäjätunnuksesi. Huom! OpenID-tunnukset ...
# -*- coding: utf-8 -*- from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout, Fieldset, ButtonHolder class LoginForm(forms.Form): username = forms.CharField(label=u"Käyttäjätunnus", help_text=u"Admin-paneelin käyttäjätunnuksesi. Huom! OpenID-tunnukset ...
mit
Python
8269630a2ec006dc580ea3829826fe19c25d3883
Test group fetch
Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org
Instanssi/dbsettings/tests.py
Instanssi/dbsettings/tests.py
from django.utils import unittest from Instanssi.dbsettings.models import Setting class SettingTestCase(unittest.TestCase): def setUp(self): Setting.set(u"lion", u"roar") Setting.set(u"cat_in_tree", True) Setting.set(u"cat_not_in_tree", False) Setting.set(u"count_cats", 123423) ...
from django.utils import unittest from Instanssi.dbsettings.models import Setting class SettingTestCase(unittest.TestCase): def setUp(self): Setting.set(u"lion", u"roar") Setting.set(u"cat_in_tree", True) Setting.set(u"cat_not_in_tree", False) Setting.set(u"count_cats", 123423) ...
mit
Python
f14f0d37cf719f8fe5a2d4ae92ef21585343146c
add version
emencia/django-datadownloader,emencia/django-datadownloader
datadownloader/__init__.py
datadownloader/__init__.py
__version__ = "0.1"
agpl-3.0
Python
a9e2fd92fd4f60609c716b9333aef163f38bdbcb
Add test for sync publishing
wallyqs/asyncio-nats-streaming,wallyqs/asyncio-nats-streaming
tests/client_test.py
tests/client_test.py
import asyncio from nats.aio.client import Client as NATS from stan.aio.client import Client as STAN from tests.utils import async_test, start_nats_streaming, StanTestCase, SingleServerTestCase class ClientTest(SingleServerTestCase): @async_test async def test_connect(self): nc = NATS() await...
import asyncio from nats.aio.client import Client as NATS from stan.aio.client import Client as STAN from tests.utils import async_test, start_nats_streaming, StanTestCase, SingleServerTestCase class ClientTest(SingleServerTestCase): @async_test async def test_connect(self): nc = NATS() await...
apache-2.0
Python
bd65c2d9cfee3c401b058fc1ac49338781d50c74
Enhance urls readability
manuelnaranjo/django-template,manuelnaranjo/django-template
project/urls.py
project/urls.py
from __future__ import absolute_import from django.contrib import admin from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from rapidsms.backends.kannel.views import KannelBackendView from rapidsms.contrib.httptester import urls admin.autod...
from __future__ import absolute_import from django.contrib import admin from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from rapidsms.backends.kannel.views import KannelBackendView from rapidsms.contrib.httptester import urls admin.autod...
apache-2.0
Python
1f0d4190f166937ec663270390fdf9d16a2639c3
Remove browseable API
barberscore/barberscore-api,dbinetti/barberscore,dbinetti/barberscore-django,barberscore/barberscore-api,dbinetti/barberscore-django,barberscore/barberscore-api,barberscore/barberscore-api,dbinetti/barberscore
project/urls.py
project/urls.py
from django.conf.urls import include, url from django.contrib import admin from django.conf import settings from django.conf.urls.static import static urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^api/', include('apps.api.urls')), url(r'^auth/', include('djoser.urls')), ] + static(set...
from django.conf.urls import include, url from django.contrib import admin from django.conf import settings from django.conf.urls.static import static urlpatterns = [ # url(r'^', include('noncense.urls', namespace='noncense')), # url(r'^', include('apps.website.urls', namespace='website')), url(r'^admin/...
bsd-2-clause
Python
95bc5f4375325687a28433e99ea8cf6071e98b20
Reduce ale_run_watch to turning on the screen and setting epochs to 0. Pass on all other variables
alito/deep_q_rl,alito/deep_q_rl
deep_q_rl/ale_run_watch.py
deep_q_rl/ale_run_watch.py
#!/usr/bin/env python """ This script runs a pre-trained network with the game visualization turned on. Specify the network file first, then any other options you want """ import subprocess import sys import argparse def run_watch(args): parser = argparse.ArgumentParser(description=__doc__) parser.add_argum...
#!/usr/bin/env python """ This script runs a pre-trained network with the game visualization turned on. Usage: ale_run_watch.py NETWORK_PKL_FILE [ ROM ] """ import subprocess import sys import argparse DefaultROM = 'breakout' DefaultTestLength = 10000 def run_watch(args): parser = argparse.ArgumentParser(descr...
bsd-3-clause
Python
a2997b5f76c658ba8ddd933275aa6f37c1bedc50
Make sure we pass *args to the requests session object
kfdm/promgen,kfdm/promgen,kfdm/promgen,kfdm/promgen
promgen/util.py
promgen/util.py
# Copyright (c) 2017 LINE Corporation # These sources are released under the terms of the MIT license: see LICENSE import requests.sessions from promgen.version import __version__ def post(url, *args, **kwargs): with requests.sessions.Session() as session: session.headers['User-Agent'] = 'promgen/{}'.fo...
# Copyright (c) 2017 LINE Corporation # These sources are released under the terms of the MIT license: see LICENSE import requests.sessions from promgen.version import __version__ def post(url, **kwargs): with requests.sessions.Session() as session: session.headers['User-Agent'] = 'promgen/{}'.format(__...
mit
Python
afb75124de4a50a3a26b4b7f881d9bc064b2efc1
Allow taking screenshot of other buffers
Contraz/demosys-py
demosys/view/screenshot.py
demosys/view/screenshot.py
import os from datetime import datetime from PIL import Image from demosys.conf import settings from demosys import context class Config: """Container for screenshot target""" target = None alignment = 1 def create(file_format='png', name=None): """ Create a screenshot :param file_format: ...
import os from datetime import datetime from PIL import Image from demosys.conf import settings from demosys import context def create(file_format='png', name=None): """ Create a screenshot :param file_format: formats supported by PIL (png, jpeg etc) """ dest = "" if settings.SCREENSHOT_PATH...
isc
Python
54172d099a10cfa0d126a0e314b58095ac388b12
Update registry to use handlers instead of func name pattern.
ahawker/ydf
ydf/registry.py
ydf/registry.py
""" ydf/registry ~~~~~~~~~~~~ Registry for storing instruction type handler functions. """ import collections from ydf import handlers, log __all__ = ['global_registry'] class Registry: """ Automatically discovers type handler functions for all instruction types which implement the :class...
""" ydf/registry ~~~~~~~~~~~~ Registry for storing instruction type handler functions. """ import collections import re from ydf import log __all__ = ['global_registry'] class Registry: """ Automatically discovers type handler functions for all instruction types which implement the :class...
apache-2.0
Python
06d3f067808a023a6166a609fe188ff7f9781eee
Fix fee scaling
molecular/electrum,molecular/electrum,molecular/electrum,molecular/electrum
gui/qt/fee_slider.py
gui/qt/fee_slider.py
from electrum.i18n import _ import PyQt4 from PyQt4.QtGui import * from PyQt4.QtCore import * import PyQt4.QtCore as QtCore import threading class FeeSlider(QSlider): def __init__(self, window, config, callback): QSlider.__init__(self, Qt.Horizontal) self.config = config self.window = wi...
from electrum.i18n import _ import PyQt4 from PyQt4.QtGui import * from PyQt4.QtCore import * import PyQt4.QtCore as QtCore import threading class FeeSlider(QSlider): def __init__(self, window, config, callback): QSlider.__init__(self, Qt.Horizontal) self.config = config self.window = wi...
mit
Python
aaf0d25cae834222f14303f33ab126be7ae29142
Define __all__ in intelligibility_models package
achabotl/pambox
pambox/intelligibility_models/__init__.py
pambox/intelligibility_models/__init__.py
""" The :mod:`pambox.intelligibility_modesl` module gather speech intelligibility models. """ from .mrsepsm import MrSepsm from .sepsm import Sepsm from .sii import Sii __all__ = ['Sepsm', 'MrSepsm', 'Sii']
import sepsm import sii
bsd-3-clause
Python
6ed856a01a5e3336da5c44bd00b78cc29d2ab52b
Increment to version 0.15.4
AtteqCom/zsl,AtteqCom/zsl
zsl/__init__.py
zsl/__init__.py
""" :mod:`zsl` -- zsl module ======================== Main service module. :platform: Unix, Windows :synopsis: The Atteq Service Layer. Service for exposing data to clients. Just provides DB access, feeds access and \ other various aspects of service applications. .. moduleauthor:: Martin Babka <babka@atte...
""" :mod:`zsl` -- zsl module ======================== Main service module. :platform: Unix, Windows :synopsis: The Atteq Service Layer. Service for exposing data to clients. Just provides DB access, feeds access and \ other various aspects of service applications. .. moduleauthor:: Martin Babka <babka@atte...
mit
Python
447b46376c8f234beb0dfc74232a25c054589db1
Add elasticutils shortcuts.
novafloss/django-esutils,novafloss/django-esutils
django_esutils/__init__.py
django_esutils/__init__.py
# -*- coding: utf-8 -*- import pkg_resources __version__ = pkg_resources.get_distribution(__package__).version from elasticutils import F # NOQA from elasticutils import Q # NOQA from elasticutils.contrib.django import S # NOQA from elasticutils.contrib.django import tasks # NOQA
mit
Python
e90cc22226189b8950957cbf8637e49ee7798c4b
Use partition instead of split.
jasonbeverage/django-token
django_token/middleware.py
django_token/middleware.py
from django.http import HttpResponseBadRequest from django.contrib import auth class TokenMiddleware(object): """ Middleware that authenticates against a token in the http authorization header. """ def process_request(self, request): auth_header = request.META.get('HTTP_AUTHORIZATIO...
from django.http import HttpResponseBadRequest from django.contrib import auth class TokenMiddleware(object): """ Middleware that authenticates against a token in the http authorization header. """ def process_request(self, request): auth_header = request.META.get('HTTP_AUTHORIZATIO...
mit
Python
d872d85e093170e9208417492aed0764fd8eb0e0
Refactor authorization
SuperNovaPOLIUSP/supernova,SuperNovaPOLIUSP/supernova,SuperNovaPOLIUSP/supernova,SuperNovaPOLIUSP/supernova
aeSupernova/presentation/presentation.py
aeSupernova/presentation/presentation.py
#Embedded file name: /home/www/aeSupernova/aeSupernova/presentation/presentation.py from django import http from django.contrib.auth.decorators import login_required from django.http import * from django.shortcuts import render_to_response from django.template import RequestContext import json from aeSupernova.header.H...
#Embedded file name: /home/www/aeSupernova/aeSupernova/presentation/presentation.py from django.shortcuts import render_to_response from django.template import RequestContext import json from django import http from django.http import * from aeSupernova.header.Header import * from aeSupernova.presentation.Presentation ...
agpl-3.0
Python
226c50acea9863dc38948078c6dfd56c9a37efbe
fix protocol import
jgraef/python3-ipfs-api
ipfs/proto/unixfs.py
ipfs/proto/unixfs.py
from ..pb2hack.protocol import Pb2Enum, Pb2Message, Pb2Protocol DataType = Pb2Enum("DataType") \ .define("Raw", 0) \ .define("Directory", 1) \ .define("File", 2) \ .define("Metadata", 3) \ .define("Symlink", 4) Data = Pb2Message("Data")\ .field("required"...
from pb2.protocol import Pb2Enum, Pb2Message, Pb2Protocol DataType = Pb2Enum("DataType") \ .define("Raw", 0) \ .define("Directory", 1) \ .define("File", 2) \ .define("Metadata", 3) \ .define("Symlink", 4) Data = Pb2Message("Data")\ .field("required", "Dat...
mit
Python
03b618c47aabe233e23e099b5f45b06c7fd5254d
throw TemplateSyntaxError with correct template name
jrief/django-sass-processor,jrief/django-sass-processor
sass_processor/templatetags/sass_tags.py
sass_processor/templatetags/sass_tags.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.template import Library from django.template.base import Node, TemplateSyntaxError from sass_processor.processor import SassProcessor try: FileNotFoundError except NameError: FileNotFoundError = IOError register = Library() class S...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.template import Library from django.template.base import Node, TemplateSyntaxError from sass_processor.processor import SassProcessor try: FileNotFoundError except NameError: FileNotFoundError = IOError register = Library() class S...
mit
Python
d9c6e1931aff80ec3f3d308174810f62bb6aa392
add a utility method to select a cuba attribute for visualization
simphony/simphony-paraview,simphony/simphony-paraview
simphony_paraview/core/paraview_utils.py
simphony_paraview/core/paraview_utils.py
import contextlib import os import tempfile import shutil from paraview import servermanager from paraview.simple import ( Disconnect, Connect, Delete, OpenDataFile, MakeBlueToRedLT) from .cuds2vtk import cuds2vtk from .constants import dataset2writer @contextlib.contextmanager def loaded_in_paraview(cuds): ...
import contextlib import os import tempfile import shutil from paraview import servermanager from paraview.simple import Disconnect, Connect, Delete, OpenDataFile from .cuds2vtk import cuds2vtk from .constants import dataset2writer @contextlib.contextmanager def loaded_in_paraview(cuds): """ Push cuds dataset t...
bsd-2-clause
Python
721be562a175227fa496789e9ce642416c5993b7
Fix bug crashing the experiment on a non-recognized keypress.
Beskhue/enactive-agents,Beskhue/enactive-agents,Beskhue/enactive-agents
enactiveagents/controller/controller.py
enactiveagents/controller/controller.py
""" Main world controller. """ from appstate import AppState import pygame import events class Controller(events.EventListener): """ Controller class. """ def __init__(self): pass def _quit(self): """ Gracefully quit the simulator. """ quitEvent = events...
""" Main world controller. """ from appstate import AppState import pygame import events class Controller(events.EventListener): """ Controller class. """ def __init__(self): pass def _quit(self): """ Gracefully quit the simulator. """ quitEvent = events...
mit
Python
588cea2a14867d7a9cc65e724994995bb4a5e217
Update webserver.py
ISISComputingGroup/EPICS-inst_servers,ISISComputingGroup/EPICS-inst_servers
JSON_Bourne/webserver.py
JSON_Bourne/webserver.py
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer from threading import Thread from time import sleep from get_webpage import scrape_webpage import json HOST, PORT = '', 60000 class MyHandler(BaseHTTPRequestHandler): def do_GET(self): """ This is called by BaseHTTPRequestHandler every ...
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer from threading import Thread from time import sleep from get_webpage import scrape_webpage import json HOST, PORT = '', 60000 class MyHandler(BaseHTTPRequestHandler): def do_GET(self): """ This is called by BaseHTTPRequestHandler every ...
bsd-3-clause
Python
53acdb65defa43db67f11a5c5a41c1353e9498f7
Test that `s` as a Dask Array is preserved
dask-image/dask-ndfourier
tests/test__utils.py
tests/test__utils.py
# -*- coding: utf-8 -*- import pytest import numpy as np import dask.array as da import dask.array.utils as dau import dask_ndfourier._utils @pytest.mark.parametrize( "a, s, n, axis", [ (da.ones((3, 4), chunks=(3, 4)), da.ones((2,), chunks=(2,)), -1, -1), ] ) def test_norm_args(a, s, n, axis): ...
# -*- coding: utf-8 -*-
bsd-3-clause
Python
a13829a0c2b95773832e68e6f0a1dc661a288ec4
Add EmailActionTest class and as well as a test to check if email is sent to the right server.
bsmukasa/stock_alerter
tests/test_action.py
tests/test_action.py
import smtplib import unittest from unittest import mock from action import PrintAction, EmailAction @mock.patch("builtins.print") class PrintActionTest(unittest.TestCase): def test_executing_action_prints_message(self, mock_print): action = PrintAction() action.execute("GOOG > $10") mock...
import unittest from unittest import mock from action import PrintAction @mock.patch("builtins.print") class PrintActionTest(unittest.TestCase): def test_executing_action_prints_message(self, mock_print): action = PrintAction() action.execute("GOOG > $10") mock_print.assert_called_with("G...
mit
Python
ec23ccf4f0b69d832fcb0cd6989b59bad2aace05
REmove configs from webserver
ollien/Timpani,ollien/Timpani,ollien/Timpani
py/webserver.py
py/webserver.py
import cherrypy import jinja2 import os.path import database CONFIG_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "../configs/")) FILE_LOCATION = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) STATIC_ROOT = os.path.abspath(os.path.join(FILE_LOCATION, "static")) CHERRYPY_CONFIG = { "/sta...
import cherrypy import jinja2 import os.path import configmanager import database CONFIG_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "../configs/")) FILE_LOCATION = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) STATIC_ROOT = os.path.abspath(os.path.join(FILE_LOCATION, "static")) CHERR...
mit
Python
19e3ef3035da6de44130c5e3d94393d2709471d8
move import to top of the module
ttyS15/pybbm,webu/pybbm,just-work/pybbm,jonsimington/pybbm,wengole/pybbm,onecue/pybbm,onecue/pybbm,hovel/pybbm,DylannCordel/pybbm,katsko/pybbm,hovel/pybbm,jonsimington/pybbm,zekone/dj_pybb,springmerchant/pybbm,wengole/pybbm,webu/pybbm,springmerchant/pybbm,DylannCordel/pybbm,wengole/pybbm,ttyS15/pybbm,artfinder/pybbm,we...
pybb/signals.py
pybb/signals.py
# -*- coding: utf-8 -*- from django.contrib.auth.models import Permission from django.db.models import ObjectDoesNotExist from django.db.models.signals import post_save, post_delete from pybb.subscription import notify_topic_subscribers from pybb import defaults from pybb.models import Profile, Post from pybb import...
# -*- coding: utf-8 -*- from django.contrib.auth.models import Permission from django.db.models import ObjectDoesNotExist from django.db.models.signals import post_save, post_delete from pybb.subscription import notify_topic_subscribers from pybb import defaults from pybb.models import Profile from pybb import util ...
bsd-2-clause
Python
ac3b30e0db9911f650fae62a82c69623a8a42768
add default __future__ imports
googlefonts/fonttools,fonttools/fonttools
Lib/fontTools/pens/areaPen.py
Lib/fontTools/pens/areaPen.py
"""Calculate the area of a glyph.""" from __future__ import print_function, division, absolute_import from fontTools.misc.py23 import * from fontTools.pens.basePen import BasePen import math def distance(p0, p1): return math.hypot(p0[0] - p1[0], p0[1] - p1[1]) def interpolate(p0, p1, t): return (p0[0] * (1...
"""Calculate the area of a glyph.""" import math from fontTools.pens.basePen import BasePen def distance(p0, p1): return math.hypot(p0[0] - p1[0], p0[1] - p1[1]) def interpolate(p0, p1, t): return (p0[0] * (1 - t) + p1[0] * t, p0[1] * (1 - t) + p1[1] * t) def polygon_area(p0, p1): return (p1[0] - p0[...
mit
Python
786ebf3e7bbead31be1d7d6fba779e794ca1d644
Add a warning when git-cl-upload-hook is modified to update git-cl accordingly.
svn2github/chromium-depot-tools,svn2github/chromium-depot-tools,svn2github/chromium-depot-tools
PRESUBMIT.py
PRESUBMIT.py
# Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Top-level presubmit script for depot tools. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the presubmit ...
# Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Top-level presubmit script for depot tools. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the presubmit ...
bsd-3-clause
Python
ef27b615702d9ce84db9087898c1f66286e66cf2
Fix the license header regex.
csulmone/gyp,csulmone/gyp,csulmone/gyp,csulmone/gyp
PRESUBMIT.py
PRESUBMIT.py
# Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Top-level presubmit script for GYP. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit API built...
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Top-level presubmit script for GYP. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit...
bsd-3-clause
Python
b094136b40c53a4f10f93bde1481d1dc3297d4c0
Update setup.py
dkazanc/TomoPhantom,dkazanc/TomoPhantom,dkazanc/TomoPhantom,dkazanc/TomoPhantom
python/setup.py
python/setup.py
#!/usr/bin/env python import setuptools from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext from Cython.Build import cythonize import os import numpy import platform import sys version = '1.0' extra_include_dirs = [numpy.get_include(), '../functions/'] e...
#!/usr/bin/env python import setuptools from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext from Cython.Build import cythonize import os import numpy import platform import sys version = '1.0' extra_include_dirs = [numpy.get_include(), '../functions/'] e...
apache-2.0
Python
c0bc252eb0e6f1a566e4adc189044edb87bf668f
bump pypi package to pull in missing self params
nodakai/watchman,supriyantomaftuh/watchman,yangeagle/watchman,masoncloud/watchman,webmasteraxe/watchman,yun63/watchman,besarthoxhaj/watchman,dhruvsinghal/watchman,twitter/watchman,amasad/watchman,amasad/watchman,masoncloud/watchman,nodakai/watchman,dcolascione/laptop-watchman,dcolascione/laptop-watchman,yun63/watchman,...
python/setup.py
python/setup.py
#!/usr/bin/env python # vim:ts=4:sw=4:et: from setuptools import setup, Extension setup( name = 'pywatchman', version = '1.1.0', description = 'Watchman client for python', author = 'Wez Furlong, Siddharth Agarwal', author_email = 'wez@fb.com', maintainer = 'Wez Furlong', maintainer_email ...
#!/usr/bin/env python # vim:ts=4:sw=4:et: from setuptools import setup, Extension setup( name = 'pywatchman', version = '1.0.0', description = 'Watchman client for python', author = 'Wez Furlong, Siddharth Agarwal', author_email = 'wez@fb.com', maintainer = 'Wez Furlong', maintainer_email ...
mit
Python
a671f3925e46ac6ac6fb794dce90c6010d0f6bb8
Clean up formatting
jpschewe/code-templates,jpschewe/code-templates,jpschewe/code-templates
python3.py
python3.py
#!/usr/bin/env python3 import warnings with warnings.catch_warnings(): import re import sys import argparse import os import os.path import logging import logging.config import json script_dir=os.path.abspath(os.path.dirname(__file__)) def get_logger(): return logging.getLogger(__...
#!/usr/bin/env python3 import warnings with warnings.catch_warnings(): import re import sys import argparse import os import os.path import logging import logging.config import json script_dir=os.path.abspath(os.path.dirname(__file__)) def get_logger(): return logging.getLogger(__...
unlicense
Python
296d1af6f7140a92c964a985990623990080cf26
Add DeviceHiveApi import
devicehive/devicehive-python
devicehive/__init__.py
devicehive/__init__.py
from .handler import Handler from .device_hive import DeviceHive from .device_hive_api import DeviceHiveApi from .transports.transport import TransportError from .api_request import ApiRequestError from .api_response import ApiResponseError from .device import DeviceError from .network import NetworkError from .user im...
from .handler import Handler from .device_hive import DeviceHive from .transports.transport import TransportError from .api_request import ApiRequestError from .api_response import ApiResponseError from .device import DeviceError from .network import NetworkError from .user import UserError
apache-2.0
Python
29c18f13408459f0854bcf6ced9cec85dc0262eb
tag alpha
RasaHQ/rasa_nlu,RasaHQ/rasa_nlu,RasaHQ/rasa_nlu
rasa/version.py
rasa/version.py
__version__ = "1.3.1a5"
__version__ = "1.3"
apache-2.0
Python
9b67a15685c1c9ba6cffe914ec3ff8062107fdc4
Edit person id values
Alweezy/alvin-mutisya-dojo-project
tests/test_people.py
tests/test_people.py
from models.people import Person, Fellow, Staff from unittest import TestCase class PersonTestCases(TestCase): """Tests the functionality of the person parent class """ def setUp(self): """Passes an instance of class Person to all the methods in this class """ self.person = Person(...
from models.people import Person, Fellow, Staff from unittest import TestCase class PersonTestCases(TestCase): """Tests the functionality of the person parent class """ def setUp(self): """Passes an instance of class Person to all the methods in this class """ self.person = Person(...
mit
Python
79af46a9d851c4aea5ab119fa128808714d54c1b
Fix all tests for linux
lancelote/banneret
tests/test_remove.py
tests/test_remove.py
import sys from banneret.cli import MACOS, LINUX def call_remove(path, version, bnrt): """Call remove method depending on the OS.""" if sys.platform in MACOS: result = bnrt.remove(path, version) elif sys.platform in LINUX: result = bnrt.remove(path + '/{version}', version) else: ...
def test_removes_correct_dir(base_path, bnrt): remove_me = 'PyCharm2017.2' for folder in ['PyCharm2016.3', 'PyCharmCE2017.2', 'PyCharm2017.2']: base_path.mkdir(folder) bnrt.remove(base_path, 'PyCharm2017.2') assert len(base_path.listdir()) == 2 assert remove_me not in base_path.listdir() d...
mit
Python
17b4b6ce4974743d245076b6b7c8a2b7d66a7510
Simplify replication script, use modern API.
zielmicha/couchdb-python,ajmirsky/couchdb-python
couchdb/tools/replicate.py
couchdb/tools/replicate.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2009 Maximillian Dornseif <md@hudora.de> # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. """ This script replicates databases from one CouchDB server to an other. This is mainly f...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2009 Maximillian Dornseif <md@hudora.de> # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. """ This script replicates databases from one CouchDB server to an other. This is mainly f...
bsd-3-clause
Python
ef63102d6995ee5f8cac2a80eb1a768865abf0bf
Replace APIException with ParseError
arjenvrielink/django-rest-framework-gis,barseghyanartur/django-rest-framework-gis,bopo/django-rest-framework-gis,illing2005/django-rest-framework-gis,sh4wn/django-rest-framework-gis,nmandery/django-rest-framework-gis,pglotov/django-rest-framework-gis,manhg/django-rest-framework-gis,nmandery/django-rest-framework-gis,dj...
rest_framework_gis/filters.py
rest_framework_gis/filters.py
from rest_framework.filters import BaseFilterBackend from rest_framework.exceptions import ParseError from django.db.models import Q from django.contrib.gis.geos import Polygon class InBBOXFilter(BaseFilterBackend): bbox_param = 'in_bbox' # The URL query parameter which contains the bbox. def get_filter_b...
from rest_framework.filters import BaseFilterBackend from rest_framework.exceptions import APIException from django.db.models import Q from django.contrib.gis.geos import Polygon class InBBOXFilter(BaseFilterBackend): bbox_param = 'in_bbox' # The URL query parameter which contains the bbox. def get_filter...
mit
Python
a5b517970ba9b2606d0d14246ee406bdf6957df3
Add test for the handling of gzipped content
caleb531/youversion-suggest,caleb531/youversion-suggest
tests/test_shared.py
tests/test_shared.py
# tests.test_shared from __future__ import unicode_literals import gzip import tests import yvs.shared as yvs import nose.tools as nose from StringIO import StringIO from mock import Mock, NonCallableMock, patch with open('tests/html/psa.23.html') as html_file: html_content = html_file.read() patch_urlopen = ...
# tests.test_shared from __future__ import unicode_literals import tests import yvs.shared as yvs import nose.tools as nose from mock import Mock, NonCallableMock, patch with open('tests/html/psa.23.html') as html_file: patch_urlopen = patch( 'urllib2.urlopen', return_value=NonCallableMock( re...
mit
Python
0819957eda318205e17591dccd81482701eab25c
Use faster password hasher in sqlite tests
dbaxa/django,gunchleoc/django,varunnaganathan/django,yamila-moreno/django,dracos/django,savoirfairelinux/django,crazy-canux/django,mattseymour/django,charettes/django,MatthewWilkes/django,dsanders11/django,ccn-2m/django,beck/django,dgladkov/django,litchfield/django,MounirMesselmeni/django,jyotsna1820/django,ojake/djang...
tests/test_sqlite.py
tests/test_sqlite.py
# This is an example test settings file for use with the Django test suite. # # The 'sqlite3' backend requires only the ENGINE setting (an in- # memory database will be used). All other backends will require a # NAME and potentially authentication information. See the # following section in the docs for more informatio...
# This is an example test settings file for use with the Django test suite. # # The 'sqlite3' backend requires only the ENGINE setting (an in- # memory database will be used). All other backends will require a # NAME and potentially authentication information. See the # following section in the docs for more informatio...
bsd-3-clause
Python
ec12908b547db8cab72e2c4802406319d92bad04
Add scroll error message test in window_test
karlch/vimiv,karlch/vimiv,karlch/vimiv
tests/window_test.py
tests/window_test.py
#!/usr/bin/env python # encoding: utf-8 """Tests window.py for vimiv's test suite.""" from unittest import main from vimiv_testcase import VimivTestCase, refresh_gui class WindowTest(VimivTestCase): """Window Tests.""" @classmethod def setUpClass(cls): cls.init_test(cls, ["vimiv/testimages/"]) ...
#!/usr/bin/env python # encoding: utf-8 """Tests window.py for vimiv's test suite.""" from unittest import main from vimiv_testcase import VimivTestCase, refresh_gui class WindowTest(VimivTestCase): """Window Tests.""" @classmethod def setUpClass(cls): cls.init_test(cls, ["vimiv/testimages/"]) ...
mit
Python
ae783f76505e202ac26195d8c234a46a535852dd
fix typo
dreibh/planetlab-lxc-plcapi,dreibh/planetlab-lxc-plcapi,dreibh/planetlab-lxc-plcapi,dreibh/planetlab-lxc-plcapi
PLC/Methods/AddPerson.py
PLC/Methods/AddPerson.py
from PLC.Faults import * from PLC.Method import Method from PLC.Parameter import Parameter, Mixed from PLC.Persons import Person, Persons from PLC.Auth import PasswordAuth can_update = lambda (field, value): field in \ ['title', 'email', 'password', 'phone', 'url', 'bio'] class AddPerson(Method): """...
from PLC.Faults import * from PLC.Method import Method from PLC.Parameter import Parameter, Mixed from PLC.Persons import Person, Persons from PLC.Auth import PasswordAuth can_update = lambda (field, value): field in \ ['title', 'email', 'password', 'phone', 'url', 'bio'] class AddPerson(Method): """...
bsd-3-clause
Python
43b8e4de31d0659561ffedfeb0ab4a42f035eade
Exclude chamber workflow from targets tested by j2 testall
google/j2cl,google/j2cl,google/j2cl,google/j2cl,google/j2cl
dev/test_all.py
dev/test_all.py
# Copyright 2021 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# Copyright 2021 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
apache-2.0
Python
626a87c13ec63a6549c3a26e6186bf1cf34a0920
return json parsed dict from create method
mrtazz/thunkapi.py
thunkapi/thunkapi.py
thunkapi/thunkapi.py
# encoding: utf-8 """ library for the thunk.us API """ import urllib import urllib2 import json class Thunk: """ class for creating an object which can talk to the thunk.us API """ def __init__(self): self.base_url = "http://thunk.us/" def create(self, name=None): """ method ...
# encoding: utf-8 """ library for the thunk.us API """ import urllib import urllib2 import json class Thunk: """ class for creating an object which can talk to the thunk.us API """ def __init__(self): self.base_url = "http://thunk.us/" def create(self, name=None): """ method ...
mit
Python
fe4e7acd34a28993ab8856e4e7a3924a547b14a9
Fix failing unit test
eddie-dunn/swytcher
swytcher/cli.py
swytcher/cli.py
# -*- coding: utf-8 -*- """CLI frontend for Swytcher""" import logging import click import swytcher.settings as settings import swytcher.swytcher as swytcher log = logging.getLogger(__name__) # pylint: disable=invalid-name logging.basicConfig(level=logging.INFO) @click.command() def main(args=None): """Consol...
# -*- coding: utf-8 -*- """CLI frontend for Swytcher""" import logging import click import swytcher.settings as settings import swytcher.swytcher as swytcher log = logging.getLogger(__name__) # pylint: disable=invalid-name logging.basicConfig(level=logging.INFO) @click.command() def main(args=None): """Consol...
mit
Python
54114a5eb51257c66b2a889a5b8cb2a1091b5e8f
fix typo in debian autopkgtests (pmcd -> pmlogger)
adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp
debian/tests/check_daemons.py
debian/tests/check_daemons.py
#!/usr/bin/env python3 import subprocess import unittest SERVICE_PMCD = "pmcd.service" SERVICE_PMLOGGER = "pmlogger.service" PORTS_PMCD = [44321] PORTS_PMLOGGER = [4330] PROP_ACTIVESTATE = "ActiveState" PROP_SUBSTATE = "SubState" STATE_RUNNING = "running" STATE_ACTIVE = "active" def format_args(service, prope...
#!/usr/bin/env python3 import subprocess import unittest SERVICE_PMCD = "pmcd.service" SERVICE_PMLOGGER = "pmcd.service" PORTS_PMCD = [44321] PORTS_PMLOGGER = [4330] PROP_ACTIVESTATE = "ActiveState" PROP_SUBSTATE = "SubState" STATE_RUNNING = "running" STATE_ACTIVE = "active" def format_args(service, property)...
lgpl-2.1
Python
2658d841b56e7bb6df14758df2add1776c741624
Fix error in upgrade scripts introduced in [1723]. Closes #1592.
rbaumg/trac,rbaumg/trac,rbaumg/trac,rbaumg/trac
trac/upgrades/db11.py
trac/upgrades/db11.py
import os.path import shutil sql = """ -- Remove empty values from the milestone list DELETE FROM milestone WHERE COALESCE(name,'')=''; -- Add a description column to the version table, and remove unnamed versions CREATE TEMP TABLE version_old AS SELECT * FROM version; DROP TABLE version; CREATE TABLE version ( ...
import os.path import shutil sql = """ -- Remove empty values from the milestone list DELETE FROM milestone WHERE COALESCE(name,'')=''; -- Add a description column to the version table, and remove unnamed versions CREATE TEMP TABLE version_old AS SELECT * FROM version; DROP TABLE version; CREATE TABLE version ( ...
bsd-3-clause
Python
df4c726b6c9845b1f31050e8ffe25a467a33be35
update docstring
develersrl/rooms,develersrl/rooms,develersrl/rooms,develersrl/rooms,develersrl/rooms,develersrl/rooms,develersrl/rooms
trunk/editor/utils.py
trunk/editor/utils.py
#!/usr/bin/env python from contextlib import contextmanager from os.path import join from os.path import normpath @contextmanager def blockedSignals(widget): widget.blockSignals(True) try: yield finally: widget.blockSignals(False) class PathTransform(object): """ classe per tras...
#!/usr/bin/env python from contextlib import contextmanager from os.path import join from os.path import normpath @contextmanager def blockedSignals(widget): widget.blockSignals(True) try: yield finally: widget.blockSignals(False) class PathTransform(object): def __init__(self): ...
mit
Python
7add8937e80fd086acb48ab4f3c4d7533c3ed539
test that parsed datasets match info in datasets.info
qPCR4vir/orange3,cheral/orange3,marinkaz/orange3,kwikadi/orange3,qPCR4vir/orange3,kwikadi/orange3,marinkaz/orange3,marinkaz/orange3,marinkaz/orange3,qPCR4vir/orange3,cheral/orange3,cheral/orange3,marinkaz/orange3,qPCR4vir/orange3,kwikadi/orange3,kwikadi/orange3,kwikadi/orange3,qPCR4vir/orange3,cheral/orange3,cheral/ora...
Orange/tests/test_datasets.py
Orange/tests/test_datasets.py
import unittest import os import Orange class TestDatasets(unittest.TestCase): def test_access(self): d1 = Orange.datasets.anneal fname = Orange.datasets.anneal['location'] d2 = Orange.datasets['anneal'] self.assertNotEqual(len(d1), 0) self.assertEqual(len(d1), len(d2)) ...
import unittest import os import Orange class TestDatasets(unittest.TestCase): def test_access(self): d1 = Orange.datasets.anneal fname = Orange.datasets.anneal['location'] d2 = Orange.datasets['anneal'] self.assertNotEqual(len(d1), 0) self.assertEqual(len(d1), len(d2)) ...
bsd-2-clause
Python
1260356a004afbd13bd777338ff647951fbe94d1
Use non-deprecated md5 library.
eldarion/robotars
robotars/templatetags/robotars_tags.py
robotars/templatetags/robotars_tags.py
# http://robohash.org/ from django import template from hashlib import md5 register = template.Library() @register.inclusion_tag("robotars/robotar.html") def robotar(user, size=None, gravatar_fallback=False, hashed=False): url = "//robohash.org/" if gravatar_fallback: if hashed: url += ...
# http://robohash.org/ from django import template from md5 import md5 register = template.Library() @register.inclusion_tag("robotars/robotar.html") def robotar(user, size=None, gravatar_fallback=False, hashed=False): url = "//robohash.org/" if gravatar_fallback: if hashed: url += "%s?...
bsd-3-clause
Python
ed9c6397e52ca42fa4cd81a3a0b6b94bcc38b93e
Fix examples/ricequant/advanced_strategy.py
Pyangs/ShiPanE-Python-SDK,sinall/ShiPanE-Python-SDK,sinall/ShiPanE-Python-SDK,Pyangs/ShiPanE-Python-SDK
examples/ricequant/advanced_strategy.py
examples/ricequant/advanced_strategy.py
import shipane_sdk def init(context): context.s1 = "000001.XSHE" def before_trading(context): # 创建 RiceQuantStrategyManagerFactory 对象 # 参数为 shipane_sdk_config_template.yaml 中配置的 manager id context.__manager = shipane_sdk.RiceQuantStrategyManagerFactory(context).create('manager-1') def handle_bar(con...
import shipane_sdk def init(context): context.s1 = "000001.XSHE" def before_trading(context): # 创建 RiceQuantStrategyManagerFactory 对象 # 参数为 shipane_sdk_config_template.yaml 中配置的 manager id context.__manager = shipane_sdk.RiceQuantStrategyManagerFactory(context).create('manager-1') def handle_bar(con...
mit
Python
af231b296039c58849cfbd067fdd73aab2028254
Fix #2915
vuolter/pyload,vuolter/pyload,vuolter/pyload
module/plugins/accounts/NitroflareCom.py
module/plugins/accounts/NitroflareCom.py
# -*- coding: utf-8 -*- import time from ..internal.Account import Account from ..internal.misc import json class NitroflareCom(Account): __name__ = "NitroflareCom" __type__ = "account" __version__ = "0.20" __status__ = "testing" __description__ = """Nitroflare.com account plugin""" __licen...
# -*- coding: utf-8 -*- import time from ..internal.Account import Account from ..internal.misc import json class NitroflareCom(Account): __name__ = "NitroflareCom" __type__ = "account" __version__ = "0.19" __status__ = "testing" __description__ = """Nitroflare.com account plugin""" __licen...
agpl-3.0
Python
7fe4925f3384e9f0fabcbc6f281ddffc4e970f02
remove unnecessary dependency in webdriver test (#22621)
crisbeto/material2,josephperrott/material2,DevVersion/material2,mmalerba/material2,mmalerba/material2,josephperrott/material2,mmalerba/material2,angular/components,angular/components,mmalerba/material2,josephperrott/material2,angular/components,DevVersion/material2,crisbeto/material2,angular/components,crisbeto/materia...
src/cdk/testing/tests/webdriver-test.bzl
src/cdk/testing/tests/webdriver-test.bzl
load("//tools:defaults.bzl", "jasmine_node_test") load("@io_bazel_rules_webtesting//web:web.bzl", "web_test") load("//tools/server-test:index.bzl", "server_test") def webdriver_test(name, tags = [], **kwargs): jasmine_node_test( name = "%s_jasmine_test" % name, tags = tags + ["manual"], **k...
load("//tools:defaults.bzl", "jasmine_node_test") load("@io_bazel_rules_webtesting//web:web.bzl", "web_test") load("//tools/server-test:index.bzl", "server_test") def webdriver_test(name, data = [], tags = [], **kwargs): jasmine_node_test( name = "%s_jasmine_test" % name, data = data + [ ...
mit
Python
34a11041e809a7635e4488515c3c1284122faa78
Fix travis settings
aipescience/django-daiquiri,aipescience/django-daiquiri,aipescience/django-daiquiri
testing/config/settings/base.py
testing/config/settings/base.py
import os from daiquiri.core.settings.base import BASE_DIR DAIQUIRI_APPS = [ 'daiquiri.archive', 'daiquiri.auth', 'daiquiri.contact', 'daiquiri.core', 'daiquiri.files', 'daiquiri.jobs', 'daiquiri.meetings', 'daiquiri.metadata', 'daiquiri.query', 'daiquiri.serve', 'daiquiri....
import os from daiquiri.core.settings.base import BASE_DIR DAIQUIRI_APPS = [ 'daiquiri.archive', 'daiquiri.auth', 'daiquiri.contact', 'daiquiri.core', 'daiquiri.files', 'daiquiri.jobs', 'daiquiri.meetings', 'daiquiri.metadata', 'daiquiri.query', 'daiquiri.serve', 'daiquiri....
apache-2.0
Python
4ea9059184373afade98109e0b2fd4dc87f39e25
Fix Southsea Captain targeting
amw2104/fireplace,oftc-ftw/fireplace,amw2104/fireplace,jleclanche/fireplace,smallnamespace/fireplace,Meerkov/fireplace,butozerca/fireplace,Meerkov/fireplace,liujimj/fireplace,beheh/fireplace,butozerca/fireplace,liujimj/fireplace,smallnamespace/fireplace,Ragowit/fireplace,oftc-ftw/fireplace,Ragowit/fireplace,NightKev/fi...
fireplace/cards/classic/neutral_epic.py
fireplace/cards/classic/neutral_epic.py
from ..utils import * # Big Game Hunter class EX1_005: action = destroyTarget # Mountain Giant class EX1_105: @hand def OWN_HAND_UPDATE(self): self.cost = self.baseCost - (len(self.controller.hand) - 1) # Murloc Warleader class EX1_507: Aura = "EX1_507e" class EX1_507e: Atk = 2 Health = 1 def isValidTarg...
from ..utils import * # Big Game Hunter class EX1_005: action = destroyTarget # Mountain Giant class EX1_105: @hand def OWN_HAND_UPDATE(self): self.cost = self.baseCost - (len(self.controller.hand) - 1) # Murloc Warleader class EX1_507: Aura = "EX1_507e" class EX1_507e: Atk = 2 Health = 1 def isValidTarg...
agpl-3.0
Python
4cc860e8bcc5ebd11e728a7b33748cc93cb1a54a
Use new TestCase methods for equality comparisons
lastfm/django-formtools,barseghyanartur/django-formtools,lastfm/django-formtools,gchp/django-formtools,thenewguy/django-formtools,barseghyanartur/django-formtools,thenewguy/django-formtools,gchp/django-formtools
formtools/tests/wizard/cookiestorage.py
formtools/tests/wizard/cookiestorage.py
import json from django.test import TestCase from django.core import signing from django.core.exceptions import SuspiciousOperation from django.http import HttpResponse from django.contrib.formtools.wizard.storage.cookie import CookieStorage from django.contrib.formtools.tests.wizard.storage import get_request, TestS...
import json from django.test import TestCase from django.core import signing from django.core.exceptions import SuspiciousOperation from django.http import HttpResponse from django.contrib.formtools.wizard.storage.cookie import CookieStorage from django.contrib.formtools.tests.wizard.storage import get_request, TestS...
bsd-3-clause
Python
fc92fe220cab8e0e9cefc6d7786e5890a7944d42
Send flumotion-reset event when a new connection starts
timvideos/flumotion,timvideos/flumotion,Flumotion/flumotion,timvideos/flumotion,Flumotion/flumotion,Flumotion/flumotion,flumotion-mirror/flumotion,Flumotion/flumotion,flumotion-mirror/flumotion
flumotion/component/producers/fgdp/fgdp.py
flumotion/component/producers/fgdp/fgdp.py
# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). # All rights reserved. # This file may be distributed and/or modified under the terms of # the GNU General Public License version 2 as published by # the Free ...
# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). # All rights reserved. # This file may be distributed and/or modified under the terms of # the GNU General Public License version 2 as published by # the Free ...
lgpl-2.1
Python
8ca0da3f25261e26d805bb51252db1564b50ff4e
Add help text for TARGET argument
iftekeriba/softlayer-python,Neetuj/softlayer-python,softlayer/softlayer-python,kyubifire/softlayer-python,nanjj/softlayer-python,briancline/softlayer-python,skraghu/softlayer-python,underscorephil/softlayer-python,allmightyspiff/softlayer-python
SoftLayer/CLI/firewall/add.py
SoftLayer/CLI/firewall/add.py
"""Create new firewall.""" # :license: MIT, see LICENSE for more details. import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import exceptions from SoftLayer.CLI import formatting import click @click.command() @click.argument('target') @click.option('--firewall-type', type=click...
"""Create new firewall.""" # :license: MIT, see LICENSE for more details. import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import exceptions from SoftLayer.CLI import formatting import click @click.command() @click.argument('target') @click.option('--firewall-type', type=click...
mit
Python
b45035dcd4edb559e9d5546ea3e743dcb15ad09e
Update VRAndroidPhoneandMyo.py
MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab
home/Alessandruino/VRAndroidPhoneandMyo.py
home/Alessandruino/VRAndroidPhoneandMyo.py
arduino = Runtime.createAndStart("arduino","Arduino") arduino.serial.refresh() sleep(2) arduino.connect("/dev/ttyUSB0") i01 = Runtime.start("i01","InMoov") i01.startHead("/dev/ttyACM0") remote = Runtime.start("remote","RemoteAdapter") myo = Runtime.start("myo","MyoThalmic") mL = Runtime.start("mL","Motor") mR = Runti...
arduino = Runtime.createAndStart("arduino","Arduino") arduino.serial.refresh() sleep(2) arduino.connect("/dev/ttyACM0") i01 = Runtime.start("i01","InMoov") i01.startHead("/dev/ttyACM0") remote = Runtime.start("remote","RemoteAdapter") myo = Runtime.start("myo","MyoThalmic") mL = Runtime.start("mL","Motor") mR = Runti...
apache-2.0
Python
065087445855d6f061acf1775925756baa0b3ee4
Add workflow import handlers
prasannav7/ggrc-core,hyperNURb/ggrc-core,VinnieJohns/ggrc-core,jmakov/ggrc-core,hyperNURb/ggrc-core,NejcZupec/ggrc-core,j0gurt/ggrc-core,edofic/ggrc-core,plamut/ggrc-core,hasanalom/ggrc-core,josthkko/ggrc-core,plamut/ggrc-core,hasanalom/ggrc-core,andrei-karalionak/ggrc-core,edofic/ggrc-core,prasannav7/ggrc-core,VinnieJ...
src/ggrc_workflows/converters/handlers.py
src/ggrc_workflows/converters/handlers.py
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: miha@reciprocitylabs.com # Maintained By: miha@reciprocitylabs.com """ Module for all special column handlers for workflow objects """ from ggrc.c...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: miha@reciprocitylabs.com # Maintained By: miha@reciprocitylabs.com """ Module for all special column handlers for workflow objects """ from ggrc.c...
apache-2.0
Python
a6cd28a743c4206939eeb96c322e4c3cb8e9154a
Allow semver version metadata to start with an optional `v` (#8303)
DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core
datadog_checks_base/datadog_checks/base/utils/metadata/version.py
datadog_checks_base/datadog_checks/base/utils/metadata/version.py
# (C) Datadog, Inc. 2019-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import re from ..common import exclude_undefined_keys # https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string SEMVER_PATTERN = re.compile( r""" v? (?P<maj...
# (C) Datadog, Inc. 2019-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import re from ..common import exclude_undefined_keys # https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string SEMVER_PATTERN = re.compile( r""" (?P<major>0|[1...
bsd-3-clause
Python
ebf19904d4e608f3325a33c0d2f183e32ffc1299
Add more output
xeroc/python-graphenelib
scripts/exchange-simpleticker-stats/main.py
scripts/exchange-simpleticker-stats/main.py
from grapheneexchange import GrapheneExchange import math class Config(): wallet_host = "localhost" wallet_port = 8092 wallet_user = "" wallet_password = "" witness_url = "ws://10.0.0.16:8090/" # witness_url = "ws://testnet.bitshares.eu/w...
from grapheneexchange import GrapheneExchange import math class Config(): wallet_host = "localhost" wallet_port = 8092 wallet_user = "" wallet_password = "" witness_url = "ws://10.0.0.16:8090/" witness_user = "" witness_password =...
mit
Python
21a3feb40d106b2cf0141abc3607c1e3c9be2044
Add condition skip to filecheck logging tests
Rafiot/PyCIRCLean,Rafiot/PyCIRCLean,CIRCL/PyCIRCLean,CIRCL/PyCIRCLean
tests/test_filecheck_logging.py
tests/test_filecheck_logging.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from datetime import datetime import pytest try: from bin.filecheck import KittenGroomerFileCheck NODEPS = False except ImportError: NODEPS = True pytestmark = pytest.mark.skipif(NODEPS, reason="Dependencies aren't installed") def save_logs(groome...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from datetime import datetime from bin.filecheck import KittenGroomerFileCheck def save_logs(groomer, test_description): divider = ('=' * 10 + '{}' + '=' * 10 + '\n') test_log_path = 'tests/{}.log'.format(test_description) time_now = str(datetime.n...
bsd-3-clause
Python
b863a35d7419d05cef0706c8a09b5fee7c6cf13f
Update materialized view test to not refresh concurrently
SectorLabs/django-postgres-extra
tests/test_materialized_view.py
tests/test_materialized_view.py
import time import uuid from django.db import models from psqlextra.materialized_view import PostgresMaterializedView from .util import get_fake_model, db_relation_exists def get_fake_materialized_view(): """Creates a fake materialized view composed of two other models.""" db_table = str(uuid.uuid4())...
import time import uuid from django.db import models from psqlextra.materialized_view import PostgresMaterializedView from .util import get_fake_model, db_relation_exists def get_fake_materialized_view(): """Creates a fake materialized view composed of two other models.""" db_table = str(uuid.uuid4())...
mit
Python
046ab1f0efb60442944fee332ab23e80cf0ba416
change up/down checking method
hgijeon/the_PLAY
Structure/Middle/KeyMiddle.py
Structure/Middle/KeyMiddle.py
from ..Middle import gameapi from ..Middle import apiVar import pygame.midi as midi class KeyMiddle (): def __init__(self): self.key = { 'a':60, 'w':61, 's':62, 'e':63, 'd':64, 'f':65, 't':66, 'g':67, } self.status = [False]...
from ..Middle import gameapi from ..Middle import apiVar import pygame.midi as midi midiDown = 144 midiUp = 128 class KeyMiddle (): def __init__(self): self.key = { 'a':60, 'w':61, 's':62, 'e':63, 'd':64, 'f':65, 't':66, 'g':67, } ...
mit
Python
b4a9b28667ca9c4f96445baa41942e4ce70b9358
Increase wait time to fix timeout issues on some bots. Octane benchmark timeout on one of the bot, increasing wait time to see if this fixes the issue.
Jonekee/chromium.src,dushu1203/chromium.src,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,axinging/chromium-crosswalk,dushu1203/chromium.src,ondra-novak/chromium.src,dednal/chromium.src,jaruba/chromium.src,Jonekee/chromium.src,M4sse/chromium.src,ChromiumWebApps/chromium,Fireblend/chrom...
tools/perf/benchmarks/octane.py
tools/perf/benchmarks/octane.py
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Runs Octane 2.0 javascript benchmark. Octane 2.0 is a modern benchmark that measures a JavaScript engine's performance by running a suite of tests re...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Runs Octane 2.0 javascript benchmark. Octane 2.0 is a modern benchmark that measures a JavaScript engine's performance by running a suite of tests re...
bsd-3-clause
Python
2e5162b71b55b7c2f2fb3f6d76a5400f6d46e358
Update Credits.py
Ghostboy-287/okadminfinder3
Classes/Credits.py
Classes/Credits.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __version__ = '2.2' __author__ = 'O.Koleda' __improver__= 'Ghostboy-287' def getCredits(): return ''' ____ __ __ __ _ _______ __ / __ \/ //_/___ _____/ /___ ___ (_)___ / ____(_)___ ____/ /__ _____ / / / / ,< / __ `/ ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __version__ = '2.1' __author__ = 'O.Koleda' __improver__= 'Ghostboy-287' def getCredits(): return ''' ____ __ __ __ _ _______ __ / __ \/ //_/___ _____/ /___ ___ (_)___ / ____(_)___ ____/ /__ _____ / / / / ,< / __ `/ ...
apache-2.0
Python
90df8841df4ce912231920e27a65df8949c7579d
Allow building Docker images from outside the docker directory
wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api
scripts/build_docker_image.py
scripts/build_docker_image.py
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- """ Builds a Docker image for a project. Usage: build_docker_image.py --project=<PROJECT> [--file=<FILE>] [--variant=<VARIANT>] build_docker_image.py -h | --help Options: -h --help Show this screen --project=<PROJECT> Name of the Docker imag...
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- """ Builds a docker image for a simple project Usage: build_docker_image.py --project=<name> [--variant=<variant>] build_docker_image.py -h | --help Options: -h --help Show this screen. --project=<project> Name of the project (e.g. api, lori...
mit
Python
fe9448f4571d08fb15c633e4a0e7191f80ba5e95
make sure rtds / pip finds the correct version of datapipelines
meraki-analytics/cassiopeia,robrua/cassiopeia,10se1ucgo/cassiopeia
doc/setup.py
doc/setup.py
#!/usr/bin/env python import sys from setuptools import setup, find_packages install_requires = [ "datapipelines==1.0.1", "merakicommons", "Pillow" ] # Require python 3.6 if sys.version_info.major != 3 and sys.version_info.minor != 6: sys.exit("Cassiopeia requires Python 3.6.") setup( name="ca...
#!/usr/bin/env python import sys from setuptools import setup, find_packages install_requires = [ "datapipelines", "merakicommons", "Pillow" ] # Require python 3.6 if sys.version_info.major != 3 and sys.version_info.minor != 6: sys.exit("Cassiopeia requires Python 3.6.") setup( name="cassiopei...
mit
Python
7dd7d76b27b74dbacb86be9f9c09df5d7c6a7f1b
Add function to probably misspell words.
j39m/katowice,j39m/katowice,j39m/katowice
SoybeanPw.py
SoybeanPw.py
#!/usr/bin/env python3 """ A script that generates not-very-random passwords. Do not use this script. It does not generate good passwords. If you wish to know why, post the source code online and make the claim that you've found a good script that generates good passwords. An angry cryptologist will come around in du...
#!/usr/bin/env python3 """ A script that generates not-very-random passwords. """ import random import re import sys DEFAULT_LENGTH = 4 MAX_LENGTH = 26 # Whenever a random selection is made, we should check bounds. def saneLength(selMethod): def fnWrapper(self, lenSelect=DEFAULT_LENGTH): if ...
bsd-2-clause
Python
e41ef019bcf6da57003eddb7052fa38377c9965b
Update create_shelters_thumbnails.py
cedricbonhomme/shelter-database,toggle-corp/shelter-database,toggle-corp/shelter-database,rodekruis/shelter-database,rodekruis/shelter-database,toggle-corp/shelter-database,toggle-corp/shelter-database,cedricbonhomme/shelter-database,cedricbonhomme/shelter-database,rodekruis/shelter-database,rodekruis/shelter-database,...
src/scripts/create_shelters_thumbnails.py
src/scripts/create_shelters_thumbnails.py
#! /usr/bin/python #-*- coding:utf-8 -* import os import conf from web.models import Shelter, ShelterPicture from bootstrap import db from PIL import Image def create_shelters_thumbnails(): shelters = Shelter.query.all() pictures = ShelterPicture.query.all() for picture in pictures: filepath...
#! /usr/bin/python #-*- coding:utf-8 -* import os import conf from web.models import Shelter, ShelterPicture from bootstrap import db from PIL import Image def create_shelters_thumbnails(): shelters = Shelter.query.all() pictures = ShelterPicture.query.filter(ShelterPicture.is_main_picture==True).all() ...
mit
Python
65c9df8d2764fa5766c8a092db4cf50ac75d8546
Add tests.
jakesyl/ruby-card,jakesyl/ruby-card
mnemosyne/tests/test_util_functions.py
mnemosyne/tests/test_util_functions.py
from mnemosyne.libmnemosyne.utils import * class TestUtilFunctions: def test_numeric_string_cmp_1(self): s1 = "abc123" s2 = "abc1000" assert(numeric_string_cmp(s1, s2) < 0) def test_numeric_string_cmp_2(self): s1 = "Category 9" s2 = "Category 11" assert(numeric...
from mnemosyne.libmnemosyne.utils import * class TestUtilFunctions: def test_numeric_string_cmp_1(self): s1 = "abc123" s2 = "abc1000" assert(numeric_string_cmp(s1, s2) < 0) def test_numeric_string_cmp_2(self): s1 = "Category 9" s2 = "Category 11" assert(numeric...
agpl-3.0
Python
a1d65da0bd9d29698737164b728baa9097a72198
Convert to string only if necessary
RavenB/modoboa,carragom/modoboa,bearstech/modoboa,carragom/modoboa,modoboa/modoboa,mehulsbhatt/modoboa,bearstech/modoboa,carragom/modoboa,modoboa/modoboa,RavenB/modoboa,tonioo/modoboa,RavenB/modoboa,modoboa/modoboa,bearstech/modoboa,bearstech/modoboa,tonioo/modoboa,tonioo/modoboa,mehulsbhatt/modoboa,modoboa/modoboa,meh...
modoboa/extensions/amavis/sql_email.py
modoboa/extensions/amavis/sql_email.py
# coding: utf-8 """ An email representation based on a database record. """ from django.template.loader import render_to_string from modoboa.lib.emailutils import Email from .sql_connector import get_connector class SQLemail(Email): """The SQL version of the Email class.""" def __init__(self, *args, **kw...
# coding: utf-8 """ An email representation based on a database record. """ from django.template.loader import render_to_string from modoboa.lib.emailutils import Email from .sql_connector import get_connector class SQLemail(Email): """The SQL version of the Email class.""" def __init__(self, *args, **kw...
isc
Python
10305cd51cab8b3ca0260eec02dd39b2cdf81fff
remove expiry for global_trending
stopstalk/stopstalk-deployment,stopstalk/stopstalk-deployment,stopstalk/stopstalk-deployment,stopstalk/stopstalk-deployment,stopstalk/stopstalk-deployment
private/scripts/generate_global_trending.py
private/scripts/generate_global_trending.py
""" Copyright (c) 2015-2020 Raj Patel(raj454raj@gmail.com), StopStalk 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 ...
""" Copyright (c) 2015-2020 Raj Patel(raj454raj@gmail.com), StopStalk 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 ...
mit
Python
a3c3c5f4cbbea80aada1358ca52c698cf13136cc
Move XMP init into setUp()
daaang/blister
unittests/test_xmp.py
unittests/test_xmp.py
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from hamcrest import * import unittest from .hamcrest import evaluates_to from blister.xmp import XMP class XMPTest (unittest.TestCase): ...
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from hamcrest import * import unittest from .hamcrest import evaluates_to from blister.xmp import XMP class XMPTest (unittest.TestCase): ...
bsd-3-clause
Python
42b2c7668659ea85eb22d5bd64ee89656b0d70a5
use django's static templatetag to generate static urls
jmrivas86/django-json-widget,jmrivas86/django-json-widget
django_json_widget/widgets.py
django_json_widget/widgets.py
import json from builtins import super from django import forms from django.templatetags.static import static class JSONEditorWidget(forms.Widget): class Media: css = {'all': (static('dist/jsoneditor.min.css'), )} js = (static('dist/jsoneditor.min.js'),) template_name = 'django_json_widget.h...
import json from builtins import super from django import forms from django.conf import settings class JSONEditorWidget(forms.Widget): class Media: css = {'all': (settings.STATIC_URL + 'dist/jsoneditor.min.css',)} js = (settings.STATIC_URL + 'dist/jsoneditor.min.js',) template_name = 'django...
mit
Python
17eb8f4a0e30742deaa33605c4356c13f894a1f1
Fix pluginName issue in epayment
OmeGak/indico,pferreir/indico,OmeGak/indico,pferreir/indico,mvidalgarcia/indico,OmeGak/indico,mic4ael/indico,mvidalgarcia/indico,ThiefMaster/indico,DirkHoffmann/indico,DirkHoffmann/indico,ThiefMaster/indico,indico/indico,DirkHoffmann/indico,OmeGak/indico,mic4ael/indico,mvidalgarcia/indico,indico/indico,ThiefMaster/indi...
indico/MaKaC/webinterface/rh/payment.py
indico/MaKaC/webinterface/rh/payment.py
# -*- coding: utf-8 -*- ## ## ## This file is part of CDS Indico. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Indico is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 o...
# -*- coding: utf-8 -*- ## ## ## This file is part of CDS Indico. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Indico is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 o...
mit
Python
c5cf8df78106e15a81f976f99d26d361b036318a
Improve batch Drum reading implementation
bgyori/indra,sorgerlab/indra,johnbachman/belpy,pvtodorov/indra,bgyori/indra,sorgerlab/indra,sorgerlab/indra,johnbachman/belpy,sorgerlab/belpy,johnbachman/indra,pvtodorov/indra,johnbachman/indra,sorgerlab/belpy,pvtodorov/indra,bgyori/indra,pvtodorov/indra,johnbachman/belpy,sorgerlab/belpy,johnbachman/indra
indra/tools/reading/run_drum_reading.py
indra/tools/reading/run_drum_reading.py
import sys import json import time import pickle from indra.sources.trips import process_xml from indra.sources.trips.drum_reader import DrumReader def set_pmid(statements, pmid): for stmt in statements: for evidence in stmt.evidence: evidence.pmid = pmid def read_content(content, host): ...
import sys import json from indra.sources.trips.drum_reader import DrumReader from indra.sources.trips import process_xml def read_content(content): sentences = [] for k, v in content.items(): sentences += v dr = DrumReader(to_read=sentences) try: dr.start() except SystemExit: ...
bsd-2-clause
Python
eda77b76aca48286b7dc6eadfbca8736ac20686d
add fixme, remove broken (non-vital) test
simphony/simphony-remote,simphony/simphony-remote,simphony/simphony-remote,simphony/simphony-remote
selenium_tests/test_user_accounting.py
selenium_tests/test_user_accounting.py
from selenium_tests.AdminDriverTest import AdminDriverTest from selenium.webdriver.common.by import By import os class TestUserAccounting(AdminDriverTest): def test_create_new_entry_button(self): self.click_first_element_located(By.LINK_TEXT, "Users") self.click_first_button("Create New Entry") ...
from selenium_tests.AdminDriverTest import AdminDriverTest from selenium.webdriver.common.by import By import os class TestUserAccounting(AdminDriverTest): def test_create_new_entry_button(self): self.click_first_element_located(By.LINK_TEXT, "Users") self.click_first_button("Create New Entry") ...
bsd-3-clause
Python
b2df20e3c87efd1eee4bc8165c4da7064288f32d
Remove six from astropy.io.misc.asdf.tags.unit.unit
pllim/astropy,lpsinger/astropy,lpsinger/astropy,lpsinger/astropy,pllim/astropy,StuartLittlefair/astropy,mhvk/astropy,saimn/astropy,lpsinger/astropy,saimn/astropy,saimn/astropy,saimn/astropy,StuartLittlefair/astropy,mhvk/astropy,larrybradley/astropy,saimn/astropy,larrybradley/astropy,astropy/astropy,larrybradley/astropy...
astropy/io/misc/asdf/tags/unit/unit.py
astropy/io/misc/asdf/tags/unit/unit.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- from astropy.units import Unit, UnitBase from astropy.io.misc.asdf.types import AstropyAsdfType class UnitType(AstropyAsdfType): name = 'unit/unit' types = ['astropy.units.UnitBase'] requires = ['astropy'] @class...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import six from astropy.units import Unit, UnitBase from astropy.io.misc.asdf.types import AstropyAsdfType class UnitType(AstropyAsdfType): name = 'unit/unit' types = ['astropy.units.UnitBase'] requires = ['astropy']...
bsd-3-clause
Python
5159618309d44dcd0d64e65ed99c5749baf618f6
tidy ups
aerickson/jenkinsapi,zaro0508/jenkinsapi,zaro0508/jenkinsapi,mistermocha/jenkinsapi,imsardine/jenkinsapi,JohnLZeller/jenkinsapi,salimfadhley/jenkinsapi,aerickson/jenkinsapi,imsardine/jenkinsapi,jduan/jenkinsapi,mistermocha/jenkinsapi,mistermocha/jenkinsapi,domenkozar/jenkinsapi,imsardine/jenkinsapi,salimfadhley/jenkins...
jenkinsapi_tests/systests/test_queue.py
jenkinsapi_tests/systests/test_queue.py
''' System tests for `jenkinsapi.jenkins` module. ''' import time import logging import unittest from jenkinsapi.queue import Queue from jenkinsapi_tests.systests.base import BaseSystemTest from jenkinsapi_tests.test_utils.random_strings import random_string from jenkinsapi_tests.systests.job_configs import LONG_RUNNIN...
''' System tests for `jenkinsapi.jenkins` module. ''' import time import logging import unittest from jenkinsapi.queue import Queue from jenkinsapi_tests.systests.base import BaseSystemTest from jenkinsapi_tests.test_utils.random_strings import random_string from jenkinsapi_tests.systests.job_configs import LONG_RUNNIN...
mit
Python
c1c4efbe18c72b130c41dec69c3b4c4295b9670d
Format test_agglomerative
rafwiewiora/msmbuilder,peastman/msmbuilder,msultan/msmbuilder,msmbuilder/msmbuilder,msultan/msmbuilder,brookehus/msmbuilder,Eigenstate/msmbuilder,dr-nate/msmbuilder,rafwiewiora/msmbuilder,brookehus/msmbuilder,msmbuilder/msmbuilder,mpharrigan/mixtape,stephenliu1989/msmbuilder,cxhernandez/msmbuilder,brookehus/msmbuilder,...
msmbuilder/tests/test_agglomerative.py
msmbuilder/tests/test_agglomerative.py
import numpy as np from mdtraj.testing import eq from sklearn.base import clone from sklearn.metrics import adjusted_rand_score from msmbuilder.cluster import LandmarkAgglomerative random = np.random.RandomState(2) def test_1(): x = [random.randn(10, 2), random.randn(10, 2)] n_clusters = 2 model1 = Lan...
import numpy as np from mdtraj.testing import eq from sklearn.base import clone from msmbuilder.cluster import LandmarkAgglomerative from sklearn.metrics import adjusted_rand_score random = np.random.RandomState(2) def test_1(): x = [random.randn(10,2), random.randn(10,2)] n_clusters = 2 model1 = Lan...
lgpl-2.1
Python
5dc9659542560c08ddaafc9abaa1988d95ca9c1a
Use SQL Alchemy query update method
SmartInfrastructures/fuel-main-dev,ddepaoli3/fuel-main-dev,teselkin/fuel-main,nebril/fuel-web,dancn/fuel-main-dev,zhaochao/fuel-web,AnselZhangGit/fuel-main,SmartInfrastructures/fuel-main-dev,prmtl/fuel-web,huntxu/fuel-web,zhaochao/fuel-web,AnselZhangGit/fuel-main,dancn/fuel-main-dev,zhaochao/fuel-web,ddepaoli3/fuel-mai...
nailgun/nailgun/api/handlers/redhat.py
nailgun/nailgun/api/handlers/redhat.py
# Copyright 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
Python
b3f516b91d118824bb90f834184aa25a5a5f1c68
Fix the argument name to adapt gensim 4.0.
zake7749/word2vec-tutorial
train.py
train.py
# -*- coding: utf-8 -*- import logging from gensim.models import word2vec def main(): logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO) sentences = word2vec.LineSentence("wiki_seg.txt") model = word2vec.Word2Vec(sentences, vector_size=250) #保存模型,供日後使用 m...
# -*- coding: utf-8 -*- import logging from gensim.models import word2vec def main(): logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO) sentences = word2vec.LineSentence("wiki_seg.txt") model = word2vec.Word2Vec(sentences, size=250) #保存模型,供日後使用 model.sa...
mit
Python
afd496ccdde07502e6f42ae1b4127d130aed050c
Reset docs theme, RTD should override
galaxyproject/gravity
docs/conf.py
docs/conf.py
# Configuration file for the Sphinx documentation builder. # # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master...
# Configuration file for the Sphinx documentation builder. # # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master...
mit
Python
9942b7b6e550ec6f76def44a7470f747c47b13a8
Patch the colorized formatter to not break for C modules.
punchagan/cinspect,punchagan/cinspect
utils/00-cinspect.py
utils/00-cinspect.py
""" A startup script for IPython to patch it to 'inspect' using cinspect. """ # Place this file in ~/.ipython/<PROFILE_DIR>/startup to patch your IPython to # use cinspect for the code inspection. import inspect from cinspect import getsource, getfile import IPython.core.oinspect as OI from IPython.utils.py3compat ...
""" A startup script for IPython to patch it to 'inspect' using cinspect. """ # Place this file in ~/.ipython/<PROFILE_DIR>/startup to patch your IPython to # use cinspect for the code inspection. import inspect from cinspect import getsource, getfile import IPython.core.oinspect as OI from IPython.utils.py3compat ...
bsd-3-clause
Python
21a4e86e6fef7fba92afb4bcb49d79859d0cb2b2
Add PEP substitution in changelog.
jaraco/jaraco.classes,jaraco/jaraco.collections,jaraco/jaraco.functools,yougov/librarypaste,yougov/mettle,python/importlib_metadata,jaraco/jaraco.path,yougov/mettle,jaraco/jaraco.itertools,jaraco/zipp,pwdyson/inflect.py,jazzband/inflect,yougov/mettle,yougov/pmxbot,jaraco/hgtools,cherrypy/magicbus,jaraco/rwt,jaraco/temp...
docs/conf.py
docs/conf.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import subprocess extensions = [ 'sphinx.ext.autodoc', 'rst.linker', ] # General information about the project. root = os.path.join(os.path.dirname(__file__), '..') setup_script = os.path.join(root, 'setup.py') fields = ['--name', '--versio...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import subprocess extensions = [ 'sphinx.ext.autodoc', 'rst.linker', ] # General information about the project. root = os.path.join(os.path.dirname(__file__), '..') setup_script = os.path.join(root, 'setup.py') fields = ['--name', '--versio...
mit
Python
0c7cb60add4d59786c1ef5d99246eea4959deb4f
print cleanup
velodee/vcs,velodee/vcs,velodee/vcs
vcs/conf/settings.py
vcs/conf/settings.py
import os import tempfile abspath = lambda * p: os.path.abspath(os.path.join(*p)) VCSRC_PATH = os.environ.get('VCSRC_PATH') if not VCSRC_PATH: HOME_ = os.getenv('HOME',os.getenv('USERPROFILE',tempfile.gettempdir())) VCSRC_PATH = VCSRC_PATH or abspath(HOME_, '.vcsrc') BACKENDS = { 'hg': 'vcs.backends.hg.Mer...
import os import tempfile abspath = lambda * p: os.path.abspath(os.path.join(*p)) VCSRC_PATH = os.environ.get('VCSRC_PATH') if not VCSRC_PATH: HOME_ = os.getenv('HOME',os.getenv('USERPROFILE',tempfile.gettempdir())) VCSRC_PATH = VCSRC_PATH or abspath(HOME_, '.vcsrc') BACKENDS = { 'hg': 'vcs.backends.hg.Mer...
mit
Python
c19391f11ce01270fd23cbfafb737048bde27423
Update numba/tests/test_auto_constants.py
stuartarchibald/numba,stuartarchibald/numba,gmarkall/numba,cpcloud/numba,gmarkall/numba,seibert/numba,cpcloud/numba,IntelLabs/numba,numba/numba,stonebig/numba,stonebig/numba,numba/numba,seibert/numba,numba/numba,IntelLabs/numba,gmarkall/numba,cpcloud/numba,stuartarchibald/numba,gmarkall/numba,cpcloud/numba,stonebig/num...
numba/tests/test_auto_constants.py
numba/tests/test_auto_constants.py
import math import sys import numpy as np from numba import njit from numba.core.compiler import compile_isolated import numba.tests.usecases as uc import unittest class TestAutoConstants(unittest.TestCase): def test_numpy_nan(self): def pyfunc(): return np.nan cres = compile_isolat...
import math import sys import numpy as np from numba import njit from numba.core.compiler import compile_isolated import numba.tests.usecases as uc import unittest class TestAutoConstants(unittest.TestCase): def test_numpy_nan(self): def pyfunc(): return np.nan cres = compile_isolat...
bsd-2-clause
Python
b3d4faae276aad5b3009c50a541e17d17c20f359
Fix thread safety of pyshearlets
aringh/odl,kohr-h/odl,aringh/odl,odlgroup/odl,odlgroup/odl,kohr-h/odl
odl/contrib/pyshearlab/operator.py
odl/contrib/pyshearlab/operator.py
# Copyright 2014-2017 The ODL contributors # # This file is part of ODL. # # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at https://mozilla.org/MPL/2.0/. """ODL integration with pyshearlab.""" imp...
# Copyright 2014-2017 The ODL contributors # # This file is part of ODL. # # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at https://mozilla.org/MPL/2.0/. """ODL integration with pyshearlab.""" imp...
mpl-2.0
Python
bd47b385764a58c3f7c8e567c5543720f1104840
Fix if check.
StackStorm/st2tests,StackStorm/st2tests,StackStorm/st2tests
packs/asserts/actions/object_equals.py
packs/asserts/actions/object_equals.py
import pprint import sys import json from st2actions.runners.pythonrunner import Action __all__ = [ 'AssertObjectEquals' ] def cmp(x, y): x = json.dumps(x, sort_keys=True) y = json.dumps(y, sort_keys=True) return (x == y) class AssertObjectEquals(Action): def run(self, object, expected): ...
import pprint import sys import json from st2actions.runners.pythonrunner import Action __all__ = [ 'AssertObjectEquals' ] def cmp(x, y): x = json.dumps(x, sort_keys=True) y = json.dumps(y, sort_keys=True) return (x == y) class AssertObjectEquals(Action): def run(self, object, expected): ...
apache-2.0
Python
d60334b611b6a8517a288b70a762026c9055795e
Adjust formatting
misgeatgit/atomspace,anitzkin/opencog,rodsol/opencog,prateeksaxena2809/opencog,shujingke/opencog,jlegendary/opencog,virneo/opencog,zhaozengguang/opencog,misgeatgit/opencog,rohit12/atomspace,kim135797531/opencog,ceefour/atomspace,shujingke/opencog,yantrabuddhi/opencog,eddiemonroe/opencog,virneo/opencog,AmeBel/atomspace,...
opencog/python/web/api/apitypes.py
opencog/python/web/api/apitypes.py
__author__ = 'Cosmo Harrigan' from flask import json, current_app from flask.ext.restful import Resource, reqparse from mappers import * from flask.ext.restful.utils import cors class TypesAPI(Resource): def __init__(self): self.reqparse = reqparse.RequestParser() self.reqparse.add_argument('callb...
__author__ = 'Cosmo Harrigan' from flask import json, current_app from flask.ext.restful import Resource, reqparse from mappers import * from flask.ext.restful.utils import cors class TypesAPI(Resource): def __init__(self): self.reqparse = reqparse.RequestParser() self.reqparse.add_argument('callb...
agpl-3.0
Python
06b12956fae75e48c197c208fda5deebd16be7a1
Update plot.py
paulborza/node-load-balancers,paulborza/node-load-balancers
docs/plot.py
docs/plot.py
#!/usr/bin/env python # # Copyright (c) 2017-present Paul Borza # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. # # brew cask install mactex # pip install matplotlib numpy import numpy as np import matplotlib.pyplot as plt import matplotlib.tick...
#!/usr/bin/env python # # Copyright (c) 2017-present Paul Borza # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. # # brew cask install mactex # pip install matplotlib numpy import numpy as np import matplotlib.pyplot as plt import matplotlib.tick...
mit
Python
f5e95bf71ed13947d00c80f53346c6aef593857b
Add missing import
toastwaffle/GData-Backup
utils.py
utils.py
import getpass import os import gflags import login_pb2 FLAGS = gflags.FLAGS gflags.DEFINE_string('login_file', '~/.gdatabackup-login', 'Alternative location of the credentials file', short_name='l') class Error(Exception): pass class NonExistentP...
import os import gflags import login_pb2 FLAGS = gflags.FLAGS gflags.DEFINE_string('login_file', '~/.gdatabackup-login', 'Alternative location of the credentials file', short_name='l') class Error(Exception): pass class NonExistentPathError(Error)...
mit
Python