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 |
|---|---|---|---|---|---|---|---|---|
68424fd529a67c10fa8d39aae0b5d77ae171565b | bump version to 4.0.10 | guardian/alerta,guardian/alerta,mrkeng/alerta,skob/alerta,skob/alerta,mrkeng/alerta,mrkeng/alerta,mrkeng/alerta,guardian/alerta,guardian/alerta,skob/alerta,skob/alerta | alerta/version.py | alerta/version.py | __version__ = '4.0.10'
| __version__ = '4.0.9'
| apache-2.0 | Python |
2a6450b3bf74581a550769addb86abab893c2249 | Add functions that: map the [0,1] to the real numbers, apply a 3d rotation, than undo the transformation (normalization) | robotenique/RandomAccessMemory,robotenique/RandomAccessMemory,robotenique/RandomAccessMemory | Python_Data/imgProcessing.py | Python_Data/imgProcessing.py | import matplotlib.pyplot as plt
import matplotlib.image as img
from matplotlib.animation import FuncAnimation
import numpy as np
def main():
im = img.imread("oi.jpg")
print(im.shape)
rotateColor(im)
def undo_normalise(im):
return (1 + 1/(np.exp(-im) + 1) * 257).astype("uint8")
def normalize(im):
r... | import matplotlib.pyplot as plt
import matplotlib.image as img
import numpy as np
def main():
im = img.imread("oi.jpg")
print(im.shape)
plotImage(im)
def plotImage(im, h = 8, **kwargs):
# Slice Image : im = im[100:300,:200,:]
y = im.shape[0]
x = im.shape[1]
w = (y/x) * h
'''
plt.figure(figsize = ... | unlicense | Python |
41cd880e328e87f422a4311658bd55f2e6b6a848 | add magic mocks | smueller18/kafka-connector,smueller18/kafka-connector | docs/conf.py | docs/conf.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
sys.path.insert(0, os.path.abspath('../'))
import kafka_connector
import sys
from unittest.mock import MagicMock
__author__ = u'Stephan Müller'
__copyright__ = u'2017, Stephan Müller'
__license__ = u'MIT'
class Mock(MagicMock):
@classmethod
... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
sys.path.insert(0, os.path.abspath('../'))
import kafka_connector
__author__ = u'Stephan Müller'
__copyright__ = u'2017, Stephan Müller'
__license__ = u'MIT'
version = release = kafka_connector.__version__
extensions = [
'sphinx.ext.autodoc',
... | mit | Python |
946de0ffa36330aca262e23074d5cd289fa186bd | use utf-8 encoding for last transactions file | 2mv/raapija | last_transactions_parser.py | last_transactions_parser.py | import csv
import tempfile
import os
class LastTransactionsParser:
LAST_TRANSACTIONS_FILENAME = os.path.join(tempfile.gettempdir(), 'raapija_transactions_last.csv')
@staticmethod
def read():
try:
with open(LastTransactionsParser.LAST_TRANSACTIONS_FILENAME, 'r', encoding='utf-8') as csvfile:
... | import csv
import tempfile
import os
class LastTransactionsParser:
LAST_TRANSACTIONS_FILENAME = os.path.join(tempfile.gettempdir(), 'raapija_transactions_last.csv')
@staticmethod
def read():
try:
with open(LastTransactionsParser.LAST_TRANSACTIONS_FILENAME, 'r') as csvfile:
reader = csv.DictR... | isc | Python |
1ea4d475b5d7a822958599085500c05e5b6e6dee | Update create_playlist.py | plamere/spotipy | examples/create_playlist.py | examples/create_playlist.py | # Creates a playlist for a user
import pprint
import sys
import os
import subprocess
import spotipy
import spotipy.util as util
if len(sys.argv) > 2:
username = sys.argv[1]
playlist_name = sys.argv[2]
playlist_description = sys.argv[3]
else:
print("Usage: %s username playlist-name playlist-descripti... | # Creates a playlist for a user
import pprint
import sys
import os
import subprocess
import spotipy
import spotipy.util as util
if len(sys.argv) > 2:
username = sys.argv[1]
playlist_name = sys.argv[2]
playlist_description = sys.argv[3]
else:
print("Usage: %s username playlist-name playlist-descripti... | mit | Python |
87c039dec966effb65ee346407e3bac77cf67f50 | Reorganize docs/conf.py | dave-shawley/ietfparse | docs/conf.py | docs/conf.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import ietfparse
project = 'ietfparse'
copyright = '2014-2022, Dave Shawley'
version = ietfparse.version
release = '.'.join(str(x) for x in ietfparse.version_info[:2])
needs_sphinx = '1.0'
extensions = []
templates_path = []
source_suffix = '.rst'
source_encoding = 'utf... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import ietfparse
project = 'ietfparse'
copyright = '2014-2020, Dave Shawley'
version = ietfparse.version
release = '.'.join(str(x) for x in ietfparse.version_info[:2])
needs_sphinx = '1.0'
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphi... | bsd-3-clause | Python |
e22669d13c37566ceac87230449e6d3ce7aab062 | update version | mongolab/mongoctl | mongoctl/version.py | mongoctl/version.py | __author__ = 'abdul'
MONGOCTL_VERSION = '1.1.15'
| __author__ = 'abdul'
MONGOCTL_VERSION = '1.1.14'
| mit | Python |
cee8edabbc50799940f2f5ab424ac5e132a89fe8 | Implement Core Hound Puppies / Core Hound Pup | Meerkov/fireplace,smallnamespace/fireplace,oftc-ftw/fireplace,smallnamespace/fireplace,NightKev/fireplace,Ragowit/fireplace,oftc-ftw/fireplace,Meerkov/fireplace,liujimj/fireplace,amw2104/fireplace,amw2104/fireplace,jleclanche/fireplace,liujimj/fireplace,beheh/fireplace,Ragowit/fireplace | fireplace/cards/blackrock/brawl.py | fireplace/cards/blackrock/brawl.py | from ..utils import *
##
# Hero Powers
# Wild Magic
class TBA01_5:
activate = Buff(Give(CONTROLLER, RandomMinion()), "TBA01_5e")
class TBA01_5e:
cost = SET(0)
# Molten Rage
class TBA01_6:
activate = Summon(CONTROLLER, "CS2_118")
##
# Minions
# Dragonkin Hatcher
class BRMC_84:
play = Summon(CONTROLLER, "BRM... | from ..utils import *
##
# Hero Powers
# Wild Magic
class TBA01_5:
activate = Buff(Give(CONTROLLER, RandomMinion()), "TBA01_5e")
class TBA01_5e:
cost = SET(0)
# Molten Rage
class TBA01_6:
activate = Summon(CONTROLLER, "CS2_118")
##
# Minions
# Dragonkin Hatcher
class BRMC_84:
play = Summon(CONTROLLER, "BRM... | agpl-3.0 | Python |
fe2219dc8f7fa69eaba35d3b4c8c043519cc510a | Add retry so we create topics, then fill them | phanib4u/streamparse,hodgesds/streamparse,msmakhlouf/streamparse,codywilbourn/streamparse,petchat/streamparse,scrapinghub/streamparse,scrapinghub/streamparse,petchat/streamparse,phanib4u/streamparse,scrapinghub/streamparse,hodgesds/streamparse,msmakhlouf/streamparse,Parsely/streamparse,petchat/streamparse,Parsely/strea... | examples/kafka-jvm/tasks.py | examples/kafka-jvm/tasks.py | import json
import random
import time
import logging
from invoke import task, run
from kafka.common import UnknownTopicOrPartitionError
from kafka.client import KafkaClient
from kafka.producer import SimpleProducer
from streamparse.ext.invoke import *
logging.basicConfig(format='%(asctime)-15s %(module)s %(name)s %(... | import json
import random
import time
import logging
from invoke import task, run
from kafka.client import KafkaClient
from kafka.producer import SimpleProducer
from streamparse.ext.invoke import *
logging.basicConfig(format='%(asctime)-15s %(module)s %(name)s %(message)s')
def random_pixel_generator():
urls = ... | apache-2.0 | Python |
9ee1b77dea630ca2f0f7282d39581d72d4f4da0a | Add required imports | adsorensen/girder,manthey/girder,girder/girder,Xarthisius/girder,sutartmelson/girder,data-exp-lab/girder,sutartmelson/girder,adsorensen/girder,girder/girder,Xarthisius/girder,adsorensen/girder,kotfic/girder,sutartmelson/girder,girder/girder,Xarthisius/girder,manthey/girder,data-exp-lab/girder,RafaelPalomar/girder,jbeez... | clients/python/setup.py | clients/python/setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... | apache-2.0 | Python |
3bd42af99e99f526349dda8e392009c782bd7a01 | Implement the x86 nop to be a "fault" microop which returns "NoFault". | SanchayanMaity/gem5,rjschof/gem5,Weil0ng/gem5,samueldotj/TeeRISC-Simulator,gem5/gem5,Weil0ng/gem5,gem5/gem5,samueldotj/TeeRISC-Simulator,HwisooSo/gemV-update,zlfben/gem5,samueldotj/TeeRISC-Simulator,cancro7/gem5,zlfben/gem5,aclifton/cpeg853-gem5,KuroeKurose/gem5,cancro7/gem5,briancoutinho0905/2dsampling,aclifton/cpeg85... | src/arch/x86/isa/insts/no_operation.py | src/arch/x86/isa/insts/no_operation.py | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# Redistribution and use of this software in source and binary forms,
# with or without modification, are permitted provided that the
# following conditions are met:
#
# The software must be used only for Non-Commercial Use which mean... | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# Redistribution and use of this software in source and binary forms,
# with or without modification, are permitted provided that the
# following conditions are met:
#
# The software must be used only for Non-Commercial Use which mean... | bsd-3-clause | Python |
9d8dfc0581d3bef8da89271650a546a70a477fb3 | Add get_json to door urls | hackerspace-ntnu/website,hackerspace-ntnu/website,hackerspace-ntnu/website | door/urls.py | door/urls.py | from django.conf.urls import url
from . import views
from website.settings import DOOR_KEY
urlpatterns = [
url(r'^$', views.door_post, name='door_post'),
url(r'^get_status/', views.get_status, name='get_status'),
url(r'^get_json/', views.get_json, name='get_json'),
url(r'^door-data/', views.door_data,... | from django.conf.urls import url
from . import views
from website.settings import DOOR_KEY
urlpatterns = [
url(r'^$', views.door_post, name='door_post'),
url(r'^get_status/', views.get_status, name='get_status'),
url(r'^door-data/', views.door_data, name='door_data'),
]
| mit | Python |
4d55538938b55566423ef458b406091a25f422ea | Fix re-encoding action in admin interface | jbittel/django-multimedia,teury/django-multimedia | multimedia/admin.py | multimedia/admin.py | from django.contrib import admin
from .models import Audio
from .models import Video
from .models import EncodeProfile
class MediaAdmin(admin.ModelAdmin):
actions = ['re_encode']
list_display = ('title', 'encoding', 'encoded', 'uploaded', 'created', 'modified')
list_filter = ('encoded', 'uploaded', 'enco... | from django.contrib import admin, messages
from .models import Audio
from .models import Video
from .models import EncodeProfile
class MediaAdmin(admin.ModelAdmin):
list_display = ('title', 'encoding', 'encoded', 'uploaded', 'created', 'modified')
prepopulated_fields = {'slug': ('title',)}
list_filter = ... | bsd-3-clause | Python |
dbeeadc48d3ea194a6b5639bbef2ff898f8880c6 | Update log.py | gtnx/mutagenerate | mutagenerate/log.py | mutagenerate/log.py | # -*- coding: utf-8 -*-
import logging
logger = logging.getLogger("mutagenerate")
logger.setLevel(logging.DEBUG)
logger.addHandler(logging.NullHandler())
| import logging
logger = logging.getLogger("mutagenerate")
logger.setLevel(logging.DEBUG)
logger.addHandler(logging.NullHandler())
| mit | Python |
bd810317b5bdf149e4141f0c17316bd3f0f91b0c | Change root driver response to list the possible actions you can use | ustwo/mastermind,ustwo/mastermind | proxyswitch/driver.py | proxyswitch/driver.py | from flask import Flask, jsonify
class Driver:
'''
Holds the driver state so the flasked script can change behaviour based
on what the user injects via HTTP
'''
name = None
def start(self, name):
self.name = name
return {"driver": self.name, "state": "started"}
def... | from flask import Flask, jsonify
class Driver:
'''
Holds the driver state so the flasked script can change behaviour based
on what the user injects via HTTP
'''
name = None
def start(self, name):
self.name = name
return {"driver": self.name, "state": "started"}
def... | mit | Python |
1bd0849ec8b5a2d48ded017ff75bef69a5ff02cb | Enable admin-doc URLs | saschpe/duff.suse.de,saschpe/duff.suse.de | duff/urls.py | duff/urls.py | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', 'duff.views.index', name='index'),
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/', include(admin.site.urls)),
)
| from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', 'duff.views.index', name='index'),
#url(r'^vm/', include('duff.vm.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admi... | apache-2.0 | Python |
071a186a677d2ddedee1d0222efb11cd9f976355 | make it delete the command | appu1232/Selfbot-for-Discord | cogs/urbandictionary.py | cogs/urbandictionary.py | import requests
import json
import discord
import prettytable
import string
from urllib import parse
from PythonGists import PythonGists
from appuselfbot import bot_prefix
from discord.ext import commands
from cogs.utils.checks import *
'''Urban dictionary discord.py scraper written by Archit Date.'''
class Urban:
... | import requests
import json
import discord
import prettytable
import string
from urllib import parse
from PythonGists import PythonGists
from appuselfbot import bot_prefix
from discord.ext import commands
from cogs.utils.checks import *
'''Urban dictionary discord.py scraper written by Archit Date.'''
class Urban:
... | mit | Python |
7c08497e3e3e08f3ebf82eb594c25c1ab65b4d9d | Implement fallback for tokenizing non-nphs tagged users | SocialNPHS/SocialNPHS | SocialNPHS/language/tweet.py | SocialNPHS/language/tweet.py | """
Given a tweet, tokenize it and shit.
"""
import nltk
from nltk.tokenize import TweetTokenizer
from SocialNPHS.sources.twitter.auth import api
from SocialNPHS.sources.twitter import user
def get_tweet_tags(tweet):
""" Break up a tweet into individual word parts """
tknzr = TweetTokenizer()
tokens = t... | """
Given a tweet, tokenize it and shit.
"""
import nltk
from nltk.tokenize import TweetTokenizer
from SocialNPHS.sources.twitter.auth import api
from SocialNPHS.sources.twitter import user
def get_tweet_tags(tweet):
""" Break up a tweet into individual word parts """
tknzr = TweetTokenizer()
tokens = t... | mit | Python |
c68a3d02f7f288d8bbb84ddd206797601656e796 | clean context regardless command success | oVirt/ovirt-engine-cli,oVirt/ovirt-engine-cli | src/ovirtcli/command/disconnect.py | src/ovirtcli/command/disconnect.py | #
# Copyright (c) 2010 Red Hat, 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 t... | #
# Copyright (c) 2010 Red Hat, 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 t... | apache-2.0 | Python |
8f9f2a95765bb4c03a980cb7dfae7bd85f6b5422 | Change filename download structure | joshim5/TALE_Toolbox,joshim5/TALE_Toolbox,joshim5/TALE_Toolbox | TALE_Toolbox/public/views.py | TALE_Toolbox/public/views.py | # -*- coding: utf-8 -*-
"""Public section, including homepage and signup."""
from flask import (Blueprint, request, render_template, flash, url_for,
redirect, session, make_response)
from TALE_Toolbox.utils import flash_errors
from TALE_Toolbox.computations import ReferenceSequenceGenerator
#from T... | # -*- coding: utf-8 -*-
"""Public section, including homepage and signup."""
from flask import (Blueprint, request, render_template, flash, url_for,
redirect, session, make_response)
from TALE_Toolbox.utils import flash_errors
from TALE_Toolbox.computations import ReferenceSequenceGenerator
#from T... | apache-2.0 | Python |
4c8e9861398523958ffb79d0d5bbaee12164882d | move debug logs to logging.debug | f-droid/fdroid-server,f-droid/fdroidserver,fdroidtravis/fdroidserver,f-droid/fdroid-server,fdroidtravis/fdroidserver,f-droid/fdroidserver,f-droid/fdroid-server,f-droid/fdroid-server,fdroidtravis/fdroidserver,f-droid/fdroid-server,f-droid/fdroidserver,f-droid/fdroidserver,f-droid/fdroidserver,fdroidtravis/fdroidserver | fdroidserver/rewritemeta.py | fdroidserver/rewritemeta.py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# rewritemeta.py - part of the FDroid server tools
# This cleans up the original .txt metadata file format.
# Copyright (C) 2010-12, Ciaran Gultnieks, ciaran@ciarang.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the ... | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# rewritemeta.py - part of the FDroid server tools
# This cleans up the original .txt metadata file format.
# Copyright (C) 2010-12, Ciaran Gultnieks, ciaran@ciarang.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the ... | agpl-3.0 | Python |
6cb0a11619311a614b801ba144883ed8403dce57 | Fix tests | stadtgestalten/stadtgestalten,stadtgestalten/stadtgestalten,stadtgestalten/stadtgestalten | features/gestalten/tests.py | features/gestalten/tests.py | from django.contrib import auth
from django.core.urlresolvers import reverse
from django.test import TestCase
class GestaltMixin:
@classmethod
def setUpTestData(cls):
super().setUpTestData()
cls.gestalt = auth.get_user_model().objects.create(
email='test@example.org', username=... | from django.contrib import auth
from django.core.urlresolvers import reverse
from django.test import TestCase
import core.tests
class GestaltMixin:
@classmethod
def setUpTestData(cls):
super().setUpTestData()
cls.gestalt = auth.get_user_model().objects.create(
email='test@exam... | agpl-3.0 | Python |
cdb3dad95f9d8a9d7795790bd5519db90f2d45fc | Remove unnecessary imports | fedora-infra/fedmsg,mathstuf/fedmsg,vivekanand1101/fedmsg,vivekanand1101/fedmsg,maxamillion/fedmsg,vivekanand1101/fedmsg,mathstuf/fedmsg,pombredanne/fedmsg,pombredanne/fedmsg,chaiku/fedmsg,chaiku/fedmsg,cicku/fedmsg,maxamillion/fedmsg,maxamillion/fedmsg,cicku/fedmsg,pombredanne/fedmsg,chaiku/fedmsg,fedora-infra/fedmsg,... | fedmsg/tests/test_config.py | fedmsg/tests/test_config.py | # This file is part of fedmsg.
# Copyright (C) 2012 Red Hat, Inc.
#
# fedmsg is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#... | # This file is part of fedmsg.
# Copyright (C) 2012 Red Hat, Inc.
#
# fedmsg is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#... | lgpl-2.1 | Python |
fd84245b31ca69dd98b7f2edc58ea01ad34bc36b | Update entity.py | LucidAi/nlcd,LucidAi/nlcd,LucidAi/nlcd,LucidAi/nlcd | fenrir/extraction/entity.py | fenrir/extraction/entity.py | # coding: utf-8
# Author: Vova Zaytsev <zaytsev@usc.edu>
import nltk
class NerExtractor(object):
def apply_truecase(self, tokens):
tokens = tokens[:]
for i in xrange(len(tokens)):
if len(tokens[i]) <= 3 or tokens[i][0] == "@":
continue
elif tokens[i].isupp... | # coding: utf-8
# Author: Vova Zaytsev <zaytsev@usc.edu>
import nltk
class NerExtractor(object):
def apply_truecase(self, tokens):
tokens = tokens[:]
for i in xrange(len(tokens)):
if len(tokens[i]) <= 3 or tokens[i][0] == "@":
continue
elif tokens[i].isupp... | mit | Python |
a212c5c859cef769bbe3d46c1da816bf6218b773 | Copy test backend code from couch model to sql model | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq | corehq/messaging/smsbackends/test/models.py | corehq/messaging/smsbackends/test/models.py | from django.conf import settings
from corehq.apps.sms.mixin import SMSBackend
from corehq.apps.sms.models import SQLSMSBackend
from corehq.apps.sms.forms import BackendForm
class TestSMSBackend(SMSBackend):
@classmethod
def get_api_id(cls):
return "TEST"
@classmethod
def get_generic_name(cls)... | from django.conf import settings
from corehq.apps.sms.mixin import SMSBackend
from corehq.apps.sms.models import SQLSMSBackend
from corehq.apps.sms.forms import BackendForm
class TestSMSBackend(SMSBackend):
@classmethod
def get_api_id(cls):
return "TEST"
@classmethod
def get_generic_name(cls)... | bsd-3-clause | Python |
30350b441537b267768052244d6a886d69c627b4 | remove the order_by as it's unneeded really | crate-archive/crate-site,crateio/crate.pypi,crate-archive/crate-site | crate_project/apps/packages/simple/views.py | crate_project/apps/packages/simple/views.py | from django.core.urlresolvers import reverse
from django.http import HttpResponseNotFound, HttpResponsePermanentRedirect
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from packages.models import Package
def not_found(request):
return HttpResponseNotFound("Not F... | from django.core.urlresolvers import reverse
from django.http import HttpResponseNotFound, HttpResponsePermanentRedirect
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from packages.models import Package
def not_found(request):
return HttpResponseNotFound("Not F... | bsd-2-clause | Python |
a4514de232e887100d2bb122be8843d7727d8523 | simplify dependencies | poldracklab/niworkflows,poldracklab/niworkflows,oesteban/niworkflows,oesteban/niworkflows,oesteban/niworkflows | niworkflows/info.py | niworkflows/info.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
These pipelines are developed by the Poldrack lab at Stanford University
(https://poldracklab.stanford.edu/) for use at
the Center for Reproducible Neurosci... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
These pipelines are developed by the Poldrack lab at Stanford University
(https://poldracklab.stanford.edu/) for use at
the Center for Reproducible Neurosci... | apache-2.0 | Python |
aed78eb3bd8748c317d4a432970ebf341ca4f668 | Update dev version | oesteban/niworkflows,oesteban/niworkflows,poldracklab/niworkflows,oesteban/niworkflows,poldracklab/niworkflows | niworkflows/info.py | niworkflows/info.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
These pipelines are developed by the Poldrack lab at Stanford University
(https://poldracklab.stanford.edu/) for use at
the Center for Reproducible Neurosci... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
These pipelines are developed by the Poldrack lab at Stanford University
(https://poldracklab.stanford.edu/) for use at
the Center for Reproducible Neurosci... | apache-2.0 | Python |
68680b8b116e10ae4e35c39b8a62c0307ee65fe4 | Fix dedupe not preserving order | muddyfish/PYKE,muddyfish/PYKE | node/deduplicate.py | node/deduplicate.py | #!/usr/bin/env python
from nodes import Node
class Deduplicate(Node):
char = "}"
args = 1
results = 1
@Node.test_func([2], [4])
@Node.test_func([1.5], [3])
def double(self, inp: Node.number):
"""inp*2"""
return inp*2
@Node.test_func([[1,2,3,1,1]], [[1,2,3]])
... | #!/usr/bin/env python
from nodes import Node
class Deduplicate(Node):
char = "}"
args = 1
results = 2
@Node.test_func([2], [4])
@Node.test_func([1.5], [3])
def double(self, inp: Node.number):
"""inp*2"""
self.results = 1
return inp*2
def func(self, seq... | mit | Python |
e3fc8a41a498afce94a5b7411c540390ed41d33f | Set version to 1.9.16. | karstenw/nodebox-pyobjc,karstenw/nodebox-pyobjc | nodebox/__init__.py | nodebox/__init__.py | __version__='1.9.16'
# import geo
# import graphics
# import gui
# import util
def get_version():
return __version__
| __version__='1.9.15'
# import geo
# import graphics
# import gui
# import util
def get_version():
return __version__ | mit | Python |
8ce53f2437194cde336003558e1d02ae11c14266 | update type hinting for 2.x compatibility | wikkiewikkie/flask-googlecharts,wikkiewikkie/flask-googlecharts,wikkiewikkie/flask-googlecharts | flask_googlecharts/utils.py | flask_googlecharts/utils.py | import datetime
def prep_data(data):
# type: (dict) -> dict
"""Takes a dict intended to be converted to JSON for use with Google Charts and transforms date and datetime
into date string representations as described here:
https://developers.google.com/chart/interactive/docs/datesandtimes
TODO: I... | import datetime
def prep_data(data):
# type: (dict) -> dict
"""Takes a dict intended to be converted to JSON for use with Google Charts and transforms date and datetime
into date string representations as described here:
https://developers.google.com/chart/interactive/docs/datesandtimes
TODO: I... | mit | Python |
7f69f15880c2a5c22e909451abb37beb6a2862bf | Add TestProjectManager | elegion/djangodash2012,elegion/djangodash2012 | fortuitus/feditor/models.py | fortuitus/feditor/models.py | from autoslug.fields import AutoSlugField
from django.db import models
from fortuitus.fcore.models import Company
from fortuitus.feditor import models_base
from fortuitus.feditor.dbfields import ParamsField
class TestProjectManager(models.Manager):
def get_by_company(self, company):
return TestProject.ob... | from autoslug.fields import AutoSlugField
from django.db import models
from fortuitus.fcore.models import Company
from fortuitus.feditor import models_base
from fortuitus.feditor.dbfields import ParamsField
class TestProject(models.Model):
"""
Test project.
Contains info about API being tested and multi... | mit | Python |
50fafefd3b198d4bfc6f34755b8e2303b190e673 | Add correct id to deployment queue object | frigg/frigg-hq,frigg/frigg-hq,frigg/frigg-hq | frigg/deployments/models.py | frigg/deployments/models.py | import json
import redis
from django.conf import settings
from django.db import models
from .managers import PRDeploymentManager
class PRDeployment(models.Model):
build = models.OneToOneField('builds.Build', related_name='deployment', unique=True)
port = models.IntegerField()
image = models.CharField(ma... | import json
import redis
from django.conf import settings
from django.db import models
from .managers import PRDeploymentManager
class PRDeployment(models.Model):
build = models.OneToOneField('builds.Build', related_name='deployment', unique=True)
port = models.IntegerField()
image = models.CharField(ma... | mit | Python |
3f80c744a653cc271975ec17165c8be57e172e3e | Add before and after output of removing CR in hex | jdgwartney/boundary-plugin-shell,boundary/boundary-plugin-shell,jdgwartney/boundary-plugin-shell,boundary/boundary-plugin-shell | exec_proc.py | exec_proc.py | #!/usr/bin/env python
# Copyright 2014 Boundary, 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 o... | #!/usr/bin/env python
# Copyright 2014 Boundary, 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 o... | apache-2.0 | Python |
721329dda87f4a98b4236928d8b7242981726deb | Add StudyType to admin app. | CenterForOpenScience/lookit-api,pattisdr/lookit-api,CenterForOpenScience/lookit-api,pattisdr/lookit-api,pattisdr/lookit-api,CenterForOpenScience/lookit-api | exp/admin.py | exp/admin.py | from django.contrib import admin
from guardian.admin import GuardedModelAdmin
from studies.models import Response, ResponseLog, Study, StudyLog, Feedback, StudyType
class StudyAdmin(GuardedModelAdmin):
pass
class ResponseAdmin(GuardedModelAdmin):
pass
class FeedbackAdmin(GuardedModelAdmin):
pass
clas... | from django.contrib import admin
from guardian.admin import GuardedModelAdmin
from studies.models import Response, ResponseLog, Study, StudyLog, Feedback
class StudyAdmin(GuardedModelAdmin):
pass
class ResponseAdmin(GuardedModelAdmin):
pass
class FeedbackAdmin(GuardedModelAdmin):
pass
class StudyLogA... | apache-2.0 | Python |
075fb7da378d7ad498d77a01f299207b70d64176 | exit when the command last longer than CRON_TIMEOUT, if it's set. | Ixxy-Open-Source/django-cron | django_cron/management/commands/cronjobs.py | django_cron/management/commands/cronjobs.py | #
# run the cron service (intended to be executed from a cron job)
#
# usage: manage.py cronjobs
import sys
import signal
from datetime import datetime
from django.conf import settings
from django.core.management.base import NoArgsCommand
import django_cron
# exit when the command last longer than CRON_TIMEOUT, if it... | #
# run the cron service (intended to be executed from a cron job)
#
# usage: manage.py cronjobs
from datetime import datetime
from django.conf import settings
from django.core.management.base import NoArgsCommand
import django_cron
class Command(NoArgsCommand):
help = "run the cron services (intended to be exec... | mit | Python |
8fe56225c30428ba4756116e2b1934ec99b0132a | include the cryptography library as a depedency | vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa | python/vespa/setup.py | python/vespa/setup.py | import os
import setuptools
def get_target_version():
build_nr = os.environ.get("GITHUB_RUN_NUMBER", "0+dev")
version = "0.1"
return "{}.{}".format(version, build_nr)
min_python = "3.6"
setuptools.setup(
name="pyvespa",
version=get_target_version(),
description="Python API for vespa.ai",
... | import os
import setuptools
def get_target_version():
build_nr = os.environ.get("GITHUB_RUN_NUMBER", "0+dev")
version = "0.1"
return "{}.{}".format(version, build_nr)
min_python = "3.6"
setuptools.setup(
name="pyvespa",
version=get_target_version(),
description="Python API for vespa.ai",
... | apache-2.0 | Python |
09985bcaad408085ae0c3c0fc3ca9b5639e487a8 | Bump the revision number for the next release | vane/pywinauto,prasen-ftech/pywinauto,yongxin1029/pywinauto,ldhwin/pywinauto,vsajip/pywinauto,pjquirk/pjquirk-dotnetnames,cessor/pywinauto,pjquirk/pjquirk-dotnetnames,mjakop/pywinauto,drinkertea/pywinauto,ldhwin/pywinauto,bombilee/pywinauto,clonly/pywinauto,LogicalKnight/pywinauto,mjakop/pywinauto,ohio813/pywinauto,ohi... | pywinauto/__init__.py | pywinauto/__init__.py | # GUI Application automation and testing library
# Copyright (C) 2006 Mark Mc Mahon
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation; either version 2.1
# of the License, or (at you... | # GUI Application automation and testing library
# Copyright (C) 2006 Mark Mc Mahon
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation; either version 2.1
# of the License, or (at you... | bsd-3-clause | Python |
195d7747cde0ef902257aff1bf513c6fca5ad504 | Update xenvif to 7.2.0.48 (whql) | OwenSmith/win-installer,benchalmers/win-installer,kostaslamda/win-installer,OwenSmith/win-installer,kostaslamda/win-installer,xenserver/win-installer,cheng--zhang/win-installer,kostaslamda/win-installer,OwenSmith/win-installer,cheng--zhang/win-installer,xenserver/win-installer,cheng--zhang/win-installer,benchalmers/win... | manifestspecific.py | manifestspecific.py | # Copyright (c) Citrix Systems 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 c... | # Copyright (c) Citrix Systems 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 c... | bsd-2-clause | Python |
b2530585cf77b14784650ab2b6d7af9f9a6101fa | disable getSchema | NNTin/Reply-Dota-2-Reddit,NNTin/Reply-Dota-2-Reddit | reddit/loginreddit.py | reddit/loginreddit.py | import praw
import obot
from steamapi import getheroes, getproplayerlist, getschema, getleaguelisting
from reddit import botinfo
from reddit import workerdeletebadcomments, workerfindcomments, workerdeleterequestedcomments
import threading
from reddit.botinfo import message
#message = True
class LoginReddit:
def... | import praw
import obot
from steamapi import getheroes, getproplayerlist, getschema, getleaguelisting
from reddit import botinfo
from reddit import workerdeletebadcomments, workerfindcomments, workerdeleterequestedcomments
import threading
from reddit.botinfo import message
#message = True
class LoginReddit:
def... | mit | Python |
2516547300f288157b78a1938174fcb2d7572927 | update version | mathause/regionmask | regionmask/version.py | regionmask/version.py | version = "0.9.5"
| version = "0.9.4"
| mit | Python |
67edf5a44239a6d9044471090d22c2645eeefb74 | Fix tests | healthchecks/healthchecks,healthchecks/healthchecks,healthchecks/healthchecks,healthchecks/healthchecks | hc/lib/s3.py | hc/lib/s3.py | from io import BytesIO
from threading import Thread
from django.conf import settings
try:
from minio import Minio
from minio.deleteobjects import DeleteObject
except ImportError:
# Enforce
settings.S3_BUCKET = None
def client():
if not settings.S3_BUCKET:
raise Exception("Object storage ... | from io import BytesIO
from threading import Thread
from django.conf import settings
from minio import Minio
from minio.deleteobjects import DeleteObject
def client():
return Minio(
settings.S3_ENDPOINT,
settings.S3_ACCESS_KEY,
settings.S3_SECRET_KEY,
region=settings.S3_REGION,
... | bsd-3-clause | Python |
e5b4493605bfab3b1ce858bc4dc2e0ef02c50749 | Fix print not wanted | toulibre/agendadulibreshow | agendadulibre/parseagenda.py | agendadulibre/parseagenda.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# parseagenda.py
#
# Copyright 2013 numahell <numahell@numajules.net>
#
# 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 ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# parseagenda.py
#
# Copyright 2013 numahell <numahell@numajules.net>
#
# 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 ... | mit | Python |
ffd72d6182bb1386bc42272ba324c5d58fe7c936 | update matrix-transpose.py | denisbalyko/checkio-solution | matrix-transpose.py | matrix-transpose.py | # checkio = lambda d: zip(*d)
checkio = lambda d: list(map(list, zip(*d)))
#These "asserts" using only for self-checking and not necessary for auto-testing
def test_function():
# assert isinstance(checkio([[0]]).pop(), list) is True, "Match types"
assert checkio([[1, 2, 3],
[4, 5, 6],
... | checkio = lambda d: list(map(list, zip(*d)))
#These "asserts" using only for self-checking and not necessary for auto-testing
def test_function():
assert checkio([[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]) == [[1, 4, 7],
[2, 5, 8],
... | mit | Python |
9fa3b77486318c21e4b2e9b96d7fd82df6923546 | Set Elastix threading to the number of threads available. | berendkleinhaneveld/Registrationshop,berendkleinhaneveld/Registrationshop | core/elastix/Elastix.py | core/elastix/Elastix.py | """
Elastix
:Authors:
Berend Klein Haneveld
"""
import os
import sys
import subprocess
import multiprocessing
class Elastix(object):
"""
Elastix
Wrapper around the task-line tool Elastix.
Inspired by pyelastix by Almar Klein. His project can be found
at https://code.google.com/p/pirt/
At the moment Elastix... | """
Elastix
:Authors:
Berend Klein Haneveld
"""
import os
import sys
import subprocess
class Elastix(object):
"""
Elastix
Wrapper around the task-line tool Elastix.
Inspired by pyelastix by Almar Klein. His project can be found
at https://code.google.com/p/pirt/
At the moment Elastix must be explicitly star... | mit | Python |
b80461ceb1af401f315eea1f30a618f3f70b263e | Add verbose_name | deka108/meas_deka,deka108/meas_deka,deka108/meas_deka,deka108/mathqa-server,deka108/meas_deka,deka108/mathqa-server,deka108/mathqa-server,deka108/mathqa-server | meas_models/apps.py | meas_models/apps.py | from __future__ import unicode_literals
from django.apps import AppConfig
class MeasModelsConfig(AppConfig):
name = 'meas_models'
verbose_name = 'Control Panel'
| from __future__ import unicode_literals
from django.apps import AppConfig
class MeasModelsConfig(AppConfig):
name = 'meas_models'
| apache-2.0 | Python |
3de1cdba6c438a5bc52c10fa469b675117b9ce45 | Fix wrong formula for y position | bit0001/trajectory_tracking,bit0001/trajectory_tracking | src/trajectory/lissajous_trajectory.py | src/trajectory/lissajous_trajectory.py | #!/usr/bin/env python
from math import pi, sin
from .trajectory import Trajectory
class LissajousTrajectory(object, Trajectory):
def __init__(self, A, B, a, b, period, delta=pi/2):
Trajectory.__init__(self)
self.A = A
self.B = B
self.a = a
self.b = b
self.period = ... | #!/usr/bin/env python
from math import pi, sin, cos
from .trajectory import Trajectory
class LissajousTrajectory(object, Trajectory):
def __init__(self, A, B, a, b, period, delta=pi/2):
Trajectory.__init__(self)
self.A = A
self.B = B
self.a = a
self.b = b
self.peri... | mit | Python |
c7ce2138cbd4a154c284721150ae45ec4ea2ed8e | increase version | marl/medleydb,marl/medleydb | medleydb/version.py | medleydb/version.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Version info"""
version = "1.2.8"
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Version info"""
version = "1.2.7"
| mit | Python |
d945bf7e744857d8c609d428c736d1539190b2b2 | Add legend to Rosenbrock minimization example | kohr-h/odl,odlgroup/odl,kohr-h/odl,aringh/odl,aringh/odl,odlgroup/odl | examples/solvers/rosenbrock_minimization.py | examples/solvers/rosenbrock_minimization.py | # Copyright 2014-2016 The ODL development group
#
# This file is part of ODL.
#
# ODL 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.
#... | # Copyright 2014-2016 The ODL development group
#
# This file is part of ODL.
#
# ODL 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.
#... | mpl-2.0 | Python |
ff8c430c6589ea72b9e169455cf6437c8623cc52 | test disconnect for filterclear | kallewoof/bitcoin,midnightmagic/bitcoin,n1bor/bitcoin,MeshCollider/bitcoin,Sjors/bitcoin,instagibbs/bitcoin,apoelstra/bitcoin,MeshCollider/bitcoin,sipsorcery/bitcoin,instagibbs/bitcoin,jnewbery/bitcoin,fujicoin/fujicoin,anditto/bitcoin,mm-s/bitcoin,kallewoof/bitcoin,jonasschnelli/bitcoin,mruddy/bitcoin,qtumproject/qtum... | test/functional/p2p_nobloomfilter_messages.py | test/functional/p2p_nobloomfilter_messages.py | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test invalid p2p messages for nodes with bloom filters disabled.
Test that, when bloom filters are not... | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test invalid p2p messages for nodes with bloom filters disabled.
Test that, when bloom filters are not... | mit | Python |
8f98b52ec670ecfe89f243348f7815b0ae71eed7 | Disable falsely reported pylint errors due to unresolved library type | Morgawr/gogonlinux,Morgawr/gogonlinux | gog_utils/gol_connection.py | gog_utils/gol_connection.py | """Module hosting class representing connection to GoL."""
import json
import requests
import os
import stat
WEBSITE_URL = "http://www.gogonlinux.com"
AVAILABLE_GAMES = "/available"
BETA_GAMES = "/available-beta"
def obtain_available_games():
"""Returns JSON list of all available games."""
resp = requests.ge... | """Module hosting class representing connection to GoL."""
import json
import requests
import os
import stat
WEBSITE_URL = "http://www.gogonlinux.com"
AVAILABLE_GAMES = "/available"
BETA_GAMES = "/available-beta"
def obtain_available_games():
"""Returns JSON list of all available games."""
resp = requests.ge... | bsd-3-clause | Python |
cf7f71eaf956ee0c3fc2ad787489955e53085507 | send email notification | LandRegistry/govuk-notify-flask,LandRegistry/govuk-notify-flask | govuk_notify_flask/views.py | govuk_notify_flask/views.py | from govuk_notify_flask import app
from flask import render_template
from govuk_notify_flask.forms import EmailForm
from notifications_python_client.notifications import NotificationsAPIClient
notifications_client = NotificationsAPIClient(app.config['NOTIFY_API_KEY'])
@app.route('/', methods=["GET", "POST"])
def ind... | from govuk_notify_flask import app
from flask import render_template
from govuk_notify_flask.forms import EmailForm
from notifications_python_client.notifications import NotificationsAPIClient
notifications_client = NotificationsAPIClient(app.config['NOTIFY_API_KEY'])
@app.route('/', methods=["GET", "POST"])
def abo... | mit | Python |
691a83a0080d5d5616fd1236b96477c1ea30d995 | Allow configuration of which layer we pull from | widoptimization-willett/feature-extraction | feature_extraction/measurements/caffenet.py | feature_extraction/measurements/caffenet.py | import os.path
import numpy as np
from . import Measurement
import skimage
import caffe
class Caffenet(Measurement):
default_options = {
'caffe_root': os.path.expanduser('~/caffe/'),
'caffe_mode': 'cpu',
'layer': 'fc7',
}
def __init__(self, options=None):
super(Caffenet, self).__init__(options)
if sel... | import os.path
import numpy as np
from . import Measurement
import skimage
import caffe
class Caffenet(Measurement):
default_options = {
'caffe_root': os.path.expanduser('~/caffe/'),
'caffe_mode': 'cpu',
}
def __init__(self, options=None):
super(Caffenet, self).__init__(options)
if self.options.caffe_mo... | apache-2.0 | Python |
4de02edeededd8bd58db5510b7d745bf86487db2 | bump 0.3.0 | ImageIntelligence/mimiron | mimiron/__init__.py | mimiron/__init__.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
__version_info__ = (0, 3, 0)
__version__ = '.'.join([unicode(i) for i in __version_info__])
__author__ = 'David Vuong'
__author_email__ = 'david@imageintelligence.com'
| # -*- coding: utf-8 -*-
from __future__ import unicode_literals
__version_info__ = (0, 2, 11)
__version__ = '.'.join([unicode(i) for i in __version_info__])
__author__ = 'David Vuong'
__author_email__ = 'david@imageintelligence.com'
| mit | Python |
571ec87ca40138db827aa815e17ce0026dccf64c | Fix flakiness (#5585) | DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core | harbor/tests/test_harbor.py | harbor/tests/test_harbor.py | # (C) Datadog, Inc. 2019-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import mock
import pytest
from datadog_checks.harbor import HarborCheck
from .common import HARBOR_COMPONENTS, HARBOR_METRICS, HARBOR_VERSION, VERSION_1_5, VERSION_1_8
@pytest.mark.integration
@pytest.... | # (C) Datadog, Inc. 2019-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import pytest
from datadog_checks.harbor import HarborCheck
from .common import HARBOR_COMPONENTS, HARBOR_METRICS, HARBOR_VERSION, VERSION_1_5, VERSION_1_8
@pytest.mark.integration
@pytest.mark.usefixt... | bsd-3-clause | Python |
37e6c1531305b21d150c793c826bafdda8c6c7b0 | Use full group name | shirlei/helios-server,shirlei/helios-server,shirlei/helios-server,shirlei/helios-server,shirlei/helios-server | heliosinstitution/models.py | heliosinstitution/models.py | from django.db import models
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
# Create your models here.
class Institution(models.Model):
name = models.CharField(max_length=250)
short_name = models.CharField(max_length=100, blank=True)
main_phone = models.Ch... | from django.db import models
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
# Create your models here.
class Institution(models.Model):
name = models.CharField(max_length=250)
short_name = models.CharField(max_length=100, blank=True)
main_phone = models.Ch... | apache-2.0 | Python |
1e5433a86e28823799b1e96301d7e96ba9a89b99 | bump version | ivancrneto/hip2slack-emoji | hip2slack_emoji/__init__.py | hip2slack_emoji/__init__.py | __version__ = '0.1.1'
| __version__ = '0.1.0'
| mit | Python |
d221f3ae90963dac94624f19f693b86b41f38d9a | fix Unit Test Code Generator for Windows | ConnectedVision/connectedvision,ConnectedVision/connectedvision,ConnectedVision/connectedvision,ConnectedVision/connectedvision,ConnectedVision/connectedvision,ConnectedVision/connectedvision | test/UnitTest/GeneratorTestCode.py | test/UnitTest/GeneratorTestCode.py | import os
import subprocess
if not "ConnectedVision" in os.environ:
raise Exception("\"ConnectedVision\" environment variable is not defined")
cvDir = os.path.abspath(os.environ["ConnectedVision"])
if not os.path.isdir(cvDir):
raise Exception("the directory path referenced by the ConnectedVision environment variab... | import os
import subprocess
if not "ConnectedVision" in os.environ:
raise Exception("\"ConnectedVision\" environment variable is not defined")
cvDir = os.path.abspath(os.environ["ConnectedVision"])
if not os.path.isdir(cvDir):
raise Exception("the directory path referenced by the ConnectedVision environment variab... | mit | Python |
39d7017b2f2c81c35cf3bf4fa503306f62a076a2 | add frame props | pombredanne/pyjs,lancezlin/pyjs,minghuascode/pyj,gpitel/pyjs,minghuascode/pyj,spaceone/pyjs,pyjs/pyjs,pyjs/pyjs,anandology/pyjamas,spaceone/pyjs,lancezlin/pyjs,Hasimir/pyjs,gpitel/pyjs,anandology/pyjamas,Hasimir/pyjs,pombredanne/pyjs,gpitel/pyjs,pyjs/pyjs,pombredanne/pyjs,lancezlin/pyjs,lancezlin/pyjs,anandology/pyjama... | library/pyjamas/ui/Frame.py | library/pyjamas/ui/Frame.py | # Copyright 2006 James Tauber and contributors
# Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
#
# 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/... | # Copyright 2006 James Tauber and contributors
# Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
#
# 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/... | apache-2.0 | Python |
4ce5ad24eed443bb5430cc4193a659b28b6cdfd6 | Fix atom folder path error for the hybrid system | intel/event-converter-for-linux-perf,intel/event-converter-for-linux-perf | hybrid-json-to-perf-json.py | hybrid-json-to-perf-json.py | #!/usr/bin/python
# generate hybrid perf json files from two perf json files (core and atom)
# For example,
# hybrid-json-to-perf-json.py alderlake_gracemont_core_v0.01_private.json alderlake_goldencove_v0.01_private.json
import os
import re
import json
import argparse
import sys
import importlib
json_to_perf_json = ... | #!/usr/bin/python
# generate hybrid perf json files from two perf json files (core and atom)
# For example,
# hybrid-json-to-perf-json.py alderlake_gracemont_core_v0.01_private.json alderlake_goldencove_v0.01_private.json
import os
import re
import json
import argparse
import sys
import importlib
json_to_perf_json = ... | bsd-3-clause | Python |
d5dfac0a60d307313f338e9b9840b1e98cf5eb76 | add utils methods | mfuentesg/SyncSettings,adnedelcu/SyncSettings | sync_settings/sync_settings_manager.py | sync_settings/sync_settings_manager.py | # -*- coding: utf-8 -*-
from .gistapi import *
import sublime, sys
class SyncSettingsManager:
settingsFilename = 'SyncSettings.sublime-settings'
gistapi = None
files = [
"Package Control.merged-ca-bundle",
"Package Control.sublime-settings",
"Package Control.system-ca-bundle",
"Package Control.user-ca-bund... | # -*- coding: utf-8 -*-
from .gistapi import Gist
from .utils import *
import sublime
class SyncSettingsManager:
settingsFilename = 'SyncSettings.sublime-settings'
gistapi = None
files = [
"Package Control.merged-ca-bundle",
"Package Control.sublime-settings",
"Package Control.system-ca-bundle",
"Package C... | mit | Python |
8cc30d0fd0ef8559b9ab1f9097b8558caff286d4 | Update notegenerator.py to point to `resources` path | ebegoli/SynthNotes | synthnotes/generators/notegenerator.py | synthnotes/generators/notegenerator.py | from pkg_resources import resource_filename
from string import Template
import json
from synthnotes.properties import SubsManager
from synthnotes.generators import LengthGenerator
class NoteGenerator(object):
def __init__(self,
base_file=resource_filename('synthnotes', 'resources/test.template... | from pkg_resources import resource_filename
from string import Template
import json
from synthnotes.properties import SubsManager
from synthnotes.generators import LengthGenerator
class NoteGenerator(object):
def __init__(self,
base_file=resource_filename(__name__, 'resources/test.template'),
... | mit | Python |
57731f7d69ce56eab0386578058bb6d1f161ccec | Fix utils import in models/__init__.py. | ulule/django-linguist | linguist/models/__init__.py | linguist/models/__init__.py | # -*- coding: utf-8 -*-
import django
from ..utils.models import load_class
from .. import settings
Translation = load_class(settings.TRANSLATION_MODEL)
if django.VERSION < (1, 7):
from .. import autodiscover
autodiscover()
| # -*- coding: utf-8 -*-
import django
from ..utils import load_class
from .. import settings
Translation = load_class(settings.TRANSLATION_MODEL)
if django.VERSION < (1, 7):
from .. import autodiscover
autodiscover()
| mit | Python |
31cf067f3e4da104551baf0e02332e22a75bb80a | Add unit test, update documentation | tum-pbs/PhiFlow,tum-pbs/PhiFlow | tests/commit/field/test__field_math.py | tests/commit/field/test__field_math.py | from unittest import TestCase
from phi import math
from phi.field import StaggeredGrid, CenteredGrid
from phi.geom import Box
from phi import field
from phi.physics import Domain
class TestFieldMath(TestCase):
def test_gradient(self):
domain = Domain(x=4, y=3)
phi = domain.grid() * (1, 2)
... | from unittest import TestCase
from phi import math
from phi.geom import Box
from phi import field
from phi.physics import Domain
class TestFieldMath(TestCase):
def test_gradient(self):
domain = Domain(x=4, y=3)
phi = domain.grid() * (1, 2)
grad = field.gradient(phi, stack_dim='gradient')... | mit | Python |
383514156934163ba7a0df81034767cb8eceedc8 | Update tests to work also under Python3+ | michalbachowski/pylogging_utils,michalbachowski/pylogging_utils,michalbachowski/pylogging_utils | tests/python/test_context/test_init.py | tests/python/test_context/test_init.py | # encoding: utf-8
from __future__ import absolute_import
import unittest
import logging
from logging_utils._compat import mock
from logging_utils.context import getLoggerWithContext, buildFormattedAndSortedContextStack
from logging_utils.context.adapter import LoggerAdapterWithContext
class GetLoggerWithContextTest... | # encoding: utf-8
from __future__ import absolute_import
import unittest
import logging
from logging_utils._compat import mock
from logging_utils.context import getLoggerWithContext, buildFormattedAndSortedContextStack
from logging_utils.context.adapter import LoggerAdapterWithContext
class GetLoggerWithContextTest... | mit | Python |
c6794a4ff32020b6bba4b85d245d496cfb157250 | remove value_to_stringt | defrex/django-resize,defrex/django-resize | resize/fields.py | resize/fields.py |
from __future__ import unicode_literals, print_function
from django.db.models.fields.files import ImageField, ImageFieldFile
from resize.utils import resize_image, get_thumb_name
class ResizedImageFieldFile(ImageFieldFile):
def ensure_resolution(self, resolution):
if not resolution in self.field.resolut... |
from __future__ import unicode_literals, print_function
from django.db.models.fields.files import ImageField, ImageFieldFile
from resize.utils import resize_image, get_thumb_name
class ResizedImageFieldFile(ImageFieldFile):
def ensure_resolution(self, resolution):
if not resolution in self.field.resolut... | mit | Python |
fec24d121aa94d3ac69089d9e7ca2bbb674c64bd | Bump to version 0.28.2 | nerevu/riko,nerevu/riko | riko/__init__.py | riko/__init__.py | # -*- coding: utf-8 -*-
# vim: sw=4:ts=4:expandtab
"""
riko
~~~~
Provides methods for analyzing and processing streams of structured data
Examples:
basic usage::
>>> from itertools import chain
>>> from riko.modules.pipeitembuilder import pipe as itembuilder
>>> from riko.modules.pipestrre... | # -*- coding: utf-8 -*-
# vim: sw=4:ts=4:expandtab
"""
riko
~~~~
Provides methods for analyzing and processing streams of structured data
Examples:
basic usage::
>>> from itertools import chain
>>> from riko.modules.pipeitembuilder import pipe as itembuilder
>>> from riko.modules.pipestrre... | mit | Python |
04cd17bb03f2b15cf37313cb3261dd37902d82b0 | Add a check that coveralls is actually called | browniebroke/deezer-python,browniebroke/deezer-python,pfouque/deezer-python,browniebroke/deezer-python | run_coveralls.py | run_coveralls.py | #!/bin/env/python
# -*- coding: utf-8
import os
from subprocess import call
if __name__ == '__main__':
if 'TRAVIS' in os.environ:
print("Calling coveralls")
rc = call('coveralls')
raise SystemExit(rc)
| #!/bin/env/python
# -*- coding: utf-8
import os
from subprocess import call
if __name__ == '__main__':
if 'TRAVIS' in os.environ:
rc = call('coveralls')
raise SystemExit(rc)
| mit | Python |
87d3507be07e3a39b655f169b627212e061ce890 | send data to NOTIFY_SOCKET ourselves, rather than relying on systemd libraries being installed | shish/sdog | sdog/notifier.py | sdog/notifier.py |
#import ctypes
#import ctypes.util
import os
import socket
class SDNotifier(object):
def __init__(self):
#self.sd = ctypes.CDLL(ctypes.util.find_library("systemd-daemon"))
pass
def __notify(self, msg):
#self.sd.sd_notify(0, msg)
if "NOTIFY_SOCKET" in os.environ:
c... |
import ctypes
import ctypes.util
class SDNotifier(object):
def __init__(self):
self.sd = ctypes.CDLL(ctypes.util.find_library("systemd-daemon"))
def ready(self):
self.__notify("READY=1")
def status(self, stat):
self.__notify("STATUS=%s" % stat)
def errno(self, errno):
... | mit | Python |
abf110466b5c6cd2bebe2f28d3581343419f686a | Improve the word image dimensions plot | dwettstein/pattern-recognition-2016,dwettstein/pattern-recognition-2016,dwettstein/pattern-recognition-2016,dwettstein/pattern-recognition-2016 | search/tuning.py | search/tuning.py | import numpy as np
import matplotlib.pyplot as plt
from ip.preprocess import create_word_mask
from search.KNN import KNN
from utils.fio import get_image_roi
from utils.transcription import get_transcription
def compute_central_heights():
trc = get_transcription()
wh = []
for coord, word in trc:
r... | import numpy as np
import matplotlib.pyplot as plt
from ip.preprocess import create_word_mask
from search.KNN import KNN
from utils.fio import get_image_roi
from utils.transcription import get_transcription
def compute_central_heights():
trc = get_transcription()
wh = []
for coord, word in trc:
r... | mit | Python |
2fd976de0bd5996b6cda2577105e26776d0f2674 | change server.new.py to server.py in killer | TurtleRover/Turtle-Rover-Mission-Control,TurtleRover/Turtle-Rover-Mission-Control,TurtleRover/Turtle-Rover-Mission-Control,TurtleRover/Turtle-Rover-Mission-Control,TurtleRover/Turtle-Rover-Mission-Control,TurtleRover/Turtle-Rover-Mission-Control | server/killer.py | server/killer.py | import subprocess
import os
import signal
import psutil
from log import logname
logger = logname()
def kill():
logger.info('Checking for another server instances...')
child = subprocess.Popen(
['pgrep', '-f', "server.py"], stdout=subprocess.PIPE, shell=False)
pids = child.communicate()[0].split()
... | import subprocess
import os
import signal
import psutil
from log import logname
logger = logname()
def kill():
logger.info('Checking for another server instances...')
child = subprocess.Popen(
['pgrep', '-f', "server.new.py"], stdout=subprocess.PIPE, shell=False)
pids = child.communicate()[0].spli... | mit | Python |
37fe22410fd9af2dd70626287a925016bf77cc04 | Fix #433: Fix a log message in tax/config.py. | grengojbo/satchmo,grengojbo/satchmo | satchmo/tax/config.py | satchmo/tax/config.py | from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from satchmo.configuration import *
from satchmo.shop.utils import is_string_like, load_module
TAX_GROUP = ConfigurationGroup('TAX', _('Tax Settings'))
config_register([
StringValue(TAX_GROUP,
'MODULE',
description=_("Ac... | from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from satchmo.configuration import *
from satchmo.shop.utils import is_string_like, load_module
TAX_GROUP = ConfigurationGroup('TAX', _('Tax Settings'))
config_register([
StringValue(TAX_GROUP,
'MODULE',
description=_("Ac... | bsd-3-clause | Python |
2eb1abfbb6c40ef50101ceaa3590e0857d4354d1 | bump version to 0.9.0 | PaulKlumpp/jenkins-autojobs,gvalkov/jenkins-autojobs,gvalkov/jenkins-autojobs,ptnapoleon/jenkins-autojobs,PaulKlumpp/jenkins-autojobs,ptnapoleon/jenkins-autojobs | jenkins_autojobs/version.py | jenkins_autojobs/version.py | #!/usr/bin/env python
# encoding: utf-8
'''
Version information constants and auxiliary functions.
'''
VERSION = (0, 9, 0)
import os
import subprocess as sub
__here__ = os.path.abspath(os.path.dirname(__file__))
def _check_output(*cmd):
p = sub.Popen(cmd, stdout=sub.PIPE, stderr=sub.PIPE, cwd=__here__)
... | #!/usr/bin/env python
# encoding: utf-8
'''
Version information constants and auxiliary functions.
'''
VERSION = (0, 6, 0)
import os
import subprocess as sub
__here__ = os.path.abspath(os.path.dirname(__file__))
def _check_output(*cmd):
p = sub.Popen(cmd, stdout=sub.PIPE, stderr=sub.PIPE, cwd=__here__)
... | bsd-3-clause | Python |
b262461f72faace58c014aadec7830e705539d5d | Improve MakerSciencePostAdmin | atiberghien/makerscience-server,atiberghien/makerscience-server | makerscience_forum/admin.py | makerscience_forum/admin.py | # -*- coding: utf-8 -*-
from django.contrib import admin
from .models import MakerSciencePost
from django.contrib.admin.options import ModelAdmin
from guardian.admin import GuardedModelAdmin
class MakerSciencePostAdmin(GuardedModelAdmin):
def display_title(self, obj):
return obj.parent.title
display_t... | from django.contrib import admin
from .models import MakerSciencePost
from django.contrib.admin.options import ModelAdmin
from guardian.admin import GuardedModelAdmin
class MakerSciencePostAdmin(GuardedModelAdmin):
pass
admin.site.register(MakerSciencePost, MakerSciencePostAdmin)
| agpl-3.0 | Python |
467cca2f581b124ba0c371d5976a6ceb8373f1c1 | enable voting on comments | praekelt/django-moderator | moderator/models.py | moderator/models.py | from django.db import models
from django.contrib.comments.models import Comment
import secretballot
class ClassifiedComment(models.Model):
comment = models.ForeignKey('comments.Comment')
cls = models.CharField(
'Class',
max_length=64,
choices=(
('spam', 'Spam'),
... | from django.db import models
class ClassifiedComment(models.Model):
comment = models.ForeignKey('comments.Comment')
cls = models.CharField(
'Class',
max_length=64,
choices=(
('spam', 'Spam'),
('ham', 'Ham'),
('unsure', 'Unsure'),
)
)
... | bsd-3-clause | Python |
a9c8773ba4c5751486fc8f00312b24f0d62ed344 | Update snowbound_flatmap.py | jargonautical/mcpi,jargonautical/mcpi | mcpipy/snowbound_flatmap.py | mcpipy/snowbound_flatmap.py | #!/usr/bin/env python
# mcpipy.com retrieved from URL below, written by snowbound
# http://www.minecraftforum.net/topic/1680160-simple-flatmap-script/
import sys
import mcpi.minecraft as minecraft
import mcpi.block as block
import server
mc = minecraft.Minecraft.create(server.address)
mc.setBlocks(-128,0,-128,128... | #!/usr/bin/env python
# mcpipy.com retrieved from URL below, written by snowbound
# http://www.minecraftforum.net/topic/1680160-simple-flatmap-script/
import sys
from .. import minecraft
from .. import block
import server
mc = minecraft.Minecraft.create(server.address)
mc.setBlocks(-128,0,-128,128,64,128,0)
if(le... | cc0-1.0 | Python |
f953c9431b600c8ec97551cd841ef7a69ff95b4e | define the default page url. | fanglinfang/myuw,fanglinfang/myuw,uw-it-aca/myuw,fanglinfang/myuw,uw-it-aca/myuw,uw-it-aca/myuw,uw-it-aca/myuw | myuw_mobile/urls.py | myuw_mobile/urls.py | from django.conf.urls.defaults import patterns, include, url
urlpatterns = patterns('myuw_mobile.views',
url(r'^my/$', 'index'),
# url(r'^my/menu/$', 'menu'),
# url(r'^my/week/$', 'week'),
)
| from django.conf.urls.defaults import patterns, include, url
urlpatterns = patterns('',
)
| apache-2.0 | Python |
1a3f9eb35cfc27f05dfe39be48920df1498228c1 | Set integration test logging level to ERROR | ramramps/mkdocs,jeoygin/mkdocs,mlzummo/mkdocs,nicoddemus/mkdocs,rickpeters/mkdocs,hhg2288/mkdocs,pjbull/mkdocs,davidgillies/mkdocs,rickpeters/mkdocs,samhatfield/mkdocs,longjl/mkdocs,jeoygin/mkdocs,jimporter/mkdocs,ramramps/mkdocs,d0ugal/mkdocs,jamesbeebop/mkdocs,cnbin/mkdocs,cnbin/mkdocs,peter1000/mkdocs,michaelmcandre... | mkdocs/tests/integration.py | mkdocs/tests/integration.py | """
# MkDocs Integration tests
This is a simple integration test that builds the MkDocs
documentation against all of the builtin themes.
From the root of the MkDocs git repo, use:
python -m mkdocs.tests.integration --help
TODOs
- Build with different configuration options.
- Build documentation other t... | """
# MkDocs Integration tests
This is a simple integration test that builds the MkDocs
documentation against all of the builtin themes.
From the root of the MkDocs git repo, use:
python -m mkdocs.tests.integration --help
TODOs
- Build with different configuration options.
- Build documentation other t... | bsd-2-clause | Python |
548db3766acdf5c1d3f1b8cb392a421fa083a518 | Store client hostname | tonioo/modoboa-public-api,tonioo/modoboa-public-api | modoboa_public_api/views.py | modoboa_public_api/views.py | """
API views.
"""
from django.conf import settings
from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView
from .models import ModoboaInstance
from .forms import ClientVersionForm
class CurrentVersionView(APIView):
"""Get current modoboa version.... | """
API views.
"""
from django.conf import settings
from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView
from .models import ModoboaInstance
from .forms import ClientVersionForm
class CurrentVersionView(APIView):
"""Get current modoboa version.... | mit | Python |
a2865801745b7974dc48dbbbdd3f35561dd24430 | Use RawConfigParser to avoid configparser.InterpolationSyntaxError | python-dirbtuves/akl.lt,python-dirbtuves/akl.lt,python-dirbtuves/akl.lt,python-dirbtuves/akl.lt,python-dirbtuves/akl.lt | akllt/dataimport/z2loader.py | akllt/dataimport/z2loader.py | # Taken from:
# https://github.com/ProgrammersOfVilnius/zope-export-tools/blob/master/z2loader.py
import codecs
import configparser
import pathlib
class Z2LoaderError(Exception):
pass
def unescape(value):
"""Decode b'\xc5\xbe' to 'ž'"""
assert isinstance(value, str)
return codecs.escape_decode(valu... | # Taken from:
# https://github.com/ProgrammersOfVilnius/zope-export-tools/blob/master/z2loader.py
import codecs
import configparser
import pathlib
class Z2LoaderError(Exception):
pass
def unescape(value):
"""Decode b'\xc5\xbe' to 'ž'"""
assert isinstance(value, str)
return codecs.escape_decode(valu... | agpl-3.0 | Python |
dffa17eb5384fc41ab9dbfff92e7be00d4229f1c | update ical_to_dict function, now getting next events | karec/ics2web,karec/ics2web,karec/ics2web | api/icalparser.py | api/icalparser.py | from icalendar import Calendar, vDatetime
from datetime import datetime, date
import requests
from pytz import timezone
UTC = timezone('Europe/Paris')
ICAL_TEST_DIR = "/home/manu/test.ics"
def ical_to_dict(stream):
"""
get all event of the current day and format them to a dict ready to be encoded in json
... |
def ical_to_dict(c):
"""
get all event of the current day and format them to a dict ready to be encoded in json
:param c: icalendar object to parse
:return: a dict containing well formated data
:rtype: dict
"""
pass
| mit | Python |
19ee4d5461dd3e93436a3ced6881ee032a4a68a5 | Add robots.txt | adaptive-learning/geography,slaweet/autoskola,adaptive-learning/geography,adaptive-learning/geography,adaptive-learning/geography,slaweet/autoskola,slaweet/autoskola | main/urls.py | main/urls.py | from django.conf.urls.defaults import patterns, include, url
from django.views.generic import TemplateView, RedirectView
from django.http import HttpResponse
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
from sitemap import sitemaps
urlpatterns = patterns(
... | from django.conf.urls.defaults import patterns, include, url
from django.views.generic import TemplateView, RedirectView
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
from sitemap import sitemaps
urlpatterns = patterns(
'',
url(r'^$', 'geography.vie... | mit | Python |
34dd6c6312c759f559eaf467b9fde597e55c126a | Add test for category display in the footer | kevgathuku/compshop,kevgathuku/compshop,kevgathuku/compshop,andela-kndungu/compshop,andela-kndungu/compshop,andela-kndungu/compshop,andela-kndungu/compshop,kevgathuku/compshop | tests/functional/test_home_page.py | tests/functional/test_home_page.py | from store.tests.factories import CategoryFactory, ProductFactory
from .base import FunctionalTest
class HomePageTest(FunctionalTest):
def test_home_page_loads_successfully(self):
self.browser.get(self.live_server_url)
self.assertIn("Home", self.browser.title)
def test_category_sidebar_disp... | from store.tests.factories import CategoryFactory, ProductFactory
from .base import FunctionalTest
class HomePageTest(FunctionalTest):
def test_home_page_loads_successfully(self):
self.browser.get(self.live_server_url)
self.assertIn("Home", self.browser.title)
def test_category_sidebar_disp... | bsd-3-clause | Python |
8cb3b8ef9d3bcc37b1bda27b2ae4cbbcd7cb3475 | set SYMPY_MIN_VERSION to 0.7.3 in sfepy/version.py | sfepy/sfepy,BubuLK/sfepy,vlukes/sfepy,vlukes/sfepy,BubuLK/sfepy,lokik/sfepy,sfepy/sfepy,vlukes/sfepy,BubuLK/sfepy,sfepy/sfepy,lokik/sfepy,lokik/sfepy,lokik/sfepy,rc/sfepy,rc/sfepy,rc/sfepy | sfepy/version.py | sfepy/version.py | # SfePy version
__version__ = '2015.3'
# "Minimal" supported versions.
NUMPY_MIN_VERSION = '1.3'
SCIPY_MIN_VERSION = '0.7'
MATPLOTLIB_MIN_VERSION = '0.99.0'
PYPARSING_MIN_VERSION = '1.5.0'
PYTABLES_MIN_VERSION = '2.1.2'
MAYAVI_MIN_VERSION = '3.3.0'
SYMPY_MIN_VERSION = '0.7.3'
IGAKIT_MIN_VERSION = '0.1'
PETSC4PY_MIN_VE... | # SfePy version
__version__ = '2015.3'
# "Minimal" supported versions.
NUMPY_MIN_VERSION = '1.3'
SCIPY_MIN_VERSION = '0.7'
MATPLOTLIB_MIN_VERSION = '0.99.0'
PYPARSING_MIN_VERSION = '1.5.0'
PYTABLES_MIN_VERSION = '2.1.2'
MAYAVI_MIN_VERSION = '3.3.0'
SYMPY_MIN_VERSION = '0.7.2'
IGAKIT_MIN_VERSION = '0.1'
PETSC4PY_MIN_VE... | bsd-3-clause | Python |
fda91235b11d3b351501567aab7a3808396e26d5 | replace bind host/port | ligthyear/flask-social-blueprint,python-cn/flask-social-blueprint,wooyek/flask-social-blueprint,python-cn/flask-social-blueprint,wooyek/flask-social-blueprint,halfcrazy/flask-social-blueprint,maxtortime/flask-social-blueprint,maxtortime/flask-social-blueprint,halfcrazy/flask-social-blueprint,ligthyear/flask-social-blue... | example/sqla/main.py | example/sqla/main.py | # coding=utf-8
# Created 2014 by Janusz Skonieczny
import logging
import os
import sys
# Setup simple logging fast, load a more complete logging setup later on
# Log a message each time this module get loaded.
logging.basicConfig(format='%(asctime)s %(levelname)-7s %(module)s.%(funcName)s - %(message)s')
logging.getLo... | # coding=utf-8
# Created 2014 by Janusz Skonieczny
import logging
import os
import sys
# Setup simple logging fast, load a more complete logging setup later on
# Log a message each time this module get loaded.
logging.basicConfig(format='%(asctime)s %(levelname)-7s %(module)s.%(funcName)s - %(message)s')
logging.getLo... | mit | Python |
4d3910915a62bab0d3d7619757067ffcf6762480 | Replace static path with a relative one | CommunityHoneyNetwork/CHN-Server,CommunityHoneyNetwork/CHN-Server,CommunityHoneyNetwork/CHN-Server,CommunityHoneyNetwork/CHN-Server | mhn/ui/constants.py | mhn/ui/constants.py | DEFAULT_FLAG_URL = 'img/unknown.png'
| DEFAULT_FLAG_URL = '/static/img/unknown.png'
| lgpl-2.1 | Python |
723849baf313d0df308aa03fd8fc7936cbfc70c0 | make compatible with python 2.6 | Rothamsted/AppliedBioinformatics,Rothamsted/AppliedBioinformatics,Rothamsted/AppliedBioinformatics | FindInsertSeq/find_high_cov.py | FindInsertSeq/find_high_cov.py | #!/usr/bin/env python
'''
Created on 2 Oct 2014
Simple script to identify most likely plasmid isertion site based on finding
a sliding window with maximum read coverage (similar to peak detection).
@author: keywan hassani-pak
'''
import argparse
def findMaxCov(file, window):
coverages = []
positio... | #!/usr/bin/env python
'''
Created on 2 Oct 2014
Simple script to identify most likely plasmid isertion site based on finding
a sliding window with maximum read coverage (similar to peak detection).
@author: keywan hassani-pak
'''
import argparse
def findMaxCov(file, window):
coverages = []
positio... | mit | Python |
6a08aac3949056889444ae5b588a38e8cd37a885 | Update h.py | ne1gh0st/WEB_t,ne1gh0st/WEB_t | static-1/etc/h.py | static-1/etc/h.py | CONFIG = {
# 'mode': 'wsgi',
'working_dir': '/home/box/web',
# 'python': '/usr/bin/python',
'args': (
'--bind=0.0.0.0:8080',
'--workers=16',
'--timeout=60',
'hello:simple_app',
),
}
| CONFIG = {
'mode': 'wsgi',
'working_dir': '/home/box/web/hello.py',
#'python': '/usr/bin/python',
'args': (
'--bind 0.0.0.0:8080',
'--workers 16',
'--timeout 60',
'hello.py'
),
}
| unlicense | Python |
6c8c6fde6fb72422969db3626e0acf02c3513ccb | fix encoding in startswith | jgm/pandocfilters,AugustH/pandocfilters | examples/plantuml.py | examples/plantuml.py | #!/usr/bin/env python
"""
Pandoc filter to process code blocks with class "plantuml" into
plant-generated images.
Needs `plantuml.jar` from http://plantuml.com/.
"""
import os
import sys
from subprocess import call
from pandocfilters import toJSONFilter, Para, Image, get_filename4code, get_caption, get_extension
... | #!/usr/bin/env python
"""
Pandoc filter to process code blocks with class "plantuml" into
plant-generated images.
Needs `plantuml.jar` from http://plantuml.com/.
"""
import os
import sys
from subprocess import call
from pandocfilters import toJSONFilter, Para, Image, get_filename4code, get_caption, get_extension
... | bsd-3-clause | Python |
8b306a533e8f6bf7fe7c52d01987470b5b6d1748 | update version | romonzaman/newfies-dialer,Star2Billing/newfies-dialer,saydulk/newfies-dialer,Star2Billing/newfies-dialer,newfies-dialer/newfies-dialer,laprice/newfies-dialer,berinhard/newfies-dialer,saydulk/newfies-dialer,emartonline/newfies-dialer,romonzaman/newfies-dialer,saydulk/newfies-dialer,newfies-dialer/newfies-dialer,newfies-... | newfies/__init__.py | newfies/__init__.py | # -*- coding: utf-8 -*-
"""Voice Broadcast Application"""
# :copyright: (c) 2010 - 2011 by Arezqui Belaid.
# :license: AGPL, see COPYING for more details.
VERSION = (1, 0, 6, "a2")
__version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:])
__author__ = "Arezqui Belaid"
__contact__ = "info@star2billing.com... | # -*- coding: utf-8 -*-
"""Voice Broadcast Application"""
# :copyright: (c) 2010 - 2011 by Arezqui Belaid.
# :license: AGPL, see COPYING for more details.
VERSION = (1, 0, 6, "a")
__version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:])
__author__ = "Arezqui Belaid"
__contact__ = "info@star2billing.com"... | mpl-2.0 | Python |
39161521ce75eddf3187a7412e4c22cbca88752d | Add logtacts domain to allowed hosts | phildini/logtacts,phildini/logtacts,phildini/logtacts,phildini/logtacts,phildini/logtacts | logtacts/settings/heroku.py | logtacts/settings/heroku.py | from .base import *
import dj_database_url
DEBUG = False
TEMPLATE_DEBUG = DEBUG
DATABASES['default'] = dj_database_url.parse(get_env_variable('LOGTACTS_DB_URL'))
SECRET_KEY = get_env_variable("LOGTACTS_SECRET_KEY")
ALLOWED_HOSTS = [
'localhost',
'127.0.0.1',
'.herokuapp.com',
'.pebble.ink',
'.lo... | from .base import *
import dj_database_url
DEBUG = False
TEMPLATE_DEBUG = DEBUG
DATABASES['default'] = dj_database_url.parse(get_env_variable('LOGTACTS_DB_URL'))
SECRET_KEY = get_env_variable("LOGTACTS_SECRET_KEY")
ALLOWED_HOSTS = [
'localhost',
'127.0.0.1',
'.herokuapp.com',
'.pebble.ink',
]
STATI... | mit | Python |
172db48053ce7143398d25690862c12c0664b11d | Update test_pillar_render.py | ryancurrah/salt-ci-demo,ryancurrah/salt-ci-demo,ryancurrah/salt-ci-demo | tests/pytest/test_pillar_render.py | tests/pytest/test_pillar_render.py | import salt.client
caller = salt.client.Caller()
def test_pillar_render():
pillar = caller.cmd('pillar.items')
assert isinstance(pillar, dict)
assert '_errors' not in pillar
| import salt.client
caller = salt.client.Caller()
def test_pillar_render():
r = caller.cmd('pillar.items')
assert isinstance(r, dict)
assert '_errors' not in r
| apache-2.0 | Python |
d0b552a50ee750e65d849cb1be79878836be9233 | fix name error | SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci | mrbelvedereci/github/handlers.py | mrbelvedereci/github/handlers.py | from django.conf import settings
from django.db.models.signals import pre_save
from django.dispatch import receiver
from github3 import login
from mrbelvedereci.github.models import Repository
@receiver(pre_save, sender=Repository)
def create_trigger_webhooks(sender, **kwargs):
repository = kwargs['instance']
... | from django.conf import settings
from django.db.models.signals import pre_save
from django.dispatch import receiver
from github3 import login
from mrbelvedereci.github.models import Repository
@receiver(pre_save, sender=Repository)
def create_trigger_webhooks(sender, **kwargs):
repository = kwargs['instance']
... | bsd-3-clause | Python |
8fb18ac380c80d44e41c12427354e9070e7847c3 | update test | tfeldmann/organize | tests/test_filter_last_modified.py | tests/test_filter_last_modified.py | from datetime import datetime, timedelta
from mock import patch
from organize.filters import LastModified
from organize.utils import Path
def test_min():
now = datetime.now()
last_modified = LastModified(days=10, hours=12, mode='older')
with patch.object(last_modified, '_last_modified') as mock_lm:
... | from datetime import datetime, timedelta
from mock import patch
from organize.filters import LastModified
from organize.utils import Path
def test_min():
now = datetime.now()
last_modified = LastModified(days=10, hours=12, select_mode='min')
with patch.object(last_modified, '_last_modified') as mock_lm:... | mit | Python |
8857b1f69e4a2dca5d08e7817c69e080da8e8266 | Add Scalasca 2.1 | iulian787/spack,mfherbst/spack,mfherbst/spack,skosukhin/spack,LLNL/spack,krafczyk/spack,iulian787/spack,matthiasdiener/spack,TheTimmy/spack,tmerrick1/spack,matthiasdiener/spack,lgarren/spack,LLNL/spack,tmerrick1/spack,LLNL/spack,EmreAtes/spack,mfherbst/spack,tmerrick1/spack,skosukhin/spack,lgarren/spack,iulian787/spack... | var/spack/packages/scalasca/package.py | var/spack/packages/scalasca/package.py | # FIXME: Add copyright
from spack import *
class Scalasca(Package):
"""Scalasca is a software tool that supports the performance optimization
of parallel programs by measuring and analyzing their runtime behavior.
The analysis identifies potential performance bottlenecks - in
particular tho... | # FIXME: Add copyright
from spack import *
class Scalasca(Package):
"""Scalasca is a software tool that supports the performance optimization
of parallel programs by measuring and analyzing their runtime behavior.
The analysis identifies potential performance bottlenecks - in
particular tho... | lgpl-2.1 | Python |
3f71260dff4078b298bc149d87d5b0c1df154d27 | Add polarity, dimension features | nickwbarber/HILT-annotations | explanatory_style.py | explanatory_style.py | import gate
class EventAttributionUnit:
def __init__(self, event, attribution):
"""event, attribution must be gate.Annotation objects
"""
self._event = event
self._attribution = attribution
for annotation in [self._event, self._attribution]:
if not isinstance(an... | import gate
class EventAttributionUnit:
def __init__(self, event, attribution):
"""event, attribution must be gate.Annotation objects
"""
self._event = event
self._attribution = attribution
for annotation in [self._event, self._attribution]:
if not isinstance(an... | mit | Python |
f13f14b134d76acac9cad8a93b47315fb0df1ba9 | Raise exception if step value is invalid. | wei2912/bce-simulation,wei2912/bce-simulation,wei2912/bce-simulation,wei2912/bce-simulation | utils/stepvals.py | utils/stepvals.py | import math
def get_range(val, step):
if args.step >= val:
raise Exception("Step value is too large! Must be smaller than value.")
stepvals = [i*step for i in xrange(int(math.ceil(val/step)))][1:]
if not stepvals[-1] == val: # if last element isn't the actual value
stepvals += [val] # add it in
return stepval... | import math
def get_range(val, step):
stepvals = [i*step for i in xrange(int(math.ceil(val/step)))][1:]
if not stepvals[-1] == val: # if last element isn't the actual value
stepvals += [val] # add it in
return stepvals
| mit | Python |
578f05cc0be131a12dc04f987a589b5cf96a8d89 | Fix cdist to work without repeating dimensions | jakirkham/dask-distance | dask_distance/_utils.py | dask_distance/_utils.py | import functools
import itertools
import numpy
import dask
import dask.array
from . import _compat
from . import _pycompat
def _broadcast_uv(u, v):
u = _compat._asarray(u)
v = _compat._asarray(v)
U = u
if U.ndim == 1:
U = U[None]
V = v
if V.ndim == 1:
V = V[None]
if U.... | import functools
import itertools
import numpy
import dask
import dask.array
from . import _compat
from . import _pycompat
def _broadcast_uv(u, v):
u = _compat._asarray(u)
v = _compat._asarray(v)
U = u
if U.ndim == 1:
U = U[None]
V = v
if V.ndim == 1:
V = V[None]
if U.... | bsd-3-clause | Python |
010bcdf6b4cb712289578afa6dc42ed092c6fd94 | update version | jasonrbriggs/stomp.py,jasonrbriggs/stomp.py | stomp/__init__.py | stomp/__init__.py | """
This provides connectivity to a message broker supporting the STOMP protocol. Both protocol
versions 1.0 and 1.1 are supported.
See the project page for more information.
Author: Jason R Briggs
License: http://www.apache.org/licenses/LICENSE-2.0
Project Page: http://code.google.com/p/stomppy
"""
import os
import... | """
This provides connectivity to a message broker supporting the STOMP protocol. Both protocol
versions 1.0 and 1.1 are supported.
See the project page for more information.
Author: Jason R Briggs
License: http://www.apache.org/licenses/LICENSE-2.0
Project Page: http://code.google.com/p/stomppy
"""
import os
import... | apache-2.0 | Python |
0556a4ae9e8e6a8f0a682956f50890a23f3c98be | Fix tensorflow naming | spacy-io/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc | thinc/layers/tensorflow_wrapper.py | thinc/layers/tensorflow_wrapper.py | from typing import Callable, Tuple, Any
from ..model import Model
from ..shims import TensorflowShim
from ..util import xp2tensorflow, tensorflow2xp
from ..types import Array
try:
import tensorflow as tf
has_tensorflow = True
except ImportError:
has_tensorflow = False
def TensorflowWrapper(tensorflow_mod... | from typing import Callable, Tuple, Any
from ..model import Model
from ..shims import TensorFlowShim
from ..util import xp2tensorflow, tensorflow2xp
from ..types import Array
try:
import tensorflow as tf
has_tensorflow = True
except ImportError:
has_tensorflow = False
def TensorFlowWrapper(tensorflow_mod... | mit | Python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.