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
c082edf34a51fd0e587a8fbc7bcf4cf18838462d
Fix for python 2.6 support
jmlong1027/multiscanner,jmlong1027/multiscanner,jmlong1027/multiscanner,mitre/multiscanner,MITRECND/multiscanner,MITRECND/multiscanner,awest1339/multiscanner,mitre/multiscanner,awest1339/multiscanner,jmlong1027/multiscanner,awest1339/multiscanner,mitre/multiscanner,awest1339/multiscanner
modules/libmagic.py
modules/libmagic.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import division, absolute_import, with_statement, print_function, unicode_literals try: import m...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import division, absolute_import, with_statement, print_function, unicode_literals try: import m...
mpl-2.0
Python
f8cc84282e6529f538a41d1ae69b38b250eac8f2
Correct logging output for gpgsign when already signed
matlink/fdroidserver,OneEducation/AppUniverse_Server,f-droid/fdroid-server,f-droid/fdroidserver,f-droid/fdroid-server,f-droid/fdroid-server,OneEducation/AppUniverse_Server,f-droid/fdroidserver,f-droid/fdroid-server,matlink/fdroidserver,fdroidtravis/fdroidserver,f-droid/fdroid-server,f-droid/fdroidserver,fdroidtravis/fd...
fdroidserver/gpgsign.py
fdroidserver/gpgsign.py
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # publish.py - part of the FDroid server tools # Copyright (C) 2010-2014, Ciaran Gultnieks, ciaran@ciarang.com # Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # publish.py - part of the FDroid server tools # Copyright (C) 2010-2014, Ciaran Gultnieks, ciaran@ciarang.com # Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
Python
f40ea65a4fbe99b5b09b803a88ef44583e3b0e73
enable empty run list and empty attributes
Fewbytes/cosmo-plugin-chef-middleware-installer
chef_middleware_installer/tasks.py
chef_middleware_installer/tasks.py
#/******************************************************************************* # * Copyright (c) 2013 GigaSpaces Technologies Ltd. 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...
#/******************************************************************************* # * Copyright (c) 2013 GigaSpaces Technologies Ltd. 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...
apache-2.0
Python
3a1c8c0332ac2fc6802caefe4406664f39d3f956
fix issue when running notes.py directly
axelhodler/notesdude,axelhodler/notesdude
notes.py
notes.py
from bottle import Bottle, route, run, template, request, static_file, error, SimpleTemplate, response, redirect from beaker.middleware import SessionMiddleware import bottle import dbaccessor DB = 'notes.db' USERNAME = 'xorrr' PASSWORD = 'test' SESSION_OPTS = { 'session.type': 'file', 'session.cookie_expires...
from bottle import Bottle, route, run, template, request, static_file, error, SimpleTemplate, response, redirect from beaker.middleware import SessionMiddleware import bottle import dbaccessor DB = 'notes.db' USERNAME = 'xorrr' PASSWORD = 'test' SESSION_OPTS = { 'session.type': 'file', 'session.cookie_expires...
mit
Python
e9089f684787f77bf61f5bd758be5860c2d59b9d
fix indent
shortdudey123/gbot
modules/setTopic.py
modules/setTopic.py
#!/usr/bin/env python # ============================================================================= # file = opme.py # description = gbot module # author = GR <https://github.com/shortdudey123> # create_date = 2014-07-12 # mod_date = 2014-07-12 # version = 0.1 # usage = loaded by gbot # notes = # python_ver = 2.7.6 #...
#!/usr/bin/env python # ============================================================================= # file = opme.py # description = gbot module # author = GR <https://github.com/shortdudey123> # create_date = 2014-07-12 # mod_date = 2014-07-12 # version = 0.1 # usage = loaded by gbot # notes = # python_ver = 2.7.6 #...
apache-2.0
Python
5afd5ee8a7ff1b0a6720b57605140ec279da123f
Debug off for production settings.
WillWeatherford/deliver-cute,WillWeatherford/deliver-cute
delivercute/production_settings.py
delivercute/production_settings.py
"""Overwrite and add settings specifically for production deployed instance.""" from delivercute.settings import * DEBUG = False ALLOWED_HOSTS.append('.us-west-2.compute.amazonaws.com') STATIC_ROOT = os.path.join(BASE_DIR, 'static') STATICFILES_DIRS = ()
"""Overwrite and add settings specifically for production deployed instance.""" from delivercute.settings import * # DEBUG = False ALLOWED_HOSTS.append('.us-west-2.compute.amazonaws.com') STATIC_ROOT = os.path.join(BASE_DIR, 'static') STATICFILES_DIRS = ()
mit
Python
e01f1bfefccc69cf51f7cd245324427d712b8904
Update version
tangochin/django-seo,whyflyru/django-seo,whyflyru/django-seo,tangochin/django-seo
djangoseo/version.py
djangoseo/version.py
# -*- coding:utf-8 -*- VERSION = (2, 3, '1wf', 'final', 0) def get_version(): global VERSION version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version elif VERSION[3] != '...
# -*- coding:utf-8 -*- VERSION = (2, 3, '0wf', 'final', 0) def get_version(): global VERSION version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version elif VERSION[3] != '...
bsd-3-clause
Python
0c28d2971449fc46f967ae30c02efc80e32cea42
Bump version to 0.6.0.
vden/djoauth2-ng,Locu/djoauth2,vden/djoauth2-ng,seler/djoauth2,seler/djoauth2,Locu/djoauth2
djoauth2/__init__.py
djoauth2/__init__.py
# coding: utf-8 __version__ = '0.6.0'
# coding: utf-8 __version__ = '0.5.0'
mit
Python
84b3788fd8843daa31c7c06adc8d7387b0b37c7b
Update __init__.py
davidmiller/dmswitch,rossjones/dmswitch
dmswitch/__init__.py
dmswitch/__init__.py
# this is a namespace package __import__('pkg_resources').declare_namespace(__name__)
# this is a namespace package try: declare_namespace(__name__) except NameError: print "Failed to declare_namespace()"
mit
Python
fab8f2cf540526da8aa485e36a9bf429ee16d8a1
Include test_list.py in the test-suite.
lpod/lpod-docs,lpod/lpod-docs,Agicia/lpod-python,Agicia/lpod-python
python/test/test.py
python/test/test.py
# -*- coding: UTF-8 -*- # Copyright (C) 2009 Itaapy, ArsAperta, Pierlis, Talend # Import from the Standard Library from unittest import TestLoader, TestSuite, TextTestRunner # Import tests import test_container import test_content import test_document import test_meta import test_style import test_styles import test_...
# -*- coding: UTF-8 -*- # Copyright (C) 2009 Itaapy, ArsAperta, Pierlis, Talend # Import from the Standard Library from unittest import TestLoader, TestSuite, TextTestRunner # Import tests import test_container import test_content import test_document import test_meta import test_style import test_styles import test_...
apache-2.0
Python
a09ec0df0beef5cba9e7568eb436a279139a804f
Fix translations
DMPwerkzeug/DMPwerkzeug,DMPwerkzeug/DMPwerkzeug,rdmorganiser/rdmo,rdmorganiser/rdmo,rdmorganiser/rdmo,DMPwerkzeug/DMPwerkzeug
rdmo/core/models.py
rdmo/core/models.py
from django.db import models from django.utils.timezone import now from django.utils.translation import get_language from django.utils.translation import ugettext_lazy as _ from rdmo.core.utils import get_languages class Model(models.Model): created = models.DateTimeField(editable=False, verbose_name=_('created'...
from django.db import models from django.utils.timezone import now from django.utils.translation import get_language from django.utils.translation import ugettext_lazy as _ from rdmo.core.utils import get_languages class Model(models.Model): created = models.DateTimeField(editable=False, verbose_name=_('created'...
apache-2.0
Python
4c91c49a1c31e1adce3570f00123629cf62456eb
use codecs.open in raw_include
numbas/editor,numbas/editor,numbas/editor
editor/templatetags/raw_include.py
editor/templatetags/raw_include.py
""" from https://djangosnippets.org/snippets/10574/ """ from django import template from django.conf import settings from django.utils.safestring import mark_safe from django.contrib.staticfiles import finders from django.contrib.staticfiles.storage import staticfiles_storage import codecs register = template.Library(...
""" from https://djangosnippets.org/snippets/10574/ """ from django import template from django.conf import settings from django.utils.safestring import mark_safe from django.contrib.staticfiles import finders from django.contrib.staticfiles.storage import staticfiles_storage register = template.Library() @register.s...
apache-2.0
Python
8b924cffbfcf6941686ff32c0d262228237ddde0
Update hashed model_bakery password
studentenportal/web,studentenportal/web,studentenportal/web,studentenportal/web,studentenportal/web
apps/front/baker_recipes.py
apps/front/baker_recipes.py
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals from django.contrib.auth import get_user_model from model_bakery.recipe import Recipe User = get_user_model() user = Recipe(User, username='testuser', password='pbkdf2_sha256$36000$pFltpNNB0Q2H$zd9qOeV...
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals from django.contrib.auth import get_user_model from model_bakery.recipe import Recipe User = get_user_model() user = Recipe(User, username='testuser', password='sha1$4b2d5$c6ff8b2ff002131f58cfb0a5b43a6...
agpl-3.0
Python
449bc0bd7f1046a8b0220fd37af03d804098ae4f
Fix autoshun parser on python 3.4
certtools/intelmq,aaronkaplan/intelmq,aaronkaplan/intelmq,aaronkaplan/intelmq,certtools/intelmq,certtools/intelmq
intelmq/bots/parsers/autoshun/parser.py
intelmq/bots/parsers/autoshun/parser.py
# -*- coding: utf-8 -*- import html import html.parser import sys from intelmq.lib import utils from intelmq.lib.bot import ParserBot from intelmq.lib.harmonization import ClassificationType TAXONOMY = { "brute force": "brute-force", "bruteforce": "brute-force", "scan": "scanner", "cve": "exploit", ...
# -*- coding: utf-8 -*- import html import html.parser import sys from intelmq.lib import utils from intelmq.lib.bot import ParserBot from intelmq.lib.harmonization import ClassificationType TAXONOMY = { "brute force": "brute-force", "bruteforce": "brute-force", "scan": "scanner", "cve": "exploit", ...
agpl-3.0
Python
e168a09607defb9e2e3e7d1b4ca36caf4c610d1b
Update apps.py
antonc42/taiga-contrib-ldap-auth,ensky/taiga-contrib-ldap-auth
taiga_contrib_ldap_auth/apps.py
taiga_contrib_ldap_auth/apps.py
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # 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 F...
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # 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 F...
agpl-3.0
Python
6e13695feba36dc638f6c62b5d02bf9edb1ef609
Bump version to beta.
mdickinson/refcycle
refcycle/version.py
refcycle/version.py
# Copyright 2013 Mark Dickinson # # 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,...
# Copyright 2013 Mark Dickinson # # 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,...
apache-2.0
Python
f2c0dc8a9749fd3afa2594a584a50dd28cb03f5c
support outputting binary numbers as 32 bits
theonewolf/prngs
src/wolf_random1.py
src/wolf_random1.py
#!/usr/bin/env python # # Description: This is my attempt at making a PRNG. It is my first attempt # ever. It is inspired from other PRNG's I have seen, but was done off the # top of my head while very tired---so I don't expect it to be good at all. # # In fact, I bet it's horrible. But this was just for fun. # # Au...
#!/usr/bin/env python # # Description: This is my attempt at making a PRNG. It is my first attempt # ever. It is inspired from other PRNG's I have seen, but was done off the # top of my head while very tired---so I don't expect it to be good at all. # # In fact, I bet it's horrible. But this was just for fun. # # Au...
unlicense
Python
69f9c1ba2d7e638670357bf812b42a10ab83fb91
Discard instances of ResourceNotFoundException
wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api
shared_infra/dynamo_write_heartbeat/src/dynamo_write_heartbeat.py
shared_infra/dynamo_write_heartbeat/src/dynamo_write_heartbeat.py
# -*- encoding: utf-8 -*- """ Run a no-op write on DynamoDB (delete a non existent item) to be run in a scheduled lambda to make DynamoDB scale down when there would otherwise be zero throughput and it otherwise wouldn't. TABLE_NAMES: comma separated list of dynamoDb tables to call """ import os import boto3 from bo...
# -*- encoding: utf-8 -*- """ Run a no-op write on DynamoDB (delete a non existent item) to be run in a scheduled lambda to make DynamoDB scale down when there would otherwise be zero throughput and it otherwise wouldn't. TABLE_NAMES: comma separated list of dynamoDb tables to call """ import os import boto3 from bo...
mit
Python
8a9844012ac273c0a396cc0128a3eaa596116176
Use stencila.io buckets and domain names
stencila/hub,stencila/hub,stencila/hub,stencila/hub,stencila/hub
director/general/custom_storages.py
director/general/custom_storages.py
''' Allow for one S3 bucket with different roots for static and "media" (user uploads) See: http://stackoverflow.com/questions/10390244/how-to-set-up-a-django-project-with-django-storages-and-amazon-s3-but-with-diff https://gist.github.com/defrex/82680e858281d3d3e6e4 http://www.laurii.info/2013/05/improve-s3boto-dj...
''' Allow for one S3 bucket with different roots for static and "media" (user uploads) See: http://stackoverflow.com/questions/10390244/how-to-set-up-a-django-project-with-django-storages-and-amazon-s3-but-with-diff https://gist.github.com/defrex/82680e858281d3d3e6e4 http://www.laurii.info/2013/05/improve-s3boto-dj...
apache-2.0
Python
180c3a3cf797ba1255f015176296e92e6d6531e3
add another candidate in /sys
hpc/charliecloud,hpc/charliecloud,hpc/charliecloud
test/chtest/dev_proc_sys.py
test/chtest/dev_proc_sys.py
#!/usr/bin/env python3 import os.path import sys # File in /sys seem to vary between Linux systems. Thus, try a few candidates # and use the first one that exists. What we want is any file under /sys with # permissions root:root -rw-------. sys_file = None for f in ("/sys/devices/cpu/rdpmc", "/sys/kernel/mm...
#!/usr/bin/env python3 import os.path import sys # File in /sys seem to vary between Linux systems. Thus, try a few candidates # and use the first one that exists. sys_file = None for f in ("/sys/devices/cpu/rdpmc", "/sys/kernel/mm/page_idle/bitmap"): if (os.path.exists(f)): sys_file = f break problem...
apache-2.0
Python
addb81f7fe22352f271764102504aab31fb74a13
Adjust the path converters in urls.
unt-libraries/django-nomination,unt-libraries/django-nomination,unt-libraries/django-nomination
nomination/urls.py
nomination/urls.py
from django.urls import re_path, path from nomination.views import ( project_listing, robot_ban, nomination_about, nomination_help, url_lookup, search_json, browse_json, project_dump, url_score_report, url_nomination_report, url_date_report, url_report, surt_report, nominator_report, nominator_url_report, f...
from django.urls import re_path, path from nomination.views import ( project_listing, robot_ban, nomination_about, nomination_help, url_lookup, search_json, browse_json, project_dump, url_score_report, url_nomination_report, url_date_report, url_report, surt_report, nominator_report, nominator_url_report, f...
bsd-3-clause
Python
f3f55bde247497d340944056007870a543d27e05
Bump wirecloud version
jpajuelo/wirecloud,rockneurotiko/wirecloud,rockneurotiko/wirecloud,jpajuelo/wirecloud,rockneurotiko/wirecloud,rockneurotiko/wirecloud,jpajuelo/wirecloud,jpajuelo/wirecloud
src/wirecloud/platform/__init__.py
src/wirecloud/platform/__init__.py
# -*- coding: utf-8 -*- # Copyright (c) 2011-2013 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud 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 v...
# -*- coding: utf-8 -*- # Copyright (c) 2011-2013 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud 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 v...
agpl-3.0
Python
0038c29e399a6a89908b96df4dcff3be65d41aca
check deleted modules in dataflow/ to fix 'git pull' users
ppwwyyxx/tensorpack,ppwwyyxx/tensorpack,eyaler/tensorpack,eyaler/tensorpack
tensorpack/dataflow/__init__.py
tensorpack/dataflow/__init__.py
# -*- coding: UTF-8 -*- # File: __init__.py # Author: Yuxin Wu <ppwwyyxx@gmail.com> from pkgutil import iter_modules import os import os.path __all__ = [] def _global_import(name): p = __import__(name, globals(), locals(), level=1) lst = p.__all__ if '__all__' in dir(p) else dir(p) del globals()[name...
# -*- coding: UTF-8 -*- # File: __init__.py # Author: Yuxin Wu <ppwwyyxx@gmail.com> from pkgutil import iter_modules import os import os.path __all__ = [] def _global_import(name): p = __import__(name, globals(), locals(), level=1) lst = p.__all__ if '__all__' in dir(p) else dir(p) del globals()[name...
apache-2.0
Python
8b6da16f6809e4d0d5c0f95b0cc54b9a472ba327
Remove manually default settings; sublime takes care of that itself
Zeeker/sublime-SessionManager
modules/settings.py
modules/settings.py
import sublime _settings_file = "SessionManager.sublime-settings" _subl_settings = {} def load(): global _subl_settings _subl_settings = sublime.load_settings(_settings_file) def get(key): return _subl_settings.get(key)
import sublime _settings_file = "SessionManager.sublime-settings" _subl_settings = {} _default_settings = { "session_path": "" } def load(): global _subl_settings _subl_settings = sublime.load_settings(_settings_file) def get(key): return _subl_settings.get(key, _default_settings[key])
mit
Python
dda11da40e055fa8bec53fbed3f634c3b83bc163
Rename variable from plugin_instance to plugin_impl
emedvedev/st2,nzlosh/st2,jtopjian/st2,tonybaloney/st2,emedvedev/st2,tonybaloney/st2,alfasin/st2,punalpatel/st2,pinterb/st2,pinterb/st2,lakshmi-kannan/st2,armab/st2,StackStorm/st2,alfasin/st2,Plexxi/st2,armab/st2,pixelrebel/st2,punalpatel/st2,nzlosh/st2,tonybaloney/st2,lakshmi-kannan/st2,Plexxi/st2,Itxaka/st2,jtopjian/s...
st2common/st2common/util/loader.py
st2common/st2common/util/loader.py
import importlib import inspect import logging import os import sys LOG = logging.getLogger(__name__) PYTHON_EXTENSIONS = ('.py') def __register_plugin_path(plugin_dir_abs_path): if not os.path.isdir(plugin_dir_abs_path): raise Exception('Directory containing plugins must be provided.') for x in sys....
import importlib import inspect import logging import os import sys LOG = logging.getLogger(__name__) PYTHON_EXTENSIONS = ('.py') def __register_plugin_path(plugin_dir_abs_path): if not os.path.isdir(plugin_dir_abs_path): raise Exception('Directory containing plugins must be provided.') for x in sys....
apache-2.0
Python
89b2fd8969438ef4f8ab4c53e3e35cd28ebfd8d7
fix number replacement
dragoon/kilogram,dragoon/kilogram,dragoon/kilogram
kilogram/dataset/wikipedia/entities.py
kilogram/dataset/wikipedia/entities.py
import re from ...lang import number_replace from ...lang.tokenize import wiki_tokenize_func ENTITY_MATCH_RE = re.compile(r'<(.+)\|(.+)>') def parse_types_text(text, dbpedia_redirects, dbpedia_types, numeric=True): """ :type dbpedia_types: dict :type dbpedia_redirects: dict """ line = wiki_token...
import re from ...lang import number_replace from ...lang.tokenize import wiki_tokenize_func ENTITY_MATCH_RE = re.compile(r'<(.+)\|(.+)>') def parse_types_text(text, dbpedia_redirects, dbpedia_types, numeric=True): """ :type dbpedia_types: dict :type dbpedia_redirects: dict """ line = wiki_token...
apache-2.0
Python
c40135f849cfa0cfce692cae0e7195d704879c68
support for YouTube embedded streams
chhe/streamlink,melmorabity/streamlink,melmorabity/streamlink,beardypig/streamlink,chhe/streamlink,wlerin/streamlink,streamlink/streamlink,streamlink/streamlink,gravyboat/streamlink,wlerin/streamlink,beardypig/streamlink,bastimeyer/streamlink,bastimeyer/streamlink,gravyboat/streamlink
src/streamlink/plugins/dogus.py
src/streamlink/plugins/dogus.py
import re import logging from streamlink.plugin import Plugin from streamlink.plugin.api.utils import itertags from streamlink.plugins.youtube import YouTube from streamlink.stream import HLSStream from streamlink.utils import update_scheme log = logging.getLogger(__name__) class Dogus(Plugin): """ Support ...
import re from streamlink.plugin import Plugin from streamlink.stream import HLSStream from streamlink.utils import update_scheme class Dogus(Plugin): """ Support for live streams from Dogus sites include ntv, ntvspor, and kralmuzik """ url_re = re.compile(r"""https?://(?:www.)? (?: ...
bsd-2-clause
Python
8f8b993cf814e90d138cab7a8fc59c3b52bd3078
change field order
byteweaver/django-eca-catalogue
eca_catalogue/product/abstract_models.py
eca_catalogue/product/abstract_models.py
from django.db import models from django.utils.translation import ugettext_lazy as _ class AbstractProduct(models.Model): item_number = models.CharField(_("Item number"), max_length=255, unique=True) name = models.CharField(_("Name"), max_length=128) description = models.TextField(_("Description"), blank=...
from django.db import models from django.utils.translation import ugettext_lazy as _ class AbstractProduct(models.Model): name = models.CharField(_("Name"), max_length=128) description = models.TextField(_("Description"), blank=True, null=True) item_number = models.CharField(_("Item number"), max_length=2...
bsd-3-clause
Python
25eb60cd4ed11586fcdf75b0a34b5ae56a96146a
Upgrade to v0.2.4
dhimmel/obo
obonet/__init__.py
obonet/__init__.py
from .read import read_obo __version__ = '0.2.4'
from .read import read_obo __version__ = '0.2.3'
cc0-1.0
Python
fda7f63434c40321e1299498f202d41470b95f27
write out pos / cigar now
ngsutils/ngsutils,ngsutils/ngsutils,ngsutils/ngsutils
bam_utils/bam_read_names.py
bam_utils/bam_read_names.py
#!/usr/bin/env python ''' Ouputs the names and positions of reads in the BAM file. ''' import sys,os from support.eta import ETA import pysam def bam_read_names(fname,mapped=False,unmapped=False): bamfile = pysam.Samfile(fname,"rb") eta = ETA(0,bamfile=bamfile) for read in bamfile: eta.print_statu...
#!/usr/bin/env python ''' Ouputs the names of reads in the BAM file. ''' import sys,gzip,os from support.eta import ETA import pysam def bam_read_names(fname,mapped=False,unmapped=False): bamfile = pysam.Samfile(fname,"rb") eta = ETA(0,bamfile=bamfile) for read in bamfile: eta.print_status(extra=r...
bsd-3-clause
Python
75da426bcbb1902b39fbe410c32d1305699a2311
handle IntegrityError when adding related podcasts
gpodder/mygpo,gpodder/mygpo,gpodder/mygpo,gpodder/mygpo
mygpo/data/tasks.py
mygpo/data/tasks.py
from operator import itemgetter from datetime import datetime, timedelta from django.db import IntegrityError from celery.decorators import periodic_task from mygpo.data.podcast import calc_similar_podcasts from mygpo.celery import celery from mygpo.podcasts.models import Podcast from celery.utils.log import get_ta...
from operator import itemgetter from datetime import datetime, timedelta from celery.decorators import periodic_task from mygpo.data.podcast import calc_similar_podcasts from mygpo.celery import celery from mygpo.podcasts.models import Podcast from celery.utils.log import get_task_logger logger = get_task_logger(__n...
agpl-3.0
Python
553da2388cebf2cc6bd56f788df0d4437aff47a4
Update taskpull_local.py
a378ec99/bcn
bcn/utils/taskpull_local.py
bcn/utils/taskpull_local.py
"""Local task-pull routine for bias recovery testing and profiling (one process only). Note ---- Profile with cProfile and store as .prof to be visualized with https://jiffyclub.github.io/snakeviz/. """ from __future__ import division, absolute_import import sys import json import abc from bcn.examples import figure...
"""Local task-pull routine for bias recovery testing and profiling (one process only). Note ---- Profile with cProfile and store as .prof to be visualized with https://jiffyclub.github.io/snakeviz/. """ from __future__ import absolute_import import sys sys.path.append('/home/sohse/projects/bcn') import sys import j...
mit
Python
8c627e2b8bb2a4f5da1a5a7b21dd996f9a184189
Set MAX! Window Sensor's class to 'window' (#11799)
sdague/home-assistant,jabesq/home-assistant,turbokongen/home-assistant,home-assistant/home-assistant,HydrelioxGitHub/home-assistant,Danielhiversen/home-assistant,balloob/home-assistant,kennedyshead/home-assistant,auduny/home-assistant,mKeRix/home-assistant,jamespcole/home-assistant,adrienbrault/home-assistant,Cinntax/h...
homeassistant/components/binary_sensor/maxcube.py
homeassistant/components/binary_sensor/maxcube.py
""" Support for MAX! Window Shutter via MAX! Cube. For more details about this platform, please refer to the documentation https://home-assistant.io/components/maxcube/ """ import logging from homeassistant.components.binary_sensor import BinarySensorDevice from homeassistant.components.maxcube import MAXCUBE_HANDLE ...
""" Support for MAX! Window Shutter via MAX! Cube. For more details about this platform, please refer to the documentation https://home-assistant.io/components/maxcube/ """ import logging from homeassistant.components.binary_sensor import BinarySensorDevice from homeassistant.components.maxcube import MAXCUBE_HANDLE ...
mit
Python
dfe112721f3a17417724e873456b3dfee112166d
Allow non-balls to have no masks (assume whole image is not a ball)
BerlinUnited/NaoTH,BerlinUnited/NaoTH,BerlinUnited/NaoTH,BerlinUnited/NaoTH,BerlinUnited/NaoTH,BerlinUnited/NaoTH,BerlinUnited/NaoTH
Utils/py/cnn-segmentation-classification/utility_functions/loader.py
Utils/py/cnn-segmentation-classification/utility_functions/loader.py
import random from glob import glob import cv2 import numpy as np from keras.utils.np_utils import to_categorical import imutils from os.path import relpath import os import numpy as np; def adjust_gamma(image, gamma=1.0): invGamma = 1.0 / gamma table = np.array([((i / 255.0) ** invGamma) * 255 ...
import random from glob import glob import cv2 import numpy as np from keras.utils.np_utils import to_categorical import imutils from os.path import relpath import os import numpy as np; def adjust_gamma(image, gamma=1.0): invGamma = 1.0 / gamma table = np.array([((i / 255.0) ** invGamma) * 255 ...
apache-2.0
Python
efc30cc91d4ff48506cbdd78953d283e49754dee
Update Wit4JBMC.py
sosy-lab/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec
benchexec/tools/Wit4JBMC.py
benchexec/tools/Wit4JBMC.py
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.tools.template import benchexec.result as result class Tool(benchexec.t...
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.tools.template import benchexec.result as result class Tool(benchexec.t...
apache-2.0
Python
d9cf7b736416f942a7bb9c164d99fdb3b4de1b08
Fix reordering due to removal of Other
Zerack/zoll.me,Zerack/zoll.me
leapday/templatetags/leapday_extras.py
leapday/templatetags/leapday_extras.py
''' James D. Zoll 4/15/2013 Purpose: Defines template tags for the Leapday Recipedia application. License: This is a public work. ''' from django import template register = template.Library() @register.filter() def good_css_name(value): ''' Returns the lower-case hyphen-replaced display name, which us...
''' James D. Zoll 4/15/2013 Purpose: Defines template tags for the Leapday Recipedia application. License: This is a public work. ''' from django import template register = template.Library() @register.filter() def good_css_name(value): ''' Returns the lower-case hyphen-replaced display name, which us...
mit
Python
8ded36206974476950bee3f35cccbc7870d934b6
Update SameTree_001.py
Chasego/codi,Chasego/cod,Chasego/codirit,cc13ny/Allin,cc13ny/Allin,Chasego/codirit,cc13ny/algo,cc13ny/algo,Chasego/codi,cc13ny/algo,Chasego/codi,cc13ny/Allin,Chasego/cod,Chasego/cod,cc13ny/algo,Chasego/codi,cc13ny/algo,Chasego/codirit,cc13ny/Allin,Chasego/cod,cc13ny/Allin,Chasego/codi,Chasego/codirit,Chasego/cod,Chaseg...
leetcode/100-Same-Tree/SameTree_001.py
leetcode/100-Same-Tree/SameTree_001.py
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def isSameTree(self, p, q): """ :type p: TreeNode :type q: TreeNode :rtype: bool ...
# Definition for a binary tree node # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: # @param p, a tree node # @param q, a tree node # @return a boolean def isSameTree(self, p, q): if p == None a...
mit
Python
c905226f84ba788d01afcfcbbeb95a4e734a8fa5
put egg into dist directory.
cournape/Bento,abadger/Bento,cournape/Bento,abadger/Bento,cournape/Bento,cournape/Bento,abadger/Bento,abadger/Bento
bento/commands/build_egg.py
bento/commands/build_egg.py
import os import zipfile from bento.private.bytecode import \ bcompile from bento.core.utils import \ pprint, ensure_dir from bento.core import \ PackageMetadata from bento.installed_package_description import \ InstalledPkgDescription, iter_files from bento._config \ import \ ...
import os import zipfile from bento.private.bytecode import \ bcompile from bento.core.utils import \ pprint, ensure_dir from bento.core import \ PackageMetadata from bento.installed_package_description import \ InstalledPkgDescription, iter_files from bento._config \ import \ ...
bsd-3-clause
Python
1089ce440debc06afbc5ffb9f61cb444e8172373
Bump develop version [ci skip]
nephila/djangocms-page-meta,nephila/djangocms-page-meta
djangocms_page_meta/__init__.py
djangocms_page_meta/__init__.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals __version__ = '0.8.4.post1' __author__ = 'Iacopo Spalletti <i.spalletti@nephila.it>' default_app_config = 'djangocms_page_meta.apps.PageMetaConfig'
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals __version__ = '0.8.4' __author__ = 'Iacopo Spalletti <i.spalletti@nephila.it>' default_app_config = 'djangocms_page_meta.apps.PageMetaConfig'
bsd-3-clause
Python
ad54c686f1953410c4bcebf1c6a9cd7bc17ffbaa
Remove unused class SocketSettings.
ameily/mongo-python-driver,aherlihy/mongo-python-driver,gormanb/mongo-python-driver,llvtt/mongo-python-driver,mongodb/mongo-python-driver,bq-xiao/mongo-python-driver,pigate/mongo-python-driver,WingGao/mongo-python-driver,ramnes/mongo-python-driver,jameslittle/mongo-python-driver,macdiesel/mongo-python-driver,ShaneHarve...
pymongo/settings.py
pymongo/settings.py
# Copyright 2014 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License. You # may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# Copyright 2014 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License. You # may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
Python
fbabb4d58e8a3a250baedd8299cca536a7aba314
add google analytics tracking code
c0deeast/pyprint,RicterZ/pyprint,Leo02/pyprint,RicterZ/pyprint,PockyNya/pyprint,Leo02/pyprint,Leo02/pyprint,c0deeast/pyprint,PockyNya/pyprint,PockyNya/pyprint,RicterZ/pyprint,c0deeast/pyprint
pyprint/__init__.py
pyprint/__init__.py
import os.path from hashlib import md5 # third-part import tornado.web from sqlalchemy.orm import scoped_session, sessionmaker # custom import views from settings import * from models import engine theme_path = os.path.join(os.path.dirname(__file__), 'theme/{theme_name}'.format(theme_name=theme)) class Applicatio...
import os.path from hashlib import md5 # third-part import tornado.web from sqlalchemy.orm import scoped_session, sessionmaker # custom import views from settings import * from models import engine theme_path = os.path.join(os.path.dirname(__file__), 'theme/{theme_name}'.format(theme_name=theme)) class Applicatio...
mit
Python
c4c71eeb5ab27dd6497e877947b4871645418185
Mark as in-development
ncolony/ncolony,moshez/ncolony
ncolony/__init__.py
ncolony/__init__.py
# Copyright (c) Moshe Zadka # See LICENSE for details. """ncolony -- a process starter/monitor""" __version__ = '0.0.2-dev' metadata = dict( name='ncolony', version=__version__, description='A process starter/monitor', long_description="""\ ncolony: A wrapper around Twisted process monitor which allo...
# Copyright (c) Moshe Zadka # See LICENSE for details. """ncolony -- a process starter/monitor""" __version__ = '0.0.1' metadata = dict( name='ncolony', version=__version__, description='A process starter/monitor', long_description="""\ ncolony: A wrapper around Twisted process monitor which allows r...
mit
Python
aa0f81a5848ec5e2d01e2aaef631d96809dee500
fix test, Tools.listToStr() is back to previous behavior
Anatoscope/sofa,Anatoscope/sofa,Anatoscope/sofa,Anatoscope/sofa,Anatoscope/sofa,Anatoscope/sofa,Anatoscope/sofa,Anatoscope/sofa,Anatoscope/sofa
applications/plugins/SofaPython/SofaPython_test/python/test_Tools.py
applications/plugins/SofaPython/SofaPython_test/python/test_Tools.py
import SofaPython.Tools from SofaTest.Macro import * def run(): ok=True l = [1,2,3,4] ok&=EXPECT_EQ("1 2 3 4", SofaPython.Tools.listToStr(l) ) return ok
import SofaPython.Tools from SofaTest.Macro import * def run(): ok=True l = [1,2,3,4] ok&=EXPECT_EQ(repr(l), SofaPython.Tools.listToStr(l) ) return ok
lgpl-2.1
Python
61148f510e70f325bcf54731a5a246cedda3a367
Update ContainDup_001.py
cc13ny/algo,Chasego/codi,Chasego/codirit,Chasego/codirit,Chasego/codirit,Chasego/codirit,cc13ny/Allin,Chasego/cod,Chasego/cod,cc13ny/Allin,Chasego/codi,Chasego/cod,cc13ny/algo,Chasego/codi,Chasego/codirit,Chasego/codi,cc13ny/Allin,cc13ny/algo,cc13ny/algo,Chasego/codi,cc13ny/Allin,Chasego/cod,Chasego/cod,cc13ny/Allin,cc...
leetcode/217-Contains-Duplicate/ContainDup_001.py
leetcode/217-Contains-Duplicate/ContainDup_001.py
class Solution: # @param {integer[]} nums # @return {boolean} def containsDuplicate(self, nums): tb = set() for n in nums: if n in tb: return True tb.add(n) return False
class Solution: # @param {integer[]} nums # @return {boolean} def containsDuplicate(self, nums): tb = set() for n in nums: if n in tb: return True else: tb.add(n) return False
mit
Python
80fc3c64f3bebf6b3c721a2b4e3628cc38d940f6
bump release to networkx
jakevdp/networkx,sharifulgeo/networkx,jakevdp/networkx,NvanAdrichem/networkx,debsankha/networkx,debsankha/networkx,chrisnatali/networkx,dhimmel/networkx,kernc/networkx,aureooms/networkx,jakevdp/networkx,JamesClough/networkx,ionanrozenfeld/networkx,bzero/networkx,chrisnatali/networkx,kernc/networkx,bzero/networkx,dmoliv...
networkx/release.py
networkx/release.py
"""Release data for NetworkX.""" # Copyright (C) 2004-2008 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # Distributed under the terms of the GNU Lesser General Public License # http://www.gnu.org/copyleft/lesser.html import os import re ...
"""Release data for NetworkX.""" # Copyright (C) 2004-2008 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # Distributed under the terms of the GNU Lesser General Public License # http://www.gnu.org/copyleft/lesser.html import os import re ...
bsd-3-clause
Python
7a30be87732cd377ed4af8b3d3304a0c33cdf78a
Change space lines and revise docstring
bowen0701/algorithms_data_structures
lc011_container_with_most_water.py
lc011_container_with_most_water.py
"""Leetcode 11. Container With Most Water Medium Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the...
"""Leetcode 11. Container With Most Water Medium Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the...
bsd-2-clause
Python
34eba9bd789f000abfa43541e8abe744a01b47bf
fix coverage
thomwiggers/onebot
onebot/__init__.py
onebot/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Thom Wiggers' __email__ = 'thom@thomwiggers.nl' __version__ = '0.1.0' import irc3 class OneBot(irc3.IrcBot): """ Main class, extensions of IrcBot """ def __init__(self, *args, **kwargs): self.defaults['nick'] = 'OneBot' sel...
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Thom Wiggers' __email__ = 'thom@thomwiggers.nl' __version__ = '0.1.0' import irc3 class OneBot(irc3.IrcBot): """ Main class, extensions of IrcBot """ def __init__(self, *args, **kwargs): self.defaults['nick'] = 'OneBot' sel...
bsd-3-clause
Python
413803138279b3a87ec531fdcc6b7523086a0b16
use joblib as it has much better IO among workers
oscarlorentzon/OpenSfM,oscarlorentzon/OpenSfM,mapillary/OpenSfM,oscarlorentzon/OpenSfM,mapillary/OpenSfM,mapillary/OpenSfM,oscarlorentzon/OpenSfM,oscarlorentzon/OpenSfM,mapillary/OpenSfM,mapillary/OpenSfM
opensfm/context.py
opensfm/context.py
# -*- coding: utf-8 -*- import logging import os import resource import sys import cv2 from joblib import Parallel, parallel_backend, delayed from opensfm import log logger = logging.getLogger(__name__) abspath = os.path.abspath(os.path.dirname(__file__)) SENSOR = os.path.join(abspath, 'data', 'sensor_data.json')...
# -*- coding: utf-8 -*- import logging import os import resource import sys import cv2 from loky import get_reusable_executor from opensfm import log logger = logging.getLogger(__name__) abspath = os.path.abspath(os.path.dirname(__file__)) SENSOR = os.path.join(abspath, 'data', 'sensor_data.json') BOW_PATH = os.p...
bsd-2-clause
Python
b234da18b6492442624fc92d253a045e0e2cd37f
check for empty route
signalw/charliechat,signalw/charliechat,signalw/charliechat
main/utils/queryGoogleForDirections.py
main/utils/queryGoogleForDirections.py
import re import requests from CharlieChat import settings #take params from user #origin = input ("enter an origin between paren\n") #destination = input("enter a destination between paren \n") def getPath(orig, dest): origin = orig #"45Hawthornestsomerville" destination = dest #"Downtowncrossing" #put parameter...
import re import requests from CharlieChat import settings #take params from user #origin = input ("enter an origin between paren\n") #destination = input("enter a destination between paren \n") def getPath(orig, dest): origin = orig #"45Hawthornestsomerville" destination = dest #"Downtowncrossing" #put parameter...
mit
Python
fba452b8af959f6ba65abc8ec5bad35ba1d9557a
fix locale setting on email sending
OpenVolunteeringPlatform/django-ovp-core,OpenVolunteeringPlatform/django-ovp-core
ovp_core/emails.py
ovp_core/emails.py
from django.core.mail import EmailMultiAlternatives from django.template import Context, Template from django.template.loader import get_template from django.conf import settings from django.utils import translation from ovp_core.helpers import get_settings, is_email_enabled, get_email_subject import threading class...
from django.core.mail import EmailMultiAlternatives from django.template import Context, Template from django.template.loader import get_template from django.conf import settings from django.utils import translation from ovp_core.helpers import get_settings, is_email_enabled, get_email_subject import threading class...
agpl-3.0
Python
bcfe9040154812fe4ed995038dca865fda387ab3
remove test from the name in examples.
simpeg/discretize,simpeg/simpeg,simpeg/discretize,simpeg/discretize
tests/examples/test_examples.py
tests/examples/test_examples.py
import unittest import sys from SimPEG import Examples import numpy as np def get(test): def func(self): print '\nTesting %s.run(plotIt=False)\n'%test getattr(Examples, test).run(plotIt=False) self.assertTrue(True) return func attrs = dict() tests = [_ for _ in dir(Examples) if not _.st...
import unittest import sys from SimPEG import Examples import numpy as np def get_test(test): def func(self): print '\nTesting %s.run(plotIt=False)\n'%test getattr(Examples, test).run(plotIt=False) self.assertTrue(True) return func attrs = dict() tests = [_ for _ in dir(Examples) if not...
mit
Python
9f79c054e7d473a697cc6f6877ec510faa7bd2fe
Update __init__.py
CodeTeam/tcrudge
tcrudge/__init__.py
tcrudge/__init__.py
""" Simple async CRUDL framework based on Tornado and Peewee ORM. Validates input using JSON-schema. Supports JSON and MessagePack responses. """ __version__ = '0.9.8'
""" Simple async CRUDL framework based on Tornado and Peewee ORM. Validates input using JSON-schema. Supports JSON and MessagePack responses. """ __version__ = '0.9.7'
mit
Python
3d89f5b843bdf5ca727d4a88ad45a8725884a471
Bump development version; 0.1.0.dev1
treasure-data/td-client-python
tdclient/version.py
tdclient/version.py
__version__ = "0.1.0.dev1"
__version__ = "0.1.0.dev0"
apache-2.0
Python
018abbf0eecd64d973817fd522e7d3200f8d5367
Bump version.
concordusapps/python-scim
src/scim/__init__.py
src/scim/__init__.py
# -*- coding: utf-8 -*- """System for Cross-Domain Identity Management (SCIM) v1.1 @par References - http://www.simplecloud.info/specs/draft-scim-core-schema-01.html - http://www.simplecloud.info/specs/draft-scim-api-01.html """ #! Version of the package. __version__ = VERSION = "0.2.1" #! Version of the SCI...
# -*- coding: utf-8 -*- """System for Cross-Domain Identity Management (SCIM) v1.1 @par References - http://www.simplecloud.info/specs/draft-scim-core-schema-01.html - http://www.simplecloud.info/specs/draft-scim-api-01.html """ #! Version of the package. __version__ = VERSION = "0.2.0" #! Version of the SCI...
mit
Python
3187b67b952f6c0c97824d8907a440e5ebda1f82
Update version in __init__.py (#322)
robinedwards/neomodel,robinedwards/neomodel
neomodel/__init__.py
neomodel/__init__.py
# pep8: noqa import pkg_resources from .core import * from neomodel.exceptions import * from .util import clear_neo4j_database, change_neo4j_password from neomodel.match import EITHER, INCOMING, OUTGOING, NodeSet, Traversal from neomodel.relationship_manager import ( NotConnected, RelationshipTo, RelationshipFrom, ...
# pep8: noqa from .core import * from neomodel.exceptions import * from .util import clear_neo4j_database, change_neo4j_password from neomodel.match import EITHER, INCOMING, OUTGOING, NodeSet, Traversal from neomodel.relationship_manager import ( NotConnected, RelationshipTo, RelationshipFrom, Relationship, Rel...
mit
Python
7e436685561c00380ca87ed01c51d8ed0f3f2c6a
Add exercise numbers on conversion (#3)
jorisvandenbossche/nbtutor,jorisvandenbossche/nbtutor
nbtutor/__init__.py
nbtutor/__init__.py
# -*- coding: utf-8 -*- """ nbtutor - a small utility to indicate which cells should be cleared (exercises). """ import os try: from nbconvert.preprocessors.base import Preprocessor except ImportError: from IPython.nbconvert.preprocessors.base import Preprocessor from traitlets import Unicode class ClearEx...
# -*- coding: utf-8 -*- """ nbtutor - a small utility to indicate which cells should be cleared (exercises). """ import os try: from nbconvert.preprocessors.base import Preprocessor except ImportError: from IPython.nbconvert.preprocessors.base import Preprocessor from traitlets import Unicode class ClearEx...
bsd-2-clause
Python
571577e736b94447549a01ffc8d5eb5fe472ec36
Print timings.
dieseldev/diesel
examples/http_pool.py
examples/http_pool.py
import sys from time import time from diesel import quickstart, quickstop from diesel.protocols.http.pool import request def f(): t1 = time() print request("http://example.iana.org/missing"), 'is missing?' t2 = time() print request("http://example.iana.org/missing"), 'is missing?' t3 = time() ...
from diesel import quickstart, quickstop from diesel.protocols.http.pool import request def f(): print request("http://example.iana.org/"), 'is found?' print request("http://example.iana.org/missing"), 'is missing?' quickstop() quickstart(f)
bsd-3-clause
Python
b36bbc2f54c3ecf976372cb7369844e9bb587c53
bump version to 2.0.0
Invoiced/invoiced-python
invoiced/version.py
invoiced/version.py
VERSION = '2.0.0'
VERSION = '1.4.0'
mit
Python
7d4139b501df6f12d6fc9a324b5d692827c2f5bc
allow ocean stories to appear anywhere they aren't excluded
MidAtlanticPortal/marco-portal2,Ecotrust/marineplanner-core,Ecotrust/marineplanner-core,Ecotrust/marineplanner-core,MidAtlanticPortal/marco-portal2,Ecotrust/marineplanner-core,MidAtlanticPortal/marco-portal2,Ecotrust/marineplanner-core,MidAtlanticPortal/marco-portal2
portal/ocean_stories/models.py
portal/ocean_stories/models.py
from django.db import models from wagtail.wagtailcore.models import Orderable, Page from wagtail.wagtailcore.fields import RichTextField from wagtail.wagtailadmin.edit_handlers import FieldPanel,InlinePanel from modelcluster.fields import ParentalKey # The abstract model for ocean story sections, complete with panel...
from django.db import models from wagtail.wagtailcore.models import Orderable, Page from wagtail.wagtailcore.fields import RichTextField from wagtail.wagtailadmin.edit_handlers import FieldPanel,InlinePanel from modelcluster.fields import ParentalKey # The abstract model for ocean story sections, complete with panel...
isc
Python
2b6426c6ed2a55a619fa9d859dafbf908dae754d
Update __manifest__.py
ingadhoc/website
l10n_ar_website_sale_ux/__manifest__.py
l10n_ar_website_sale_ux/__manifest__.py
############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
agpl-3.0
Python
bb4052c30947687347232ef71cabfcf245628b48
use new extension point to define pragma in idl
ros2/rmw_opensplice
rosidl_typesupport_opensplice_cpp/rosidl_typesupport_opensplice_cpp/rosidl_generator_dds_idl_extension.py
rosidl_typesupport_opensplice_cpp/rosidl_typesupport_opensplice_cpp/rosidl_generator_dds_idl_extension.py
# Copyright 2014 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# Copyright 2014 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
Python
3d621000728e14e21a60d3e7dabd2e3b836f3b78
Add the copyright information
code4game/libprotobuf,code4game/libprotobuf
regenerateforue4.py
regenerateforue4.py
# Copyright @ 2016, Code 4 Game, Under The MIT License. from datetime import * import os import sys comment = '// Added for UE4 in {0}(UTC)'.format(datetime.utcnow()) include_allow_header = '#include "AllowWindowsPlatformTypes.h"' include_hide_header = '#include "HideWindowsPlatformTypes.h"' def Check(_CodeFile): ...
from datetime import * import os import sys comment = '// Added for UE4 in {0}(UTC)'.format(datetime.utcnow()) include_allow_header = '#include "AllowWindowsPlatformTypes.h"' include_hide_header = '#include "HideWindowsPlatformTypes.h"' def Check(_CodeFile): if (os.path.isfile(_CodeFile) is False): print ...
mit
Python
f4c72230a78544ec81ce7f890c73785efdc5375a
use wrap()
simbuerg/benchbuild,simbuerg/benchbuild
pprof/projects/pprof/lulesh.py
pprof/projects/pprof/lulesh.py
#!/usr/bin/evn python # encoding: utf-8 from pprof.project import ProjectFactory, log from pprof.settings import config from group import PprofGroup from os import path from plumbum import FG, local class Lulesh(PprofGroup): """ Lulesh """ class Factory: def create(self, exp): return ...
#!/usr/bin/evn python # encoding: utf-8 from pprof.project import ProjectFactory, log from pprof.settings import config from group import PprofGroup from os import path from plumbum import FG, local class Lulesh(PprofGroup): """ Lulesh """ class Factory: def create(self, exp): return ...
mit
Python
4c3a4949f8afbfcb684a9809999549a794621ea0
Fix migration sorting
sprucedev/DockCI,sprucedev/DockCI,RickyCook/DockCI,sprucedev/DockCI,sprucedev/DockCI-Agent,RickyCook/DockCI,RickyCook/DockCI,sprucedev/DockCI-Agent,sprucedev/DockCI,RickyCook/DockCI
dockci/migrations/run.py
dockci/migrations/run.py
""" Runner for DockCI migrations """ import os import sys from importlib import import_module def main(): try: with open('data/version.txt', 'r') as handle: data_version = int(handle.read()) except FileNotFoundError: data_version = -1 migrations_dir = os.path.dirname(os.path...
""" Runner for DockCI migrations """ import os import sys from importlib import import_module def main(): try: with open('data/version.txt', 'r') as handle: data_version = int(handle.read()) except FileNotFoundError: data_version = -1 migrations_dir = os.path.dirname(os.path...
isc
Python
26e309e4421b9a1579d3c6b72a2247ddc06c2241
Add truncate_locations
ankur-gos/PSL-Bipedal,ankur-gos/PSL-Bipedal
preprocessing/preprocessing.py
preprocessing/preprocessing.py
''' preprocessing.py Preprocess locations by clustering them Ankur Goswami, agoswam3@ucsc.edu ''' from sklearn.cluster import KMeans import numpy as np def truncate_locations(start, end): with open(start, 'r') as start_file, open(end, 'r') as end_file, open('truncated_locations.txt', 'w') as fout: ...
''' preprocessing.py Preprocess locations by clustering them Ankur Goswami, agoswam3@ucsc.edu '''
mit
Python
bf06f7b1b59d3a0bf1c70b26a767eb5beb8fef40
Add __init__ for sphericaldf
jobovy/galpy,jobovy/galpy,jobovy/galpy,jobovy/galpy
galpy/df/sphericaldf.py
galpy/df/sphericaldf.py
# Superclass for spherical distribution functions, contains # - sphericaldf: superclass of all spherical DFs # - anisotropicsphericaldf: superclass of all anisotropic spherical DFs import numpy import pdb import scipy.interpolate from .df import df, _APY_LOADED from ..potential import flatten as flatten_potential f...
# Superclass for spherical distribution functions, contains # - sphericaldf: superclass of all spherical DFs # - anisotropicsphericaldf: superclass of all anisotropic spherical DFs import numpy import pdb import scipy.interpolate from .df import df, _APY_LOADED from ..potential import flatten as flatten_potential f...
bsd-3-clause
Python
bc50210afc3cfb43441fe431e34e04db612f87c7
Implement YAML file compilation into 'bytecode'
sprymix/importkit
importkit/yaml/schema.py
importkit/yaml/schema.py
import subprocess class YamlValidationError(Exception): pass class Base(object): schema_file = '' @classmethod def validate(cls, meta): if 'marshalled' in meta and meta['marshalled']: return cls.validatefile(meta['filename']) @classmethod def validatefile(cls, filenam...
import subprocess class YamlValidationError(Exception): pass class Base(object): schema_file = '' @classmethod def validate(cls, filename): kwalify = subprocess.Popen(['kwalify', '-lf', cls.schema_file, filename], stdout=subprocess.PIPE, ...
mit
Python
a12076e0fd8dfd0e4d35802684bbd837ed2246b0
Convert image to base64 before sending Item to sync
gsnbng/erpnext,gsnbng/erpnext,gsnbng/erpnext,gsnbng/erpnext
erpnext/hub_node/data_migration_mapping/item_to_hub_item/__init__.py
erpnext/hub_node/data_migration_mapping/item_to_hub_item/__init__.py
import io, base64, urllib, os def pre_process(doc): file_path = doc.image file_name = os.path.basename(file_path) if file_path.startswith('http'): url = file_path file_path = os.path.join('/tmp', file_name) urllib.urlretrieve(url, file_path) with io.open(file_path, 'rb') as f: doc.image = base64.b64enco...
agpl-3.0
Python
bfa52bdcae97250c36829ce96e6d539363749552
call tables
major/fedora-meeting-report
report_generator.py
report_generator.py
#!/usr/bin/env python from bugzilla import Bugzilla from collections import Counter from datetime import datetime from terminaltables import UnixTable TABLES = [ ('priority', 'Priority'), ('status', 'Status'), ('severity', 'Severity'), ('component', 'Component'), ('version', 'D...
#!/usr/bin/env python from bugzilla import Bugzilla from collections import Counter from datetime import datetime from terminaltables import UnixTable VALID_STATUSES = ['NEW', 'ASSIGNED', 'MODIFIED', 'ON_QA'] def get_security_bugs(): bz = Bugzilla(url='https://bugzilla.redhat.com/xmlrpc.cgi') query_data = {...
apache-2.0
Python
dd312c9410b5aa648080449268154c5db8272cda
remove extraneous import
LandRegistry/system-of-record-alpha,LandRegistry/system-of-record-alpha,LandRegistry/system-of-record-alpha
systemofrecord/health.py
systemofrecord/health.py
from healthcheck import HealthCheck class Health(object): def __init__(self, app, endpoint='/health', checks=None): self.health = HealthCheck(app, endpoint) # extra health checks [self.health.add_check(check) for check in checks if callable(check)]
from healthcheck import HealthCheck from systemofrecord import app class Health(object): def __init__(self, app, endpoint='/health', checks=None): self.health = HealthCheck(app, endpoint) # extra health checks [self.health.add_check(check) for check in checks if callable(check)]
mit
Python
514b271c4858226a56cb122b37fd3593290aeb8c
Bump version to 0.3.0b1
neutralio/nio-cli,nioinnovation/nio-cli
nio_cli/__init__.py
nio_cli/__init__.py
__version__ = '0.2.0b1'
__version__ = '0.0.0.a'
apache-2.0
Python
c1fa2b156bb67fc593bdccd7b1561529bfc32a2e
Fix for new parameter stuff.
SanchayanMaity/gem5,sobercoder/gem5,yb-kim/gemV,samueldotj/TeeRISC-Simulator,markoshorro/gem5,kaiyuanl/gem5,zlfben/gem5,cancro7/gem5,zlfben/gem5,qizenguf/MLC-STT,zlfben/gem5,aclifton/cpeg853-gem5,briancoutinho0905/2dsampling,Weil0ng/gem5,Weil0ng/gem5,gem5/gem5,joerocklin/gem5,joerocklin/gem5,rallylee/gem5,HwisooSo/gemV...
tests/long/70.twolf/test.py
tests/long/70.twolf/test.py
# Copyright (c) 2006-2007 The Regents of The University of Michigan # 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, this ...
# Copyright (c) 2006-2007 The Regents of The University of Michigan # 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, this ...
bsd-3-clause
Python
f0a6072615085c0bfed252ca599b42ae2ad3b59e
Fix __init__ version
arista-eosplus/pyeapi
pyeapi/__init__.py
pyeapi/__init__.py
# # Copyright (c) 2014, Arista Networks, 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, # this list of condit...
# # Copyright (c) 2014, Arista Networks, 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, # this list of condit...
bsd-3-clause
Python
ba89f97d34c03e2bb42dbe2132d393381153c8b2
Update __init__.py
pytube/pytube
pytube/__init__.py
pytube/__init__.py
# flake8: noqa: F401 # noreorder """ Pytube: a very serious Python library for downloading YouTube Videos. """ __title__ = "pytube" __author__ = "Nick Ficano" __license__ = "Unlicensed" __js__ = None __js_url__ = None from pytube.version import __version__ from pytube.streams import Stream from pytube.captions import ...
# -*- coding: utf-8 -*- # flake8: noqa: F401 # noreorder """ Pytube: a very serious Python library for downloading YouTube Videos. """ __title__ = "pytube" __author__ = "Nick Ficano, Harold Martin" __license__ = "MIT License" __copyright__ = "Copyright 2019 Nick Ficano" __js__ = None __js_url__ = None from pytube.vers...
unlicense
Python
49355c4ceb7c19fd2d4dbb952400f657acd23052
Remove unused reports
jlutz777/FreeStore,jlutz777/FreeStore,jlutz777/FreeStore
reporting/utils.py
reporting/utils.py
""" Utility functions for reports """ from .reports import FamilyTotalOverTimeReport, IndividualsByAgeReport from .reports import FamilyCheckoutsPerWeekReport, DependentCheckoutsPerWeekReport from .reports import EmptyFamilyCheckoutsPerWeekReport, FamilyCheckInsPerWeekReport from .reports import FamiliesPerZipReport, ...
""" Utility functions for reports """ from .reports import FamilyTotalOverTimeReport, DependentsTotalOverTimeReport from .reports import FamilyCheckoutsPerWeekReport, DependentCheckoutsPerWeekReport from .reports import EmptyFamilyCheckoutsPerWeekReport, FamilyCheckInsPerWeekReport from .reports import ItemsPerCategor...
mit
Python
fc1549940c6105d08178a244cbcbd3b622e4ec30
Add 'active' column
caktus/rapidsms-nutrition,caktus/rapidsms-nutrition
nutrition/tables.py
nutrition/tables.py
from __future__ import unicode_literals from urllib import urlencode from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe import django_tables2 as tables from nutrition.models import Report class NutritionReportTable(tables.Table): # Override lots of columns to create bett...
from __future__ import unicode_literals from urllib import urlencode from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe import django_tables2 as tables from nutrition.models import Report class NutritionReportTable(tables.Table): # Override lots of columns to create bett...
bsd-3-clause
Python
e2eaf533ea87a1fad98899ea003d908cc41406f1
Use the maxlen keyword argument to deque... because we can now!
jdf/processing.py,tildebyte/processing.py,mashrin/processing.py,mashrin/processing.py,Luxapodular/processing.py,mashrin/processing.py,tildebyte/processing.py,Luxapodular/processing.py,tildebyte/processing.py,Luxapodular/processing.py,jdf/processing.py,jdf/processing.py
mode/examples/Basics/Input/StoringInput/StoringInput.pyde
mode/examples/Basics/Input/StoringInput/StoringInput.pyde
""" Storing Input. Move the mouse across the screen to change the position of the circles. The positions of the mouse are recorded into a deque and played back every frame. Between each frame, the newest value are added to the end of each array and the oldest value is deleted. """ from collections import deque h...
""" Storing Input. Move the mouse across the screen to change the position of the circles. The positions of the mouse are recorded into an array and played back every frame. Between each frame, the newest value are added to the end of each array and the oldest value is deleted. """ import collections num = 60 mx...
apache-2.0
Python
244b8e282cf76ba95968511544505d5482c476c9
set nosignal here and disable sigio
Lispython/pycurl,Lispython/pycurl,Lispython/pycurl
pycurl/examples/xmlrpc_curl.py
pycurl/examples/xmlrpc_curl.py
#! /usr/bin/env python # vi:ts=4:et # $Id$ # We should ignore SIGPIPE when using pycurl.NOSIGNAL - see the libcurl # documentation `libcurl-the-guide' for more info. try: import signal from signal import SIGPIPE, SIG_IGN signal.signal(signal.SIGPIPE, signal.SIG_IGN) except ImportError: pass import xmlrpc...
#! /usr/bin/env python # vi:ts=4:et # $Id$ import xmlrpclib, pycurl try: import cStringIO as StringIO except: import StringIO class CURLTransport(xmlrpclib.Transport): """Handles a cURL HTTP transaction to an XML-RPC server.""" xmlrpc_h = [ "User-Agent: PycURL XML-RPC", "Content-Type: text/xml" ] def...
lgpl-2.1
Python
e0109cdb52f02f1e8963849adeb42311cef2aa6c
Make htmlescape function available in templates
gratipay/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com,mccolgst/www.gittip.com,studio666/gratipay.com,eXcomm/gratipay.com,eXcomm/gratipay.com,mccolgst/www.gittip.com,mccolgst/www.gittip.com,studio666/gratipay.com,studio666/gratipay.com,eXcomm/gratipay.com,gratipay/gratipay.com,studio666/gratipay.com,eXcomm/g...
gratipay/renderers/jinja2_htmlescaped.py
gratipay/renderers/jinja2_htmlescaped.py
import aspen_jinja2_renderer as base from markupsafe import escape as htmlescape class HTMLRenderer(base.Renderer): def render_content(self, context): # Extend to inject an HTML-escaping function. Since autoescape is on, # template authors shouldn't normally need to use this function, but ...
import aspen_jinja2_renderer as base from markupsafe import escape as htmlescape class HTMLRenderer(base.Renderer): def render_content(self, context): # Extend to inject an HTML-escaping function. Since autoescape is on, # template authors shouldn't normally need to use this function, but ...
mit
Python
8c3c13230c809416cb29d98a42d76f1b5e8d45b3
use coros.Semaphore as LockType instead of coros.semaphore (the latter is a function)
tempbottle/eventlet,lindenlab/eventlet,lindenlab/eventlet,lindenlab/eventlet,tempbottle/eventlet,collinstocks/eventlet,collinstocks/eventlet
eventlet/green/thread.py
eventlet/green/thread.py
"""implements standard module 'thread' with greenlets""" from __future__ import absolute_import import thread as thread_module from eventlet.support import greenlet from eventlet.api import spawn from eventlet.coros import Semaphore as LockType error = thread_module.error def get_ident(gr=None): if gr is None: ...
"""implements standard module 'thread' with greenlets""" from __future__ import absolute_import import thread as thread_module from eventlet.support import greenlet from eventlet.api import spawn from eventlet.coros import semaphore as LockType error = thread_module.error def get_ident(gr=None): if gr is None: ...
mit
Python
ddf5747eb7bf0527988e76c773a5c925d80b2205
add choices of whether to add mat2 in pymhex
ronghanghu/mhex_graph,ronghanghu/mhex_graph
pymhex/load_mhex_into_caffe.py
pymhex/load_mhex_into_caffe.py
#! /usr/bin/env python3.4 import numpy as np, scipy.io import caffe def load_mhex(caffe_prototxt, caffe_model, mhex_mat_file, save_file, load_mat2=True): """ load matrices dumped from matlab into Caffe network MHEX implemenatation in Caffe consists of two InnerProductLayer at bottom and top, and one SoftmaxLay...
#! /usr/bin/env python3.4 import numpy as np, scipy.io import caffe def load_mhex(caffe_prototxt, caffe_model, mhex_mat_file, save_file): """ load matrices dumped from matlab into Caffe network MHEX implemenatation in Caffe consists of two InnerProductLayer at bottom and top, and one SoftmaxLayer between them....
bsd-2-clause
Python
f28b256b72f529c4f784daa86d83e5941550b033
Add production lot to production wizard if exist closes #965
alhashash/odoomrp-wip,factorlibre/odoomrp-wip,windedge/odoomrp-wip,diagramsoftware/odoomrp-wip,sergiocorato/odoomrp-wip,sergiocorato/odoomrp-wip,factorlibre/odoomrp-wip,Daniel-CA/odoomrp-wip-public,alfredoavanzosc/odoomrp-wip-1,invitu/odoomrp-wip,raycarnes/odoomrp-wip,xpansa/odoomrp-wip,odoomrp/odoomrp-wip,esthermm/odo...
mrp_production_traceability/wizard/mrp_product_produce.py
mrp_production_traceability/wizard/mrp_product_produce.py
# -*- encoding: utf-8 -*- ############################################################################## # # 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...
# -*- encoding: utf-8 -*- ############################################################################## # # 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...
agpl-3.0
Python
11f470e3bc97dbc0c960a085ac7d5ccbc6a08c2d
add new status
ktsstudio/tornkts
tornkts/base/server_response.py
tornkts/base/server_response.py
class ServerResponseStatus(object): def __init__(self, alias, description, http_code=200): self.alias = alias self.description = description self.http_code = http_code class ServerError(Exception): FIELD_INVALID_FORMAT = 'invalid_format' FIELD_LESS_MIN = 'less_min' FIELD_MORE_M...
class ServerResponseStatus(object): def __init__(self, alias, description, http_code=200): self.alias = alias self.description = description self.http_code = http_code class ServerError(Exception): FIELD_INVALID_FORMAT = 'invalid_format' FIELD_LESS_MIN = 'less_min' FIELD_MORE_M...
mit
Python
d7707a377eb339305511afbd822c78baad1e00e4
set machine ID when adding flags
mutantmonkey/ctfengine,mutantmonkey/ctfengine
add_flags.py
add_flags.py
from ctfengine import models from ctfengine import db from ctfengine.pwn.models import Flag, Machine import random while True: print("Adding a new machine. Leave blank to quit.") hostname = raw_input("Hostname: ") if len(hostname) > 0: m = Machine(hostname) db.session.add(m) db.sess...
from ctfengine import models from ctfengine import db from ctfengine.pwn.models import Flag, Machine import random while True: print("Adding a new machine. Leave blank to quit.") hostname = raw_input("Hostname: ") if len(hostname) > 0: m = Machine(hostname) db.session.add(m) db.sess...
isc
Python
5fcca2a124ac828b01633a3ad237a6435e8ff603
Update version (18.10) for API changes script
FDio/vpp,chrisy/vpp,chrisy/vpp,FDio/vpp,FDio/vpp,chrisy/vpp,vpp-dev/vpp,chrisy/vpp,chrisy/vpp,vpp-dev/vpp,chrisy/vpp,FDio/vpp,vpp-dev/vpp,chrisy/vpp,chrisy/vpp,vpp-dev/vpp,vpp-dev/vpp,FDio/vpp,FDio/vpp,FDio/vpp,vpp-dev/vpp,vpp-dev/vpp,FDio/vpp
extras/scripts/list_api_changes.py
extras/scripts/list_api_changes.py
#!/usr/bin/env python import os, fnmatch, subprocess starttag = 'v18.10-rc0' endtag = 'v18.10' emit_md = True apifiles = [] for root, dirnames, filenames in os.walk('.'): for filename in fnmatch.filter(filenames, '*.api'): apifiles.append(os.path.join(root, filename)) for f in apifiles: commits = sub...
#!/usr/bin/env python import os, fnmatch, subprocess starttag = 'v18.07-rc0' endtag = 'v18.07' emit_md = True apifiles = [] for root, dirnames, filenames in os.walk('.'): for filename in fnmatch.filter(filenames, '*.api'): apifiles.append(os.path.join(root, filename)) for f in apifiles: commits = sub...
apache-2.0
Python
a2de1f7f3fa5ecec7d4004be3fb839932a938389
Fix (API changes)
ceibal-tatu/sugar-toolkit-gtk3,ceibal-tatu/sugar-toolkit-gtk3,ceibal-tatu/sugar-toolkit-gtk3,manuq/sugar-toolkit-gtk3,i5o/sugar-toolkit-gtk3,gusDuarte/sugar-toolkit-gtk3,i5o/sugar-toolkit-gtk3,tchx84/sugar-toolkit-gtk3,godiard/sugar-toolkit-gtk3,sugarlabs/sugar-toolkit,manuq/sugar-toolkit-gtk3,puneetgkaur/backup_sugar_...
tests/test-snowflake-box.py
tests/test-snowflake-box.py
#!/usr/bin/env python # Copyright (C) 2006, Red Hat, Inc. # # 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 2 of the License, or # (at your option) any later version. # # This pr...
#!/usr/bin/env python # Copyright (C) 2006, Red Hat, Inc. # # 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 2 of the License, or # (at your option) any later version. # # This pr...
lgpl-2.1
Python
cea3aa40ae6e3d9e3703b836ba044cf0cca95c78
Update exercises/concept/ellens-alien-game/.meta/exemplar.py
exercism/python,jmluy/xpython,exercism/python,jmluy/xpython
exercises/concept/ellens-alien-game/.meta/exemplar.py
exercises/concept/ellens-alien-game/.meta/exemplar.py
class Alien: total_aliens_created = 0 health = 3 def __init__(self, pos_x, pos_y): Alien.total_aliens_created += 1 self.x = pos_x self.y = pos_y def hit(self): self.health -= 1 def is_alive(self): return self.health > 0 def teleport(self, new_coordinat...
class Alien: total_aliens_created = 0 health = 3 def __init__(self, pos_x, pos_y): Alien.total_aliens_created += 1 self.x = pos_x self.y = pos_y def hit(self): self.health -= 1 def is_alive(self): return self.health > 0 def teleport(self, new_x, new_y)...
mit
Python
30eb3fb05c9fee4f01ec1f15e80a22f23a8cda0e
remove unused print in testing codes
ebuchman/daoist_protocol,ethermarket/pyethereum,shahankhatch/pyethereum,pipermerriam/pyethereum,pipermerriam/pyethereum,karlfloersch/pyethereum,karlfloersch/pyethereum,holiman/pyethereum,inzem77/pyethereum,ebuchman/daoist_protocol,vaporry/pyethereum,harlantwood/pyethereum,ethereum/pyethereum,shahankhatch/pyethereum,cke...
features/steps/compact_encoding.py
features/steps/compact_encoding.py
@given(u'an Even length hex sequence') def step_impl(context): context.srcs = [ [], [0x0, 0x1], [0x1, 0x2, 0x3, 0x4] ] @given(u'an odd length hex sequence') def step_impl(context): context.srcs = [ [0x0], [0x1, 0x2, 0x3] ] @when(u'append a terminator') def step_...
@given(u'an Even length hex sequence') def step_impl(context): context.srcs = [ [], [0x0, 0x1], [0x1, 0x2, 0x3, 0x4] ] @given(u'an odd length hex sequence') def step_impl(context): context.srcs = [ [0x0], [0x1, 0x2, 0x3] ] @when(u'append a terminator') def step_...
mit
Python
15b6499f30c5797686930fdd4a7303c218561411
migrate map urls from arches module
mradamcox/afrh,mradamcox/afrh,mradamcox/afrh
afrh/urls.py
afrh/urls.py
''' ARCHES - a program developed to inventory and manage immovable cultural heritage. Copyright (C) 2013 J. Paul Getty Trust and World Monuments Fund 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 Founda...
''' ARCHES - a program developed to inventory and manage immovable cultural heritage. Copyright (C) 2013 J. Paul Getty Trust and World Monuments Fund 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 Founda...
agpl-3.0
Python
1da4245cbc25a609b006254714ae273b6a6824e0
Update global lock, default connection
mozilla-services/retools,bbangert/retools,0x1997/retools
retools/__init__.py
retools/__init__.py
"""retools This module holds a default Redis instance, which can be configured process-wide:: from retools import Connection Connection.set_default(host='127.0.0.1', db=0, **kwargs) """ from redis import Redis from retools.redconn import Connection __all__ = ['Connection'] class Connection(objec...
#
mit
Python
563747cf8d3623be1c5c83dfbcfe481e986606f4
add mutliform testcase
zeaphoo/cocopot,zeaphoo/flagon
tests/test_datastructure.py
tests/test_datastructure.py
import pytest from flagon.datastructures import MultiDict def test_basic_multidict(): d = MultiDict([('a', 'b'), ('a', 'c')]) assert d['a'] == 'b' assert d.getlist('a') == ['b', 'c'] assert ('a' in d) == True d = MultiDict([('a', 'b'), ('a', 'c')], a='dddd') assert d['a'] == 'b' assert d....
import pytest from flagon.datastructures import MultiDict def test_basic_multidict(): d = MultiDict([('a', 'b'), ('a', 'c')]) assert d['a'] == 'b' assert d.getlist('a') == ['b', 'c'] assert ('a' in d) == True
mit
Python
8a80e5d64293bc39299da2d2a77f4b29fef820c9
fix TestHiddenHilite.test_does_highlight_fenced_blocks to use has_pygments
googlearchive/py-gfm,Zopieux/py-gfm
tests/test_hidden_hilite.py
tests/test_hidden_hilite.py
# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import gfm from test_case import TestCase class TestHiddenHilite(TestCase): def setUp(self): ...
# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import gfm from test_case import TestCase class TestHiddenHilite(TestCase): def setUp(self): ...
bsd-3-clause
Python
abebe7c0a1a8cad2a2305ade04e17dbae2ddc9d7
Test updated to accomodate change where normalisation script updates the output artifact and not the input artifact
EdinburghGenomics/clarity_scripts,EdinburghGenomics/clarity_scripts
tests/test_normalisation.py
tests/test_normalisation.py
from unittest.mock import Mock, patch, PropertyMock from scripts.normalisation import CalculateVolumes from tests.test_common import TestEPP def fake_outputs_per_input(inputid, Analyte=False): # outputs_per_input is a list of all of the outputs per input obtained from the process by searching with input id #...
from unittest.mock import Mock, patch, PropertyMock from scripts.normalisation import CalculateVolumes from tests.test_common import TestEPP class TestNormalisation(TestEPP): def setUp(self): step_udfs = { 'KAPA Volume (uL)': 60, 'KAPA Target DNA Concentration (ng/ul)': 50 ...
mit
Python
422d934da65a1ea91d99c095c79376f1fd85ffe0
Use basic_get() and yield, so we don't need queue
miaoski/amqp-http-river
amqp-http.py
amqp-http.py
# -*- coding: utf8 -*- # Hand-made AMQP to HTTP river, like rabbitmq-http import pika from flask import Flask, Response QUEUE = 'queue_name' ROUTING_KEY = 'routing.key.#' EXCHANGE = 'feeds' AMQP = 'amqp://user:pass@host:5672/%2Fvhost' app = Flask(__name__) @app.route('/', methods=['GET']) def get_queue(): retur...
# -*- coding: utf8 -*- # Hand-made AMQP to HTTP river, like rabbitmq-http import pika import Queue import thread from flask import Flask, Response q = Queue.Queue() QUEUE = 'queue_name' ROUTING_KEY = 'routing.key.#' EXCHANGE = 'feeds' AMQP = 'amqp://user:pass@host:5672/%2Fvhost' app = Flask(__name__) @app.route('/...
mit
Python
d0bfa5a394cdd6c6d53d1d17a94aa42e07dfe7aa
fix test for new napalm version with get_config
20c/ngage,20c/ngage
tests/test_plugin_napalm.py
tests/test_plugin_napalm.py
import pytest import ngage default_config = { 'host': 'localhost', 'type': 'napalm:junos' } @pytest.fixture() def cls(): return ngage.plugin.get_plugin_class('napalm') @pytest.fixture() def obj(cls): return cls(default_config) def test_init(cls): assert cls(default_config) def test_in...
import pytest import ngage default_config = { 'host': 'localhost', 'type': 'napalm:junos' } @pytest.fixture() def cls(): return ngage.plugin.get_plugin_class('napalm') @pytest.fixture() def obj(cls): return cls(default_config) def test_init(cls): assert cls(default_config) def test_in...
apache-2.0
Python
2e133e08a0ae87289d6d0b75058ff4b790bbb112
Add test that InvCovDiag is computed correctly (it is)
kwikteam/klustakwik2,benvermaercke/klustakwik2
klustakwik2/tests/test_linear_algebra.py
klustakwik2/tests/test_linear_algebra.py
from numpy import * from klustakwik2 import * from numpy.testing import assert_raises, assert_array_almost_equal, assert_array_equal from nose import with_setup from nose.tools import nottest from klustakwik2.linear_algebra import BlockPlusDiagonalMatrix from scipy.linalg import cho_factor, cho_solve, cholesky, s...
from numpy import * from klustakwik2 import * from numpy.testing import assert_raises, assert_array_almost_equal, assert_array_equal from nose import with_setup from nose.tools import nottest from klustakwik2.linear_algebra import BlockPlusDiagonalMatrix from scipy.linalg import cho_factor, cho_solve, cholesky, s...
bsd-3-clause
Python
d90756b6dcf971b169b417e25f24d618e90ea547
Enable TLS for exim4
samuel/kokki
kokki/cookbooks/exim4/recipes/default.py
kokki/cookbooks/exim4/recipes/default.py
from kokki import * Package("exim4", action="upgrade") Service("exim4", supports_restart=True) File("/etc/exim4/update-exim4.conf.conf", owner = "root", group = "root", mode = 0644, content = Template("exim4/update-exim4.conf.conf.j2"), notifies = [("restart", env.resources["Service"]["exim4"...
from kokki import * Package("exim4", action="upgrade") Service("exim4", supports_restart=True) File("/etc/exim4/update-exim4.conf.conf", owner = "root", group = "root", mode = 0644, content = Template("exim4/update-exim4.conf.conf.j2"), notifies = [("restart", env.resources["Service"]["exim4"...
bsd-3-clause
Python
64a7ce3108f5e36ac286cef9aeb6cf0d862ef6a9
bump to 0.2.0
h2non/riprova
riprova/__init__.py
riprova/__init__.py
# -*- coding: utf-8 -*- from .retry import retry from .retrier import Retrier from .backoff import Backoff from .constants import PY_34 from .errors import ErrorWhitelist, ErrorBlacklist, add_whitelist_error from .strategies import * # noqa from .exceptions import (RetryError, MaxRetriesExceeded, ...
# -*- coding: utf-8 -*- from .retry import retry from .retrier import Retrier from .backoff import Backoff from .constants import PY_34 from .errors import ErrorWhitelist, ErrorBlacklist, add_whitelist_error from .strategies import * # noqa from .exceptions import (RetryError, MaxRetriesExceeded, ...
mit
Python
e5667063e33a814220eab323d49eee28a7114cc9
Fix a test
DragonComputer/Dragonfire,DragonComputer/Dragonfire,DragonComputer/Dragonfire,mertyildiran/Dragonfire,mertyildiran/Dragonfire
dragonfire/tests/test_omniscient.py
dragonfire/tests/test_omniscient.py
# -*- coding: utf-8 -*- """ .. module:: test_omniscient :platform: Unix :synopsis: tests for the omniscient submodule. .. moduleauthor:: Mehmet Mert Yıldıran <mert.yildiran@bil.omu.edu.tr> """ from dragonfire.omniscient import Omniscient import spacy import pytest @pytest.fixture def omniscient(): '''...
# -*- coding: utf-8 -*- """ .. module:: test_omniscient :platform: Unix :synopsis: tests for the omniscient submodule. .. moduleauthor:: Mehmet Mert Yıldıran <mert.yildiran@bil.omu.edu.tr> """ from dragonfire.omniscient import Omniscient import spacy import pytest @pytest.fixture def omniscient(): '''...
mit
Python
b579516ec0a95fc8280e5fd55a09f381f49d1b64
Remove unneeded module `sys`
Pablosan/hello-bottlepy,Pablosan/hello-bottlepy
hello-bottlepy/server.py
hello-bottlepy/server.py
# Copyright (c) 2011-2014 Paul Nelson (Pablosan@SalientBlue.com) # 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/LICEN...
# Copyright (c) 2011-2014 Paul Nelson (Pablosan@SalientBlue.com) # 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/LICEN...
apache-2.0
Python