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
28d1875008dc1201e14391aac7724a52471866fa
add view funtion to browserlib
percyfal/bokeh,timsnyder/bokeh,abele/bokeh,srinathv/bokeh,canavandl/bokeh,roxyboy/bokeh,Karel-van-de-Plassche/bokeh,schoolie/bokeh,paultcochrane/bokeh,rhiever/bokeh,saifrahmed/bokeh,azjps/bokeh,aavanian/bokeh,tacaswell/bokeh,jplourenco/bokeh,rhiever/bokeh,akloster/bokeh,ericdill/bokeh,bsipocz/bokeh,philippjfr/bokeh,Kas...
bokeh/browserlib.py
bokeh/browserlib.py
from os.path import abspath import webbrowser from . import settings def get_browser_controller(browser=None): browser = settings.browser(browser) if browser is not None: if browser == 'none': class DummyWebBrowser(object): def open(self, url, new=0, autoraise=True): ...
import webbrowser from . import settings def get_browser_controller(browser=None): browser = settings.browser(browser) if browser is not None: if browser == 'none': class DummyWebBrowser(object): def open(self, url, new=0, autoraise=True): pass ...
bsd-3-clause
Python
c8064d4fab988d42cb400bbe26965f3078522da4
Fix brightcove id extraction
kidburglar/youtube-dl,dstftw/youtube-dl,ping/youtube-dl,yan12125/youtube-dl,spvkgn/youtube-dl,vinegret/youtube-dl,epitron/youtube-dl,erikdejonge/youtube-dl,Tatsh/youtube-dl,gkoelln/youtube-dl,vinegret/youtube-dl,ping/youtube-dl,rrooij/youtube-dl,rg3/youtube-dl,dstftw/youtube-dl,unreal666/youtube-dl,steebchen/youtube-dl...
youtube_dl/extractor/gameinformer.py
youtube_dl/extractor/gameinformer.py
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class GameInformerIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?gameinformer\.com/(?:[^/]+/)*(?P<id>.+)\.aspx' _TEST = { 'url': 'http://www.gameinformer.com/b/features/archive/2015/09/26/replay-animal-cro...
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class GameInformerIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?gameinformer\.com/(?:[^/]+/)*(?P<id>.+)\.aspx' _TEST = { 'url': 'http://www.gameinformer.com/b/features/archive/2015/09/26/replay-animal-cro...
unlicense
Python
9207e5eccb91f43fab1477ac74e7cc7cdc350186
Fix syntax error
flux3dp/fluxghost,flux3dp/fluxghost,flux3dp/fluxghost,flux3dp/fluxghost
fluxghost/api/camera.py
fluxghost/api/camera.py
import logging from fluxclient.robot.camera import FluxCamera from fluxclient.utils.version import StrictVersion from .control_base import control_base_mixin CRITICAL_VERSION = StrictVersion("1.0") logger = logging.getLogger("API.CAMERA") """ Control printer Javascript Example: ws = new WebSocket("ws://127.0.0.1...
import logging from fluxclient.robot.camera import FluxCamera from fluxclient.utils.version import StrictVersion from .control_base import control_base_mixin CRITICAL_VERSION = StrictVersion("1.0") logger = logging.getLogger("API.CAMERA") """ Control printer Javascript Example: ws = new WebSocket("ws://127.0.0.1...
agpl-3.0
Python
482f45b86066f6569faa90fab21d32b207f75d4d
Switch token/basic auth logging to INFO, to match login/logout logging.
wwitzel3/awx,wwitzel3/awx,wwitzel3/awx,wwitzel3/awx
awx/api/authentication.py
awx/api/authentication.py
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. # Python import logging # Django from django.conf import settings from django.utils.encoding import smart_text # Django REST Framework from rest_framework import authentication # Django OAuth Toolkit from oauth2_provider.contrib.rest_framework import OAuth2A...
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. # Python import logging # Django from django.conf import settings from django.utils.encoding import smart_text # Django REST Framework from rest_framework import authentication # Django OAuth Toolkit from oauth2_provider.contrib.rest_framework import OAuth2A...
apache-2.0
Python
4c1ae5913b96bb9c201701fe330c9e8b97f43d41
revert makeaddin.py to default behavior of placing the result in the local directory instead of the directory above as its less confusing.
genegis/genegis,genegis/genegis,genegis/genegis
makeaddin.py
makeaddin.py
import os import re import zipfile current_path = os.path.dirname(os.path.abspath(__file__)) out_zip_name = os.path.join(current_path, os.path.basename(current_path) + ".esriaddin") BACKUP_FILE_PATTERN = re.compile(".*_addin_[0-9]+[.]py$", re.IGNORECASE) def looks_like_a_back...
import os import re import zipfile current_path = os.path.dirname(os.path.abspath(__file__)) out_zip_name = os.path.join(current_path, "..", os.path.basename(current_path) + ".esriaddin") BACKUP_FILE_PATTERN = re.compile(".*_addin_[0-9]+[.]py$", re.IGNORECASE) def looks_like_a...
mpl-2.0
Python
07c5e0c700af22c22cb12cef62a2b8f3f7f70030
bump version to next release alpha
dsanders11/django-advanced-filters,PreppyLLC-opensource/django-advanced-filters,modlinltd/django-advanced-filters,modlinltd/django-advanced-filters,modlinltd/django-advanced-filters,PreppyLLC-opensource/django-advanced-filters,dsanders11/django-advanced-filters,dsanders11/django-advanced-filters,PreppyLLC-opensource/dj...
advanced_filters/__init__.py
advanced_filters/__init__.py
__version__ = '1.0.2a'
__version__ = '1.0.1'
mit
Python
e33b8a804b5af0421376a236ec4c56d7743c13ff
Bump to version 0.60.4
nerevu/riko,nerevu/riko
riko/__init__.py
riko/__init__.py
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ riko ~~~~ Provides functions for analyzing and processing streams of structured data Examples: basic usage:: >>> from itertools import chain >>> from functools import partial >>> from riko.modules import itembuilder, strreplace ...
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ riko ~~~~ Provides functions for analyzing and processing streams of structured data Examples: basic usage:: >>> from itertools import chain >>> from functools import partial >>> from riko.modules import itembuilder, strreplace ...
mit
Python
212720ff677985f57a0f26e073df9bad6dc5c9c0
Add ClassifierBaseScoreType to score_types.__init__ (#281)
paris-saclay-cds/ramp-workflow,paris-saclay-cds/ramp-workflow
rampwf/score_types/__init__.py
rampwf/score_types/__init__.py
from .accuracy import Accuracy from .balanced_accuracy import BalancedAccuracy from .base import BaseScoreType from .brier_score import ( BrierScore, BrierSkillScore, BrierScoreReliability, BrierScoreResolution) from .clustering_efficiency import ClusteringEfficiency from .classification_error import Classification...
from .accuracy import Accuracy from .balanced_accuracy import BalancedAccuracy from .base import BaseScoreType from .brier_score import ( BrierScore, BrierSkillScore, BrierScoreReliability, BrierScoreResolution) from .clustering_efficiency import ClusteringEfficiency from .classification_error import Classification...
bsd-3-clause
Python
231fe04d13bd7f86445ab5163301ca04f1c54752
enable empty run list and empty attributes
Fewbytes/cosmo-plugin-chef-appmodule-installer
chef_appmodule_installer/tasks.py
chef_appmodule_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
b69cbd31b2a75e4bdd1592977a13bf5c80795a17
Fix objects.node.atoms.cmd
Tendrl/node-agent,Tendrl/node_agent,Tendrl/node-agent,Tendrl/node-agent,r0h4n/node-agent,Tendrl/node_agent,r0h4n/node-agent,r0h4n/node-agent
tendrl/node_agent/objects/node/atoms/cmd.py
tendrl/node_agent/objects/node/atoms/cmd.py
import logging import subprocess LOG = logging.getLogger(__name__) class Cmd(object): def run(self, parameters): cmd = parameters.get("Node.cmd_str") cmd = ["nohup"] + cmd.split(" ") subprocess.Popen(cmd) return True
import logging from tendrl.node_agent.ansible_runner.ansible_module_runner \ import AnsibleExecutableGenerationFailed from tendrl.node_agent.ansible_runner.ansible_module_runner \ import AnsibleRunner LOG = logging.getLogger(__name__) ANSIBLE_MODULE_PATH = "core/commands/command.py" class Cmd(object): ...
lgpl-2.1
Python
e8f5a85ffd039c3c63045c0e06a41b98d98008d3
update package
mfherbst/spack,lgarren/spack,matthiasdiener/spack,tmerrick1/spack,skosukhin/spack,EmreAtes/spack,tmerrick1/spack,LLNL/spack,iulian787/spack,TheTimmy/spack,LLNL/spack,LLNL/spack,mfherbst/spack,tmerrick1/spack,EmreAtes/spack,lgarren/spack,lgarren/spack,matthiasdiener/spack,lgarren/spack,TheTimmy/spack,krafczyk/spack,Emre...
var/spack/packages/ncurses/package.py
var/spack/packages/ncurses/package.py
from spack import * class Ncurses(Package): """The ncurses (new curses) library is a free software emulation of curses in System V Release 4.0, and more. It uses terminfo format, supports pads and color and multiple highlights and forms characters and function-key mapping, and has all the othe...
from spack import * class Ncurses(Package): """The ncurses (new curses) library is a free software emulation of curses in System V Release 4.0, and more. It uses terminfo format, supports pads and color and multiple highlights and forms characters and function-key mapping, and has all the othe...
lgpl-2.1
Python
382a3f673c4d74f6ba2b8c4ccff9332445b76093
Fix resource category help text.
cdriehuys/chmvh-website,cdriehuys/chmvh-website,cdriehuys/chmvh-website
chmvh_website/resources/models.py
chmvh_website/resources/models.py
from django.db import models class Category(models.Model): """A category of resources.""" important = models.BooleanField( default=False, help_text=('Categories marked important will be shown at the top of ' 'the resource list'), verbose_name='important') title =...
from django.db import models class Category(models.Model): """A category of resources.""" important = models.BooleanField( default=False, help_text=('categories marked important will be shown at the top of ', 'the resource list'), verbose_name='important') title ...
mit
Python
e757c0bc72bd508a2a8fddda1900e71b15383cdf
Fix for failing query.
ICT4H/dcs-mangrove
georegistry/api.py
georegistry/api.py
# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 import urllib import json from mangrove.utils.types import is_string, is_number GEOREGISTRY_API_BASE_URL = 'http://ni-api.georegistry.org/api/1.0' GEOREGISTRY_API_DEFAULT_LIMIT = 50 GEOREGISTRY_NUM_HTTP_ATTEMPS = 5 def get_locations_tree(country_code, limit=GEOREGISTRY_API...
# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 import urllib import json from mangrove.utils.types import is_string, is_number GEOREGISTRY_API_BASE_URL = 'http://ni-api.georegistry.org/api/1.0' GEOREGISTRY_API_DEFAULT_LIMIT = 50 GEOREGISTRY_NUM_HTTP_ATTEMPS = 5 def get_locations_tree(country_code, limit=GEOREGISTRY_API...
bsd-3-clause
Python
91b6025b2706d9ca993627d20a9d4f769a4f3276
fix scale
str4d/i2p-tools,str4d/i2p-tools,str4d/i2p-tools,majestrate/i2p-tools,majestrate/i2p-tools,majestrate/i2p-tools,majestrate/i2p-tools,str4d/i2p-tools,majestrate/i2p-tools
munin/i2pmon.py
munin/i2pmon.py
#!/usr/bin/env python # # i2pcontrol munin plugin # import sys if len(sys.argv) > 1 and sys.argv[1] == 'config': print ('graph_title I2P Bandwidth') print ('graph_order down up') print ('graph_category network') print ('graph_vlabel bits in (-) / out (+) per ${graph_period}') print ('down.label bps'...
#!/usr/bin/env python # # i2pcontrol munin plugin # import sys if len(sys.argv) > 1 and sys.argv[1] == 'config': print ('graph_title I2P Bandwidth') print ('graph_order down up') print ('graph_category network') print ('graph_args --base 1000') print ('graph_vlabel bits in (-) / out (+) per ${graph_...
mit
Python
68eeae8d008a2ae6db3923a1f6d19a5f9cb54e04
Update hiptnt.py
dbeyer/benchexec,sosy-lab/benchexec,dbeyer/benchexec,IljaZakharov/benchexec,martin-neuhaeusser/benchexec,IljaZakharov/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,dbeyer/benchexec,martin-neuhaeusser/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,martin-neuhaeusser/benchexec,ultimate-pa/benchexec,sosy-lab/benc...
benchexec/tools/hiptnt.py
benchexec/tools/hiptnt.py
""" BenchExec is a framework for reliable benchmarking. This file is part of BenchExec. Copyright (C) 2007-2015 Dirk Beyer 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 ...
""" BenchExec is a framework for reliable benchmarking. This file is part of BenchExec. Copyright (C) 2007-2015 Dirk Beyer 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 ...
apache-2.0
Python
94f0b65504424786bab736c87fbff57e61bb39d4
Replace the last occurrence of .s with .h
sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc
build/generate_asm_header.py
build/generate_asm_header.py
#!/usr/bin/env python # # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All...
#!/usr/bin/env python # # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All...
bsd-3-clause
Python
d5d37914fc613c17804418fbdeedde562bad1908
use empty ip to specify all interfaces
rueberger/janelia_jupyterhub
janelia_jupyterhub/jupyterhub_config.py
janelia_jupyterhub/jupyterhub_config.py
# Configuration file for jupyterhub. c.JupyterHub.authenticator_class = 'ldapauthenticator.LDAPAuthenticator' # Connect containers to this Docker network network_name = 'jhub' c.DockerSpawner.use_internal_ip = True c.DockerSpawner.network_name = network_name # Pass the network name as argument to spawned containers ...
# Configuration file for jupyterhub. c.JupyterHub.authenticator_class = 'ldapauthenticator.LDAPAuthenticator' # Connect containers to this Docker network network_name = 'jhub' c.DockerSpawner.use_internal_ip = True c.DockerSpawner.network_name = network_name # Pass the network name as argument to spawned containers ...
mit
Python
26e9800e3c31892a1ddc584903bf5ef646b1a633
Add seen command
mgracik/robinette
robinette/irc.py
robinette/irc.py
from dateutil import tz import logging logging.basicConfig(level=logging.DEBUG) log = logging.getLogger(__name__) import bson from nltk.chat.eliza import eliza_chatbot as chatbot import pymongo from xmlrpc.server import BaseHandler from xmlrpc.util import signature class IRC(BaseHandler): def __init__(self, ch...
import logging logging.basicConfig(level=logging.DEBUG) log = logging.getLogger(__name__) import bson from nltk.chat.eliza import eliza_chatbot as chatbot import pymongo from xmlrpc.server import BaseHandler from xmlrpc.util import signature class IRC(BaseHandler): def __init__(self, chatbot): self._mo...
mit
Python
636f29374561148f167ff76f4a6dc23ee2e57d95
remove ipdb
romaintha/twitter
twitter/streaming_api.py
twitter/streaming_api.py
import logging import time import tweepy from twitter import settings class Streaming: def __init__(self, pipeline, batch_size=1000, consumer_key=settings.CONSUMER_TOKEN, consumer_secret=settings.CONSUMER_SECRET, acces_token=s...
import logging import time import tweepy from twitter import settings class Streaming: def __init__(self, pipeline, batch_size=1000, consumer_key=settings.CONSUMER_TOKEN, consumer_secret=settings.CONSUMER_SECRET, acces_token=s...
mit
Python
84b22370caeb6fd493d9238922cc39c6c12f24d2
Fix redirect admin
rtfd/readthedocs.org,rtfd/readthedocs.org,pombredanne/readthedocs.org,safwanrahman/readthedocs.org,espdev/readthedocs.org,davidfischer/readthedocs.org,rtfd/readthedocs.org,tddv/readthedocs.org,rtfd/readthedocs.org,safwanrahman/readthedocs.org,espdev/readthedocs.org,safwanrahman/readthedocs.org,davidfischer/readthedocs....
readthedocs/redirects/admin.py
readthedocs/redirects/admin.py
from __future__ import absolute_import from django.contrib import admin from .models import Redirect class RedirectAdmin(admin.ModelAdmin): list_display = ['project', 'redirect_type', 'from_url', 'to_url'] raw_id_fields = ('project',) admin.site.register(Redirect, RedirectAdmin)
from __future__ import absolute_import from django.contrib import admin from .models import Redirect class RedirectAdmin(admin.ModelAdmin): list_display = ['project', 'redirect_type', 'from_url', 'to_url'] admin.site.register(Redirect, RedirectAdmin)
mit
Python
f4822a15ba2360d90da29f27e5ca0802a8feaf4b
Bump version to 12.1.5
hhursev/recipe-scraper
recipe_scrapers/__version__.py
recipe_scrapers/__version__.py
__version__ = "12.1.5"
__version__ = "12.0.5"
mit
Python
697f55cf757edd6587e00bbc98533133c00b6d10
Update __version__ as it seems like I have forgotten how publishing works
hhursev/recipe-scraper
recipe_scrapers/__version__.py
recipe_scrapers/__version__.py
__version__ = "13.6.0"
__version__ = "13.5.0"
mit
Python
564940c0a588bb34455af499754b1be46d690c7b
Bump version to 12.0.5
hhursev/recipe-scraper
recipe_scrapers/__version__.py
recipe_scrapers/__version__.py
__version__ = "12.0.5"
__version__ = "12.0.4"
mit
Python
b9c54a3a7169bdaa04539f61f97489e2d7fc70ea
Remove test error trigger
ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend
cla_frontend/apps/status/views.py
cla_frontend/apps/status/views.py
import datetime from django.http import JsonResponse from django.shortcuts import render from django.views.generic import View from cla_common.smoketest import smoketest from .smoketests import smoketests def status(request): results = list(smoketests.execute()) passed = reduce(lambda acc, curr: acc and cur...
import datetime from django.http import JsonResponse from django.shortcuts import render from django.views.generic import View from cla_common.smoketest import smoketest from .smoketests import smoketests def status(request): if "error" in request.GET.keys(): raise Exception("ISSUE: %s" % datetime.datet...
mit
Python
969b2d322174392a85f6fa6fc92160cb18144594
Allow for empty tags and authors on `ContentSerializer`
theonion/django-bulbs,theonion/django-bulbs,theonion/django-bulbs,theonion/django-bulbs,pombredanne/django-bulbs,pombredanne/django-bulbs,theonion/django-bulbs
bulbs/content/serializers.py
bulbs/content/serializers.py
from django import forms from django.contrib.auth.models import User from rest_framework import serializers from .models import Content, Tag class TagSerializer(serializers.ModelSerializer): class Meta: model = Tag class UserSerializer(serializers.ModelSerializer): class Meta: model = User ...
from django import forms from django.contrib.auth.models import User from rest_framework import serializers from .models import Content, Tag class TagSerializer(serializers.ModelSerializer): class Meta: model = Tag class UserSerializer(serializers.ModelSerializer): class Meta: model = User ...
mit
Python
fabbc25e32203ec0fa854c85b77834534ec099f7
Fix merge conflict
cobalt-uoft/uoft-scrapers,kshvmdn/uoft-scrapers,arkon/uoft-scrapers,g3wanghc/uoft-scrapers
uoftscrapers/__init__.py
uoftscrapers/__init__.py
import logging import os import sys from .scrapers.buildings import Buildings from .scrapers.calendar.utsg import UTSGCalendar from .scrapers.coursefinder import CourseFinder from .scrapers.exams.utm import UTMExams from .scrapers.exams.utsc import UTSCExams from .scrapers.exams.utsg import UTSGExams from .scrapers.fo...
import logging import os import sys from .scrapers.buildings import Buildings from .scrapers.calendar.utsg import UTSGCalendar from .scrapers.coursefinder import CourseFinder from .scrapers.exams.utm import UTMExams from .scrapers.exams.utsc import UTSCExams from .scrapers.exams.utsg import UTSGExams from .scrapers.fo...
mit
Python
0ed3ed8b0ef9742df09945483c5886722a75499b
Add a test for user deadlines
wtsi-hgi/CoGS-Webapp,wtsi-hgi/CoGS-Webapp,wtsi-hgi/CoGS-Webapp
test/scheduler/test_scheduler.py
test/scheduler/test_scheduler.py
""" Copyright (c) 2017 Genome Research Ltd. Authors: * Christopher Harrison <ch12@sanger.ac.uk> * Simon Beal <sb48@sanger.ac.uk> 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...
""" Copyright (c) 2017 Genome Research Ltd. Authors: * Christopher Harrison <ch12@sanger.ac.uk> * Simon Beal <sb48@sanger.ac.uk> 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...
agpl-3.0
Python
98c079e60c5f40190986cf3711755f3e76642393
test for determinism
fartashf/cleverhans,carlini/cleverhans,cleverhans-lab/cleverhans,cleverhans-lab/cleverhans,cihangxie/cleverhans,carlini/cleverhans,cleverhans-lab/cleverhans,openai/cleverhans
tests_tf/test_mnist_tutorial_tf.py
tests_tf/test_mnist_tutorial_tf.py
import unittest import numpy as np from cleverhans.devtools.checks import CleverHansTest class TestMNISTTutorialTF(CleverHansTest): def test_mnist_tutorial_tf(self): np.random.seed(42) import tensorflow as tf tf.set_random_seed(42) from cleverhans_tutorials import mnist_tutorial...
import unittest import numpy as np from cleverhans.devtools.checks import CleverHansTest class TestMNISTTutorialTF(CleverHansTest): def test_mnist_tutorial_tf(self): np.random.seed(42) import tensorflow as tf tf.set_random_seed(42) from cleverhans_tutorials import mnist_tutorial...
mit
Python
8dbb26e16549915dcb9b6773ead6c30d567b81e5
Bump version
bebraw/pynu,bebraw/pynu
pynu/__init__.py
pynu/__init__.py
# -*- coding: utf-8 -*- """ Node utilities for Python. """ """ Pynu - Python Node Utilities Copyright (C) 2013 Juho Vepsäläinen This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the...
# -*- coding: utf-8 -*- """ Node utilities for Python. """ """ Pynu - Python Node Utilities Copyright (C) 2010 Juho Vepsäläinen This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the...
mit
Python
03dc74261338ac6905526bac77b2c9374f317f7b
Support pep257 0.3.0
PyCQA/flake8-docstrings
flake8_docstrings.py
flake8_docstrings.py
# -*- coding: utf-8 -*- """pep257 docstrings convention needs error code and class parser for be included as module into flakes8 """ import pep257 __version__ = '0.1.5' class pep257Checker(object): """flake8 needs a class to check python file.""" name = 'pep257' version = __version__ def __init__(...
# -*- coding: utf-8 -*- """pep257 docstrings convention needs error code and class parser for be included as module into flakes8 """ import pep257 __version__ = '0.1.4' class pep257Checker(object): """flake8 needs a class to check python file.""" name = 'pep257' version = __version__ def __init__(...
mit
Python
d06e472cb0a33d6aa927972a3d5e89e7ee392b2f
resolve deprecation warning
kmike/django-qsstats-magic
qsstats/utils.py
qsstats/utils.py
import datetime import re from dateutil.relativedelta import relativedelta, MO from qsstats.exceptions import InvalidInterval from qsstats import compat def _remove_time(dt): tzinfo = getattr(dt, 'tzinfo', compat.now().tzinfo) return datetime.datetime(dt.year, dt.month, dt.day, tzinfo=tzinfo) def _to_datetime...
import datetime import re from dateutil.relativedelta import relativedelta, MO from qsstats.exceptions import InvalidInterval from qsstats import compat def _remove_time(dt): tzinfo = getattr(dt, 'tzinfo', compat.now().tzinfo) return datetime.datetime(dt.year, dt.month, dt.day, tzinfo=tzinfo) def _to_datetime...
bsd-3-clause
Python
226abc572d32c134783e6b149961c6fb2e7921c6
Create .pc dir and dir for patches
vadmium/python-quilt,bjoernricks/python-quilt
quilt/cli/new.py
quilt/cli/new.py
# vim: fileencoding=utf-8 et sw=4 ts=4 tw=80: # python-quilt - A Python implementation of the quilt patch system # # Copyright (C) 2012 Björn Ricks <bjoern.ricks@googlemail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as ...
# vim: fileencoding=utf-8 et sw=4 ts=4 tw=80: # python-quilt - A Python implementation of the quilt patch system # # Copyright (C) 2012 Björn Ricks <bjoern.ricks@googlemail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as ...
mit
Python
d95f448cbf8072205a104a7ef5e2e4db40d68756
Add popagate_network_log option to grab.tools.logs.default_logging
giserh/grab,shaunstanislaus/grab,alihalabyah/grab,subeax/grab,SpaceAppsXploration/grab,huiyi1990/grab,alihalabyah/grab,kevinlondon/grab,shaunstanislaus/grab,giserh/grab,codevlabs/grab,liorvh/grab,maurobaraldi/grab,raybuhr/grab,kevinlondon/grab,liorvh/grab,lorien/grab,raybuhr/grab,istinspring/grab,huiyi1990/grab,lorien/...
grab/tools/logs.py
grab/tools/logs.py
import logging def default_logging(grab_log='/tmp/grab.log', level=logging.DEBUG, mode='a', propagate_network_logger=False, network_log='/tmp/grab.network.log'): """ Customize logging output to display all log messages except grab network logs. Redirect grab net...
import logging def default_logging(grab_log='/tmp/grab.log', level=logging.DEBUG, mode='a', network_log='/tmp/grab.network.log'): """ Customize logging output to display all log messages except grab network logs. Redirect grab network logs into file. """ logging.basicConfi...
mit
Python
8d6d6d5d23649a10cab17f04b8fa102809ce3f11
Fix typo in docstrings (#8764)
adityahase/frappe,vjFaLk/frappe,vjFaLk/frappe,saurabh6790/frappe,yashodhank/frappe,frappe/frappe,saurabh6790/frappe,StrellaGroup/frappe,frappe/frappe,almeidapaulopt/frappe,frappe/frappe,saurabh6790/frappe,mhbu50/frappe,almeidapaulopt/frappe,adityahase/frappe,yashodhank/frappe,saurabh6790/frappe,mhbu50/frappe,StrellaGro...
frappe/core/utils.py
frappe/core/utils.py
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe def get_parent_doc(doc): """Returns document of `reference_doctype`, `reference_doctype`""" if not hasattr(doc, "parent_doc"): if doc.reference_doctype and doc...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe def get_parent_doc(doc): """Returns document of `reference_doctype`, `reference_doctype`""" if not hasattr(doc, "parent_doc"): if doc.reference_doctype and doc...
mit
Python
8eaa3e2c19f5d907eacf1e308ad410769ccc4101
Update externsExtractor.py
LiveTex/Livetex-Tools,LiveTex/Livetex-Tools
tools/externs-extractor/externsExtractor.py
tools/externs-extractor/externsExtractor.py
#!/usr/bin/python import os from optparse import OptionParser from extractors.elementsExtractor import extractElements def getPaths(path): paths = list() pathsListFile = open(path, 'r') pathsList = pathsListFile.read().splitlines() for path in pathsList: if path: paths.append('./l...
#!/usr/bin/python2 import os from optparse import OptionParser from extractors.elementsExtractor import extractElements def getPaths(path): paths = list() pathsListFile = open(path, 'r') pathsList = pathsListFile.read().splitlines() for path in pathsList: if path: paths.append('./...
bsd-3-clause
Python
2fb66af07b38b4744fab53f86c2ac6048e47e9bc
Make geocode CLI PEP-8 compliant
minimedj/geocoder,miraculixx/geocoder,epyatopal/geocoder-1,akittas/geocoder,ahlusar1989/geocoder,DenisCarriere/geocoder
geocode.py
geocode.py
import sys import click import unicodecsv import geocoder @click.command() @click.argument('location', required=False) @click.option('--provider', default='bing') @click.option('--input', type=click.File('r')) @click.option('--output', type=click.File('w'), default='-') @click.option('--fieldnames') def cli(locatio...
import click import geocoder import unicodecsv import sys @click.command() @click.argument('location', required=False) @click.option('--provider', default='bing') @click.option('--input', type=click.File('r')) @click.option('--output', type=click.File('w'), default='-') @click.option('--fieldnames') def cli(location...
mit
Python
556dec981b7a7f204b01a7e83d1af80b18228da8
Fix Bugs
jiasir/get-dns
get-dns.py
get-dns.py
__author__ = 'Taio' import os.path import dns.query import dns.zone import logging from utils.noflib import Noflib run = Noflib() logger = logging.getLogger('get-dns') logging.basicConfig(filename='get-dns.log', level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') dcAdd = '172.20.10....
__author__ = 'Taio' import os.path import dns.querry import dns.zone import logging from utils.noflib import Noflib run = Noflib() logger = logging.getLogger('get-dns') logging.basicConfig(filename='get-dns.log', level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') dcAdd = '172.20.10...
mit
Python
70434e9a752b88aae2a741bafb1427e69da8654c
Update metadata api
daniel1409/dataviva-api,DataViva/dataviva-api
app/apis/metadata_api.py
app/apis/metadata_api.py
from flask import Blueprint, jsonify, request from inflection import singularize from app import redis from os import path import pickle blueprint = Blueprint('metadata_api', __name__, url_prefix='/metadata') @blueprint.route('/<string:data>/<string:id>') @blueprint.route('/<string:data>') def api(data, id=...
from flask import Blueprint, jsonify, request from inflection import singularize from app import redis from os import path import pickle blueprint = Blueprint('metadata_api', __name__, url_prefix='/metadata') @blueprint.route('/<string:data>/<string:id>') @blueprint.route('/<string:data>') def api(data, id=...
mit
Python
dda91ae23ece88abebc3ff9dbbaf163d05ceaf39
Simplify namespace
williamjacksn/python-rainwave-client
gutter/__init__.py
gutter/__init__.py
from .client import RainwaveClient from .channel import RainwaveChannel from .album import RainwaveAlbum from .artist import RainwaveArtist from .cooldown import RainwaveCooldown from .song import RainwaveSong
from .client import RainwaveClient
mit
Python
a56c744af8c1a96631d990c2a398aedcd24a78de
Set the response's mimetype. Motion cannot process HTTP responses without an image mimetype.
flebel/rtsp2snapshot
rtsp2snapshot.py
rtsp2snapshot.py
#!/usr/bin/env python import io import platform import shlex import subprocess from flask import Flask, request, send_file, send_from_directory app = Flask(__name__) tmp_dir = '/tmp/' tmp_filename = 'snapshot.jpg' @app.route('/<path:url>') def snapshot(url): freebsd_platform = platform.system() == 'FreeBSD' ...
#!/usr/bin/env python import io import platform import shlex import subprocess from flask import Flask, request, send_file, send_from_directory app = Flask(__name__) tmp_dir = '/tmp/' tmp_filename = 'snapshot.jpg' @app.route('/<path:url>') def snapshot(url): freebsd_platform = platform.system() == 'FreeBSD' ...
bsd-3-clause
Python
37aa3ae42dafe58ca29152f75a36ea77b792393e
rename 'project.home.user' to 'project.dash'
pkimber/search,pkimber/search,pkimber/search
example/urls.py
example/urls.py
# -*- encoding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.core.urlreso...
# -*- encoding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.core.urlreso...
apache-2.0
Python
813802b70368c7df5747d797628221286988285b
Simplify the XSS test slightly
alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend
tests/app/main/views/test_xss.py
tests/app/main/views/test_xss.py
# coding=utf-8 from __future__ import unicode_literals import mock from ...helpers import LoggedInApplicationTest from dmapiclient import HTTPError import urllib class TestXSS(LoggedInApplicationTest): @mock.patch('app.main.views.services.data_api_client') def test_service_not_found_flash_message_injection(s...
# coding=utf-8 from __future__ import unicode_literals import mock from ...helpers import LoggedInApplicationTest from dmapiclient import HTTPError import urllib class TestXSS(LoggedInApplicationTest): @mock.patch('app.main.views.services.data_api_client') def test_service_not_found_flash_message_injection(s...
mit
Python
6c87c5c160228503f848e3039d1e33362d69f411
Test helper fill_form: support for skipping fields and relation fields
dpausp/arguments,dpausp/arguments,dpausp/arguments,dpausp/arguments
tests/helpers/webtest_helpers.py
tests/helpers/webtest_helpers.py
from enum import Enum def python_to_deform_value(py_value): if py_value is True: return 'true' elif py_value is False: return None elif py_value is None: return '' elif isinstance(py_value, Enum): return py_value.name else: return str(py_value) def assert_...
from enum import Enum def python_to_deform_value(py_value): if py_value is True: return 'true' elif py_value is False: return None elif py_value is None: return '' elif isinstance(py_value, Enum): return py_value.name else: return str(py_value) def assert_...
agpl-3.0
Python
badbf0ee8634101d6dcdca288670ca4fcb2b871e
Update __init__.py
ianunruh/hvac,ianunruh/hvac
hvac/api/secrets_engines/__init__.py
hvac/api/secrets_engines/__init__.py
"""Vault secrets engines endpoints""" from hvac.api.secrets_engines.aws import Aws from hvac.api.secrets_engines.azure import Azure from hvac.api.secrets_engines.gcp import Gcp from hvac.api.secrets_engines.ad import ActiveDirectory from hvac.api.secrets_engines.identity import Identity from hvac.api.secrets_engines.kv...
"""Vault secrets engines endpoints""" from hvac.api.secrets_engines.aws import Aws from hvac.api.secrets_engines.azure import Azure from hvac.api.secrets_engines.gcp import Gcp from hvac.api.secrets_engines.identity import Identity from hvac.api.secrets_engines.kv import Kv from hvac.api.secrets_engines.pki import Pki ...
apache-2.0
Python
48cb6d920aa1ab030465882e978c8b9006e38b72
Bump app version to 2020.6.0
kernelci/kernelci-backend,kernelci/kernelci-backend
app/handlers/__init__.py
app/handlers/__init__.py
__version__ = "2020.6.0" __versionfull__ = __version__
__version__ = "2020.5.0" __versionfull__ = __version__
lgpl-2.1
Python
62c7b723638bf76463209834e1c50d0728951929
add repr for shell outputs
sibson/dynoup,sibson/dynoup
scaler/models.py
scaler/models.py
from uuid import uuid4 from dynoup import db from sqlalchemy.dialects.postgresql import UUID, JSON class User(db.Model): id = db.Column(UUID(as_uuid=True), primary_key=True) email = db.Column(db.String(120), nullable=False) htoken = db.Column(db.String(512), nullable=False) def __repr__(self): ...
from uuid import uuid4 from dynoup import db from sqlalchemy.dialects.postgresql import UUID, JSON class User(db.Model): id = db.Column(UUID(as_uuid=True), primary_key=True) email = db.Column(db.String(120), nullable=False) htoken = db.Column(db.String(512), nullable=False) # track many-to-many relati...
mit
Python
b67baab2bd60d597275ce39c6e91bdab4a55d464
Fix doubles teardown (#135)
uber/doubles
doubles/pytest_plugin.py
doubles/pytest_plugin.py
import pytest from doubles.lifecycle import teardown, verify @pytest.hookimpl(hookwrapper=True) def pytest_runtest_call(item): outcome = yield try: outcome.get_result() verify() finally: teardown()
import pytest from doubles.lifecycle import teardown, verify @pytest.hookimpl(hookwrapper=True) def pytest_pyfunc_call(pyfuncitem): outcome = yield try: outcome.get_result() verify() finally: teardown()
mit
Python
e0ddd80ea2d23f9b5fc32dd8a5ea13f9cb30da49
Add api for package search based on name and keywords
NikhilKalige/atom-website,NikhilKalige/atom-website,NikhilKalige/atom-website
app/packages/__init__.py
app/packages/__init__.py
from flask import Blueprint packages = Blueprint('packages', __name__) from . import views, models from utils import github_data def post_get_single(result=None, **kw): result.update(result.pop("get_json")) result.update(github_data(result['name'], result['author'], result['url'])) # runs for search requ...
from flask import Blueprint packages = Blueprint('packages', __name__) from . import views, models from utils import github_data def post_get_single(result=None, **kw): result.update(result.pop("get_json")) result.update(github_data(result['name'], result['author'], result['url'])) # runs for search requ...
bsd-2-clause
Python
b6562fad5f8cfb3dec578f7c3613d75282ad4f45
Bump version
shosca/django-rest-witchcraft
rest_witchcraft/__version__.py
rest_witchcraft/__version__.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals __author__ = 'Serkan Hosca' __author_email__ = 'serkan@hosca.com' __version__ = '0.0.5' __description__ = 'SQLAlchemy specific things for django-rest-framework'
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals __author__ = 'Serkan Hosca' __author_email__ = 'serkan@hosca.com' __version__ = '0.0.4' __description__ = 'SQLAlchemy specific things for django-rest-framework'
mit
Python
b26b3c3a2d6c0d0ca6167cd787d61c3349199ac9
Fix bug
vismantic-ohtuprojekti/image-filtering-suite,vismantic-ohtuprojekti/qualipy
imgfilter/analyzers/reduce_colors.py
imgfilter/analyzers/reduce_colors.py
""" Analyzer for reducing the number of colors in an image to a certain amount. Uses the k-nearest neighbors method. """ from analyzer import Analyzer import cv2 import numpy def reduce_colors(image, colors): """Reduces the number of colors in a given image to certain amount. The algorithm uses the k-neares...
""" Analyzer for reducing the number of colors in an image to a certain amount. Uses the k-nearest neighbors method. """ from analyzer import Analyzer import cv2 import numpy def reduce_colors(image, colors): """Reduces the number of colors in a given image to certain amount. The algorithm uses the k-neares...
mit
Python
f25843bfe8bbe581c575630c41f8c4e686f808a6
Use print_function
treemo/circuits,treemo/circuits,eriol/circuits,treemo/circuits,nizox/circuits,eriol/circuits,eriol/circuits
fabfile/help.py
fabfile/help.py
# Module: help # Date: 28th November 2013 # Author: James Mills, j dot mills at griffith dot edu dot au """Help Tasks""" from __future__ import print_function from fabric import state from fabric.api import task from fabric.tasks import Task from fabric.task_utils import crawl @task(default=True) def hel...
# Module: help # Date: 28th November 2013 # Author: James Mills, j dot mills at griffith dot edu dot au """Help Tasks""" from fabric import state from fabric.api import task from fabric.tasks import Task from fabric.task_utils import crawl @task(default=True) def help(name=None): """Display help for a ...
mit
Python
0b91f045260396308a2cda207765cef7e0a62f7c
work on the grapher
bh107/benchpress,bh107/benchpress,bh107/benchpress,bh107/benchpress
grapher/npbackend.py
grapher/npbackend.py
from graph import * import numpy as np class Npbackend(Graph): def render(self, data, order=None, baseline=None, highest=None): #Lets generate the vcache=10 graphs and with matmul for s in set([script for script, bridge, vem, ve, r in data]): res = {} for script, bridge,...
from graph import * import numpy as np class Npbackend(Graph): def render(self, data, order=None, baseline=None, highest=None): #Lets generate the vcache=10 graphs and with matmul for s in set([script for script, bridge, vem, ve, r in data]): res = {} for script, bridge,...
apache-2.0
Python
8b143188b79c9a8b89ad44d2921d4f4eb2ad8cf4
Simplify definition and add typing
pyGrowler/Growler,akubera/Growler
growler/responder.py
growler/responder.py
# # growler/responder.py # """ Event loop independent class for managing clients' requests and server responses. """ from typing import Optional from asyncio import BaseTransport from socket import socket as Socket from abc import ABC, abstractmethod class GrowlerResponder(ABC): """ Abstract base class for ...
# # growler/responder.py # """ Event loop independent class for managing clients' requests and server responses. """ import abc class GrowlerResponder(abc.ABC): """ Abstract base class for 'responder' objects that handle the stream of client data. Responders are designed to be event-loop independent...
apache-2.0
Python
4bc50fc3552ce537727895c7dc60bf3559249457
Tag new release: 2.2.11
Floobits/floobits-sublime,Floobits/floobits-sublime
floo/version.py
floo/version.py
PLUGIN_VERSION = '2.2.11' # The line above is auto-generated by tag_release.py. Do not change it manually. try: from .common import shared as G assert G except ImportError: from common import shared as G G.__VERSION__ = '0.03' G.__PLUGIN_VERSION__ = PLUGIN_VERSION
PLUGIN_VERSION = '2.2.10' # The line above is auto-generated by tag_release.py. Do not change it manually. try: from .common import shared as G assert G except ImportError: from common import shared as G G.__VERSION__ = '0.03' G.__PLUGIN_VERSION__ = PLUGIN_VERSION
apache-2.0
Python
127f26069622d78c3255079808211a00dec3af64
Fix for issue #508 MenuBarPopupPanel should not be modal
gpitel/pyjs,pombredanne/pyjs,Hasimir/pyjs,gpitel/pyjs,minghuascode/pyj,anandology/pyjamas,minghuascode/pyj,Hasimir/pyjs,lancezlin/pyjs,lancezlin/pyjs,pyjs/pyjs,spaceone/pyjs,pombredanne/pyjs,minghuascode/pyj,Hasimir/pyjs,lancezlin/pyjs,spaceone/pyjs,gpitel/pyjs,lancezlin/pyjs,spaceone/pyjs,pombredanne/pyjs,spaceone/pyj...
library/pyjamas/ui/MenuBarPopupPanel.py
library/pyjamas/ui/MenuBarPopupPanel.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
b95694b88a8b18a6d7ef932fd365949a2aa97322
Add test vectors with decryption
jvarho/totp-client
test-totp.py
test-totp.py
#!/usr/bin/env python # Copyright (c) 2015, Jan Varho # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AU...
#!/usr/bin/env python # Copyright (c) 2015, Jan Varho # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AU...
isc
Python
9bfe2dbd37fa18ed7915e82dc8dc8515d7fe9a76
Terminate child processes on SIGTERM signal
alfredhq/alfred-collector
alfred_collector/__main__.py
alfred_collector/__main__.py
import argparse import signal import yaml from functools import partial from .process import CollectorProcess def get_config(path): with open(path) as file: return yaml.load(file) def terminate_processes(processes, signum, frame): for process in processes: if process is not None and process....
import argparse import yaml from .process import CollectorProcess def get_config(path): with open(path) as file: return yaml.load(file) def main(): parser = argparse.ArgumentParser() parser.add_argument('config') args = parser.parse_args() config = get_config(args.config) processes...
isc
Python
816bec01d51a93567db6838f5afa57913ecc538c
Fix collections.iterable warning (#553)
keon/algorithms
algorithms/arrays/flatten.py
algorithms/arrays/flatten.py
""" Implement Flatten Arrays. Given an array that may contain nested arrays, produce a single resultant array. """ from collections.abc import Iterable # return list def flatten(input_arr, output_arr=None): if output_arr is None: output_arr = [] for ele in input_arr: if isinstance(ele, Iterabl...
""" Implement Flatten Arrays. Given an array that may contain nested arrays, produce a single resultant array. """ from collections import Iterable # return list def flatten(input_arr, output_arr=None): if output_arr is None: output_arr = [] for ele in input_arr: if isinstance(ele, Iterable): ...
mit
Python
917b84f4d985e211168967c2fda6ea0b0b2ffe61
Add explicit branching in AirVisual diagnostics (#64493)
mezz64/home-assistant,rohitranjan1991/home-assistant,mezz64/home-assistant,rohitranjan1991/home-assistant,rohitranjan1991/home-assistant,GenericStudent/home-assistant,nkgilley/home-assistant,w1ll1am23/home-assistant,GenericStudent/home-assistant,toddeye/home-assistant,toddeye/home-assistant,w1ll1am23/home-assistant,nkg...
homeassistant/components/airvisual/diagnostics.py
homeassistant/components/airvisual/diagnostics.py
"""Diagnostics support for AirVisual.""" from __future__ import annotations from types import MappingProxyType from typing import Any from homeassistant.components.diagnostics import REDACTED from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF_LONGITU...
"""Diagnostics support for AirVisual.""" from __future__ import annotations from types import MappingProxyType from typing import Any from homeassistant.components.diagnostics import REDACTED from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF_LONGITU...
apache-2.0
Python
50b0f2e7f271fa4db2e507d0eaa559c31aecc1ee
Fix atom feed
OmeGak/indico,DirkHoffmann/indico,DirkHoffmann/indico,mvidalgarcia/indico,ThiefMaster/indico,OmeGak/indico,pferreir/indico,DirkHoffmann/indico,mvidalgarcia/indico,mic4ael/indico,ThiefMaster/indico,mic4ael/indico,indico/indico,OmeGak/indico,ThiefMaster/indico,indico/indico,DirkHoffmann/indico,mvidalgarcia/indico,indico/...
indico/web/http_api/metadata/atom.py
indico/web/http_api/metadata/atom.py
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
mit
Python
3aadc8a8c469dcaad7217fea82b3ef92c7e9934d
remove unused Mixin
noisyboiler/wampy
wampy/roles/publisher.py
wampy/roles/publisher.py
import logging from wampy.errors import WampyError from wampy.messages.publish import Publish logger = logging.getLogger('wampy.publishing') class PublishProxy: def __init__(self, client): self.client = client def __call__(self, *unsupported_args, **kwargs): if len(unsupported_args) != 0:...
import logging from wampy.errors import WampyError from wampy.messages.publish import Publish logger = logging.getLogger('wampy.publishing') class PublishProxy: def __init__(self, client): self.client = client def __call__(self, *unsupported_args, **kwargs): if len(unsupported_args) != 0:...
mpl-2.0
Python
547f5c7de0803bbec9873db7e613d3ff7cad24ed
Add server logging to contrib operations
pferreir/indico,pferreir/indico,mvidalgarcia/indico,indico/indico,indico/indico,mic4ael/indico,OmeGak/indico,pferreir/indico,OmeGak/indico,mvidalgarcia/indico,mvidalgarcia/indico,ThiefMaster/indico,ThiefMaster/indico,DirkHoffmann/indico,ThiefMaster/indico,DirkHoffmann/indico,mvidalgarcia/indico,ThiefMaster/indico,mic4a...
indico/modules/events/contributions/operations.py
indico/modules/events/contributions/operations.py
# This file is part of Indico.# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at...
# This file is part of Indico.# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at...
mit
Python
c24b1eb0e269c9cd59b7ae0d9a4388fc8264b188
Add a failing test for the linebreak presence
dulaccc/igenstrings,dulaccc/igenstrings,dulaccc/igenstrings,dulaccc/igenstrings
tests/test_merger.py
tests/test_merger.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_igenstrings ---------------------------------- Tests for `igenstrings` module. """ import os import unittest from codecs import open from py import path import pytest from igenstrings.merger import Merger @pytest.fixture(autouse=True) def initdir(tmpdir): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_igenstrings ---------------------------------- Tests for `igenstrings` module. """ import os import unittest from codecs import open from py import path import pytest from igenstrings.merger import Merger @pytest.fixture(autouse=True) def initdir(tmpdir): ...
mit
Python
692fe65ca9d24286d10e542c5028924a22036362
Add encoding and unicode literals import
Turbasen/turbasen.py
tests/test_models.py
tests/test_models.py
# encoding: utf-8 from __future__ import unicode_literals import pytest import turbasen @pytest.fixture def configure_dev(): turbasen.configure(ENDPOINT_URL='http://dev.nasjonalturbase.no/') @pytest.mark.skipif(turbasen.settings.Settings.API_KEY is None, reason="API key not set") def test_get(configure_dev): ...
import pytest import turbasen @pytest.fixture def configure_dev(): turbasen.configure(ENDPOINT_URL='http://dev.nasjonalturbase.no/') @pytest.mark.skipif(turbasen.settings.Settings.API_KEY is None, reason="API key not set") def test_get(configure_dev): sted = turbasen.Sted.get('52407fb375049e561500004e') ...
mit
Python
50bb03002c04512c858e97f29ad1c8ea15fef701
Edit staff and fellow ids
Alweezy/alvin-mutisya-dojo-project
tests/test_people.py
tests/test_people.py
from models.people import Person, Fellow, Staff from unittest import TestCase class PersonTestCases(TestCase): """Tests the functionality of the person parent class """ def setUp(self): """Passes an instance of class Person to all the methods in this class """ self.person = Person(...
from models.people import Person, Fellow, Staff from unittest import TestCase class PersonTestCases(TestCase): """Tests the functionality of the person parent class """ def setUp(self): """Passes an instance of class Person to all the methods in this class """ self.person = Person(...
mit
Python
abd53f3dba7b2cca7dbe50cf83b3622048771a99
add test_report() test
jendrikseipp/vulture,jendrikseipp/vulture
tests/test_script.py
tests/test_script.py
import os.path import subprocess import sys DIR = os.path.dirname(os.path.abspath(__file__)) REPO = os.path.dirname(DIR) def call_vulture(args, **kwargs): return subprocess.call( [sys.executable, 'vulture.py'] + args, cwd=REPO, **kwargs) def test_script(): assert call_vulture(['whitelist.py', 'vul...
import os.path import subprocess import sys DIR = os.path.dirname(os.path.abspath(__file__)) REPO = os.path.dirname(DIR) def call_vulture(args, **kwargs): return subprocess.call( [sys.executable, 'vulture.py'] + args, cwd=REPO, **kwargs) def test_script(): assert call_vulture(['whitelist.py', 'vul...
mit
Python
ad2ca3753ac73feccb68472c1c18f1f9201d958f
Remove now pointless test
Mause/resumable
tests/test_simple.py
tests/test_simple.py
#!/usr/bin/env python3 from nose.tools import eq_ from resumable import rebuild, value def test_simple(): @rebuild def function(original): return value(original.upper()) original = 'hello' original = function['function'](original) eq_(original, 'HELLO') def test_nested(): @rebuil...
#!/usr/bin/env python3 from nose.tools import eq_ from resumable import rebuild, value def test_simple(): @rebuild def function(original): return value(original.upper()) original = 'hello' original = function['function'](original) eq_(original, 'HELLO') def test_value(): @rebuild...
mit
Python
b82cf905280a3be91dcd3ac536495643f435f7b1
fix thing
abau171/helpmio,abau171/helpmio,abau171/helpmio
helpmio/chat.py
helpmio/chat.py
import uuid import helpmio.event class ChatRoom: def __init__(self, asker_name): self._connected_users = dict() self._all_users = dict() self._chat_history = [] self.on_connect = helpmio.event.EventDispatcher() self.on_disconnect = helpmio.event.EventDispatcher() s...
import uuid import helpmio.event class ChatRoom: def __init__(self, asker_name): self._connected_users = dict() self._all_users = dict() self._chat_history = [] self.on_connect = helpmio.event.EventDispatcher() self.on_disconnect = helpmio.event.EventDispatcher() s...
mit
Python
1fdd2c838f0a947ff34770ba4660c4662adfeb32
Allow deciseconds
xeroc/python-graphenelib
graphenecommon/utils.py
graphenecommon/utils.py
# -*- coding: utf-8 -*- import re import time from datetime import datetime, timezone timeFormat = "%Y-%m-%dT%H:%M:%S" def formatTime(t): """ Properly Format Time for permlinks """ if isinstance(t, float): return datetime.utcfromtimestamp(t).strftime(timeFormat) if isinstance(t, datetime): ...
import re import time from datetime import datetime, timezone timeFormat = "%Y-%m-%dT%H:%M:%S" def formatTime(t): """ Properly Format Time for permlinks """ if isinstance(t, float): return datetime.utcfromtimestamp(t).strftime(timeFormat) if isinstance(t, datetime): return t.strftime...
mit
Python
2a38fd96cba20048264a67980b552489c8c2762f
Support for direct assignment of values of function calls
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
thinglang/parser/symbols/base.py
thinglang/parser/symbols/base.py
import struct from thinglang.compiler import CompilationContext, BytecodeSymbols from thinglang.lexer.tokens import LexicalToken from thinglang.lexer.tokens.base import LexicalIdentifier from thinglang.parser.symbols import BaseSymbol from thinglang.parser.symbols.functions import MethodCall from thinglang.utils.type_...
import struct from thinglang.compiler import CompilationContext, BytecodeSymbols from thinglang.lexer.tokens import LexicalToken from thinglang.lexer.tokens.base import LexicalIdentifier from thinglang.parser.symbols import BaseSymbol from thinglang.utils.type_descriptors import ValueType class AssignmentOperation(B...
mit
Python
fab3a21e70b9ee83b948c0698b25639f374d5851
fix bug - deduplicator
robcza/intelmq,pkug/intelmq,sch3m4/intelmq,aaronkaplan/intelmq,sch3m4/intelmq,robcza/intelmq,robcza/intelmq,pkug/intelmq,aaronkaplan/intelmq,certtools/intelmq,aaronkaplan/intelmq,sch3m4/intelmq,sch3m4/intelmq,certtools/intelmq,pkug/intelmq,robcza/intelmq,certtools/intelmq,pkug/intelmq
intelmq/bots/experts/deduplicator/deduplicator.py
intelmq/bots/experts/deduplicator/deduplicator.py
from copy import deepcopy from intelmq.lib.bot import Bot, sys from intelmq.lib.cache import Cache from intelmq.lib.message import Event class DeduplicatorBot(Bot): def init(self): self.cache = Cache( self.parameters.redis_cache_host, self.param...
from copy import copy from intelmq.lib.bot import Bot, sys from intelmq.lib.cache import Cache from intelmq.lib.message import Event class DeduplicatorBot(Bot): def init(self): self.cache = Cache( self.parameters.redis_cache_host, self.parameter...
agpl-3.0
Python
04319b38278269d34d253c4be973c1309edc579c
Add missing no cover to util
explosion/thinc,spacy-io/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc
thinc/neural/util.py
thinc/neural/util.py
from __future__ import print_function, unicode_literals import numpy from .ops import NumpyOps, CupyOps def get_ops(ops): if ops in ('numpy', 'cpu'): return NumpyOps() elif ops in ('cupy', 'gpu'): return CupyOps() else: raise ValueError("TODO error %s" % ops) def mark_sentence_bo...
from __future__ import print_function, unicode_literals import numpy from .ops import NumpyOps, CupyOps def get_ops(ops): if ops in ('numpy', 'cpu'): return NumpyOps() elif ops in ('cupy', 'gpu'): return CupyOps() else: raise ValueError("TODO error %s" % ops) def mark_sentence_bo...
mit
Python
ad56a9cac7f0e62ef901a52589a62be3a2c81c46
Add secret key to testing settings
ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas
api/settings/testing.py
api/settings/testing.py
from .base import * ADMINS = ( ('Lyndon Garvey', 'lyndon.garvey@digital.justice.gov.uk'), ) SECRET_KEY = "Trdfgjgfghfdgjlfdtr_+@3gvuedrs873w"
from .base import * ADMINS = ( ('Lyndon Garvey', 'lyndon.garvey@digital.justice.gov.uk'), )
mit
Python
7c91cfa7e68d4f9b54a4380915235d5a443e0dc3
Remove benchmark in create_record
plamut/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core
src/ggrc/fulltext/sql.py
src/ggrc/fulltext/sql.py
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """SQL routines for full-text indexing.""" from ggrc import db from ggrc.fulltext import Indexer class SqlIndexer(Indexer): def create_record(self, record, commit=True): for prop, value in record.pr...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """SQL routines for full-text indexing.""" from ggrc import db from ggrc.fulltext import Indexer from ggrc.utils import benchmark class SqlIndexer(Indexer): def create_record(self, record, commit=True):...
apache-2.0
Python
b1b2a3db2bc2e764e895dacf1c44ed1e674c7270
Update validate.py
timothycrosley/hug,timothycrosley/hug,MuhammadAlkarouri/hug,MuhammadAlkarouri/hug,MuhammadAlkarouri/hug,timothycrosley/hug
hug/validate.py
hug/validate.py
"""hug/validate.py Defines hugs built-in validation methods Copyright (C) 2016 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limi...
"""hug/validate.py Defines hugs built-in validation methods Copyright (C) 2016 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limi...
mit
Python
70593ae9b29577cc9b038209c8fa173cf3883e47
Update tweetimporter.py
franckbrignoli/twitter-bot-detection
libraries/tweetimporter.py
libraries/tweetimporter.py
import unicodedata class TweetImporter(object): def __init__(self, twitter_client, database): self.twitter_client = twitter_client self.database = database def importData(self, user, tweets_number=10): followers = self.twitter_client.followers_list(screen_name=user, count=1) f...
import unicodedata class TweetImporter(object): def __init__(self, twitter_client, database): self.twitter_client = twitter_client self.database = database def importData(self, user, tweets_number=10): followers = self.twitter_client.followers_list(screen_name=user, count=1) f...
mit
Python
a90554993c47987f9b253330a8858dad254766ec
Fix variable.
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Demo/scripts/script.py
Demo/scripts/script.py
#! /usr/bin/env python # script.py -- Make typescript of terminal session. # Usage: # -a Append to typescript. # -p Use Python as shell. # Author: Steen Lumholt. import os, time, sys, getopt import pty def read(fd): data = os.read(fd, 1024) script.write(data) return data shell = '...
#! /usr/bin/env python # script.py -- Make typescript of terminal session. # Usage: # -a Append to typescript. # -p Use Python as shell. # Author: Steen Lumholt. import os, time, sys, getopt import pty def read(fd): data = os.read(fd, 1024) file.write(data) return data shell = 'sh...
mit
Python
ec0ec8a36e45f68676aa88ba5dbf7889cf1aab79
Improve logging
daevaorn/sentry,looker/sentry,ifduyue/sentry,mvaled/sentry,beeftornado/sentry,gencer/sentry,looker/sentry,fotinakis/sentry,JackDanger/sentry,looker/sentry,BuildingLink/sentry,zenefits/sentry,fotinakis/sentry,daevaorn/sentry,jean/sentry,JamesMura/sentry,JackDanger/sentry,BuildingLink/sentry,mvaled/sentry,gencer/sentry,n...
src/sentry/tasks/sync_docs.py
src/sentry/tasks/sync_docs.py
from __future__ import absolute_import, print_function import logging from sentry.tasks.base import instrumented_task BASE_URL = 'https://docs.getsentry.com/hosted/_platforms/{}' logger = logging.getLogger('sentry') def get_integration_id(platform_id, integration_id): if integration_id == '_self': ret...
from __future__ import absolute_import, print_function import logging from sentry.tasks.base import instrumented_task BASE_URL = 'https://docs.getsentry.com/hosted/_platforms/{}' logger = logging.getLogger('sentry') def get_integration_id(platform_id, integration_id): if integration_id == '_self': ret...
bsd-3-clause
Python
75080e6f0da4f699ef1eb89310847befeccfab40
Check for deprecation on import is problematic. Rather just check that filter can be imported normally.
michaelaye/scikit-image,warmspringwinds/scikit-image,juliusbierk/scikit-image,michaelpacer/scikit-image,ofgulban/scikit-image,vighneshbirodkar/scikit-image,oew1v07/scikit-image,chriscrosscutler/scikit-image,pratapvardhan/scikit-image,robintw/scikit-image,paalge/scikit-image,vighneshbirodkar/scikit-image,youprofit/sciki...
skimage/filter/tests/test_filter_import.py
skimage/filter/tests/test_filter_import.py
from numpy.testing import assert_warns from warnings import catch_warnings, simplefilter def test_import_filter(): with catch_warnings(): simplefilter('ignore') from skimage import filter as F assert('sobel' in dir(F))
from skimage._shared.utils import all_warnings, skimage_deprecation from numpy.testing import assert_warns def import_filter(): from skimage import filter as F assert('sobel' in dir(F)) def test_filter_import(): with all_warnings(): assert_warns(skimage_deprecation, import_filter)
bsd-3-clause
Python
3778014fb18f5a34a214d0fae3f7b57ab866284a
Exclude MPs who are no longer members of a fraction.
ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt
manoseimas/mps_v2/views.py
manoseimas/mps_v2/views.py
from django.shortcuts import render from django.utils.safestring import mark_safe from couchdbkit.exceptions import ResourceNotFound from sboard.models import couch from manoseimas.mps.nodes import prepare_position_list from .models import ParliamentMember, GroupMembership, Group def mp_list(request, fraction_slu...
from django.shortcuts import render from django.utils.safestring import mark_safe from couchdbkit.exceptions import ResourceNotFound from sboard.models import couch from manoseimas.mps.nodes import prepare_position_list from .models import ParliamentMember, GroupMembership, Group def mp_list(request, fraction_slu...
agpl-3.0
Python
d2328c28c89c1700906244610e92854c578e1262
test now a package
jandecaluwe/myhdl,palashahuja/myhdl,j-marjanovic/myhdl,myhdl/myhdl,jmgc/myhdl-numeric,hgomersall/myhdl,jck/myhdl,juhasch/myhdl,hgomersall/myhdl,josyb/myhdl,juhasch/myhdl,myhdl/myhdl,jandecaluwe/myhdl,cfelton/myhdl,palashahuja/myhdl,palashahuja/myhdl,jandecaluwe/myhdl,jmgc/myhdl-numeric,myhdl/myhdl,jck/myhdl,gw0/myhdl,p...
test/test.py
test/test.py
""" Run all the myhdl unit tests. """ import unittest from myhdl.test import test_all unittest.main(defaultTest='test_all.suite', testRunner=unittest.TextTestRunner(verbosity=2))
""" Run all the myhdl unit tests. """ import unittest from myhdl import test_all unittest.main(defaultTest='test_all.suite', testRunner=unittest.TextTestRunner(verbosity=2))
lgpl-2.1
Python
3b4dc1aefe17d14ad74edbdfa133b26247880f73
Update run_init_temp.py
cornell-zhang/datuner,cornell-zhang/datuner,cornell-zhang/datuner,cornell-zhang/datuner,cornell-zhang/datuner,cornell-zhang/datuner
scripts/tests/run_init_temp.py
scripts/tests/run_init_temp.py
import os import sys pwd =os.getcwd() tpath = 'vtr_flow_holder' design = 'diffeq1' wrksp = 'workspace_holder' proc_num = 1 datpath = sys.path[0] srcFile = datpath+"/run_DATuner.py" rep_cmd = "sed -e \"s:TOOL_PATH_HOLD:"+tpath+":g\" -e \"s:DESIGN_NAME_HOLD:"+design+":g\" -e \"s:WORK_SPACE_HOLD:"+wrksp+":g\" -e \"s:DA...
import os import sys pwd =os.getcwd() tpath = 'vtr_flow_holder' design = 'diffeq1' wrksp = 'workspace_holder' proc_num = 1 datpath = sys.path[0] srcFile = datpath+"/run_DATuner_arg.py" rep_cmd = "sed -e \"s:TOOL_PATH_HOLD:"+tpath+":g\" -e \"s:DESIGN_NAME_HOLD:"+design+":g\" -e \"s:WORK_SPACE_HOLD:"+wrksp+":g\" -e \"...
bsd-3-clause
Python
2debb381fc2db4be1e7ea6e5252a50ae0de6f4a9
Update Clock.py
MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab
service/Clock.py
service/Clock.py
# start the services python = Runtime.start("python","Python") clock = Runtime.start("clock","Clock") log = Runtime.start("log","Log") audio = Runtime.start("audio","AudioFile") # define a ticktock method def ticktock(timedata): print timedata audio.playResource("resource/Clock/tick.mp3") #create a message ...
# start the services python = Runtime.start("python","Python") clock = Runtime.start("clock","Clock") log = Runtime.start("log","Log") audio = Runtime.start("audio","AudioFile") # define a ticktock method def ticktock(timedata): print timedata audio.playResource("resource/Clock/tick.mp3") #create a message ...
apache-2.0
Python
65b397e3911d64e047cbb66f90cf15598f626bae
Remove unused code
liyi193328/seq2seq,google/seq2seq,liyi193328/seq2seq,kontact-chan/seq2seq,chunfengh/seq2seq,kontact-chan/seq2seq,shashankrajput/seq2seq,liyi193328/seq2seq,shashankrajput/seq2seq,google/seq2seq,chunfengh/seq2seq,shashankrajput/seq2seq,google/seq2seq,kontact-chan/seq2seq,chunfengh/seq2seq,kontact-chan/seq2seq,liyi193328/...
seq2seq/inference/inference.py
seq2seq/inference/inference.py
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
apache-2.0
Python
d8c873b2c135bce14cf909086c4a7b749e013a10
Check for _type
opencivicdata/pupa,mileswwatkins/pupa,datamade/pupa,rshorey/pupa,mileswwatkins/pupa,datamade/pupa,rshorey/pupa,influence-usa/pupa,influence-usa/pupa,opencivicdata/pupa
tools/scruffy/checkers/common.py
tools/scruffy/checkers/common.py
from .. import Check from ..core import db def common_checks(obj, singular, plural): if obj.get('jurisdiction_id'): org = db.metadata.find_one({ "_id": obj['jurisdiction_id'] }) if org is None: yield Check(collection=plural, id=obj['_id'], ...
from .. import Check from ..core import db def common_checks(obj, singular, plural): if obj.get('jurisdiction_id'): org = db.metadata.find_one({ "_id": obj['jurisdiction_id'] }) if org is None: yield Check(collection=plural, id=obj['_id'], ...
bsd-3-clause
Python
ad79dea7e0cd0af94cc17635a9ed72995af3bbd3
Bump version to 0.0.2
kgriffs/setec,kgriffs/setec
setec/version.py
setec/version.py
"""Package version.""" __version__ = '0.0.2' """Current version."""
"""Package version.""" __version__ = '0.0.1' """Current version."""
apache-2.0
Python
9cbc286e9e9ddeda8751250ad880b513bd28619e
Add the Twitter and Facebook IDs for testing. Refs #251
CulturePlex/pybossa,CulturePlex/pybossa,PyBossa/pybossa,geotagx/geotagx-pybossa-archive,proyectos-analizo-info/pybossa-analizo-info,jean/pybossa,geotagx/pybossa,proyectos-analizo-info/pybossa-analizo-info,PyBossa/pybossa,OpenNewsLabs/pybossa,proyectos-analizo-info/pybossa-analizo-info,geotagx/pybossa,stefanhahmann/pybo...
settings_test.py
settings_test.py
SQLALCHEMY_DATABASE_TEST_URI = 'postgresql://postgres:@localhost/pybossa' GOOGLE_CLIENT_ID = '' GOOGLE_CLIENT_SECRET = '' TWITTER_CONSUMER_KEY='' TWITTER_CONSUMER_SECRET='' FACEBOOK_APP_ID='' FACEBOOK_APP_SECRET='' TERMSOFUSE = 'http://okfn.org/terms-of-use/' DATAUSE = 'http://opendatacommons.org/licenses/by/' ITSDANGE...
SQLALCHEMY_DATABASE_TEST_URI = 'postgresql://postgres:@localhost/pybossa' GOOGLE_CLIENT_ID = '' GOOGLE_CLIENT_SECRET = '' TERMSOFUSE = 'http://okfn.org/terms-of-use/' DATAUSE = 'http://opendatacommons.org/licenses/by/' ITSDANGEORUSKEY = 'its-dangerous-key' LOGO = 'logo.png' MAIL_SERVER = 'localhost' MAIL_USERNAME = Non...
agpl-3.0
Python
9eb97ccd871afba7f2fbd0f59771bb840a32f939
fix copy and paste leftovers
Impactstory/total-impact-core,total-impact/total-impact-core,Impactstory/total-impact-core,total-impact/total-impact-core,total-impact/total-impact-core,total-impact/total-impact-core,Impactstory/total-impact-core,Impactstory/total-impact-core
totalimpact/providers/bibjson.py
totalimpact/providers/bibjson.py
from StringIO import StringIO import json, re from totalimpact.providers import provider from totalimpact.providers.provider import Provider, ProviderContentMalformedError, ProviderTimeout, ProviderServerError from totalimpact import unicode_helpers import logging logger = logging.getLogger('ti.providers.bibjson') ...
from StringIO import StringIO import json, re from totalimpact.providers import provider from totalimpact.providers.provider import Provider, ProviderContentMalformedError, ProviderTimeout, ProviderServerError from totalimpact import unicode_helpers import logging logger = logging.getLogger('ti.providers.bibjson') ...
mit
Python
abf2d338762d0d48a3a334c607cef65fa025ac7d
Update extract_strings_qt.py
JSponaugle/ion,JSponaugle/ion,JSponaugle/ion,JSponaugle/ion,JSponaugle/ion,JSponaugle/ion
share/qt/extract_strings_qt.py
share/qt/extract_strings_qt.py
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob import operator OUT_CPP="src/qt/bitcoinstrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' format produced by x...
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob OUT_CPP="src/qt/bitcoinstrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' format produced by xgettext. Ret...
mit
Python
f9269fe894915e0c81d4313032541085c9982533
Update interface.py
MCPEBukkit/Python_PE,MCPEBukkit/Python_PE
src/interface.py
src/interface.py
import socket import logger from src.logging import sys import time class interface(object): """docstring for interface""" def __init__(self, arg): super(interface, self).__init__() self.arg = arg def connection(ip = "0.0.0.0", port = 19132): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) b...
import socket import logger from src.logging import sys import time class interface(object): """docstring for interface""" def __init__(self, arg): super(interface, self).__init__() self.arg = arg def connection(ip = "0.0.0.0", port = 19132): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) bind = s...
mit
Python
8bd9d8fbdbfd2c5ac430ef64af932c67e58b887e
Add topic-command
Thor77/TeamspeakIRC
tsversion.py
tsversion.py
import irc3 from irc3.plugins.command import command from irc3.plugins.cron import cron from teamspeak_web_utils import latest_version @irc3.plugin class TSVersion(object): def __init__(self, bot): self.bot = bot self.client_version = None self.server_version = None config = bot.co...
import irc3 from irc3.plugins.command import command from irc3.plugins.cron import cron from teamspeak_web_utils import latest_version @irc3.plugin class TSVersion(object): def __init__(self, bot): self.bot = bot self.client_version = None self.server_version = None config = bot.co...
mit
Python
f22eae158e337f4438aa367c13b93bf40085f242
add def unicode in class Achievement
kaduuuken/achievementsystem,kaduuuken/achievementsystem
achievements/models.py
achievements/models.py
from django.db import models from django.contrib.auth.models import User from filebrowser.fields import FileBrowseField from django.utils.translation import ugettext_lazy as _ import validate class Category(models.Model): name = models.CharField(_("Name"), max_length=255) parent_category = models.ForeignKey('s...
from django.db import models from django.contrib.auth.models import User from filebrowser.fields import FileBrowseField from django.utils.translation import ugettext_lazy as _ import validate class Category(models.Model): name = models.CharField(_("Name"), max_length=255) parent_category = models.ForeignKey('s...
bsd-2-clause
Python
be0a878a0b8cb87491967bce30e503b62547a5c7
add class Progress
kaduuuken/achievementsystem,kaduuuken/achievementsystem
achievements/models.py
achievements/models.py
from django.db import models from django.contrib.auth.models import User from filebrowser.fields import FileBrowseField from django.utils.translation import ugettext_lazy as _ class Category(models.Model): name = models.CharField(_("Name"), max_length=255) parent_category = models.ForeignKey('self', blank=Tru...
from django.db import models from django.contrib.auth.models import User from filebrowser.fields import FileBrowseField from django.utils.translation import ugettext_lazy as _ class Category(models.Model): name = models.CharField(_("Name"), max_length=255) parent_category = models.ForeignKey('self', blank=Tru...
bsd-2-clause
Python
b58a856d8ec99dd5b55037859959057bbfc3b87c
bump benchmark version
slundberg/shap,slundberg/shap,slundberg/shap,slundberg/shap
shap/__init__.py
shap/__init__.py
# flake8: noqa __version__ = '0.27.3a' from .explainers.kernel import KernelExplainer, kmeans from .explainers.sampling import SamplingExplainer from .explainers.tree import TreeExplainer, Tree from .explainers.deep import DeepExplainer from .explainers.gradient import GradientExplainer from .explainers.linear import...
# flake8: noqa __version__ = '0.27.3' from .explainers.kernel import KernelExplainer, kmeans from .explainers.sampling import SamplingExplainer from .explainers.tree import TreeExplainer, Tree from .explainers.deep import DeepExplainer from .explainers.gradient import GradientExplainer from .explainers.linear import ...
mit
Python
d54b1a1b2faf8ded624385dc8e4b0e8ec5adb869
Update version.
pmaigutyak/mp-shop,pmaigutyak/mp-shop,pmaigutyak/mp-shop
shop/__init__.py
shop/__init__.py
__version__ = '2.12'
__version__ = '2.11'
isc
Python
b8ecb1e86fcbbda0f92314c90fb319c2c50fcf94
Set DEBUG = False in production
kz26/uchicago-hvz,kz26/uchicago-hvz,kz26/uchicago-hvz
uchicagohvz/production_settings.py
uchicagohvz/production_settings.py
from local_settings import * DEBUG = False ALLOWED_HOSTS = ['uchicagohvz.org'] # Database DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'uchicagohvz', # Or path...
from local_settings import * settings.DEBUG = False ALLOWED_HOSTS = ['uchicagohvz.org'] # Database DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'uchicagohvz', ...
mit
Python
e62bab8106e96df4e9a248e125c6b18e3700f602
add unit test for utils
RaRe-Technologies/smart_open,RaRe-Technologies/smart_open
smart_open/tests/test_utils.py
smart_open/tests/test_utils.py
# -*- coding: utf-8 -*- # # Copyright (C) 2019 Radim Rehurek <me@radimrehurek.com> # # This code is distributed under the terms and conditions # from the MIT License (MIT). # import unittest import smart_open.utils class ClampTest(unittest.TestCase): def test_low(self): self.assertEqual(smart_open.utils...
# -*- coding: utf-8 -*- # # Copyright (C) 2019 Radim Rehurek <me@radimrehurek.com> # # This code is distributed under the terms and conditions # from the MIT License (MIT). # import unittest import smart_open.utils class ClampTest(unittest.TestCase): def test_low(self): self.assertEqual(smart_open.utils...
mit
Python
2dad5140ceeb7635374203b55727eb19c3264875
fix template path in urls
crobays/django-boilerplate,crobays/django-boilerplate,crobays/boilerplate-django,maikelvl/django-boilerplate,crobays/django-boilerplate,maikelvl/django-boilerplate,maikelvl/django-boilerplate,crobays/boilerplate-django,crobays/boilerplate-django
src/main/urls.py
src/main/urls.py
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic.base import TemplateView urlpatterns = [ # Examples: url(r'^$', TemplateView.as_view(template_name='pages/home.html'), name=...
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic.base import TemplateView urlpatterns = [ # Examples: url(r'^$', TemplateView.as_view(template_name='home.html'), name='home'...
mit
Python
551f7bf91a91420de6ac4c4b5767c7d926c9a500
Allow camera to be chosen by config
exhuma/raspicam,exhuma/raspicam,exhuma/raspicam
raspicam/main.py
raspicam/main.py
import logging from config_resolver import Config import cv2 from camera import USBCam, PiCamera from processing import detect from raspicam.webui import make_app LOG = logging.getLogger(__name__) class Application: def __init__(self, config): self.config = config self.initialised = False ...
import logging from config_resolver import Config import cv2 from camera import USBCam from processing import detect from raspicam.webui import make_app LOG = logging.getLogger(__name__) class Application: def __init__(self, config): self.config = config self.initialised = False self...
mit
Python
562d84c69177b684a148e7818c1e47312a473c54
Add serializers for UserOrders API
dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4
apps/shop/serializers.py
apps/shop/serializers.py
# -*- coding: utf-8 -*- from rest_framework import serializers from apps.authentication.models import OnlineUser as User from apps.gallery.serializers import ResponsiveImageSerializer from apps.inventory.models import Item, ItemCategory from apps.payment.models import PaymentTransaction from apps.shop.models import O...
# -*- coding: utf-8 -*- from rest_framework import serializers from apps.authentication.models import OnlineUser as User from apps.gallery.serializers import ResponsiveImageSerializer from apps.inventory.models import Item, ItemCategory from apps.payment.models import PaymentTransaction from apps.shop.models import O...
mit
Python