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
b14de33367ddf82d39ee5fe1671bc2526a5280b6
correct module version
it-projects-llc/pos-addons,it-projects-llc/pos-addons,it-projects-llc/pos-addons
pos_mobile_restaurant/__manifest__.py
pos_mobile_restaurant/__manifest__.py
{ "name": """POS Mobile UI for Waiters""", "summary": """Your Restaurant in the Mobile Version""", "category": "Point of Sale", "live_test_url": "http://apps.it-projects.info/shop/product/pos-mobile-ui?version=11.0", "images": ["images/pos_mobile_restaurant.png"], "version": "11.0.1.3.8", "a...
{ "name": """POS Mobile UI for Waiters""", "summary": """Your Restaurant in the Mobile Version""", "category": "Point of Sale", "live_test_url": "http://apps.it-projects.info/shop/product/pos-mobile-ui?version=11.0", "images": ["images/pos_mobile_restaurant.png"], "version": "10.0.1.3.8", "a...
mit
Python
669fa4443e9e4b551613ac1bb6b69c8818f382fc
Fix tweet format
romansalin/twiboozer
twiboozer.py
twiboozer.py
# -*- encoding: utf-8 -*- # TODO вынести, оформить как package import os import datetime import random import textwrap from pymarkovchain import MarkovChain from twibot import TwiBot def format_tweet(tweet): """Format tweet after generation.""" max_len = 140 if len(tweet) > max_len: tweet = te...
# -*- encoding: utf-8 -*- # TODO вынести, оформить как package import os import datetime import random import textwrap from pymarkovchain import MarkovChain from twibot import TwiBot def format_tweet(tweet): """Format tweet after generation.""" if tweet[-1] not in ".?!": tweet = "{0}{1}".format(tw...
mit
Python
ef1248dc4e150e72b9a347120f73b01909ff7522
remove site requirement in pages app
Signbank/BSL-signbank,Signbank/Auslan-signbank,Signbank/Auslan-signbank,Signbank/Auslan-signbank,Signbank/BSL-signbank,Signbank/Auslan-signbank,Signbank/BSL-signbank,Signbank/BSL-signbank
pages/views.py
pages/views.py
from auslan.pages.models import Page from django.template import loader, RequestContext from django.shortcuts import get_object_or_404, render_to_response from django.http import HttpResponse, HttpResponseRedirect from django.conf import settings from django.core.xheaders import populate_xheaders from django.utils.safe...
from auslan.pages.models import Page from django.template import loader, RequestContext from django.shortcuts import get_object_or_404, render_to_response from django.http import HttpResponse, HttpResponseRedirect from django.conf import settings from django.core.xheaders import populate_xheaders from django.utils.safe...
bsd-3-clause
Python
3b3418592331059f560bb641704a184d64734fc7
fix evals
ambros-gleixner/rubberband,xmunoz/rubberband,ambros-gleixner/rubberband,xmunoz/rubberband,ambros-gleixner/rubberband,xmunoz/rubberband,xmunoz/rubberband
rubberband/constants.py
rubberband/constants.py
INFINITY_KEYS = ("separating/flowcover/maxslackroot", "separating/flowcover/maxslack", "heuristics/undercover/maxcoversizeconss") INFINITY_MASK = -1 ZIPPED_SUFFIX = ".gz" FILES_DIR = "files/" STATIC_FILES_DIR = FILES_DIR + "static/" ALL_SOLU = STATIC_FILES_DIR + "all.solu" IPET_EVALUATIONS = { ...
INFINITY_KEYS = ("separating/flowcover/maxslackroot", "separating/flowcover/maxslack", "heuristics/undercover/maxcoversizeconss") INFINITY_MASK = -1 ZIPPED_SUFFIX = ".gz" FILES_DIR = "files/" STATIC_FILES_DIR = FILES_DIR + "static/" ALL_SOLU = STATIC_FILES_DIR + "all.solu" IPET_EVALUATIONS = { ...
mit
Python
9011b359bdf164994734f8d6890a2d5acb5fa865
Replace joins with list_to_number in 32
cryvate/project-euler,cryvate/project-euler
project_euler/solutions/problem_32.py
project_euler/solutions/problem_32.py
from itertools import permutations from ..library.base import list_to_number def solve() -> int: pandigital = [] for permutation in permutations(range(1, 10)): result = list_to_number(permutation[:4]) for i in range(1, 4): left = list_to_number(permutation[4:4 + i]) ...
from itertools import permutations def solve() -> int: pandigital = [] for permutation in permutations(range(1, 10)): result = int(''.join(str(digit) for digit in permutation[:4])) for i in range(1, 4): left = int(''.join(str(digit) for digit in permutation[4:4 + i])) ...
mit
Python
dc333069f4536fdc978d76924b098d10a1a8a50a
Fix error on status for last line in file.
sentience/SublimeSimpleCov,sentience/SublimeSimpleCov
ruby_coverage_status.py
ruby_coverage_status.py
import os import sublime import sublime_plugin import json import re from .common.json_coverage_reader import JsonCoverageReader STATUS_KEY = 'ruby-coverage-status' class RubyCoverageStatusListener(sublime_plugin.EventListener): """Show coverage statistics in status bar.""" def on_load(self, view): ...
import os import sublime import sublime_plugin import json import re from .common.json_coverage_reader import JsonCoverageReader STATUS_KEY = 'ruby-coverage-status' class RubyCoverageStatusListener(sublime_plugin.EventListener): """Show coverage statistics in status bar.""" def on_load(self, view): ...
mit
Python
921bdcc5d6f6ac4be7dfd0015e5b5fd6d06e6486
Raise exception when --debug is specified to main script
wylee/runcommands,wylee/runcommands
runcommands/__main__.py
runcommands/__main__.py
import sys from .config import RawConfig, RunConfig from .exc import RunCommandsError from .run import run, partition_argv, read_run_args from .util import printer def main(argv=None): debug = None try: all_argv, run_argv, command_argv = partition_argv(argv) cli_args = run.parse_args(RawConfi...
import sys from .config import RawConfig, RunConfig from .exc import RunCommandsError from .run import run, partition_argv, read_run_args from .util import printer def main(argv=None): try: all_argv, run_argv, command_argv = partition_argv(argv) cli_args = run.parse_args(RawConfig(run=RunConfig()...
mit
Python
5ca0e0683a663271c40d728e5f88ee19a26eca61
Add ProfileSummary to defaults
caffodian/django-devserver,Stackdriver/django-devserver,pjdelport/django-devserver,chriscauley/django-devserver,jimmyye/django-devserver,dcramer/django-devserver,madgeekfiend/django-devserver,mathspace/django-devserver,takeshineshiro/django-devserver,coagulant/django-devserver,bastianh/django-devserver
devserver/settings.py
devserver/settings.py
DEVSERVER_MODULES = ( 'devserver.modules.sql.SQLRealTimeModule', 'devserver.modules.profile.ProfileSummaryModule', # 'devserver.modules.cache.CacheSummaryModule', ) # This variable gets set to True when we're running the devserver DEVSERVER_ACTIVE = False
DEVSERVER_MODULES = ( 'devserver.modules.sql.SQLRealTimeModule', 'devserver.modules.cache.CacheSummaryModule', ) # This variable gets set to True when we're running the devserver DEVSERVER_ACTIVE = False
bsd-3-clause
Python
75ac453e873727675ba18e1f45b5bc0cfda26fd7
Increment the version number
bugra/angel-list
angel/__init__.py
angel/__init__.py
__title__ = 'angel' __version__ = '0.0.2' __author__ = 'Bugra Akyildiz' __license__ = 'MIT' __copyright__ = 'Copyright 2014 Bugra Akyildiz'
__title__ = 'angel' __version__ = '0.0.1' __author__ = 'Bugra Akyildiz' __license__ = 'MIT' __copyright__ = 'Copyright 2014 Bugra Akyildiz'
mit
Python
c39d6494d1bc27dedb2141970cdd7a51382f0af4
Update version 0.5.0.dev1 -> 0.5.0
oneklc/dimod,oneklc/dimod
dimod/package_info.py
dimod/package_info.py
__version__ = '0.5.0' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.'
__version__ = '0.5.0.dev1' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.'
apache-2.0
Python
ff504057223cd71f8ebbb7e7a53dc7982a9422a8
Add stream logger config convenience function
boto/boto3
boto3/__init__.py
boto3/__init__.py
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
apache-2.0
Python
7b071f3ccacd87f6dcb0e9a570d8ce386dbf7a4f
change FULLNAME to AUTHOR_FULLNAME
bsdlp/burrito.sh,fly/burrito.sh,fly/burrito.sh,bsdlp/burrito.sh
pelicanconf.py
pelicanconf.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals AUTHOR = u'jchen' AUTHOR_FULLNAME = u'Jon Chen' SITENAME = u'BURRITO 4 LYFE' SITEURL = '' TIMEZONE = 'ETC/UTC' DEFAULT_LANG = u'en' CSS_FILE = 'style.css' # theme stuff THEME = './theme' # plugins PLUGIN_PATH = './plugins' PLU...
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals AUTHOR = u'jchen' FULLNAME = u'Jon Chen' SITENAME = u'BURRITO 4 LYFE' SITEURL = '' TIMEZONE = 'ETC/UTC' DEFAULT_LANG = u'en' CSS_FILE = 'style.css' # theme stuff THEME = './theme' # plugins PLUGIN_PATH = './plugins' PLUGINS = ...
bsd-3-clause
Python
a3c582df681aae77034e2db08999c89866cd6470
Refactor earth mover's distance implementation
davidfoerster/schema-matching
utilities.py
utilities.py
import collections def each(function, iterable): for item in iterable: function(item) def each_unpack(function, iterable): for item in iterable: function(*item) def minmax(*args): min = None max = None for x in args: if max < x: max = x if x > min: min = x return min, max ...
import collections def each(function, iterable): for item in iterable: function(item) def each_unpack(function, iterable): for item in iterable: function(*item) def minmax(*args): min = None max = None for x in args: if max < x: max = x if x > min: min = x return min, max ...
mit
Python
26cb100e7e4782cdc4d7a55f6a096a9da2db2b5c
fix bug 1495003: add search to GraphicsDeviceAdmin
mozilla/socorro,lonnen/socorro,lonnen/socorro,lonnen/socorro,mozilla/socorro,mozilla/socorro,mozilla/socorro,lonnen/socorro,mozilla/socorro,mozilla/socorro
webapp-django/crashstats/crashstats/admin.py
webapp-django/crashstats/crashstats/admin.py
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.admin.models import LogEntry, ADDITION, CHANGE, DELETION from crashstats.crashstats.models import ( GraphicsDevice, Signature, ) # Fix the Django Admin User list display so it shows the columns we care about ...
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.admin.models import LogEntry, ADDITION, CHANGE, DELETION from crashstats.crashstats.models import ( GraphicsDevice, Signature, ) # Fix the Django Admin User list display so it shows the columns we care about ...
mpl-2.0
Python
0d2079b1dcb97708dc55c32d9e2c1a0f12595875
Replace string substitution with string formatting
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/runners/launchd.py
salt/runners/launchd.py
# -*- coding: utf-8 -*- ''' Manage launchd plist files ''' # Import python libs import os import sys def write_launchd_plist(program): ''' Write a launchd plist for managing salt-master or salt-minion CLI Example: .. code-block:: bash salt-run launchd.write_launchd_plist salt-master ''...
# -*- coding: utf-8 -*- ''' Manage launchd plist files ''' # Import python libs import os import sys def write_launchd_plist(program): ''' Write a launchd plist for managing salt-master or salt-minion CLI Example: .. code-block:: bash salt-run launchd.write_launchd_plist salt-master ''...
apache-2.0
Python
a2a6b336295e65d29881e83ba45e1758c4582bbb
add available filters
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/apps/reports/standard/users/reports.py
corehq/apps/reports/standard/users/reports.py
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext_lazy from memoized import memoized from corehq.apps.reports.datatables import DataTablesColumn, DataTablesHeader from corehq.apps.reports.dispatcher import UserManagementReportDispatcher from corehq.apps.reports.generic i...
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext_lazy from memoized import memoized from corehq.apps.reports.datatables import DataTablesColumn, DataTablesHeader from corehq.apps.reports.dispatcher import UserManagementReportDispatcher from corehq.apps.reports.generic i...
bsd-3-clause
Python
e1f6e98d7e3a1840567b1b5e379f87ec1e0aa9dc
add two more views
amdeb/odoo-connector
connector8/__openerp__.py
connector8/__openerp__.py
# -*- coding: utf-8 -*- {'name': 'Connector8', 'version': '0.1', 'author': 'Openerp Connector Core Editors and Amdeb', 'license': 'AGPL-3', 'category': 'Generic Modules', 'description': """ This is a port of OCA connector to Odoo 8.0 """, 'depends': ['mail' ], 'data': ['security/connector_security....
# -*- coding: utf-8 -*- {'name': 'Connector8', 'version': '0.1', 'author': 'Openerp Connector Core Editors and Amdeb', 'license': 'AGPL-3', 'category': 'Generic Modules', 'description': """ This is a port of OCA connector to Odoo 8.0 """, 'depends': ['mail' ], 'data': ['security/connector_security....
agpl-3.0
Python
fe96f6539b40a880e88f7efe8502279cea1de506
update test
qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/apps/accounting/tests/test_model_validation.py
corehq/apps/accounting/tests/test_model_validation.py
from datetime import date from django.core.exceptions import ValidationError from corehq.apps.accounting.models import ( BillingAccount, CreditAdjustment, Invoice, LineItem, Subscriber, Subscription, ) from corehq.apps.accounting.tests import generator from corehq.apps.accounting.tests.base_te...
from datetime import date from django.core.exceptions import ValidationError from django.test import TransactionTestCase from corehq.apps.accounting.models import ( BillingAccount, CreditAdjustment, Invoice, LineItem, Subscriber, Subscription, ) from corehq.apps.accounting.tests import generat...
bsd-3-clause
Python
4f040d1d7730ee611f0c4a6768ecc181c6a43ff7
Fix broken view test for select seats
Karspexet/Karspexet,Karspexet/Karspexet,Karspexet/Karspexet,Karspexet/Karspexet,Karspexet/Karspexet
karspexet/ticket/tests/test_views.py
karspexet/ticket/tests/test_views.py
# coding: utf-8 from django.shortcuts import reverse from django.test import TestCase, RequestFactory from django.utils import timezone from karspexet.show.models import Show, Production from karspexet.ticket import views from karspexet.venue.models import Venue, SeatingGroup import pytest class TestHome(TestCase)...
# coding: utf-8 from django.shortcuts import reverse from django.test import TestCase, RequestFactory from django.utils import timezone from karspexet.show.models import Show, Production from karspexet.ticket import views from karspexet.venue.models import Venue, SeatingGroup import pytest class TestHome(TestCase)...
mit
Python
14f0ed32b62e2d00443e99428516a2d17a68bc58
Use COMPLEX_TEST_STRING for testing
d6e/coala,shreyans800755/coala,djkonro/coala,SambitAcharya/coala,sagark123/coala,arafsheikh/coala,svsn2117/coala,Balaji2198/coala,coala/coala,lonewolf07/coala,scottbelden/coala,rresol/coala,refeed/coala,NalinG/coala,Balaji2198/coala,saurabhiiit/coala,andreimacavei/coala,meetmangukiya/coala,karansingh1559/coala,Balaji21...
coalib/tests/processes/communication/LogMessageTest.py
coalib/tests/processes/communication/LogMessageTest.py
""" This program 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT...
""" This program 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT...
agpl-3.0
Python
7cbf46b1c44791b6a1466b08e049b568d32cf2d3
fix soil.tests.test_download_base:TestBlobDownload
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/ex-submodules/soil/tests/test_download_base.py
corehq/ex-submodules/soil/tests/test_download_base.py
from __future__ import absolute_import from __future__ import unicode_literals from io import BytesIO from uuid import uuid4 from django.test import TestCase from soil import BlobDownload from soil.util import expose_blob_download from corehq.blobs.tests.util import new_meta, TemporaryFilesystemBlobDB class TestBlo...
from __future__ import absolute_import from __future__ import unicode_literals from io import BytesIO from uuid import uuid4 from django.test import TestCase from soil import BlobDownload from soil.util import expose_blob_download from corehq.blobs.tests.util import new_meta, TemporaryFilesystemBlobDB class TestBlo...
bsd-3-clause
Python
c3367eaa7bccf5843abd12a438e14518d533cdbe
Allow API on Windows
platformio/platformio-api
platformio_api/__init__.py
platformio_api/__init__.py
# Copyright 2014-present Ivan Kravets <me@ikravets.com> # # 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...
# Copyright 2014-present Ivan Kravets <me@ikravets.com> # # 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
dc743c63c52c7ef0bcab73d7b4fcf8f3f4a54ea6
make median transmittance optional in plot_mean_transmittance.
yishayv/lyacorr,yishayv/lyacorr
plot_mean_transmittance.py
plot_mean_transmittance.py
import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import host_subplot import common_settings import mean_transmittance import median_transmittance lya_center = 1215.67 settings = common_settings.Settings() enable_median_transmittance = False def do_plot(): m = mean_transmittance.MeanTransmittance.fr...
import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import host_subplot import common_settings import mean_transmittance import median_transmittance lya_center = 1215.67 settings = common_settings.Settings() def do_plot(): m = mean_transmittance.MeanTransmittance.from_file(settings.get_mean_transmitta...
mit
Python
4173221d72356fc336be63273a7252c81831fd54
fix datetime_to_string
kirov/exp1403,kirov/ephim
ephim/utils.py
ephim/utils.py
from datetime import datetime import string def to_base(num, b, numerals=string.digits + string.ascii_lowercase): return ((num == 0) and numerals[0]) or (to_base(num // b, b, numerals).lstrip(numerals[0]) + numerals[num % b]) def datetime_to_string(dt: datetime): delta = dt - datetime.utcfromtimestamp(0) ...
from datetime import datetime import string def to_base(num, b, numerals=string.digits + string.ascii_lowercase): return ((num == 0) and numerals[0]) or (to_base(num // b, b, numerals).lstrip(numerals[0]) + numerals[num % b]) def datetime_to_string(dt: datetime): delta = dt - datetime.fromtimestamp(0) ...
mit
Python
58ab8c5ebafad2109b8d8f19c44adbb11fe18c02
Fix broken or_else implementation
udacity/pygow
pygow/maybe.py
pygow/maybe.py
class Just: a = None def __init__(self, a): self.a = a def __eq__(self, other): return (isinstance(other, self.__class__) and self.a == other.a) def __ne__(self, other): return not self.__eq__(other) def __str__(self): return 'Just(%s)' % self.a def is...
class Just: a = None def __init__(self, a): self.a = a def __eq__(self, other): return (isinstance(other, self.__class__) and self.a == other.a) def __ne__(self, other): return not self.__eq__(other) def __str__(self): return 'Just(%s)' % self.a def is...
bsd-3-clause
Python
2aca9f77b6f5b8171ec33906a66cd805f57937a0
Fix mistake with previous commit.
kron4eg/django-localeurl,kron4eg/django-localeurl
localeurl/templatetags/localeurl_tags.py
localeurl/templatetags/localeurl_tags.py
# Copyright (c) 2008 Joost Cassee # Licensed under the terms of the MIT License (see LICENSE.txt) from django import template from django.template import Node, Token, TemplateSyntaxError from django.template import resolve_variable, defaulttags from django.template.defaultfilters import stringfilter from django.conf i...
# Copyright (c) 2008 Joost Cassee # Licensed under the terms of the MIT License (see LICENSE.txt) from django import template from django.template import Node, Token, TemplateSyntaxError from django.template import resolve_variable, defaulttags from django.template.defaultfilters import stringfilter from django.conf i...
mit
Python
f18d675f2877e8f9356dc64a96bf8fba364cddd3
Add search field to admin Terms.
unt-libraries/django-controlled-vocabularies,unt-libraries/django-controlled-vocabularies
controlled_vocabularies/admin.py
controlled_vocabularies/admin.py
from django.contrib import admin from django import forms from controlled_vocabularies.models import Vocabulary, Term, Property class PropertyInline(admin.TabularInline): model = Property fk_name = "term_key" extra = 1 class VocabularyAdmin(admin.ModelAdmin): """ Vocabulary class that determines how...
from django.contrib import admin from django import forms from controlled_vocabularies.models import Vocabulary, Term, Property class PropertyInline(admin.TabularInline): model = Property fk_name = "term_key" extra = 1 class VocabularyAdmin(admin.ModelAdmin): """ Vocabulary class that determines how...
bsd-3-clause
Python
e60ce628029e3100d6f2a8a8f7260e2ed229e6ac
Add helper method to retrieve review count per user in a skeleton
fzadow/CATMAID,fzadow/CATMAID,fzadow/CATMAID,fzadow/CATMAID,htem/CATMAID,htem/CATMAID,htem/CATMAID,htem/CATMAID
django/applications/catmaid/control/review.py
django/applications/catmaid/control/review.py
from collections import defaultdict from catmaid.models import Review from django.db import connection def get_treenodes_to_reviews(treenode_ids=None, skeleton_ids=None, umap=lambda r: r): """ Returns a dictionary that contains all reviewed nodes of the passed <treenode_ids> and...
from collections import defaultdict from catmaid.models import Review def get_treenodes_to_reviews(treenode_ids=None, skeleton_ids=None, umap=lambda r: r): """ Returns a dictionary that contains all reviewed nodes of the passed <treenode_ids> and/or <skeleton_ids> lists as keys. ...
agpl-3.0
Python
a36a7a0eb6560156c5be6f0cc5523c17e79591e4
fix import errors
deepchem/deepchem,peastman/deepchem,peastman/deepchem,deepchem/deepchem
deepchem/models/tests/test_normalizing_flow_pytorch.py
deepchem/models/tests/test_normalizing_flow_pytorch.py
""" Test for Pytorch Normalizing Flow model and its transformations """ import pytest import numpy as np import unittest try: import torch from torch.distributions import MultivariateNormal from deepchem.models.torch_models.layers import Affine has_torch = True except: has_torch = False @unittest.skipIf(...
""" Test for Pytorch Normalizing Flow model and its transformations """ import pytest import numpy as np import unittest try: import torch from torch.distributions import MultivariateNormal from deepchem.models.torch_models.normalizing_flows_pytorch import Affine has_torch = True except: has_torch = False ...
mit
Python
3dc54a1c845cf0b99fd0dfc6fd454659895ba888
Fix import.
liberation/django-elasticsearch,sadnoodles/django-elasticsearch,AlexandreProenca/django-elasticsearch,leotsem/django-elasticsearch,alsur/django-elasticsearch
django_elasticsearch/contrib/restframework/__init__.py
django_elasticsearch/contrib/restframework/__init__.py
from rest_framework import VERSION from django_elasticsearch.contrib.restframework.base import AutoCompletionMixin if int(VERSION[0]) < 3: from django_elasticsearch.contrib.restframework.restframework2 import IndexableModelMixin from django_elasticsearch.contrib.restframework.restframework2 import Elasticsear...
from rest_framework import VERSION from django_elasticsearch.contrib.restframework.restframework import AutoCompletionMixin if int(VERSION[0]) < 3: from django_elasticsearch.contrib.restframework.restframework2 import IndexableModelMixin from django_elasticsearch.contrib.restframework.restframework2 import El...
mit
Python
df553c4e0c536f7deaa180076658ba61e3af66b6
Rework parsers to use subparsers
zxiiro/sym
refresh/cli.py
refresh/cli.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # The MIT License (MIT) # # Copyright (c) 2013 Thanh Ha # # 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 wi...
# -*- coding: utf-8 -*- ''' The MIT License (MIT) Copyright (c) 2013 Thanh Ha 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 righ...
mit
Python
89dac8b14610f08b12db0ab6e00b7432b527fd89
Remove trailing whitespace
jongiddy/balcazapy,jongiddy/balcazapy,jongiddy/balcazapy
python/balcaza/activity/local/text.py
python/balcaza/activity/local/text.py
from balcaza.t2types import * from balcaza.t2activity import BeanshellCode ByteArrayToString = BeanshellCode( '''if ((bytes == void) || (bytes == null)) { throw new RuntimeException("The 'bytes' parameter must be specified"); } if (encoding == void) { string = new String(bytes); } else { string = new String(bytes, ...
from balcaza.t2types import * from balcaza.t2activity import BeanshellCode ByteArrayToString = BeanshellCode( '''if ((bytes == void) || (bytes == null)) { throw new RuntimeException("The 'bytes' parameter must be specified"); } if (encoding == void) { string = new String(bytes); } else { string = new String(bytes, ...
lgpl-2.1
Python
b324031ee683005be0307e3b323c4709ce3a01eb
Disable those new requirements because pip requires gcc to install them
LibreTime/libretime,LibreTime/libretime,comiconomenclaturist/libretime,Lapotor/libretime,LibreTime/libretime,comiconomenclaturist/libretime,LibreTime/libretime,Lapotor/libretime,Lapotor/libretime,LibreTime/libretime,Lapotor/libretime,Lapotor/libretime,comiconomenclaturist/libretime,comiconomenclaturist/libretime,Lapoto...
python_apps/airtime_analyzer/setup.py
python_apps/airtime_analyzer/setup.py
from setuptools import setup from subprocess import call import sys # Allows us to avoid installing the upstart init script when deploying airtime_analyzer # on Airtime Pro: if '--no-init-script' in sys.argv: data_files = [] sys.argv.remove('--no-init-script') # super hax else: data_files = [('/etc/init', ...
from setuptools import setup from subprocess import call import sys # Allows us to avoid installing the upstart init script when deploying airtime_analyzer # on Airtime Pro: if '--no-init-script' in sys.argv: data_files = [] sys.argv.remove('--no-init-script') # super hax else: data_files = [('/etc/init', ...
agpl-3.0
Python
2c1811fad85d6bacf8d3fcaf1299994bfc5efb78
Support serializer path instead of "self" keyword
Hipo/drf-extra-fields,Hipo/drf-extra-fields
drf_extra_fields/relations.py
drf_extra_fields/relations.py
from collections import OrderedDict from django.utils.module_loading import import_string from rest_framework.relations import PrimaryKeyRelatedField, SlugRelatedField class PresentableRelatedFieldMixin(object): def __init__(self, **kwargs): self.presentation_serializer = kwargs.pop("presentation_seriali...
from collections import OrderedDict from rest_framework.relations import PrimaryKeyRelatedField, SlugRelatedField class PresentableRelatedFieldMixin(object): def __init__(self, **kwargs): self.presentation_serializer = kwargs.pop("presentation_serializer", None) self.presentation_serializer_kwarg...
apache-2.0
Python
461b7c5bf5541fc3a56039d6756262d6b99e8428
Add null count.
jhanley634/testing-tools,jhanley634/testing-tools,jhanley634/testing-tools,jhanley634/testing-tools,jhanley634/testing-tools,jhanley634/testing-tools,jhanley634/testing-tools
problem/column_explorer/column_explorer.py
problem/column_explorer/column_explorer.py
#! /usr/bin/env python3 # Copyright 2019 John Hanley. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, m...
#! /usr/bin/env python3 # Copyright 2019 John Hanley. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, m...
mit
Python
86d088835a88c00af69090b6b7f1bae42ff5c09a
remove monetdb typo
bootandy/sqlalchemy,Cito/sqlalchemy,epa/sqlalchemy,olemis/sqlalchemy,monetate/sqlalchemy,dstufft/sqlalchemy,halfcrazy/sqlalchemy,wfxiang08/sqlalchemy,276361270/sqlalchemy,davidjb/sqlalchemy,alex/sqlalchemy,wujuguang/sqlalchemy,zzzeek/sqlalchemy,Akrog/sqlalchemy,alex/sqlalchemy,Cito/sqlalchemy,davidfraser/sqlalchemy,Win...
lib/sqlalchemy/databases/__init__.py
lib/sqlalchemy/databases/__init__.py
# __init__.py # Copyright (C) 2005, 2006, 2007, 2008 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php __all__ = [ 'sqlite', 'postgres', 'mysql', 'oracle', 'mssql', 'firebird', 'sybase', 'acc...
# __init__.py # Copyright (C) 2005, 2006, 2007, 2008 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php __all__ = [ 'sqlite', 'postgres', 'mysql', 'oracle', 'mssql', 'firebird', 'sybase', 'acc...
mit
Python
a4f475245c3af8470337fe0c25b136e58189a607
Update griddy to use CoordinatorEntity (#39392)
sander76/home-assistant,toddeye/home-assistant,FreekingDean/home-assistant,jawilson/home-assistant,partofthething/home-assistant,rohitranjan1991/home-assistant,tchellomello/home-assistant,turbokongen/home-assistant,sdague/home-assistant,rohitranjan1991/home-assistant,Danielhiversen/home-assistant,turbokongen/home-assis...
homeassistant/components/griddy/sensor.py
homeassistant/components/griddy/sensor.py
"""Support for August sensors.""" import logging from homeassistant.const import ENERGY_KILO_WATT_HOUR from homeassistant.helpers.update_coordinator import CoordinatorEntity from .const import CONF_LOADZONE, DOMAIN _LOGGER = logging.getLogger(__name__) async def async_setup_entry(hass, config_entry, async_add_enti...
"""Support for August sensors.""" import logging from homeassistant.const import ENERGY_KILO_WATT_HOUR from homeassistant.helpers.entity import Entity from .const import CONF_LOADZONE, DOMAIN _LOGGER = logging.getLogger(__name__) async def async_setup_entry(hass, config_entry, async_add_entities): """Set up th...
apache-2.0
Python
331f5b0a951e13f816e752609ac348df272e1b1e
Update conf_template.py
LinkingDataIO/RO2SHARE
docs/conf_template.py
docs/conf_template.py
# Statement for enabling the development environment DEBUG = True # Define the application directory import os BASE_DIR = os.path.abspath(os.path.dirname(__file__)) # Define the database - we are working with # SQLite for this example SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(BASE_DIR, 'app.db') DATABASE_...
# Statement for enabling the development environment DEBUG = True # Define the application directory import os BASE_DIR = os.path.abspath(os.path.dirname(__file__)) # Define the database - we are working with # SQLite for this example SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(BASE_DIR, 'app.db') DATABASE_...
mit
Python
30db4b3ae377669b3b598c9d4d22b5fbff2082ab
Fix typo on model
bcgov/gwells,bcgov/gwells,bcgov/gwells,bcgov/gwells
app/backend/aquifers/serializers.py
app/backend/aquifers/serializers.py
""" Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distri...
""" Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distri...
apache-2.0
Python
8995d7314bddcf4418a08cb39b2fabbc8704706e
Use conservative defaults for local facebook settings.
Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server
pykeg/src/pykeg/contrib/facebook/models.py
pykeg/src/pykeg/contrib/facebook/models.py
import datetime from django.db import models from django.db.models.signals import post_save from socialregistration import models as sr_models PRIVACY_CHOICES = ( ('EVERYONE', 'Everyone'), ('ALL_FRIENDS', 'Friends'), ('FRIENDS_OF_FRIENDS', 'Friends of Friends'), ('NETWORK_FRIENDS', 'Networks and Friends'), #...
import datetime from django.db import models from django.db.models.signals import post_save from socialregistration import models as sr_models PRIVACY_CHOICES = ( ('EVERYONE', 'Everyone'), ('ALL_FRIENDS', 'Friends'), ('FRIENDS_OF_FRIENDS', 'Friends of Friends'), ('NETWORK_FRIENDS', 'Networks and Friends'), #...
mit
Python
eff9a7fa2c25739926a8c583c51f30fee66185c9
return plugin name changed at loading
quinoescobar/keystoneauth-oidc-refreshtoken
keystoneauth_oidc_refreshtoken/loading.py
keystoneauth_oidc_refreshtoken/loading.py
# coding=utf-8 # Copyright 2017 JOSÉ JOAQUÍN ESCOBAR GÓMEZ # File: loading.py # Description: # # 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/...
# coding=utf-8 # Copyright 2017 JOSÉ JOAQUÍN ESCOBAR GÓMEZ # File: loading.py # Description: # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/...
apache-2.0
Python
b978d2a1f2f9cc9942971a6e252ccd1209a9269b
remove message (#8163)
williamFalcon/pytorch-lightning,williamFalcon/pytorch-lightning
pytorch_lightning/metrics/__init__.py
pytorch_lightning/metrics/__init__.py
# Copyright The PyTorch Lightning team. # # 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 i...
# Copyright The PyTorch Lightning team. # # 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 i...
apache-2.0
Python
d6b9cc4acb4800aa63cc91957c05c75312a081e5
update language_by_size from trunk r9110, add new sq-site
azatoth/pywikipedia
pywikibot/families/wikinews_family.py
pywikibot/families/wikinews_family.py
# -*- coding: utf-8 -*- from pywikibot import family __version__ = '$Id$' # The Wikimedia family that is known as Wikinews class Family(family.Family): def __init__(self): family.Family.__init__(self) self.name = 'wikinews' self.languages_by_size = [ 'sr', 'en', 'pl', 'de', ...
# -*- coding: utf-8 -*- from pywikibot import family __version__ = '$Id$' # The Wikimedia family that is known as Wikinews class Family(family.Family): def __init__(self): family.Family.__init__(self) self.name = 'wikinews' self.languages_by_size = [ 'sr', 'en', 'pl', 'de', ...
mit
Python
06a851590f32acad0bc1e5b0d87cc4b1148b644c
Add unique index to patient_numbers
renalreg/radar,renalreg/radar,renalreg/radar,renalreg/radar
radar/radar/models/patient_numbers.py
radar/radar/models/patient_numbers.py
from sqlalchemy import Column, Integer, ForeignKey, String, Index from sqlalchemy.orm import relationship from radar.database import db from radar.models import MetaModelMixin from radar.models.common import uuid_pk_column, patient_id_column, patient_relationship class PatientNumber(db.Model, MetaModelMixin): __...
from sqlalchemy import Column, Integer, ForeignKey, String, Index from sqlalchemy.orm import relationship from radar.database import db from radar.models import MetaModelMixin from radar.models.common import uuid_pk_column, patient_id_column, patient_relationship class PatientNumber(db.Model, MetaModelMixin): __...
agpl-3.0
Python
ab2d635f6f52c6cbc6c59d3fa887176852e186ff
Move Ko-Fi notifications to private channels.
Eylesis/Botfriend
KofiFriend_Brain.py
KofiFriend_Brain.py
import traceback import json import util_functions from discord.ext import commands import discord import sys import re import os import asyncio from aiohttp import web import datetime botToken = os.environ.get('botToken') def run_app(app, *, host='0.0.0.0', port=None, shutdown_timeout=60.0, ssl_context=None, print=p...
import traceback import json import util_functions from discord.ext import commands import discord import sys import re import os import asyncio from aiohttp import web import datetime botToken = os.environ.get('botToken') def run_app(app, *, host='0.0.0.0', port=None, shutdown_timeout=60.0, ssl_context=None, print=p...
mit
Python
b980d69fe3d2da87814a915c6a85ef930d832860
Change simple_blend to simply average the predictions
jvanbrug/netflix,jvanbrug/netflix
scripts/simple_blend.py
scripts/simple_blend.py
import numpy as np import os import sys sys.path.append(os.path.abspath(os.path.dirname(os.path.dirname(__file__)))) from utils.data_paths import SUBMISSIONS_DIR_PATH OUTPUT_FILE_PATH = os.path.join(SUBMISSIONS_DIR_PATH, 'simple_blend.dta') PREDICTION_FILE_PATHS = [os.path.join(SUBMISSIONS_DIR_PATH, 'predictions1.dt...
import numpy as np import os import sys sys.path.append(os.path.abspath(os.path.dirname(os.path.dirname(__file__)))) from utils.data_paths import SUBMISSIONS_DIR_PATH OUTPUT_FILE_PATH = os.path.join(SUBMISSIONS_DIR_PATH, 'simple_blend.dta') PREDICTION_FILE_PATHS = [os.path.join(SUBMISSIONS_DIR_PATH, 'predictions1.dt...
mit
Python
4657a4fafb1218fe73b76d142c554bd8f347d81f
Make the correct None check
adderall/regulations-site,eregs/regulations-site,willbarton/regulations-site,willbarton/regulations-site,ascott1/regulations-site,grapesmoker/regulations-site,eregs/regulations-site,eregs/regulations-site,jeremiak/regulations-site,adderall/regulations-site,EricSchles/regulations-site,tadhg-ohiggins/regulations-site,asc...
regserver/regulations/views/chrome.py
regserver/regulations/views/chrome.py
from django.conf import settings from django.http import Http404 from django.views.generic.base import TemplateView from regulations.generator import generator from regulations.generator.versions import fetch_grouped_history from regulations.views import utils from regulations.views.partial import * from regulations.v...
from django.conf import settings from django.http import Http404 from django.views.generic.base import TemplateView from regulations.generator import generator from regulations.generator.versions import fetch_grouped_history from regulations.views import utils from regulations.views.partial import * from regulations.v...
cc0-1.0
Python
aaa6142718827ea6d568eccc75c624598b0bc9c9
Update __init__.py
ralph-group/pymeasure
pymeasure/instruments/thorlabs/__init__.py
pymeasure/instruments/thorlabs/__init__.py
# # This file is part of the PyMeasure package. # # Copyright (c) 2013-2020 PyMeasure Developers # # 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 limit...
# # This file is part of the PyMeasure package. # # Copyright (c) 2013-2020 PyMeasure Developers # # 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 limit...
mit
Python
1a9581a33efab4bcf7f1b7a6e555fa373d6f0739
Fix repo URL in staging report
kironapublic/vaadin,Peppe/vaadin,shahrzadmn/vaadin,kironapublic/vaadin,shahrzadmn/vaadin,kironapublic/vaadin,Legioth/vaadin,magi42/vaadin,Darsstar/framework,magi42/vaadin,Peppe/vaadin,mstahv/framework,asashour/framework,jdahlstrom/vaadin.react,kironapublic/vaadin,udayinfy/vaadin,sitexa/vaadin,asashour/framework,Darssta...
scripts/GenerateStagingReport.py
scripts/GenerateStagingReport.py
#coding=UTF-8 from BuildArchetypes import archetypes, getDeploymentContext import argparse, cgi parser = argparse.ArgumentParser(description="Build report generator") parser.add_argument("version", type=str, help="Vaadin version that was just built") parser.add_argument("deployUrl", type=str, help="Base url of the de...
#coding=UTF-8 from BuildArchetypes import archetypes, getDeploymentContext import argparse, cgi parser = argparse.ArgumentParser(description="Build report generator") parser.add_argument("version", type=str, help="Vaadin version that was just built") parser.add_argument("deployUrl", type=str, help="Base url of the de...
apache-2.0
Python
ceb5f223f2f38969157372b608d03771a9179858
Make threading tests work in environment with restricted maxprocs
ndawe/rootpy,kreczko/rootpy,rootpy/rootpy,ndawe/rootpy,kreczko/rootpy,rootpy/rootpy,rootpy/rootpy,kreczko/rootpy,ndawe/rootpy
rootpy/logger/tests/test_threading.py
rootpy/logger/tests/test_threading.py
from __future__ import division import itertools import os import resource import thread import threading import time from math import ceil from random import random import ROOT import rootpy; log = rootpy.log["rootpy.logger.test.threading"] rootpy.logger.magic.DANGER.enabled = True from .logcheck import EnsureLog...
from __future__ import division import itertools import os import threading import time from random import random import rootpy; log = rootpy.log["rootpy.logger.test.threading"] rootpy.logger.magic.DANGER.enabled = True import ROOT from .logcheck import EnsureLogContains def optional_fatal(abort=True): msg = ...
bsd-3-clause
Python
65ecd399ea82abdafd0a2471193a9c850b50db87
Debug level of logging
emkael/jfrteamy-playoff,emkael/jfrteamy-playoff
playoff.py
playoff.py
import traceback from jfr_playoff.filemanager import PlayoffFileManager from jfr_playoff.generator import PlayoffGenerator from jfr_playoff.settings import PlayoffSettings def main(): interactive = False try: import argparse arg_parser = argparse.ArgumentParser( description='Gen...
import traceback from jfr_playoff.filemanager import PlayoffFileManager from jfr_playoff.generator import PlayoffGenerator from jfr_playoff.settings import PlayoffSettings def main(): interactive = False try: import argparse arg_parser = argparse.ArgumentParser( description='Gen...
bsd-2-clause
Python
3f80c759c55552dce7d45cf5f84e953ac7863974
add placeholder for more examples
JiscPER/magnificent-octopus,JiscPER/magnificent-octopus,JiscPER/magnificent-octopus
octopus/modules/examples/examples.py
octopus/modules/examples/examples.py
from octopus.core import app from flask import Blueprint, render_template blueprint = Blueprint('examples', __name__) #@blueprint.route("/") #def list_examples(): # return render_template("examples/list.html") @blueprint.route("/ac") def autocomplete(): return render_template("examples/es/autocomplete.html")...
from octopus.core import app from flask import Blueprint, render_template blueprint = Blueprint('examples', __name__) #@blueprint.route("/") #def list_examples(): # return render_template("examples/list.html") @blueprint.route("/ac") def autocomplete(): return render_template("examples/es/autocomplete.html")...
apache-2.0
Python
2668829d114031ba6fa641bb989988368371917b
add program lookup to choice group admin hotfix
ITOO-UrFU/open-programs,ITOO-UrFU/open-programs,ITOO-UrFU/open-programs
open_programs/apps/programs/admin.py
open_programs/apps/programs/admin.py
from django.contrib import admin from reversion.admin import VersionAdmin from ajax_select.admin import AjaxSelectAdmin from ajax_select import make_ajax_form from .models import Program, TrainingTarget, ProgramCompetence, ProgramModules, TargetModules, ChoiceGroup, ChoiceGroupType, LearningPlan @admin.register(Prog...
from django.contrib import admin from reversion.admin import VersionAdmin from ajax_select.admin import AjaxSelectAdmin from ajax_select import make_ajax_form from .models import Program, TrainingTarget, ProgramCompetence, ProgramModules, TargetModules, ChoiceGroup, ChoiceGroupType, LearningPlan @admin.register(Prog...
unlicense
Python
ec5cb4e878dae00bb6b23965c6c466ee29727583
Update HashFilter
Parsely/python-bloomfilter
pybloom/hashfilter.py
pybloom/hashfilter.py
import time class HashFilter(object): ''' Plain Temporal Hash Filter for testing purposes ''' def __init__(self, expiration): self.expiration = expiration self.unique_items = {} def add(self, key, timestamp = None): timestamp = int(timestamp) if key in self.unique_i...
import time class HashFilter(object): ''' Plain Temporal Hash Filter for testing purposes ''' def __init__(self, expiration): self.expiration = expiration self.unique_items = {} def add(self, key, timestamp = None): if key in self.unique_items: if not timestamp:...
mit
Python
ab13290364a40c0592ed347bf7b91110afaa7115
Fix test_json
adrienpacifico/openfisca-france,benjello/openfisca-france,SophieIPP/openfisca-france,antoinearnoud/openfisca-france,benjello/openfisca-france,sgmap/openfisca-france,sgmap/openfisca-france,antoinearnoud/openfisca-france,SophieIPP/openfisca-france,adrienpacifico/openfisca-france
openfisca_france/tests/test_jsons.py
openfisca_france/tests/test_jsons.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # OpenFisca -- A versatile microsimulation software # By: OpenFisca Team <contact@openfisca.fr> # # Copyright (C) 2011, 2012, 2013, 2014 OpenFisca Team # https://github.com/openfisca # # This file is part of OpenFisca. # # OpenFisca is free software; you can redistribute...
#! /usr/bin/env python # -*- coding: utf-8 -*- # OpenFisca -- A versatile microsimulation software # By: OpenFisca Team <contact@openfisca.fr> # # Copyright (C) 2011, 2012, 2013, 2014 OpenFisca Team # https://github.com/openfisca # # This file is part of OpenFisca. # # OpenFisca is free software; you can redistribute...
agpl-3.0
Python
72ec0d82bfa59d14dbd9e8ffd89ddcfc990fc4fe
Fix #14
hadim/pygraphml
pygraphml/__init__.py
pygraphml/__init__.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from .attribute import Attribute from .item import Item from .point import Point from .node import Node from .edge import Edge from .graph import...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from .attribute import Attribute from .item import Item from .point import Point from .node import Node from .edge import Edge from .graph import...
bsd-3-clause
Python
3905327d8cb02c6c7929f6b3bd12658c6bc1b6ab
bump to 1.73
lobocv/pyperform
pyperform/__init__.py
pyperform/__init__.py
from __future__ import print_function __version__ = '1.73' from pyperform.benchmark import Benchmark from .comparisonbenchmark import ComparisonBenchmark from .benchmarkedclass import BenchmarkedClass from .benchmarkedfunction import BenchmarkedFunction from .timer import timer from .exceptions import ValidationErro...
from __future__ import print_function __version__ = '1.72' from pyperform.benchmark import Benchmark from .comparisonbenchmark import ComparisonBenchmark from .benchmarkedclass import BenchmarkedClass from .benchmarkedfunction import BenchmarkedFunction from .timer import timer from .exceptions import ValidationErro...
mit
Python
813fac88b392f81825d60f3862a09718f12bf424
add ccsd
Konjkov/pyquante2,Konjkov/pyquante2,Konjkov/pyquante2
pyquante2/__init__.py
pyquante2/__init__.py
from pyquante2.basis.basisset import basisset from pyquante2.basis.cgbf import cgbf,sto from pyquante2.basis.pgbf import pgbf from pyquante2.geo.molecule import molecule from pyquante2.geo.samples import * from pyquante2.graphics.vtkplot import vtk_orbs from pyquante2.grid.grid import grid from pyquante2.ints.one impor...
from pyquante2.basis.basisset import basisset from pyquante2.basis.cgbf import cgbf,sto from pyquante2.basis.pgbf import pgbf from pyquante2.geo.molecule import molecule from pyquante2.geo.samples import * from pyquante2.graphics.vtkplot import vtk_orbs from pyquante2.grid.grid import grid from pyquante2.ints.one impor...
bsd-3-clause
Python
f808b67c9a067d9addd75f09e10853c3812d6101
Refactor code
artefactual/automation-tools,artefactual/automation-tools
transfers/examples/pre-transfer/00_unbag.py
transfers/examples/pre-transfer/00_unbag.py
#!/usr/bin/env python # Script to re-package unzipped bags as standard transfers, utilizing checksums from bag manifest. # Assumes bags are structured as either bag/data/(content) or bag/data/objects/(content). # Enables use of scripts to add metadata to SIP without failing transfer at bag validation. from __future_...
#!/usr/bin/env python # Script to re-package unzipped bags as standard transfers, utilizing checksums from bag manifest. # Assumes bags are structured as either bag/data/(content) or bag/data/objects/(content). # Enables use of scripts to add metadata to SIP without failing transfer at bag validation. from __future_...
agpl-3.0
Python
2fbd5ceead47ea980e5dfa7b2bc29eafbbab2d72
remove unneeded import in views
arturtamborski/arturtamborskipl,arturtamborski/arturtamborskipl
blog/views.py
blog/views.py
from django.http import Http404 from django.shortcuts import render, get_object_or_404, get_list_or_404 from django.utils import timezone from . import models as blog def home(request): NUM_LAST_ARTICLES = 5 articles = blog.Article.objects.filter(date__lte=timezone.now()).order_by('-date')[:NUM_LAST_ARTICLE...
from django.core.exceptions import ObjectDoesNotExist from django.http import Http404 from django.shortcuts import render, get_object_or_404, get_list_or_404 from django.utils import timezone from . import models as blog def home(request): NUM_LAST_ARTICLES = 5 articles = blog.Article.objects.filter(date__l...
mit
Python
62c76a953ea5a1c753f9c7447bab5800bb25c2b1
add life expantency context bulk down for ihme
semio/ddf_utils
ddf_utils/factory/igme.py
ddf_utils/factory/igme.py
# -*- coding: utf-8 -*- """download sources from CME info portal""" __doc__ = """T.B.D""" import os.path as osp import re import requests import pandas as pd from lxml import html from urllib.parse import urlsplit, urljoin url = 'http://www.childmortality.org/' metadata = None def load_metadata(): r = reque...
# -*- coding: utf-8 -*- """download sources from CME info portal""" __doc__ = """T.B.D""" import os.path as osp import re import requests import pandas as pd from io import BytesIO from lxml import html from urllib.parse import urlsplit, urljoin url = 'http://www.childmortality.org/' metadata = None def load_me...
mit
Python
5dce1ee6c54d8686cee42651528c087e9939368b
Bump version, 0.9.4.21
why2pac/dp-tornado,why2pac/dp-tornado,why2pac/dp-tornado,why2pac/dp-tornado
dp_tornado/version.py
dp_tornado/version.py
__version_info__ = (0, 9, 4, 22) __version__ = '.'.join(map(str, __version_info__))
__version_info__ = (0, 9, 4, 21) __version__ = '.'.join(map(str, __version_info__))
mit
Python
7eca9eb4d5c7134b84c3462ac01cf1679557819f
Update example
arambadk/django-datatable,arambadk/django-datatable,shymonk/django-datatable,shymonk/django-datatable,arambadk/django-datatable,shymonk/django-datatable
example/app/tables.py
example/app/tables.py
#!/usr/bin/env python # coding: utf-8 from table.columns import Column, LinkColumn, DatetimeColumn, Link from table.utils import A from table import Table from models import Person class PersonTable(Table): id = Column(field='id', header=u'#', header_attrs={'width': '5%'}) name = Column(field='nam...
#!/usr/bin/env python # coding: utf-8 from table.columns import Column, LinkColumn, DatetimeColumn, Link from table.utils import A from table import Table from models import Person class PersonTable(Table): id = Column(field='id', header=u'#', header_attrs={'width': '5%'}) name = Column(field='nam...
mit
Python
cd9e9efd8587b5be9e3d9a4e7efeaf26b048b0d2
fix attribute error on handlers loading
dimagi/rapidsms,dimagi/rapidsms
lib/rapidsms/contrib/handlers/settings.py
lib/rapidsms/contrib/handlers/settings.py
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 INSTALLED_HANDLERS = None EXCLUDED_HANDLERS = [] RAPIDSMS_HANDLERS_EXCLUDE_APPS = []
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 INSTALLED_HANDLERS = None EXCLUDED_HANDLERS = []
bsd-3-clause
Python
5223846786b70dd9c198f98f7a620e70b40fab3d
update k84
WatsonDNA/nlp100,wtsnjp/nlp100,wtsnjp/nlp100,WatsonDNA/nlp100
chap09/k84.py
chap09/k84.py
# # usage: python k84.py {N} # import sys import plyvel import struct from math import log def create_matrix(n): co_db = plyvel.DB('./co.ldb', create_if_missing=True) word_db = plyvel.DB('./word.ldb', create_if_missing=True) context_db = plyvel.DB('./context.ldb', create_if_missing=True) matrix_db = p...
# # usage: python k84.py {N} # import sys import plyvel from math import log def wc_matrix(n, ofn): co_db = plyvel.DB('./co.ldb', create_if_missing=True) word_db = plyvel.DB('./word.ldb', create_if_missing=True) context_db = plyvel.DB('./context.ldb', create_if_missing=True) x = 0 ZERO = x.to_byt...
unlicense
Python
241897e2f4596dfee6eae87a6467254e135ac61b
Upgrade ready to fly quads to parts v2.
rcbuild-info/scrape,rcbuild-info/scrape
rcbi/rcbi/spiders/ReadyToFlyQuadsSpider.py
rcbi/rcbi/spiders/ReadyToFlyQuadsSpider.py
import scrapy from scrapy import log from scrapy.spiders import CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor from rcbi.items import Part MANUFACTURERS = ["Tiger", "RTF ", "HQ Prop", "Lemon"] CORRECT = {"Tiger": "T-Motor", "RTF ": "ReadyToFlyQuads", "HQ Prop": "HQProp", "Lemon": "Lemon Rx"} STOCK_...
import scrapy from scrapy import log from scrapy.spiders import CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor from rcbi.items import Part MANUFACTURERS = ["Tiger", "RTF ", "HQ Prop", "Lemon"] CORRECT = {"Tiger": "T-Motor", "RTF ": "ReadyToFlyQuads", "HQ Prop": "HQProp", "Lemon": "Lemon Rx"} class R...
apache-2.0
Python
01003d7b64220b794d8e10e78dd26badef4dfcc5
Fix tests
klen/Flask-Foundation,klen/fquest,klen/tweetchi
base/auth/tests.py
base/auth/tests.py
from flask_testing import TestCase from ..app import create_app from ..config import test from ..ext import db class BaseCoreTest(TestCase): def create_app(self): return create_app(test) def setUp(self): db.create_all() def tearDown(self): db.session.remove() db.drop_al...
from flask_testing import TestCase from ..app import create_app from ..config import test from ..ext import db class BaseCoreTest(TestCase): def create_app(self): return create_app(test) def setUp(self): db.create_all() def tearDown(self): db.session.remove() db.drop_al...
bsd-3-clause
Python
69e760e4a571d16e75f30f1e97ea1a917445f333
Switch to recipe engine "url" module.
CoherentLabs/depot_tools,CoherentLabs/depot_tools
recipes/recipe_modules/gitiles/__init__.py
recipes/recipe_modules/gitiles/__init__.py
DEPS = [ 'recipe_engine/json', 'recipe_engine/path', 'recipe_engine/python', 'recipe_engine/raw_io', 'recipe_engine/url', ]
DEPS = [ 'recipe_engine/json', 'recipe_engine/path', 'recipe_engine/python', 'recipe_engine/raw_io', 'url', ]
bsd-3-clause
Python
bb366439065924732b9b1559a0dc776c586fa07c
fix url
willbarton/regulations-site,willbarton/regulations-site,ascott1/regulations-site,adderall/regulations-site,ascott1/regulations-site,EricSchles/regulations-site,jeremiak/regulations-site,jeremiak/regulations-site,EricSchles/regulations-site,adderall/regulations-site,adderall/regulations-site,EricSchles/regulations-site,...
regulations/tests/selenium/example_test.py
regulations/tests/selenium/example_test.py
import os import unittest import base64 import json import httplib import sys from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait class ExampleTest(unittest.TestCase): def setUp(self): self.capabilities = webdriver.DesiredCapabilities.CHROME self.capabilities['tu...
import os import unittest import base64 import json import httplib import sys from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait class ExampleTest(unittest.TestCase): def setUp(self): self.capabilities = webdriver.DesiredCapabilities.CHROME self.capabilities['tu...
cc0-1.0
Python
bbee1e9b8563d56c0d0acbfc6ae61334f8251159
Reset default value in test so that it doesn't produce error
burnpanck/traits,burnpanck/traits
enthought/traits/tests/undefined_test_case.py
enthought/traits/tests/undefined_test_case.py
import unittest from enthought.traits.api import HasTraits, Str, Undefined, ReadOnly, Float class Foo(HasTraits): name = Str() original_name = ReadOnly bar = Str baz = Float def _name_changed(self): if self.original_name is Undefined: self.original_name = self.name class Bar...
import unittest from enthought.traits.api import HasTraits, Str, Undefined, ReadOnly, Float class Foo(HasTraits): name = Str() original_name = ReadOnly bar = Str baz = Float def _name_changed(self): if self.original_name is Undefined: self.original_name = self.name class Bar...
bsd-3-clause
Python
85f14fffc01002e5a1c0a7a3644a81a4ade61745
Bump dsub version to 0.2.1
DataBiosphere/dsub,DataBiosphere/dsub
dsub/_dsub_version.py
dsub/_dsub_version.py
# Copyright 2017 Google 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 a...
# Copyright 2017 Google 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 a...
apache-2.0
Python
edb6f738979e213cca3fd03991caebdf209b09b9
Fix permissions script
GluuFederation/community-edition-setup,GluuFederation/community-edition-setup,GluuFederation/community-edition-setup
static/extension/dynamic_scope/dynamic_permission.py
static/extension/dynamic_scope/dynamic_permission.py
# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. # Copyright (c) 2016, Gluu # # Author: Yuriy Movchan # from org.xdi.model.custom.script.type.scope import DynamicScopeType from org.xdi.service.cdi.util import CdiUtil from org.xdi.oxauth.service import Us...
# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. # Copyright (c) 2016, Gluu # # Author: Yuriy Movchan # from org.xdi.model.custom.script.type.scope import DynamicScopeType from org.xdi.oxauth.service import UserService from org.xdi.util import StringHelp...
mit
Python
c1923339d7d64b9e85e3a2a1522ff0442e18a798
Update common version (#6060)
Azure/azure-sdk-for-python,Azure/azure-sdk-for-python,Azure/azure-sdk-for-python,Azure/azure-sdk-for-python
sdk/core/azure-common/azure/common/_version.py
sdk/core/azure-common/azure/common/_version.py
#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- VERSION = "...
#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- VERSION = "...
mit
Python
3ff373ed0d5349087a77b2a96af41e0e5cc9c15d
add UI for boardd loopback test
commaai/openpilot,commaai/openpilot,commaai/openpilot,commaai/openpilot,commaai/openpilot,commaai/openpilot
selfdrive/boardd/tests/test_boardd_loopback.py
selfdrive/boardd/tests/test_boardd_loopback.py
#!/usr/bin/env python3 import os import random import time from collections import defaultdict from functools import wraps import cereal.messaging as messaging from cereal import car from common.basedir import PARAMS from common.params import Params from common.spinner import Spinner from panda import Panda from selfd...
#!/usr/bin/env python3 import os import random import time from collections import defaultdict from functools import wraps import cereal.messaging as messaging from cereal import car from common.basedir import PARAMS from common.params import Params from panda import Panda from selfdrive.boardd.boardd import can_list_...
mit
Python
4019372609565b074a5c3ba946245b61c8479ada
update dev version after 2.1.0 tag [skip ci]
desihub/fiberassign,desihub/fiberassign,desihub/fiberassign,desihub/fiberassign
py/fiberassign/_version.py
py/fiberassign/_version.py
__version__ = '2.1.0.dev2650'
__version__ = '2.1.0'
bsd-3-clause
Python
9602574af41a9c09edbc84bf77bde3a285d71741
use datastore client in example
radinformatics/som-tools,radinformatics/som-tools,radinformatics/som-tools,radinformatics/som-tools
examples/google/radiology/upload_storage_radiology.py
examples/google/radiology/upload_storage_radiology.py
#!/usr/bin/env python # RADIOLOGY --------------------------------------------------- # This is an example script to upload data (images, text, metadata) to # google cloud storage and datastore. Data MUST be de-identified import os # Start google storage client for pmc-stanford from som.api.google.datastore import D...
#!/usr/bin/env python # RADIOLOGY --------------------------------------------------- # This is an example script to upload data (images, text, metadata) to # google cloud storage and datastore. Data MUST be de-identified import os # Start google storage client for pmc-stanford from som.api.google import Client clie...
mit
Python
951b6b9cc14e323dc97aa6e67dee17ef110e673f
check for exclusive try/else and if/else
mitar/pychecker,mitar/pychecker
pychecker2/utest/scopes.py
pychecker2/utest/scopes.py
from pychecker2.TestSupport import WarningTester from pychecker2 import ScopeChecks class RedefinedTestCase(WarningTester): def testScopes(self): w = ScopeChecks.RedefineCheck.redefinedScope self.warning('def f(): pass\n' 'def f(): pass\n', 1, w, 'f', 2) ...
from pychecker2.TestSupport import WarningTester from pychecker2 import ScopeChecks class RedefinedTestCase(WarningTester): def testScopes(self): self.warning('def f(): pass\n' 'def f(): pass\n', 1, ScopeChecks.RedefineCheck.redefinedScope, 'f', 2) self.war...
bsd-3-clause
Python
a434050e0f1c9f3e162898a3687cd7de8b77980c
Update load.py
simphony/simphony-mayavi
simphony_mayavi/load.py
simphony_mayavi/load.py
from mayavi.core.api import registry from simphony_mayavi.adapt2cuds import adapt2cuds def load(filename, name=None, kind=None, rename_arrays=None): """ Load the file data into a CUDS container. """ data_set = _read(filename) return adapt2cuds( data_set, name, kind, rename_arrays) def _rea...
from mayavi.core.api import registry from simphony_mayavi.adapt2cuds import adapt2cuds def load(filename, name=None, kind=None, rename_arrays=None): """ Load the file data into a CUDS container. """ data_set = _read(filename) return adapt2cuds( data_set, name, kind, rename_arrays) def _rea...
bsd-2-clause
Python
2bf0c9e0d8bbce50f06ca08c79f97ecf5b76e21b
Fix logging
thombashi/SimpleSQLite,thombashi/SimpleSQLite
simplesqlite/_logger.py
simplesqlite/_logger.py
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import, unicode_literals import logbook import sqliteschema import tabledata logger = logbook.Logger("SimpleSQLie") logger.disable() def set_logger(is_enable): if is_enable != logger.disa...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import, unicode_literals import logbook import tabledata logger = logbook.Logger("SimpleSQLie") logger.disable() def set_logger(is_enable): if is_enable != logger.disabled: return...
mit
Python
930508e5ec00d9f174409097ba54e70c7c6b2b3c
Fix #421: RPN_DEFNS needs to passed to Pelegant via env
radiasoft/sirepo,radiasoft/sirepo,radiasoft/sirepo,mrakitin/sirepo,mrakitin/sirepo,mkeilman/sirepo,radiasoft/sirepo,mkeilman/sirepo,mkeilman/sirepo,mrakitin/sirepo,mrakitin/sirepo,radiasoft/sirepo,mkeilman/sirepo
sirepo/pkcli/elegant.py
sirepo/pkcli/elegant.py
# -*- coding: utf-8 -*- """Wrapper to run elegant from the command line. :copyright: Copyright (c) 2015 RadiaSoft LLC. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function from pykern import pkio from pykern import pkresour...
# -*- coding: utf-8 -*- """Wrapper to run elegant from the command line. :copyright: Copyright (c) 2015 RadiaSoft LLC. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function from pykern import pkio from pykern import pkresour...
apache-2.0
Python
5c8a6072309989ac97eefc2a6f63a6082a2c5ff0
Update matching_specific_string.py
JsWatt/Free-Parking,JsWatt/Free-Parking,JsWatt/Free-Parking,JsWatt/Free-Parking,JsWatt/Free-Parking,JsWatt/Free-Parking,JsWatt/Free-Parking,JsWatt/Free-Parking
hacker_rank/contests/regular_expresso/matching_specific_string.py
hacker_rank/contests/regular_expresso/matching_specific_string.py
Regex_Pattern = r'hackerrank' # Do not delete 'r'.
mit
Python
05b15f2db049e8b722f17867f5163c0b6e3a3108
Allow POST to /git-update url.
m-allanson/pelican-themes,m-allanson/pelican-themes
pthemes.py
pthemes.py
import os import logging from flask import Flask, render_template, redirect, url_for, flash from pq import PQ from api import APIGrabber from db import PonyDB logging.basicConfig() # Config # --------------- # App config app = Flask(__name__) app.config.from_object(os.environ.get('APP_SETTINGS', None)) db = PonyDB(a...
import os import logging from flask import Flask, render_template, redirect, url_for, flash from pq import PQ from api import APIGrabber from db import PonyDB logging.basicConfig() # Config # --------------- # App config app = Flask(__name__) app.config.from_object(os.environ.get('APP_SETTINGS', None)) db = PonyDB(a...
mit
Python
8f4f902042b848a6a212ae966aaf6435ae8d5c77
set background as a widget
angelonuffer/Sheldon-Chess,angelonuffer/Sheldon-Chess,angelonuffer/Sheldon-Chess
sheldonchess/interface/web/sheldonchess.py
sheldonchess/interface/web/sheldonchess.py
from rajesh import Application, run, expr from rajesh.element import Img, Div from screens import MainMenu, NormalGameLobby class Player(object): def __init__(self, app): self.app = app self.name = "" class SheldonChess(Application): def begin(self): self.player = Player(self) ...
from rajesh import Application, run, expr from rajesh.element import Img, Div from screens import MainMenu, NormalGameLobby class Player(object): def __init__(self, app): self.app = app self.name = "" class SheldonChess(Application): def begin(self): self.player = Player(self) ...
mit
Python
fac2c5752c23d2fd415caafd2654f696c4842806
Bump version.
bboe/pyramid_addons,bboe/pyramid_addons
pyramid_addons/__init__.py
pyramid_addons/__init__.py
__version__ = '0.21'
__version__ = '0.20'
bsd-2-clause
Python
8e4a5ef25c87879fb01aa79f88c6c6a833820f8b
bump version
dpressel/baseline,dpressel/baseline,dpressel/baseline,dpressel/baseline
python/baseline/version.py
python/baseline/version.py
__version__ = "1.1.3"
__version__ = "1.1.2"
apache-2.0
Python
86768d83067745def16761db24ce496e3125399e
test script works
oelarnes/mtgreatest,oelarnes/mtgreatest
mtgreatest/process_results/test_script.py
mtgreatest/process_results/test_script.py
#!/usr/bin/env python import scrape_results from mtgreatest.rdb import Cursor cursor = Cursor() event_info = cursor.execute('select event_id, event_link from event_table where results_loaded = 1') event_info = [dict(zip(('event_id','event_link'), item)) for item in event_info] #this should be a method (or default re...
#!/usr/bin/env python import scrape_results from mtgreatest.rdb import Cursor cursor = Cursor() event_info = cursor.execute('select event_id, event_link from event_table where results_loaded = 1') event_info = [dict(zip(('event_id','event_link'), item)) for item in event_info] #this should be a method (or default re...
mit
Python
e164a3ccb7625d4f36c83628aa6f7f030f38d6cf
remove normalized test
dmoliveira/networkx,harlowja/networkx,bzero/networkx,Sixshaman/networkx,michaelpacer/networkx,dhimmel/networkx,beni55/networkx,debsankha/networkx,ltiao/networkx,ghdk/networkx,jakevdp/networkx,nathania/networkx,kernc/networkx,RMKD/networkx,aureooms/networkx,ionanrozenfeld/networkx,RMKD/networkx,debsankha/networkx,OrkoHu...
networkx/algorithms/tests/test_smetric.py
networkx/algorithms/tests/test_smetric.py
from nose.tools import assert_equal import networkx as nx def test_smetric(): g = nx.Graph() g.add_edge(1,2) g.add_edge(2,3) g.add_edge(2,4) g.add_edge(1,4) sm = nx.s_metric(g,normalized=False) assert_equal(sm, 19.0) # smNorm = nx.s_metric(g,normalized=True) # assert_equal(smNorm, 0...
from nose.tools import assert_equal import networkx as nx def test_smetric(): g = nx.Graph() g.add_edge(1,2) g.add_edge(2,3) g.add_edge(2,4) g.add_edge(1,4) sm = nx.s_metric(g,normalized=False) assert_equal(sm, 19.0) smNorm = nx.s_metric(g,normalized=True) # assert_equal(smNorm, 0....
bsd-3-clause
Python
3de294f3492f7a3f796c162113c8b4298347e900
expand on tests
kaczmarj/neurodocker,kaczmarj/neurodocker
neurodocker/interfaces/tests/test_ants.py
neurodocker/interfaces/tests/test_ants.py
"""Tests for neurodocker.interfaces.ANTs""" # Author: Jakub Kaczmarzyk <jakubk@mit.edu> from __future__ import absolute_import, division, print_function import pytest from neurodocker.interfaces import ANTs from neurodocker.interfaces.tests import utils class TestANTs(object): """Tests for ANTs class.""" ...
"""Tests for neurodocker.interfaces.ANTs""" # Author: Jakub Kaczmarzyk <jakubk@mit.edu> from __future__ import absolute_import, division, print_function from neurodocker.interfaces import ANTs from neurodocker.interfaces.tests import utils class TestANTs(object): """Tests for ANTs class.""" def test_build_i...
apache-2.0
Python
d1490510cd5f66a5da699ffea39b6a8b37c88f01
add test for composite potential
adrn/gary,adrn/gary,adrn/gala,adrn/gala,adrn/gary,adrn/gala
gary/potential/tests/test_io.py
gary/potential/tests/test_io.py
# coding: utf-8 """ test reading/writing potentials to files """ from __future__ import division, print_function __author__ = "adrn <adrn@astro.columbia.edu>" # Standard library import os # Third-party import numpy as np # Project from ..io import read, write from ..builtin import IsochronePotential from ..custom...
# coding: utf-8 """ test reading/writing potentials to files """ from __future__ import division, print_function __author__ = "adrn <adrn@astro.columbia.edu>" # Standard library import os # Third-party import numpy as np # Project from ..io import read, write from ..builtin import IsochronePotential from ...units...
mit
Python
db69d08b61f83703fc40ef7273cba1b2e0b825a3
stop checking if an entry already exists when polling
Nurdok/nextfeed,Nurdok/nextfeed,Nurdok/nextfeed,Nurdok/nextfeed,Nurdok/nextfeed
feeds/tasks.py
feeds/tasks.py
import time import feedparser from celery import task from feeds.models import Feed, Entry from django.core.exceptions import ObjectDoesNotExist from profiles.models import UserProfile, UserEntryDetail def poll_feed(feed): parser = feedparser.parse(feed.link) # Add entries from feed entries = parser.entr...
import time import feedparser from celery import task from feeds.models import Feed, Entry from django.core.exceptions import ObjectDoesNotExist from profiles.models import UserProfile, UserEntryDetail def poll_feed(feed): parser = feedparser.parse(feed.link) # Add entries from feed entries = parser.entr...
mit
Python
81806fe89b9c4a364d373020bd56ee1a396a5858
Add automatic escaping of the settings docstring for Windows' sake in py3k
jamesbeebop/evennia,jamesbeebop/evennia,jamesbeebop/evennia
evennia/game_template/server/conf/settings.py
evennia/game_template/server/conf/settings.py
r""" Evennia settings file. The available options are found in the default settings file found here: {settings_default} Remember: Don't copy more from the default file than you actually intend to change; this will make sure that you don't overload upstream updates unnecessarily. When changing a setting requiring a...
""" Evennia settings file. The available options are found in the default settings file found here: {settings_default} Remember: Don't copy more from the default file than you actually intend to change; this will make sure that you don't overload upstream updates unnecessarily. When changing a setting requiring a ...
bsd-3-clause
Python
a85f6f86522dbb984818defc0d5c3cee049f1341
add simple async post support
xsank/Pyeventbus,xsank/Pyeventbus
eventbus/eventbus.py
eventbus/eventbus.py
__author__ = 'Xsank' import inspect from multiprocessing.pool import ThreadPool from listener import Listener from exception import RegisterError from exception import UnregisterError class EventBus(object): def __init__(self,pool_size=4): self.listeners=dict() self.pool=ThreadPool(pool_size) ...
__author__ = 'Xsank' import inspect from listener import Listener from exception import RegisterError from exception import UnregisterError class EventBus(object): def __init__(self): self.listeners=dict() def register(self,listener): if not isinstance(listener,Listener): raise R...
mit
Python
30e00089247b314e82bc7792ac6f9641cd632bbd
Bump to dev.
tempbottle/eventlet,tempbottle/eventlet,collinstocks/eventlet,collinstocks/eventlet,lindenlab/eventlet,lindenlab/eventlet,lindenlab/eventlet
eventlet/__init__.py
eventlet/__init__.py
version_info = (0, 9, 16, "dev") __version__ = ".".join(map(str, version_info)) try: from eventlet import greenthread from eventlet import greenpool from eventlet import queue from eventlet import timeout from eventlet import patcher from eventlet import convenience import greenlet sle...
version_info = (0, 9, 15) __version__ = ".".join(map(str, version_info)) try: from eventlet import greenthread from eventlet import greenpool from eventlet import queue from eventlet import timeout from eventlet import patcher from eventlet import convenience import greenlet sleep = gr...
mit
Python
22f373c0e6ef3a2c7bfb128ad014af245f113ea9
Add default serial baudrate.
pollen/pyrobus
robus/io/serial_io.py
robus/io/serial_io.py
import serial as _serial from serial.tools.list_ports import comports from . import IOHandler class Serial(IOHandler): @classmethod def is_host_compatible(cls, host): available_host = (p.device for p in comports()) return host in available_host def __init__(self, host, baudrate=57600): ...
import serial as _serial from serial.tools.list_ports import comports from . import IOHandler class Serial(IOHandler): @classmethod def is_host_compatible(cls, host): available_host = (p.device for p in comports()) return host in available_host def __init__(self, host, baudrate): ...
mit
Python
e0024790be3a85e529c93397500e4f736c82a5ef
Fix the runner for Python 2.
calmjs/calmjs.parse
src/calmjs/parse/tests/test_testing.py
src/calmjs/parse/tests/test_testing.py
# -*- coding: utf-8 -*- import unittest from calmjs.parse.testing.util import build_equality_testcase from calmjs.parse.testing.util import build_exception_testcase def run(self): """ A dummy run method. """ class BuilderEqualityTestCase(unittest.TestCase): def test_build_equality_testcase(self): ...
# -*- coding: utf-8 -*- import unittest from calmjs.parse.testing.util import build_equality_testcase from calmjs.parse.testing.util import build_exception_testcase class BuilderEqualityTestCase(unittest.TestCase): def test_build_equality_testcase(self): DummyTestCase = build_equality_testcase('DummyTes...
mit
Python
d926c984e895b68ad0cc0383926451c0d7249512
Fix use of deprecated find_module
saimn/astropy,lpsinger/astropy,mhvk/astropy,lpsinger/astropy,pllim/astropy,astropy/astropy,lpsinger/astropy,larrybradley/astropy,StuartLittlefair/astropy,astropy/astropy,pllim/astropy,saimn/astropy,saimn/astropy,StuartLittlefair/astropy,astropy/astropy,StuartLittlefair/astropy,astropy/astropy,mhvk/astropy,astropy/astro...
astropy/tests/tests/test_imports.py
astropy/tests/tests/test_imports.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pkgutil def test_imports(): """ This just imports all modules in astropy, making sure they don't have any dependencies that sneak through """ def onerror(name): # We should raise any legitimate error that occurred, but...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pkgutil def test_imports(): """ This just imports all modules in astropy, making sure they don't have any dependencies that sneak through """ def onerror(name): # We should raise any legitimate error that occurred, but...
bsd-3-clause
Python
8864d0f7ea909bebda68b28ad53a312c10af581e
Update ClientCredentials tutorial to use Python3
MyPureCloud/developercenter-tutorials,MyPureCloud/developercenter-tutorials,MyPureCloud/developercenter-tutorials,MyPureCloud/developercenter-tutorials,MyPureCloud/developercenter-tutorials,MyPureCloud/developercenter-tutorials,MyPureCloud/developercenter-tutorials,MyPureCloud/developercenter-tutorials
oauth-client-credentials/python/script.py
oauth-client-credentials/python/script.py
import base64, requests, sys print("-----------------------------------------------") print("- PureCloud Python Client Credentials Example -") print("-----------------------------------------------") client_id = "CLIENT_ID" client_secret = "CLIENT_SECRET" # Base64 encode the client ID and client secret authorization ...
import base64, requests, sys print '-----------------------------------------------' print '- PureCloud Python Client Credentials Example -' print '-----------------------------------------------' clientId = '7de3af06-c0b3-4f9b-af45-72f4a1403797' clientSecret = '1duphi_YtswNjN2GXOg_APY-KKTmnYXvfNj7N8GUhnM' # Base64 e...
mit
Python
c479c360d979d22182e787f74f5a74473fc41002
Save sales ranges only when the forms data is changed
suutari/shoop,shoopio/shoop,shawnadelic/shuup,suutari-ai/shoop,suutari-ai/shoop,shoopio/shoop,hrayr-artunyan/shuup,suutari/shoop,shoopio/shoop,shawnadelic/shuup,hrayr-artunyan/shuup,suutari/shoop,suutari-ai/shoop,hrayr-artunyan/shuup,shawnadelic/shuup
shoop/campaigns/admin_module/form_parts.py
shoop/campaigns/admin_module/form_parts.py
# This file is part of Shoop. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django import forms from django.utils.translation impo...
# This file is part of Shoop. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django import forms from django.utils.translation impo...
agpl-3.0
Python
029e39edfb733a524d7ea4fc7f64fa93e81b9f53
Add SACREBLEU_DIR and smart_open to imports (#73)
mjpost/sacreBLEU,mjpost/sacreBLEU
sacrebleu/__init__.py
sacrebleu/__init__.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2017--2018 Amazon.com, Inc. or its affiliates. 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. A copy of the License # is located at # # http://aws....
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2017--2018 Amazon.com, Inc. or its affiliates. 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. A copy of the License # is located at # # http://aws....
apache-2.0
Python
9fdcc147a754e3b4f85decb858066610652bd713
update version. (#5439)
iulian787/spack,LLNL/spack,iulian787/spack,EmreAtes/spack,mfherbst/spack,tmerrick1/spack,TheTimmy/spack,skosukhin/spack,TheTimmy/spack,EmreAtes/spack,LLNL/spack,LLNL/spack,krafczyk/spack,TheTimmy/spack,matthiasdiener/spack,iulian787/spack,TheTimmy/spack,mfherbst/spack,LLNL/spack,skosukhin/spack,matthiasdiener/spack,sko...
var/spack/repos/builtin/packages/r-tibble/package.py
var/spack/repos/builtin/packages/r-tibble/package.py
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
Python