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
7ed5f886d1fc92c3f7c39c7e6c11c15f3151296d
fix romance error
LeagueOfAutomatedNations/LeagueBot,LeagueOfAutomatedNations/LeagueBot
leaguebot/services/alerters/slack.py
leaguebot/services/alerters/slack.py
from leaguebot import app import leaguebot.models.map as screepmap import leaguebot.services.screeps as screeps import leaguebot.services.slack as slack import re def sendBattleMessage(battleinfo): message = getBattleMessageText(battleinfo) sendToSlack(message) def getBattleMessageText(battleinfo): tick...
from leaguebot import app import leaguebot.models.map as screepmap import leaguebot.services.screeps as screeps import leaguebot.services.slack as slack import re def sendBattleMessage(battleinfo): message = getBattleMessageText(battleinfo) sendToSlack(message) def getBattleMessageText(battleinfo): tick...
mit
Python
6cfeb4fefb0eaa7c47ba8f44b4d1fb640983dc5a
Set version to v0.25.0-dev
SoCo/SoCo,SoCo/SoCo
soco/__init__.py
soco/__init__.py
"""SoCo (Sonos Controller) is a simple library to control Sonos speakers.""" # There is no need for all strings here to be unicode, and Py2 cannot import # modules with unicode names so do not use from __future__ import # unicode_literals # https://github.com/SoCo/SoCo/issues/98 # import logging from .core import S...
"""SoCo (Sonos Controller) is a simple library to control Sonos speakers.""" # There is no need for all strings here to be unicode, and Py2 cannot import # modules with unicode names so do not use from __future__ import # unicode_literals # https://github.com/SoCo/SoCo/issues/98 # import logging from .core import S...
mit
Python
14a0738ec836bd3369984835797f5002813b270a
Fix imports to local paths
abenicho/isvr
nilearn/_utils/__init__.py
nilearn/_utils/__init__.py
from .niimg_conversions import is_a_niimg, _get_shape, _repr_niimgs, \ copy_niimg, check_niimg, concat_niimgs, check_niimgs from .numpy_conversions import as_ndarray from .cache_mixin import CacheMixin
from niimg_conversions import is_a_niimg, _get_shape, _repr_niimgs, \ copy_niimg, check_niimg, concat_niimgs, check_niimgs from numpy_conversions import as_ndarray from cache_mixin import CacheMixin
bsd-3-clause
Python
c8c96913057bcbccce931529fc0f7ebdbad725fa
Add support for matching %s__in
stuaxo/mnd
mnd/match.py
mnd/match.py
""" Argument matching. """ from operator import eq, contains from collections import namedtuple class InvalidArg: def __bool__(self): return False def arg_comparitor(name): """ :param arg name :return: pair containing name, comparitor given an argument name, munge it and return a prope...
""" Argument matching. """ from collections import namedtuple class InvalidArg: pass def arg_match(m_arg, arg, default=True): """ :param m_arg: value to match against or callable :param arg: arg to match :param default: will be returned if m_arg is None if m_arg is a callable it will ...
mit
Python
ec3443a000d4d004575b0425ec40640c17d2adfb
Use __version__.
codysoyland/django-template-repl
src/template_repl/__init__.py
src/template_repl/__init__.py
__version__ = '0.2.1' def get_version(): return __version__
def get_version(): return '0.2.1'
bsd-3-clause
Python
5d5a739979d2bbf160c951b846a0dcc4acd504c6
Remove scikits.ts and larry from example
jstoxrocky/statsmodels,gef756/statsmodels,bashtage/statsmodels,edhuckle/statsmodels,rgommers/statsmodels,josef-pkt/statsmodels,adammenges/statsmodels,yl565/statsmodels,huongttlan/statsmodels,bsipocz/statsmodels,wkfwkf/statsmodels,Averroes/statsmodels,josef-pkt/statsmodels,wzbozon/statsmodels,bert9bert/statsmodels,DonBe...
examples/tsa/ex_dates.py
examples/tsa/ex_dates.py
""" Using dates with timeseries models """ import statsmodels.api as sm import numpy as np import pandas # Getting started # --------------- data = sm.datasets.sunspots.load() # Right now an annual date series must be datetimes at the end of the year. from datetime import datetime dates = sm.tsa.datetools.date_from...
""" Using dates with timeseries models """ import statsmodels.api as sm import numpy as np import pandas # Getting started # --------------- data = sm.datasets.sunspots.load() # Right now an annual date series must be datetimes at the end of the year. # We can use scikits.timeseries and datetime to create this array...
bsd-3-clause
Python
d7cb8495dc7608ac45195fb523c7b728c24f3a4c
Make all api functions have consistent data variable naming
edelight/kitchen,edelight/kitchen,edelight/kitchen,edelight/kitchen
kitchen/dashboard/api.py
kitchen/dashboard/api.py
"""Data API""" # -*- coding: utf-8 -*- import json from django.http import HttpResponse, Http404 from django.views.decorators.http import require_http_methods from kitchen.dashboard import chef @require_http_methods(["GET"]) def get_roles(request): """Returns all nodes in the repo""" data = chef.get_roles()...
"""Data API""" # -*- coding: utf-8 -*- import json from django.http import HttpResponse, Http404 from django.views.decorators.http import require_http_methods from kitchen.dashboard import chef @require_http_methods(["GET"]) def get_roles(request): """Returns all nodes in the repo""" roles = chef.get_roles(...
apache-2.0
Python
c31fb511abf67bfebaa8e1c296b68465fb2523bb
fix imports
clonker/ci-tests
ui/viewer.py
ui/viewer.py
import mdtraj as md import IPython from mdtraj.html import TrajectoryView, enable_notebook from IPython.html.widgets.widget_int import IntSliderWidget def view_traj(traj, topology_file=None, stride=1): r"""Opens a trajectory viewer (from mdtraj). Parameters ---------- traj : `mdtraj.Trajectory` or ...
import mdtraj as md import IPython from mdtraj.html import TrajectoryView, enable_notebook import IPython def view_traj(traj, topology_file=None, stride=1): r"""Opens a trajectory viewer (from mdtraj). Parameters ---------- traj : `mdtraj.Trajectory` or string mdtraj.Trajectory object or fi...
bsd-3-clause
Python
aca62878340f1a1a04e674bcd2ce8e894e4efdc9
update help button to use font awesome and be disabled if no help
xgds/xgds_core,xgds/xgds_core,xgds/xgds_core
xgds_core/templatetags/help_button.py
xgds_core/templatetags/help_button.py
#__BEGIN_LICENSE__ # Copyright (c) 2015, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # All rights reserved. # # The xGDS platform is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance ...
#__BEGIN_LICENSE__ # Copyright (c) 2015, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # All rights reserved. # # The xGDS platform is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance ...
apache-2.0
Python
95b00dae180c54d62b43f04743e9f8ec34e3de52
Fix minor style issue
sagersmith8/ai_graph_coloring,sagersmith8/ai_graph_coloring
ai_graph_color/line.py
ai_graph_color/line.py
class Line: def __init__(self, point_a, point_b): """ Make a new line from two points. :param point_a: one of the points on the line :type point_a: tuple(float, float) :param point_b: one of the points on the line :type point_b: tuple(float, float) """ ...
class Line: def __init__(self, point_a, point_b): """ Make a new line from two points. :param point_a: one of the points on the line :type point_a: tuple(float, float) :param point_b: one of the points on the line :type point_b: tuple(float, float) """ ...
mit
Python
23a8df19e272bf4a48d59629976fc0cd4a1b83eb
Add TFBooster Code to Solve "German signal" problem
Gabvaztor/TFBoost
Settings/German_Signal/ModelConfiguration.py
Settings/German_Signal/ModelConfiguration.py
""" Normally, this files contains all necessary code to execute successfully the solution of the problem but in this case (because this version is not stable) all code is in "TFModel_backup.py" file. """ # TODO Define Code """ TFBooster Code to solve problem """ setting_object = SettingsObject.Settings(Dictionary.stri...
""" Normally, this files contains all necessary code to execute successfully the solution of the problem but in this case (because this version is not stable) all code is in "TFModel_backup.py" file. """
apache-2.0
Python
868589926bd09729e03d59f929f3de0ae0fee673
Bump release
racker/fleece,racker/fleece
fleece/__about__.py
fleece/__about__.py
"""Fleece package attributes and metadata.""" __all__ = ( '__title__', '__summary__', '__author__', '__email__', '__license__', '__version__', '__copyright__', '__url__', ) __title__ = 'fleece' __summary__ = 'Wrap the lamb...da' __author__ = 'Rackers' __email__ = 'bruce.stringer@racksp...
"""Fleece package attributes and metadata.""" __all__ = ( '__title__', '__summary__', '__author__', '__email__', '__license__', '__version__', '__copyright__', '__url__', ) __title__ = 'fleece' __summary__ = 'Wrap the lamb...da' __author__ = 'Rackers' __email__ = 'bruce.stringer@racksp...
apache-2.0
Python
19cd8be63d482a3fb23456c5c87ebdfe16ac9415
Add a method to test `locateMarker()' in util.py.
isislovecruft/scramblesuit,isislovecruft/scramblesuit
unittests.py
unittests.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import util import const import uniformdh import obfsproxy.network.buffer as obfs_buf class UniformDHTest( unittest.TestCase ): def setUp( self ): weAreServer = True self.udh = uniformdh.new("A" * const.SHARED_SECRET_LENGTH, weAreSer...
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import util import const import uniformdh import obfsproxy.network.buffer as obfs_buf class UniformDHTest( unittest.TestCase ): def setUp( self ): weAreServer = True self.udh = uniformdh.new("A" * const.SHARED_SECRET_LENGTH, weAreSer...
bsd-3-clause
Python
5935d03339770fd2359767f47c761d3b7bfd59d1
Support some very basic features
Xion/unmatcher
unmatcher.py
unmatcher.py
""" unmatcher :: Regular expression reverser for Python """ __version__ = "0.0.1" __author__ = "Karol Kuczmarski" __license__ = "Simplified BSD" import random import re import string __all__ = ['reverse'] def reverse(pattern, groups=None, **kwargs): if not isinstance(pattern, basestring): pattern = pa...
""" unmatcher :: Regular expression reverser for Python """ __version__ = "0.0.1" __author__ = "Karol Kuczmarski" __license__ = "Simplified BSD" import random import re import string __all__ = ['reverse'] def reverse(pattern, groups=None, **kwargs): if not isinstance(pattern, basestring): pattern = pa...
bsd-2-clause
Python
b6a4349a0f3f9c66a52eabb540b778ec3975e96a
Split imports
matteobachetti/srt-single-dish-tools
srttools/tests/test_import.py
srttools/tests/test_import.py
from astropy.table import Table def test_import_scan(): from srttools import Scan s = Scan() assert isinstance(s, Table) def test_import_scanset(): from srttools import ScanSet s = ScanSet() assert isinstance(s, Table) def test_import_calibratortable(): from srttools import CalibratorT...
from srttools import Scan, ScanSet, CalibratorTable from astropy.table import Table def test_import_scan(): s = Scan() assert isinstance(s, Table) def test_import_scanset(): s = ScanSet() assert isinstance(s, Table) def test_import_calibratortable(): s = CalibratorTable() assert isinstance...
bsd-3-clause
Python
97f7e1f04be413e5cffaaa7c718188ceae672c05
reduce ldap calls
tjcsl/director,tjcsl/director,tjcsl/director,tjcsl/director
web3/apps/users/forms.py
web3/apps/users/forms.py
from django import forms from django.core.validators import EmailValidator from .models import User, Group from ...utils.tjldap import get_uid class UserForm(forms.ModelForm): username = forms.CharField(max_length=32, widget=forms.TextInput(attrs={"class": "form-control"})) ema...
from django import forms from django.core.validators import EmailValidator from .models import User, Group from ...utils.tjldap import get_uid class UserForm(forms.ModelForm): username = forms.CharField(max_length=32, widget=forms.TextInput(attrs={"class": "form-control"})) ema...
mit
Python
17d0bd407a738dc032621fc000f33674d0f6613e
add property `id`
wemoo/wemoo-center,wemoo/wemoo-center,wemoo/wemoo-center
app/models/task.py
app/models/task.py
# coding: utf8 import datetime from config import environment db = environment.mdb class Task(db.Document): TYPE_ONCE = 1 TYPE_CONTINUES = 2 title = db.StringField(required=True, max_length=100) task_type = db.IntField(required=True) desc = db.StringField(required=True, max_length=1000) sc...
# coding: utf8 import datetime from config import environment db = environment.mdb class Task(db.Document): TYPE_ONCE = 1 TYPE_CONTINUES = 2 title = db.StringField(required=True, max_length=100) task_type = db.IntField(required=True) desc = db.StringField(required=True, max_length=1000) sc...
mit
Python
532c201053ae271544270035423f690b4774794a
Fix multiselect user/group field when retrieving results from a report
Swimlane/sw-python-client
swimlane/core/fields/usergroup.py
swimlane/core/fields/usergroup.py
from .base import MultiSelectField from swimlane.core.resources.usergroup import UserGroup class UserGroupField(MultiSelectField): """Manages getting/setting users from record User/Group fields""" field_type = 'Core.Models.Fields.UserGroupField, Core' supported_types = [UserGroup] def set_swimlane(...
from .base import MultiSelectField from swimlane.core.resources.usergroup import UserGroup class UserGroupField(MultiSelectField): """Manages getting/setting users from record User/Group fields""" field_type = 'Core.Models.Fields.UserGroupField, Core' supported_types = [UserGroup] def cast_to_pytho...
mit
Python
69ec68bcf5fed95f85d5b4a3ac1fc155cb26175d
create background thread task
duncan60/flask-simple-demo,duncan60/flask-simple-demo,duncan60/flask-simple-demo
application/socket/simple.py
application/socket/simple.py
# -*- coding: utf-8 -*- from flask import request from application import app, api, socketio from flask_socketio import emit, disconnect thread = None def background_thread(): count = 0 while True: socketio.sleep(2) count += 1 socketio.emit('serverResponse', {'dat...
# -*- coding: utf-8 -*- from flask import request from application import app, api, socketio from flask_socketio import emit, disconnect @socketio.on('clientEvent', namespace='/test') def test_message(message): emit('serverResponse', {'data': 'server msg: {0} !!!'.format(message['data'])}) @socketio.on('...
mit
Python
2d3e481360a0564163c0b004c8bfaf9b4fb645c1
Make modules uninstallable
Domatix/l10n-spain,factorlibre/l10n-spain,factorlibre/l10n-spain,factorlibre/l10n-spain
l10n_es_account_asset/__openerp__.py
l10n_es_account_asset/__openerp__.py
# -*- coding: utf-8 -*- # © 2012-2015 Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Gestión de activos fijos para España", "version": "8.0.2.0.0", "depends": ["account_asset"], "author": "Serv. Tecnol. Avanzados - Pedro M...
# -*- coding: utf-8 -*- # © 2012-2015 Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Gestión de activos fijos para España", "version": "8.0.2.0.0", "depends": ["account_asset"], "author": "Serv. Tecnol. Avanzados - Pedro M...
agpl-3.0
Python
67c7233cdf4893eb4302f297e12dfa53886d3523
Add a config check for missing Thrift server or misconfiguration
cloudera/hue,kawamon/hue,cloudera/hue,lumig242/Hue-Integration-with-CDAP,todaychi/hue,Peddle/hue,kawamon/hue,jayceyxc/hue,cloudera/hue,MobinRanjbar/hue,lumig242/Hue-Integration-with-CDAP,xq262144/hue,vmax-feihu/hue,todaychi/hue,cloudera/hue,kawamon/hue,jayceyxc/hue,fangxingli/hue,vmax-feihu/hue,fangxingli/hue,vmax-feih...
apps/hbase/src/hbase/conf.py
apps/hbase/src/hbase/conf.py
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
Python
7ad9813e3214108cf68e00db6b10f88501103b92
Fix middleware to not hardcode mozillians
akatsoulas/mozillians,hoosteeno/mozillians,chirilo/mozillians,hoosteeno/mozillians,mozilla/mozillians,satdav/mozillians,glogiotatidis/mozillians-new,brian-yang/mozillians,fxa90id/mozillians,akarki15/mozillians,glogiotatidis/mozillians-new,justinpotts/mozillians,safwanrahman/mozillians,justinpotts/mozillians,mozilla/moz...
apps/phonebook/middleware.py
apps/phonebook/middleware.py
import os from django.http import (HttpResponseForbidden, HttpResponseNotAllowed, HttpResponseRedirect) import commonware.log from funfactory.manage import ROOT from funfactory.urlresolvers import reverse # TODO: this is hackish. Once we update mozillians to the newest playdoh layout error_p...
from django.http import (HttpResponseForbidden, HttpResponseNotAllowed, HttpResponseRedirect) import commonware.log from funfactory.urlresolvers import reverse from mozillians.urls import error_page log = commonware.log.getLogger('m.phonebook') class PermissionDeniedMiddleware(object): ...
bsd-3-clause
Python
22f1e025111d0ebe3f8bb032f8f078322bf94386
remove an unused widget
armstrong/armstrong.hatband,texastribune/armstrong.hatband,texastribune/armstrong.hatband,armstrong/armstrong.hatband,texastribune/armstrong.hatband,armstrong/armstrong.hatband
armstrong/hatband/options.py
armstrong/hatband/options.py
from django.contrib import admin from django.contrib.admin.options import InlineModelAdmin from django.db import models from django import forms from django.template.loader import render_to_string from django.utils.safestring import mark_safe from . import widgets from .utils import static_url RICH_TEXT_DBFIELD_OVERRI...
from django.contrib import admin from django.contrib.admin.options import InlineModelAdmin from django.db import models from django import forms from django.template.loader import render_to_string from django.utils.safestring import mark_safe from . import widgets from .utils import static_url RICH_TEXT_DBFIELD_OVERRI...
apache-2.0
Python
ca30b673833a4d0c1fc6204e211e8ac7499b590a
bump version
vmalloc/backslash-python,slash-testing/backslash-python
backslash/__version__.py
backslash/__version__.py
__version__ = "2.0.2"
__version__ = "2.0.1"
bsd-3-clause
Python
8a36c7d83c2421a50d24cc51823bd474578cd768
update dev version after 0.15.0 tag [skip ci]
desihub/desimodel,desihub/desimodel
py/desimodel/_version.py
py/desimodel/_version.py
__version__ = '0.15.0.dev651'
__version__ = '0.15.0'
bsd-3-clause
Python
c058db50ff489fb49b16b055649b2d8a3b0e6d4c
Revert import changes
wind-python/windpowerlib
windpowerlib/__init__.py
windpowerlib/__init__.py
__copyright__ = "Copyright oemof developer group" __license__ = "MIT" __version__ = "0.2.1dev" from windpowerlib.wind_turbine import WindTurbine from windpowerlib.wind_farm import WindFarm from windpowerlib.wind_turbine_cluster import WindTurbineCluster from windpowerlib.modelchain import ModelChain from windpowerlib....
__copyright__ = "Copyright oemof developer group" __license__ = "MIT" __version__ = "0.2.1dev" from .wind_turbine import WindTurbine from .wind_farm import WindFarm from .wind_turbine_cluster import WindTurbineCluster from .modelchain import ModelChain from .turbine_cluster_modelchain import TurbineClusterModelChain f...
mit
Python
c79182da0690b63cef23809b30013c44a1b5999a
Add ListElement
Cretezy/pymessenger2,karlinnolabs/pymessenger
pymessenger2/__init__.py
pymessenger2/__init__.py
from .bot import Bot from .buttons import * @attr.s class Element: title = attr.ib() item_url = attr.ib(default=None) image_url = attr.ib(default=None) subtitle = attr.ib(default=None) buttons = attr.ib(default=None) @attr.s class QuickReply: """ See https://developers.facebook.com/docs...
from .bot import Bot from .buttons import * @attr.s class Element: title = attr.ib() item_url = attr.ib(default=None) image_url = attr.ib(default=None) subtitle = attr.ib(default=None) buttons = attr.ib(default=None) @attr.s class QuickReply: """ See https://developers.facebook.com/docs...
mit
Python
b407b48f1d5bb2698bf7402addc4f1ebd5f2773c
Test plot title and axis labels
DanielAndreasen/SWEETer-Cat,DanielAndreasen/SWEETer-Cat
sweetercat/tests/test_plot.py
sweetercat/tests/test_plot.py
"""SWEETer-Cat tests regarding the plotting pages.""" import pytest from flask import url_for def test_plot_get_requests(client): """Test that all pages return status code: 200 using the end_points""" for end_point in ('plot', 'plot_exo'): plot = client.get(url_for(end_point)) assert plot.st...
"""SWEETer-Cat tests regarding the plotting pages.""" import pytest from flask import url_for def test_plot_get_requests(client): """Test that all pages return status code: 200 using the end_points""" for end_point in ('plot', 'plot_exo'): plot = client.get(url_for(end_point)) assert plot.st...
mit
Python
cf60d3869834ba4654f57f1b4daca7797f2c5736
extend => append.
hello-base/web,hello-base/web,hello-base/web,hello-base/web
base/components/views.py
base/components/views.py
from django.views.generic import TemplateView, View from braces.views import AjaxResponseMixin, JSONResponseMixin from haystack.query import SearchQuerySet from components.merchandise.music.models import Album, Edition, Single, Track from components.people.models import Group, Idol class AutocompleteView(JSONRespon...
from django.views.generic import TemplateView, View from braces.views import AjaxResponseMixin, JSONResponseMixin from haystack.query import SearchQuerySet from components.merchandise.music.models import Album, Edition, Single, Track from components.people.models import Group, Idol class AutocompleteView(JSONRespon...
apache-2.0
Python
1930fe6bb492d41da88fae2f902e3f966a12926a
Fix indentation error on str method for league
shermanng10/superathletebuilder,shermanng10/superathletebuilder,shermanng10/superathletebuilder,shermanng10/superathletebuilder
athletes/models.py
athletes/models.py
from django.db import models from django.utils import timezone from django.utils.encoding import force_bytes class Sport(models.Model): name = models.CharField(max_length=20) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) def __str__(self): return force_byt...
from django.db import models from django.utils import timezone from django.utils.encoding import force_bytes class Sport(models.Model): name = models.CharField(max_length=20) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) def __str__(self): return force_byt...
mit
Python
d5ec3ead350036fbe1d7e04964ceedc9b3188428
handle when request path ends in /
gregmli/cwta,gregmli/cwta,gregmli/cwta,gregmli/cwta,gregmli/cwta
redesign/website/cwta.py
redesign/website/cwta.py
import webapp2 from google.appengine.api import users #from google.appengine.ext import db import jinja2 import os import urllib jinja_environment = jinja2.Environment(loader=jinja2.FileSystemLoader(os.path.dirname(__file__))) def urlencode_filter(s): if type(s) == 'Markup': s = s.unescape() s = s....
import webapp2 from google.appengine.api import users #from google.appengine.ext import db import jinja2 import os import urllib jinja_environment = jinja2.Environment(loader=jinja2.FileSystemLoader(os.path.dirname(__file__))) def urlencode_filter(s): if type(s) == 'Markup': s = s.unescape() s = s....
mit
Python
583195165d5e3a40ff3ebc6273dafa6111173bfa
Remove debug line
nedbat/zellij
test_defuzz.py
test_defuzz.py
import itertools import math from defuzz import Defuzzer from hypothesis import given, example from hypothesis.strategies import floats, integers, lists, tuples from hypo_helpers import f def test_it(): dfz = Defuzzer() assert dfz.defuzz((1, 2)) == (1, 2) assert dfz.defuzz((1, 3)) == (1, 3) assert ...
import itertools import math from defuzz import Defuzzer from hypothesis import given, example from hypothesis.strategies import floats, integers, lists, tuples from hypo_helpers import f def test_it(): dfz = Defuzzer() assert dfz.defuzz((1, 2)) == (1, 2) assert dfz.defuzz((1, 3)) == (1, 3) assert ...
apache-2.0
Python
7af8c206ace3e6fd99bef11501e1def601bbdd78
Add patches and missing dependency to bash (#13084)
LLNL/spack,iulian787/spack,LLNL/spack,LLNL/spack,LLNL/spack,iulian787/spack,LLNL/spack,iulian787/spack,iulian787/spack,iulian787/spack
var/spack/repos/builtin/packages/bash/package.py
var/spack/repos/builtin/packages/bash/package.py
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Bash(AutotoolsPackage): """The GNU Project's Bourne Again SHell.""" homepage = "https...
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Bash(AutotoolsPackage): """The GNU Project's Bourne Again SHell.""" homepage = "https...
lgpl-2.1
Python
1599dce2aeda294ae803444beeddca7d8a6d06d0
Add versions 1.8 and 1.7 (#10978)
LLNL/spack,LLNL/spack,iulian787/spack,iulian787/spack,iulian787/spack,LLNL/spack,LLNL/spack,LLNL/spack,iulian787/spack,iulian787/spack
var/spack/repos/builtin/packages/canu/package.py
var/spack/repos/builtin/packages/canu/package.py
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Canu(MakefilePackage): """A single molecule sequence assembler for genomes large and ...
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Canu(MakefilePackage): """A single molecule sequence assembler for genomes large and ...
lgpl-2.1
Python
cc2014baa5f9650cac1176b0ecd5f8a86cb9010b
Fix typo
xadahiya/hydrus,HTTP-APIs/hydrus
hydrus/server/parser.py
hydrus/server/parser.py
from data.astronomy import astronomy from server.commons import ROOT, SERVE, HYDRA_DOC objects = astronomy['defines'] # print(objects[0]) # filter the objects array # use 'lifter' library to filter arrays # https://github.com/EliotBerriot/lifter template = { "@context": { "hydra": "http://www.w3.org/ns/hydr...
from data.astronomy import astronomy from server.commons import ROOT, SERVE, HYDRA_DOC objects = astronomy['defines'] # print(objects[0]) # filter the objects array # use 'lifter' library to filter arrays # https://github.com/EliotBerriot/lifter template = { "@context": { "hydra": "http://www.w3.org/ns/hydr...
mit
Python
0791cbb2aa2af72411153649ca7d365be02b1e62
Increment version
spacy-io/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc
thinc/about.py
thinc/about.py
# inspired from: # https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/ # https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py __name__ = 'thinc' __version__ = '6.8.1' __summary__ = "Practical Machine Learning for NLP" __uri__ = 'https://github.com/explosion/thinc' __au...
# inspired from: # https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/ # https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py __name__ = 'thinc' __version__ = '6.8.0' __summary__ = "Practical Machine Learning for NLP" __uri__ = 'https://github.com/explosion/thinc' __au...
mit
Python
c906f99e961d2fa44a01f3efff85ce2679701027
Update bottlespin.py
kallerdaller/Cogs-Yorkfield
bottlespin/bottlespin.py
bottlespin/bottlespin.py
import discord from discord.ext import commands from random import choice class Bottlespin: """Spins a bottle and lands on a random user.""" def __init__(self, bot): self.bot = bot @commands.command(pass_context=True, no_pm=True, alias=["bottlespin"]) async def spin(self, ctx, role): ...
import discord from discord.ext import commands from random import choice class Bottlespin: """Spins a bottle and lands on a random user.""" def __init__(self, bot): self.bot = bot @commands.command(pass_context=True, no_pm=True, alias=["bottlespin"]) async def spin(self, ctx, role): ...
mit
Python
53e8c14d774131503dbdefe6528cd1e26adbf30b
Allow Travis to load tests and use azure-storage installed from pip at the same time
Azure/azure-sdk-for-python,Azure/azure-sdk-for-python,v-iam/azure-sdk-for-python,Azure/azure-sdk-for-python,AutorestCI/azure-sdk-for-python,lmazuel/azure-sdk-for-python,Azure/azure-sdk-for-python,SUSE/azure-sdk-for-python
azure_nosetests.py
azure_nosetests.py
#!/usr/bin/env python import os.path, nose, glob, sys, pkg_resources packages = [os.path.dirname(p) for p in glob.glob('azure*/setup.py')] sys.path += packages # Declare it manually, because "azure-storage" is probably installed with pip pkg_resources.declare_namespace('azure') nose.main()
#!/usr/bin/env python import os.path, nose, glob, sys packages = [os.path.dirname(p) for p in glob.glob('azure*/setup.py')] sys.path += packages nose.main()
mit
Python
c13445cc54b96b2524ea9df71e892d2fe6c8c34a
Make sure warning messages are logged on stdout
SUSE/azurectl,SUSE/azurectl,SUSE/azurectl
azurectl/logger.py
azurectl/logger.py
# Copyright (c) 2015 SUSE Linux GmbH. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
# Copyright (c) 2015 SUSE Linux GmbH. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
apache-2.0
Python
270298cce11e90f7f8c0cc2f06b7ddbbfaad9f6b
Test the default URL shortener backend
bywbilly/django-blog-zinnia,marctc/django-blog-zinnia,ZuluPro/django-blog-zinnia,extertioner/django-blog-zinnia,Maplecroft/django-blog-zinnia,aorzh/django-blog-zinnia,Fantomas42/django-blog-zinnia,petecummings/django-blog-zinnia,1844144/django-blog-zinnia,dapeng0802/django-blog-zinnia,ZuluPro/django-blog-zinnia,1844144...
zinnia/tests/test_url_shortener.py
zinnia/tests/test_url_shortener.py
"""Test cases for Zinnia's url_shortener""" import warnings from django.test import TestCase from zinnia.url_shortener import get_url_shortener from zinnia import url_shortener as us_settings from zinnia.url_shortener.backends import default class URLShortenerTestCase(TestCase): """Test cases for zinnia.url_sho...
"""Test cases for Zinnia's url_shortener""" import warnings from django.test import TestCase from zinnia.url_shortener import get_url_shortener from zinnia import url_shortener as us_settings from zinnia.url_shortener.backends.default import backend as default_backend class URLShortenerTestCase(TestCase): """Te...
bsd-3-clause
Python
cc32a7b1b40c54c98fb3bceda8f9bb3b3bea243a
Fix dst_ssh
brickgao/specchio
specchio/main.py
specchio/main.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import time from watchdog.observers import Observer from specchio.handlers import SpecchioEventHandler from specchio.utils import init_logger, logger def main(): """Main function for specchio Example: specchio test/ user@host:test/ :return: Non...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import time from watchdog.observers import Observer from specchio.handlers import SpecchioEventHandler from specchio.utils import init_logger, logger def main(): """Main function for specchio Example: specchio test/ user@host:test/ :return: Non...
mit
Python
39ef94c4fc76930964b9635cc6fadeefbf8510c6
Update init
ghl3/bamboo,ghl3/bamboo
bamboo/__init__.py
bamboo/__init__.py
from core import * __all__ = ['core', 'frames', 'groups', 'modeling']
from core import wrap import bamboo.groups import bamboo.frames import bamboo.plotting __all__ = ['core', 'plotting', 'frames', 'groups', 'modeling']
mit
Python
e0e5e662e950973e8a79ae876cc91119b91d9122
Update hoomd.md documentation
joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue
hoomd/md/__init__.py
hoomd/md/__init__.py
# Copyright (c) 2009-2019 The Regents of the University of Michigan # This file is part of the HOOMD-blue project, released under the BSD 3-Clause # License. """ Molecular Dynamics Perform Molecular Dynamics simulations with HOOMD-blue. .. rubric:: Stability :py:mod:`hoomd.md` is **stable**. When upgrading from ver...
# Copyright (c) 2009-2019 The Regents of the University of Michigan # This file is part of the HOOMD-blue project, released under the BSD 3-Clause # License. """ Molecular Dynamics Perform Molecular Dynamics simulations with HOOMD-blue. .. rubric:: Stability :py:mod:`hoomd.md` is **stable**. When upgrading from ver...
bsd-3-clause
Python
54d6d76fc485b32fc14dec49c2e53a4bed3114cc
Add base tests
trevor/calendarserver,trevor/calendarserver,trevor/calendarserver
twext/who/test/test_aggregate.py
twext/who/test/test_aggregate.py
## # Copyright (c) 2013 Apple 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 # # Unless required by applicable law or...
## # Copyright (c) 2013 Apple 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 # # Unless required by applicable law or...
apache-2.0
Python
2e922bbf0a4a0635ee0d9d5ecfac83da9ab0d702
Bump version
pombredanne/django-taggit-serializer,bopo/django-taggit-serializer,glemmaPaul/django-taggit-serializer
taggit_serializer/__init__.py
taggit_serializer/__init__.py
__version__ = '0.1.2'
__version__ = '0.1.1'
bsd-3-clause
Python
0f5794bc369ea0039a5219fbc19323a522bd412e
Fix topology
maclav3/dihedral-spsa
topology/__init__.py
topology/__init__.py
from abc import * class Topology(ABCMeta): @abstractmethod def __init__(self): self.bonds = None self.angles = None self.dihedrals = None
from abc import * class Topology(ABCMeta): @abstractmethod def __init__(self): self.bonds = None self.angles = None self.
mit
Python
d01a7c63ab577a54213c956fb3de4b8d82323797
Add Heirloom and Artifact item quality.
PuckCh/battlenet
battlenet/enums.py
battlenet/enums.py
RACE = { 1: 'Human', 2: 'Orc', 3: 'Dwarf', 4: 'Night Elf', 5: 'Undead', 6: 'Tauren', 7: 'Gnome', 8: 'Troll', 9: 'Goblin', 10: 'Blood Elf', 11: 'Draenei', 22: 'Worgen', 24: 'Pandaren', 25: 'Pandaren', 26: 'Pandaren', } CLASS = { 1: 'Warrior', 2: 'Palad...
RACE = { 1: 'Human', 2: 'Orc', 3: 'Dwarf', 4: 'Night Elf', 5: 'Undead', 6: 'Tauren', 7: 'Gnome', 8: 'Troll', 9: 'Goblin', 10: 'Blood Elf', 11: 'Draenei', 22: 'Worgen', 24: 'Pandaren', 25: 'Pandaren', 26: 'Pandaren', } CLASS = { 1: 'Warrior', 2: 'Palad...
mit
Python
8e4e2b07cae070d034a5ea91769dfc5dad28ce3e
Handle 79 character limit
inetCatapult/troposphere,Yipit/troposphere,cloudtools/troposphere,alonsodomin/troposphere,7digital/troposphere,johnctitus/troposphere,ptoraskar/troposphere,garnaat/troposphere,alonsodomin/troposphere,dmm92/troposphere,ikben/troposphere,horacio3/troposphere,cloudtools/troposphere,WeAreCloudar/troposphere,horacio3/tropos...
troposphere/utils.py
troposphere/utils.py
import time def _tail_print(e): print("%s %s %s" % (e.resource_status, e.resource_type, e.event_id)) def get_events(conn, stackname): """Get the events in batches and return in chronological order""" next = None event_list = [] while 1: events = conn.describe_stack_events(stackname, next...
import time def _tail_print(e): print("%s %s %s" % (e.resource_status, e.resource_type, e.event_id)) def get_events(conn, stackname): """Get the events in batches and return in chronological order""" next = None event_list = [] while 1: events = conn.describe_stack_events(stackname, next...
bsd-2-clause
Python
9bfdecf9c104667bbaf923a0c6c01dcaf057b379
Add summary option
danielfrg/cyhdfs3,danielfrg/cyhdfs3,danielfrg/libhdfs3.py,danielfrg/libhdfs3.py
benchmark/timer.py
benchmark/timer.py
""" Taken from: https://gist.github.com/acdha/4068406 """ import sys import inspect from timeit import default_timer class Timer(object): """Context Manager to simplify timing Python code Usage: with Timer('key step'): ... do something ... """ def __init__(self, context=None, summ...
""" Taken from: https://gist.github.com/acdha/4068406 """ import sys from timeit import default_timer class Timer(object): """Context Manager to simplify timing Python code Usage: with Timer('key step'): ... do something ... """ def __init__(self, context=None): self.timer...
apache-2.0
Python
949d42baaa2b60481233feb5db12c8f4777ebfba
fix name
biokit/biokit,biokit/biokit
biokit/converters/bed2bam.py
biokit/converters/bed2bam.py
class Bam2Bed(object): """ """ def __init__(self, infile, outfile=None, *args, **kwargs): """.. rubric:: constructor :param str filename """ pass def __call__(self): print("YOUPI !!!!!! ") pass
class BED2BAM(object): """ """ def __init__(self, infile, outfile=None, *args, **kwargs): """.. rubric:: constructor :param str filename """ pass def __call__(self): pass
bsd-2-clause
Python
959652ce1bb3ac9ff54ddc5f1f7500efdc5691b0
handle async-available peers by dropping new requests when old requests are still pending; add zmqrpc.async_multicall() for calling many peers and waiting for quorum or timeout
carlopires/libconsent
part1/zmqrpc.py
part1/zmqrpc.py
# Conrad Meyer <cemeyer@uw.edu> # 0824410 # CSE 550 Problem Set 3 # Thu Nov 10 2011 import threading import time import zmq class Server(threading.Thread): def __init__(self, zctx, endpoint, obj): threading.Thread.__init__(self) self.methods = {} for x in dir(obj): if not x.startswith("_"): ...
# Conrad Meyer <cemeyer@uw.edu> # 0824410 # CSE 550 Problem Set 3 # Thu Nov 10 2011 import threading import zmq class Server(threading.Thread): def __init__(self, zctx, endpoint, obj): threading.Thread.__init__(self) self.methods = {} for x in dir(obj): if not x.startswith("_"): self.metho...
mit
Python
937dcf5ff0198890f438047f6644e688e32a1a3f
fix the erro with fillDict
alexaleluia12/nivel-represas-sp,alexaleluia12/nivel-represas-sp
core/robot.py
core/robot.py
#!/usr/bin/env python #-*- coding:utf-8 -*- # TODO # from crawl import Crawl import threading from datetime import datetime from wrapdb import Db def fillDict(valDict): """ retorna dicionario com os valeres preenchidos com a respectiva data de hoje """ ano = "%Y" mes = "%m" dia = "%d" ...
#!/usr/bin/env python #-*- coding:utf-8 -*- # TODO # testar tudo isso, deveria ter usado TDD nesse projeto :( from crawl import Crawl import threading from datetime import datetime from wrapdb import Db def fillDict(valDict): """ retorna valDict com os valeres preenchidos com a respectiva data de hoje ...
mit
Python
ade2883bfd37b6ae7311d66d88d3426854166a93
Allow personal commands with fetched user
KrusnikViers/Zordon,KrusnikViers/Zordon
app/handlers/common.py
app/handlers/common.py
from telegram import Update, Bot, ReplyKeyboardMarkup, KeyboardButton from ..models import User commands_map = { # User-related commands 'start': 'start', 'status': 'status', 'activate': 'ready', 'deactivate': 'do_not_disturb', # Commands with activities 'activity_list': 'list_activities'...
from telegram import Update, Bot, ReplyKeyboardMarkup, KeyboardButton from ..models import User commands_map = { # User-related commands 'start': 'start', 'status': 'status', 'activate': 'ready', 'deactivate': 'do_not_disturb', # Commands with activities 'activity_list': 'list_activities'...
mit
Python
83bffee653bddda0f3a134933ecf69bfe1c697b4
Add version table
NikhilKalige/atom-website,NikhilKalige/atom-website,NikhilKalige/atom-website
app/packages/models.py
app/packages/models.py
from app import db import datetime class Package(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(255), unique=True, nullable=False) author = db.Column(db.String(50)) link = db.Column(db.String(140)) description = db.Column(db.String()) downloads = db.relation...
from app import db import datetime class Package(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(255), unique=True, nullable=False) author = db.Column(db.String(50)) link = db.Column(db.String(140)) description = db.Column(db.String()) downloads = db.relation...
bsd-2-clause
Python
03b2b06e90f34e67fbda1172eab2c7de6dc8246a
Update time grain expressions for Spark >= 3.x (#18690)
airbnb/caravel,zhouyao1994/incubator-superset,airbnb/caravel,airbnb/caravel,airbnb/caravel,zhouyao1994/incubator-superset,zhouyao1994/incubator-superset,zhouyao1994/incubator-superset,zhouyao1994/incubator-superset
superset/db_engine_specs/databricks.py
superset/db_engine_specs/databricks.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
Python
ed9294c7ab0abf574f076464274d83f1e39b53cd
Handle and log exceptions. Render Response objects.
funkybob/paws
paws/handler.py
paws/handler.py
from .request import Request from .response import response, Response import logging log = logging.getLogger() class Handler(object): ''' Simple dispatcher class. ''' def __init__(self, event, context): self.request = Request(event, context) def __call__(self, event, context): fu...
from .request import Request from .response import response class Handler(object): ''' Simple dispatcher class. ''' def __init__(self, event, context): self.request = Request(event, context) def __call__(self, event, context): func = getattr(self, self.event['httpMethod'], self.in...
bsd-3-clause
Python
8996a5a28cf23f58d48549fc0cfc3b4a8464a3a5
Change version to 0.7.6-git
cccfran/sympy,abloomston/sympy,rahuldan/sympy,aktech/sympy,wanglongqi/sympy,kevalds51/sympy,vipulroxx/sympy,farhaanbukhsh/sympy,postvakje/sympy,wanglongqi/sympy,jerli/sympy,atreyv/sympy,kaushik94/sympy,wyom/sympy,jbbskinny/sympy,sahmed95/sympy,Mitchkoens/sympy,yukoba/sympy,yashsharan/sympy,meghana1995/sympy,saurabhjn76...
sympy/release.py
sympy/release.py
__version__ = "0.7.6-git"
__version__ = "0.7.5-git"
bsd-3-clause
Python
923a1697e0fa06de4a712e8cb3d344a24b53c789
add sync_date to celery tasks
pythondigest/pythondigest,pythondigest/pythondigest,pythondigest/pythondigest
syncrss/tasks.py
syncrss/tasks.py
from celery.task import task from django.db import transaction from datetime import datetime from time import mktime import feedparser from .models import ResourceRSS, RawItem @task def update_rss(): for resource in ResourceRSS.objects.filter(status=True): try: data =feedparser.parse(resource....
from celery.task import task from django.db import transaction from datetime import datetime from time import mktime import feedparser from .models import ResourceRSS, RawItem @task def update_rss(): for rec in ResourceRSS.objects.filter(status=True): print rec.link try: data =feedpars...
mit
Python
d8343fcd6cc8d3d5dc39b1305096d8768ca08c85
Add 'roll' to dice.py's commands
Jeebeevee/DouweBot_JJ15,SophosBlitz/glacon,craisins/wh2kbot,parkrrr/skybot,andyeff/skybot,rmmh/skybot,df-5/skybot,olslash/skybot,craisins/nascarbot,Jeebeevee/DouweBot,Teino1978-Corp/Teino1978-Corp-skybot,TeamPeggle/ppp-helpdesk,cmarguel/skybot,elitan/mybot,isislab/botbot,callumhogsden/ausbot,jmgao/skybot,ddwo/nhl-bot,c...
plugins/dice.py
plugins/dice.py
""" dice.py: written by Scaevolus 2008, updated 2009 simulates dicerolls """ import re import random from util import hook whitespace_re = re.compile(r'\s+') valid_diceroll_re = re.compile(r'^[+-]?(\d+|\d*d\d+)([+-](\d+|\d*d\d+))*$', re.I) sign_re = re.compile(r'[+-]?(?:\d*d)?\d+', re...
""" dice.py: written by Scaevolus 2008, updated 2009 simulates dicerolls """ import re import random from util import hook whitespace_re = re.compile(r'\s+') valid_diceroll_re = re.compile(r'^[+-]?(\d+|\d*d\d+)([+-](\d+|\d*d\d+))*$', re.I) sign_re = re.compile(r'[+-]?(?:\d*d)?\d+', re...
unlicense
Python
0ef2bb1379c62f32076d972738f6f3fc9f9c70b7
fix tests
norayr/unisubs,ofer43211/unisubs,ReachingOut/unisubs,ofer43211/unisubs,pculture/unisubs,wevoice/wesub,ReachingOut/unisubs,ujdhesa/unisubs,ReachingOut/unisubs,eloquence/unisubs,wevoice/wesub,ujdhesa/unisubs,ofer43211/unisubs,eloquence/unisubs,ofer43211/unisubs,pculture/unisubs,eloquence/unisubs,ReachingOut/unisubs,eloqu...
apps/profiles/tests.py
apps/profiles/tests.py
# Universal Subtitles, universalsubtitles.org # # Copyright (C) 2010 Participatory Culture Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License...
# Universal Subtitles, universalsubtitles.org # # Copyright (C) 2010 Participatory Culture Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License...
agpl-3.0
Python
285592f6d420ab57f8d183f4068e974ee4ea3d65
Add tests for hash plugin
tomleese/smartbot,Muzer/smartbot,Cyanogenoid/smartbot,thomasleese/smartbot-old
plugins/hash.py
plugins/hash.py
import io import hashlib import unittest class Plugin: def on_command(self, bot, msg, stdin, stdout, reply): if len(msg["args"]) >= 2: algorithm = msg["args"][1] contents = " ".join(msg["args"][2:]) if not contents: contents = stdin.read().strip() ...
import hashlib import sys class Plugin: def on_command(self, bot, msg): if len(sys.argv) >= 2: algorithm = sys.argv[1] contents = " ".join(sys.argv[2:]) if not contents: contents = sys.stdin.read().strip() h = hashlib.new(algorithm) ...
mit
Python
48a4c7f1cc801523bd8305269c115edbed7e18cb
fix bug in weibo.py
N402/NoahsArk,N402/NoahsArk
ark/exts/oauth/weibo.py
ark/exts/oauth/weibo.py
import os from flask import session from ark.exts import oauth2 weibo_oauth = oauth2.remote_app( 'weibo', consumer_key=os.environ['ARK_WEIBO_CONSUMER_KEY'], consumer_secret=os.environ['ARK_WEIBO_CONSUMER_SECRET'], request_token_params={'scope': 'email,statuses_to_me_read'}, base_url='https://api...
import os from flask import session from ark.exts import oauth2 weibo_oauth = oauth2.remote_app( 'weibo', consumer_key=os.environ['ARK_WEIBO_CONSUMER_KEY'], consumer_secret=os.environ['ARK_WEIBO_CONSUMER_SECRET'], request_token_params={'scope': 'email,statuses_to_me_read'}, base_url='https://api...
mit
Python
40299b2f5f23c63349a651725410f108ebaa7571
Revert of Make telemetry_unittests.py work on Windows (patchset #1 id:1 of https://codereview.chromium.org/647103003/)
fujunwei/chromium-crosswalk,Chilledheart/chromium,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,markYoungH/chromium.src,Jonekee/chromium.src,jaruba/chromium.src,dushu1203/chromium.src,markYoungH/chromium.src,M4sse/chromium.src,markYoungH/chromium.src,Fireblend/chromium-crosswalk,PeterWangInt...
testing/scripts/telemetry_unittests.py
testing/scripts/telemetry_unittests.py
#!/usr/bin/env python # Copyright 2014 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. import json import os import sys import common def main_run(args): filter_tests = [] if args.filter_file: filter_tests = js...
#!/usr/bin/env python # Copyright 2014 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. import json import os import sys import common def main_run(args): filter_tests = [] if args.filter_file: filter_tests = js...
bsd-3-clause
Python
4d7303b5325bf07395c4822a752fcaffad511ae8
Remove function hg_version(), was not used
rolandgeider/wger,DeveloperMal/wger,petervanderdoes/wger,rolandgeider/wger,wger-project/wger,petervanderdoes/wger,kjagoo/wger_stark,wger-project/wger,DeveloperMal/wger,DeveloperMal/wger,wger-project/wger,rolandgeider/wger,DeveloperMal/wger,wger-project/wger,petervanderdoes/wger,kjagoo/wger_stark,kjagoo/wger_stark,kjago...
wger/workout_manager/__init__.py
wger/workout_manager/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ :copyright: 2011, 2012 by OpenSlides team, see AUTHORS. :license: GNU GPL, see LICENSE for more details. """ VERSION = (1, 2, 0, 'alpha', 1) RELEASE = False def get_version(version=None, release=None): """Derives a PEP386-compliant version number from VER...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ :copyright: 2011, 2012 by OpenSlides team, see AUTHORS. :license: GNU GPL, see LICENSE for more details. """ VERSION = (1, 2, 0, 'alpha', 1) RELEASE = False def get_version(version=None, release=None): """Derives a PEP386-compliant version number from VER...
agpl-3.0
Python
69d779feee29238fb2eaf7096cc748935e21ef3d
Add blank lines and fix indenting for flake8
heynemann/pyvows,marcelometal/pyvows
tests/assertions/types/classes_vows.py
tests/assertions/types/classes_vows.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # pyvows testing engine # https://github.com/heynemann/pyvows # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 Bernardo Heynemann heynemann@gmail.com from pyvows import Vows, expect class SomeClass(object): pas...
#!/usr/bin/env python # -*- coding: utf-8 -*- # pyvows testing engine # https://github.com/heynemann/pyvows # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 Bernardo Heynemann heynemann@gmail.com from pyvows import Vows, expect class SomeClass(object): pass cl...
mit
Python
b5afdd604831f985427880537d37eb7a35addaa1
Fix test to cater for packages leaked into venv
pfmoore/pip,pypa/pip,sbidoul/pip,pfmoore/pip,pradyunsg/pip,sbidoul/pip,pypa/pip,pradyunsg/pip
tests/functional/test_python_option.py
tests/functional/test_python_option.py
import json import os from pathlib import Path from venv import EnvBuilder from tests.lib import PipTestEnvironment, TestData def test_python_interpreter( script: PipTestEnvironment, tmpdir: Path, shared_data: TestData, ) -> None: env_path = os.fspath(tmpdir / "venv") env = EnvBuilder(with_pip=Fa...
import json import os from pathlib import Path from venv import EnvBuilder from tests.lib import PipTestEnvironment, TestData def test_python_interpreter( script: PipTestEnvironment, tmpdir: Path, shared_data: TestData, ) -> None: env_path = os.fsdecode(tmpdir / "venv") env = EnvBuilder(with_pip=...
mit
Python
ee9f48c7c169876fad6e7e911a4ea0c459b2c232
Make master 2.4.0
PyCQA/astroid
astroid/__pkginfo__.py
astroid/__pkginfo__.py
# -*- coding: utf-8 -*- # Copyright (c) 2006-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2014-2018 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2014 Google, Inc. # Copyright (c) 2015-2017 Ceridwen <ceridwenv@gmail.com> # Copyright (c) 2015 Florian Bruhin <me@the-compiler.org> # Copyri...
# -*- coding: utf-8 -*- # Copyright (c) 2006-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2014-2018 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2014 Google, Inc. # Copyright (c) 2015-2017 Ceridwen <ceridwenv@gmail.com> # Copyright (c) 2015 Florian Bruhin <me@the-compiler.org> # Copyri...
lgpl-2.1
Python
7ef2ac94e5791b7e731996688525e4c2ef861cb3
Remove shbang line from PRESUBMIT.py.
android-ia/platform_external_chromium_org_tools_grit,MIPS/external-chromium_org-tools-grit,geekboxzone/lollipop_external_chromium_org_tools_grit,xin3liang/platform_external_chromium_org_tools_grit,android-ia/platform_external_chromium_org_tools_grit,yinquan529/platform-external-chromium_org-tools-grit,Omegaphora/extern...
PRESUBMIT.py
PRESUBMIT.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. """grit unittests presubmit script. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the presubmit API built i...
#!/usr/bin/env python # 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. """grit unittests presubmit script. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the...
bsd-2-clause
Python
051c14f869594ff9c7a970aa5c400c9db94f74fe
fix imports
2nd47/CSC373_A2,2nd47/CSC373_A2
RandomMST.py
RandomMST.py
from ass2 import create_graph from random import random import sys if __name__ == '__main__': # size can be between 30 - 50k if len(sys.argv) < 2: print('Please input a size argument!') exit() create_graph(int(sys.argv[1]), random, None) #create_graph(int(sys.argv[1]), None, randomWithinCircle)
from ass2 import create_graph if __name__ == '__main__': # size can be between 30 - 50k if len(sys.argv) < 2: print('Please input a size argument!') exit() create_graph(int(sys.argv[1]), random, None) #create_graph(int(sys.argv[1]), None, randomWithinCircle)
mit
Python
4c986e7cedde18530745dca072e06659f1fb20a9
Remove numpy.compat._pep440 from default imports
endolith/numpy,numpy/numpy,numpy/numpy,mattip/numpy,endolith/numpy,mattip/numpy,mhvk/numpy,charris/numpy,charris/numpy,mattip/numpy,endolith/numpy,numpy/numpy,mhvk/numpy,mhvk/numpy,mhvk/numpy,charris/numpy,charris/numpy,endolith/numpy,mhvk/numpy,mattip/numpy,numpy/numpy
numpy/compat/__init__.py
numpy/compat/__init__.py
""" Compatibility module. This module contains duplicated code from Python itself or 3rd party extensions, which may be included for the following reasons: * compatibility * we may only need a small subset of the copied library/module """ from . import _inspect from . import py3k from ._inspect import getargspec...
""" Compatibility module. This module contains duplicated code from Python itself or 3rd party extensions, which may be included for the following reasons: * compatibility * we may only need a small subset of the copied library/module """ from . import _inspect from . import _pep440 from . import py3k from ._ins...
bsd-3-clause
Python
cc7966022ead516869ec8479d2071ece755fabfc
Use print function, display better paths
perimosocordiae/numpylint
numpylint/numpylinter.py
numpylint/numpylinter.py
#!/usr/bin/env python from __future__ import print_function import os.path import tempfile from argparse import ArgumentParser from rope.base.project import Project from rope.base import libutils from rope.refactor.restructure import Restructure from numpylint.lintbits import LINTBITS def lint(filepath, proj, orig_p...
#!/usr/bin/env python import os.path import tempfile from argparse import ArgumentParser from rope.base.project import Project from rope.base import libutils from rope.refactor.restructure import Restructure from numpylint.lintbits import LINTBITS def lint(filepath, proj, orig_path, opts): mod = proj.get_file(file...
mit
Python
5722e1f04d549f27816f91fb76f2a91e01f8145b
Bump version to 0.0.4
jbbarth/aws-status,jbbarth/aws-status
aws_status/__init__.py
aws_status/__init__.py
# -*- coding: utf-8 -*- from __future__ import absolute_import from .status_page import StatusPage from .feed import Feed __version__ = "0.0.4"
# -*- coding: utf-8 -*- from __future__ import absolute_import from .status_page import StatusPage from .feed import Feed __version__ = "0.0.3"
mit
Python
9608fff697e4692d8a76db2c1658850233059126
fix fucking zero base
kz26/PyExcelerate
Worksheet.py
Worksheet.py
import Range from DataTypes import DataTypes class Worksheet(object): def __init__(self, name, workbook, data=None): self._columns = 0 # cache this for speed self._name = name self._cells = {} self._parent = workbook self._merges = [] # list of Range objects self._attributes = {} if data != None: for...
import Range from DataTypes import DataTypes class Worksheet(object): def __init__(self, name, workbook, data=None): self._columns = 0 # cache this for speed self._name = name self._cells = {} self._parent = workbook self._merges = [] # list of Range objects self._attributes = {} if data != None: for...
bsd-2-clause
Python
9d2cab53fb1590d5c6f60b5f9e62140c11fb676f
Bump version to 0.2.0.dev
franga2000/django-machina,reinbach/django-machina,franga2000/django-machina,ellmetha/django-machina,franga2000/django-machina,ellmetha/django-machina,reinbach/django-machina,reinbach/django-machina,ellmetha/django-machina
machina/__init__.py
machina/__init__.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os __version__ = '0.2.0.dev' MACHINA_VANILLA_APPS = [ 'machina', 'machina.apps.forum', 'machina.apps.forum_conversation', 'machina.apps.forum_conversation.forum_attachments', 'machina.apps.forum_conversation.forum_polls', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os __version__ = '0.1.2.dev' MACHINA_VANILLA_APPS = [ 'machina', 'machina.apps.forum', 'machina.apps.forum_conversation', 'machina.apps.forum_conversation.forum_attachments', 'machina.apps.forum_conversation.forum_polls', ...
bsd-3-clause
Python
62f663f77d1b13a01f0270b4d88ae5720427c91f
add licence disclaimer to error.py
ojengwa/paystack
paystack/error.py
paystack/error.py
# -*- coding: utf-8 -*- """ Paystack API wrapper. @author Bernard Ojengwa. Copyright (c) 2015, Bernard Ojengwa All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must re...
# -*- coding: utf-8 -*- class Error(Exception): """Base Error class.""" pass class APIError(Error): pass class APIConnectionError(Error): pass class ValidationError(Error): pass class AuthorizationError(Error): pass class InvalidRequestError(Error): pass
bsd-3-clause
Python
8c71bc2408f79ee6187bf6238d910d37b5cee4dd
Extend BackupFactory with metadata
opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor
nodeconductor/backup/tests/factories.py
nodeconductor/backup/tests/factories.py
import factory from django.core.urlresolvers import reverse from nodeconductor.backup import models from nodeconductor.iaas import models as iaas_models from nodeconductor.iaas.tests import factories as iaas_factories from nodeconductor.structure.tests import factories as structure_factories class BackupScheduleFac...
import factory from django.core.urlresolvers import reverse from nodeconductor.backup import models from nodeconductor.iaas.tests import factories as iaas_factories class BackupScheduleFactory(factory.DjangoModelFactory): class Meta(object): model = models.BackupSchedule backup_source = factory.Sub...
mit
Python
94ece9631f05cf5a845ea1a09e87370ab195582e
Fix some new bugs
jinwei908/BeeLogger,jinwei908/BeeLogger,4w4k3/BeeLogger,jinwei908/BeeLogger,4w4k3/BeeLogger,4w4k3/BeeLogger
checker.py
checker.py
# Copyright 2017 Insanity Framework (IF) # Written by: * Alisson Moretto - 4w4k3 # https://github.com/4w4k3/Insanity-Framework # Licensed under the BSD-3-Clause import os def banner(text, char="*"): print(char * len(text) + "****") print(char + " " + text + " " + char) print(char * len(text) + "****") def...
# Copyright 2017 Insanity Framework (IF) # Written by: * Alisson Moretto - 4w4k3 # https://github.com/4w4k3/Insanity-Framework # Licensed under the BSD-3-Clause import os def banner(text, char="*"): print(char * len(text) + "****") print(char + " " + text + " " + char) print(char * len(text) + "****") def...
bsd-3-clause
Python
0707d920f37edb82d16ccabe1e8413ec16c47c0b
Change directory where data is written to.
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/mcapi/mcdir.py
backend/mcapi/mcdir.py
import utils from os import environ import os.path MCDIR = environ.get("MCDIR") or '/mcfs/data/materialscommons' def for_uid(uidstr): pieces = uidstr.split('-') path = os.path.join(MCDIR, pieces[1][0:2], pieces[1][2:4]) utils.mkdirp(path) return path
import utils from os import environ import os.path MCDIR = environ.get("MCDIR") or '/mcfs/data' def for_uid(uidstr): pieces = uidstr.split('-') path = os.path.join(MCDIR, pieces[1][0:2], pieces[1][2:4]) utils.mkdirp(path) return path
mit
Python
95770bf4d71666b5e589061f5c76979bfcebb000
Make imports conform to PEP8.
onespacemedia/developer-automation
hooks/post_gen_project.py
hooks/post_gen_project.py
from cookiecutter.main import cookiecutter from getpass import getpass import os import sys from shutil import rmtree current_path = os.path.abspath('.') sys.path.append(current_path) import github # NOQA import google # NOQA import mandrill # NOQA import opbeat # NOQA # opbeat, mandrill, google # Ensure we ha...
from cookiecutter.main import cookiecutter from getpass import getpass import os import sys from shutil import rmtree current_path = os.path.abspath('.') sys.path.append(current_path) import github, google, mandrill # NOQA import opbeat # NOQA # opbeat, mandrill, google # Ensure we have all of the environment va...
mit
Python
39f02725badba7ad8512737c6721061489ab3ee6
Add node model
PressLabs/cobalt,PressLabs/cobalt
node/node.py
node/node.py
from configparser import ConfigParser from driver import BTRFSDriver class Node: """ # Dummy config example [bk1-z3.presslabs.net] ssd = True """ def __init__(self, context): self._conf_path = context['conf_path'] self._driver = BTRFSDriver(context['volume_path']) self....
from configparser import ConfigParser from driver import BTRFSDriver class Node: """ # Dummy config example [bk1-z3.presslabs.net] ssd = True """ def __init__(self, context): self._conf_path = context['node']['conf_path'] self._driver = BTRFSDriver(context['volume_path']) ...
apache-2.0
Python
6b07ffa43ecfd1d34f39fc1d6e37f9f3069d48cf
fix bug
shendri4/wolves_capture_130,shendri4/wolves_capture_130
bam2vcf_GATK_wolves.py
bam2vcf_GATK_wolves.py
#!/usr/bin/env python #import argparse #from glob import glob #-s test_samples.txt #-b /mnt/lfs2/hend6746/devils/reference/sarHar1.fa from os.path import join as jp from os.path import abspath import os import sys import argparse parser = argparse.ArgumentParser() parser.add_argument('-s', "--samples", help=" sample...
#!/usr/bin/env python #import argparse #from glob import glob #-s test_samples.txt #-b /mnt/lfs2/hend6746/devils/reference/sarHar1.fa from os.path import join as jp from os.path import abspath import os import sys import argparse parser = argparse.ArgumentParser() parser.add_argument('-s', "--samples", help=" sample...
apache-2.0
Python
9d8cd275bdd6227e759c78d74ad5fc2ed0c4e2cb
add the new lib directories
EndPointCorp/lg_ros_nodes,EndPointCorp/lg_ros_nodes,EndPointCorp/lg_ros_nodes,EndPointCorp/lg_ros_nodes,EndPointCorp/lg_ros_nodes,EndPointCorp/lg_ros_nodes
lg_common/setup.py
lg_common/setup.py
#!/usr/bin/env python from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup d = generate_distutils_setup( packages=['lg_common'], package_dir={'': 'src'}, package_data={ 'lg_common': [ 'extensions/ros_window_ready/*', 'extensions/moni...
#!/usr/bin/env python from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup d = generate_distutils_setup( packages=['lg_common'], package_dir={'': 'src'}, package_data={ 'lg_common': [ 'extensions/ros_window_ready/*', 'extensions/moni...
apache-2.0
Python
eff44d791722a422dc2f7b845d0d0a3c819753a5
Fix another path
daniel-j-born/grpc,zhimingxie/grpc,ejona86/grpc,muxi/grpc,firebase/grpc,thunderboltsid/grpc,deepaklukose/grpc,dklempner/grpc,firebase/grpc,infinit/grpc,jtattermusch/grpc,LuminateWireless/grpc,thinkerou/grpc,malexzx/grpc,zhimingxie/grpc,simonkuang/grpc,thunderboltsid/grpc,ipylypiv/grpc,yongni/grpc,arkmaxim/grpc,stanley-...
test/core/http/test_server.py
test/core/http/test_server.py
#!/usr/bin/env python2.7 # Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, thi...
#!/usr/bin/env python2.7 # Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, thi...
apache-2.0
Python
b1050d6ea320b6cbe606595036461a646df5d2a7
Sort task list
Kryz/sentry,nicholasserra/sentry,korealerts1/sentry,Kryz/sentry,hongliang5623/sentry,drcapulet/sentry,looker/sentry,mvaled/sentry,hongliang5623/sentry,looker/sentry,1tush/sentry,imankulov/sentry,Natim/sentry,kevinlondon/sentry,alexm92/sentry,JackDanger/sentry,jean/sentry,kevinastone/sentry,ifduyue/sentry,mvaled/sentry,...
src/sentry/web/frontend/admin_queue.py
src/sentry/web/frontend/admin_queue.py
from __future__ import absolute_import from sentry.celery import app from sentry.web.frontend.base import BaseView class AdminQueueView(BaseView): def has_permission(self, request): return request.user.is_superuser def handle(self, request): context = { 'task_list': sorted(app.ta...
from __future__ import absolute_import from sentry.celery import app from sentry.web.frontend.base import BaseView class AdminQueueView(BaseView): def has_permission(self, request): return request.user.is_superuser def handle(self, request): context = { 'task_list': app.tasks.key...
bsd-3-clause
Python
2a3c5e08378a6646bc11a47518394cd8ef3e9547
Fix lint
RickMohr/otm-core,RickMohr/otm-core,recklessromeo/otm-core,clever-crow-consulting/otm-core,maurizi/otm-core,maurizi/otm-core,clever-crow-consulting/otm-core,recklessromeo/otm-core,recklessromeo/otm-core,RickMohr/otm-core,RickMohr/otm-core,maurizi/otm-core,clever-crow-consulting/otm-core,recklessromeo/otm-core,maurizi/o...
opentreemap/treemap/management/commands/uitest.py
opentreemap/treemap/management/commands/uitest.py
from __future__ import print_function from __future__ import unicode_literals from __future__ import division import unittest import sys import importlib from optparse import make_option from django.core.management.base import BaseCommand from django.conf import settings from pyvirtualdisplay import Display class...
from __future__ import print_function from __future__ import unicode_literals from __future__ import division import unittest import sys import importlib from optparse import make_option from django.core.management.base import BaseCommand from django.conf import settings from pyvirtualdisplay import Display class ...
agpl-3.0
Python
6ad1664fb2e1b7eb7a54570b70e4dd53fb1cef5e
move abbreviation expansion into a function
qtux/instmatcher
instmatcher/__init__.py
instmatcher/__init__.py
# Copyright 2016 Matthias Gazzari # # 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 writ...
# Copyright 2016 Matthias Gazzari # # 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 writ...
apache-2.0
Python
5f0d976f2f7ad361a01fa4f9008bbbbeb298c517
Bump version for bugfix
alex/invocations,pyinvoke/invocations,mrjmad/invocations,singingwolfboy/invocations
invocations/_version.py
invocations/_version.py
__version_info__ = (0, 4, 4) __version__ = '.'.join(map(str, __version_info__))
__version_info__ = (0, 4, 3) __version__ = '.'.join(map(str, __version_info__))
bsd-2-clause
Python
f75a151b33635cad5604cb9d7f66fc043c4f972a
Fix except handler raises immediately
UITools/saleor,mociepka/saleor,UITools/saleor,UITools/saleor,UITools/saleor,maferelo/saleor,maferelo/saleor,mociepka/saleor,maferelo/saleor,mociepka/saleor,UITools/saleor
saleor/core/utils/json_serializer.py
saleor/core/utils/json_serializer.py
import json from django.core.serializers.base import DeserializationError from django.core.serializers.json import ( DjangoJSONEncoder, PythonDeserializer, Serializer as JsonSerializer) from prices import Money MONEY_TYPE = 'Money' class Serializer(JsonSerializer): def _init_options(self): super()._...
import json from django.core.serializers.base import DeserializationError from django.core.serializers.json import ( DjangoJSONEncoder, PythonDeserializer, Serializer as JsonSerializer) from prices import Money MONEY_TYPE = 'Money' class Serializer(JsonSerializer): def _init_options(self): super()._...
bsd-3-clause
Python
7b9033db5a8abfb5c71850e776a3f4a5db718d26
Remove debugging statement.
certain/certain,certain/certain
trunk/certmgr/StoreHandler/__init__.py
trunk/certmgr/StoreHandler/__init__.py
"""Module to handle different store types.""" __all__ = ['git', 'svn', 'web'] import abc class StoreBase(object): """Abstract base class for StoreHandler 'plugins'.""" __metaclass__ = abc.ABCMeta @abc.abstractmethod def setup(self): """Setup this specific store object.""" return ...
"""Module to handle different store types.""" __all__ = ['git', 'svn', 'web'] import abc class StoreBase(object): """Abstract base class for StoreHandler 'plugins'.""" __metaclass__ = abc.ABCMeta @abc.abstractmethod def setup(self): """Setup this specific store object.""" return ...
agpl-3.0
Python
b5050df1b8e23434a59f53c4a509e6932feb03d9
update rules_proto digest to ea52a32 (#1245)
googleapis/gapic-generator-typescript,googleapis/gapic-generator-typescript,googleapis/gapic-generator-typescript
repositories.bzl
repositories.bzl
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") def gapic_generator_typescript_repositories(): maybe( http_archive, name = "build_bazel_rules_nodejs", sha256 = "c911b5bd8aee8b0498cc387cacdb5f917098ce477fb4182db07b0ef8a9e0...
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") def gapic_generator_typescript_repositories(): maybe( http_archive, name = "build_bazel_rules_nodejs", sha256 = "c911b5bd8aee8b0498cc387cacdb5f917098ce477fb4182db07b0ef8a9e0...
apache-2.0
Python
8be5ffa9b9c69785fc01253a1a5aa2263db8d6e6
Bump version to 14.0.0a2
genialis/resolwe-bio,genialis/resolwe-bio,genialis/resolwe-bio,genialis/resolwe-bio
resolwe_bio/__about__.py
resolwe_bio/__about__.py
"""Central place for package metadata.""" # NOTE: We use __title__ instead of simply __name__ since the latter would # interfere with a global variable __name__ denoting object's name. __title__ = 'resolwe-bio' __summary__ = 'Bioinformatics pipelines for the Resolwe platform' __url__ = 'https://github.com/genial...
"""Central place for package metadata.""" # NOTE: We use __title__ instead of simply __name__ since the latter would # interfere with a global variable __name__ denoting object's name. __title__ = 'resolwe-bio' __summary__ = 'Bioinformatics pipelines for the Resolwe platform' __url__ = 'https://github.com/genial...
apache-2.0
Python
8ab7a9bde85bdec508a1061b4b10b75c3f8323d4
Update version number
Affirm/plaid-python
plaid/__init__.py
plaid/__init__.py
__version__ = '0.2.18.affirm.2' from client import Client, require_access_token
__version__ = '0.2.1' from client import Client, require_access_token
mit
Python
85c1f5d2b6f369ef5790851e93065ea268dc9835
fix to format_props for string variables
koojh89/pyxley,subodhchhabra/pyxley,MKridler/pyxley,stitchfix/pyxley,stitchfix/pyxley,quevedin/pyxley,stitchfix/pyxley,subodhchhabra/pyxley,quevedin/pyxley,koojh89/pyxley,koojh89/pyxley,quevedin/pyxley,subodhchhabra/pyxley
pyxley/react_template.py
pyxley/react_template.py
from react import jsx from jinja2 import Template import json class ReactTemplate(object): """ """ def __init__(self, template, template_args, path): self.transformer = jsx.JSXTransformer() self.template = template self.args = template_args self.path = path def write_to...
from react import jsx from jinja2 import Template import json class ReactTemplate(object): """ """ def __init__(self, template, template_args, path): self.transformer = jsx.JSXTransformer() self.template = template self.args = template_args self.path = path def write_to...
mit
Python
04ca6e47a2f1d2d60501f74018a28781469e1987
update script
chapter09/Sparkvent
bin/task_count_redis.py
bin/task_count_redis.py
#!/usr/bin/python import sys import os import time import datetime import redis sys.path.insert(0, '../sparkvent') from sparkvent.config import Config from sparkvent.resp_parse import * ROOT_DIR = os.path.dirname(os.path.abspath(__file__ + "/../")) def main(): config = Config(os.path.abspath(ROOT_DIR + "/conf/c...
#!/usr/bin/python import sys import os import time import datetime import redis sys.path.insert(0, '../sparkvent') from sparkvent.config import Config from sparkvent.resp_parse import * ROOT_DIR = os.path.dirname(os.path.abspath(__file__ + "/../")) def main(): config = Config(os.path.abspath(ROOT_DIR + "/conf/c...
mit
Python
8e9d50136a836a23cc07b1398a35d64745f128a7
add scipy.stats.norm.pdf
google/jax,google/jax,tensorflow/probability,google/jax,tensorflow/probability,google/jax
jax/scipy/stats/norm.py
jax/scipy/stats/norm.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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
Python
9d09cf598f7340b0f03b9b769c67c841cf8b2fdf
Use luigi.cmdline in bin_test.py
bmaggard/luigi,ThQ/luigi,aeron15/luigi,LamCiuLoeng/luigi,lichia/luigi,humanlongevity/luigi,PeteW/luigi,moandcompany/luigi,moritzschaefer/luigi,DomainGroupOSS/luigi,edx/luigi,moritzschaefer/luigi,javrasya/luigi,Yoone/luigi,stephenpascoe/luigi,walkers-mv/luigi,casey-green/luigi,thejens/luigi,bmaggard/luigi,drincruz/luigi...
test/bin_test.py
test/bin_test.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
apache-2.0
Python
18e90bd413978f5140aa8977b032ae6db4a59105
Refactor test/variable names to be more generally applicable.
rucker/dotfiles-manager
test_dotfiles.py
test_dotfiles.py
#!/usr/bin/python import unittest import mock import dotfilesinstaller import platform import sys import os import io class DotfilesTest(unittest.TestCase): def setUp(self): dotfilesinstaller.init() dotfilesinstaller.cleanUp() @mock.patch('platform.system', mock.MagicMock(return_value='Darwin')) def te...
#!/usr/bin/python import unittest import mock import dotfilesinstaller import platform import sys import os import io class DotfilesTest(unittest.TestCase): def setUp(self): dotfilesinstaller.init() dotfilesinstaller.cleanUp() @mock.patch('platform.system', mock.MagicMock(return_value='Darwin')) def te...
mit
Python
bca06eb56d0e1ad51271220ec3448d681a91983a
Test fallback on libscrypt loading failures
jvarho/pylibscrypt,jvarho/pylibscrypt
test_fallback.py
test_fallback.py
#!/usr/bin/env python # Copyright (c) 2014-2015, Jan Varho # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND T...
#!/usr/bin/env python # Copyright (c) 2014-2015, Jan Varho # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND T...
isc
Python
50838e2d377409c02757af5d4686957a754c641f
add travis ci
kute/eventor
test/test.py
test/test.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # __author__ = 'kute' # __mtime__ = '2016/12/25 17:47' """ """ # from __future__ import absolute_import import unittest from eventor.core import Eventor from eventor.util import EventorUtil import os class SimpleTest(unittest.TestCase): def test_run_with_tasklis...
#! /usr/bin/env python # -*- coding: utf-8 -*- # __author__ = 'kute' # __mtime__ = '2016/12/25 17:47' """ """ # from __future__ import absolute_import import unittest from eventor.core import Eventor from eventor.util import EventorUtil import os class SimpleTest(unittest.TestCase): def test_run_with_tasklis...
mit
Python
eb53eeeffb1c2d6bae44b7cd884f01ffd8cb64cd
add note regarding version of pandocfilters
cagix/pandoc-lecture
textohtml.py
textohtml.py
#!/usr/bin/env python """ Pandoc filter to replace certain LaTeX macros with matching HTML tags. In my beamer slides I use certain macros like `\blueArrow` which produces an arrow in deep blue color. This filter translates this TeX macros into the corresponding HTML markup. Note, that the `html.css` must also be ...
#!/usr/bin/env python """ Pandoc filter to replace certain LaTeX macros with matching HTML tags. In my beamer slides I use certain macros like `\blueArrow` which produces an arrow in deep blue color. This filter translates this TeX macros into the corresponding HTML markup. Note, that the `html.css` must also be ...
mit
Python