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
73bccf55b9d6882fed29ab38e0188d7c62370664
Create prueba.py
aescoda/TFG
prueba.py
prueba.py
from flask import Flask from flask import request import os import xml.etree.ElementTree as ET from threading import Thread app = Flask(__name__) def send_email(xml): print "2" prueba() print xml return None @app.route('/webhook', methods=['POST','GET']) def webhook(): print "webhook" ...
from flask import Flask from flask import request import xml.etree.ElementTree as ET from threading import Thread app = Flask(__name__) def send_email(xml): print "2" prueba() print xml return None @app.route('/webhook', methods=['POST','GET']) def webhook(): print "webhook" xml = "...
apache-2.0
Python
b9261b8be00d431bdfe4b3090d0d21904ba29620
Fix ulozto account
vuolter/pyload,vuolter/pyload,vuolter/pyload
module/plugins/accounts/UlozTo.py
module/plugins/accounts/UlozTo.py
# -*- coding: utf-8 -*- import re import urlparse from module.plugins.internal.Account import Account class UlozTo(Account): __name__ = "UlozTo" __type__ = "account" __version__ = "0.22" __status__ = "testing" __description__ = """Uloz.to account plugin""" __license__ = "GPLv3" ...
# -*- coding: utf-8 -*- import re import urlparse from module.plugins.internal.Account import Account class UlozTo(Account): __name__ = "UlozTo" __type__ = "account" __version__ = "0.22" __status__ = "testing" __description__ = """Uloz.to account plugin""" __license__ = "GPLv3" ...
agpl-3.0
Python
7fbeb4c9823b03c00ad73acd53085caab304917c
upgrade will now detect if the installation is from git and update accordingly
purduesigbots/purdueros-cli,purduesigbots/pros-cli
proscli/upgrade.py
proscli/upgrade.py
import click from proscli.utils import default_cfg import os import os.path import subprocess import sys import json @click.group() def upgrade_cli(): pass def get_upgrade_command(): if getattr(sys, 'frozen', False): cmd = os.path.abspath(os.path.join(sys.executable, '..', '..', 'updater.exe')) ...
import click from proscli.utils import default_cfg import os import os.path import subprocess import sys import json @click.group() def upgrade_cli(): pass def get_upgrade_command(): if getattr(sys, 'frozen', False): cmd = os.path.abspath(os.path.join(sys.executable, '..', '..', 'updater.exe')) ...
bsd-3-clause
Python
8c93043e4e3c27fd42873766b6cc677cd60818db
Remove now obsolete comment.
StackStorm/st2,StackStorm/st2,tonybaloney/st2,StackStorm/st2,Plexxi/st2,tonybaloney/st2,Plexxi/st2,Plexxi/st2,lakshmi-kannan/st2,peak6/st2,Plexxi/st2,peak6/st2,nzlosh/st2,lakshmi-kannan/st2,nzlosh/st2,StackStorm/st2,nzlosh/st2,lakshmi-kannan/st2,nzlosh/st2,peak6/st2,tonybaloney/st2
st2common/st2common/models/db/pack.py
st2common/st2common/models/db/pack.py
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
apache-2.0
Python
c28de15fd8cade476fa8d7af904826dcea3c0f3e
Add Python note on simple unit test
erictleung/programming-notes,erictleung/programming-notes,erictleung/programming-notes,erictleung/programming-notes,erictleung/programming-notes,erictleung/programming-notes,erictleung/programming-notes,erictleung/programming-notes,erictleung/programming-notes
python.py
python.py
# Python Notes # Version 2.7 # for loop for i in range(10): print i # check list elements of matching string randList = ["a", "ab", "bc", "de", "abc"] toFind = "a" print [x for x in randList if toFind in x] # read file with open("filename.txt", "r") as fh: data = fh.readline() # read line by line # data ...
# Python Notes # Version 2.7 # for loop for i in range(10): print i # check list elements of matching string randList = ["a", "ab", "bc", "de", "abc"] toFind = "a" print [x for x in randList if toFind in x] # read file with open("filename.txt", "r") as fh: data = fh.readline() # read line by line # data ...
cc0-1.0
Python
80cdc54dbe41c243c4620472aa8ba5c6ece40324
Add target_table attribute to DataRow
pantheon-systems/etl-framework
etl_framework/DataTable.py
etl_framework/DataTable.py
class DataRow(dict): """object for holding row of data""" def __init__(self, *args, **kwargs): """creates instance of DataRow""" super(DataRow, self).__init__(*args, **kwargs) self.target_table = None def row_values(self, field_names, default_value=None): """returns row v...
class DataRow(dict): """object for holding row of data""" def row_values(self, field_names, default_value=None): """returns row value of specified field_names""" return tuple(self.get(field_name, default_value) for field_name in field_names) class DataTable(object): """object for holding ...
mit
Python
9d1d8ed852b329d9f9465218b516840f308c9340
Remove errant comma in capabilities policies
mahak/cinder,openstack/cinder,phenoxim/cinder,mahak/cinder,j-griffith/cinder,Datera/cinder,Datera/cinder,openstack/cinder,j-griffith/cinder,phenoxim/cinder
cinder/policies/capabilities.py
cinder/policies/capabilities.py
# Copyright (c) 2017 Huawei Technologies Co., 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 of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
# Copyright (c) 2017 Huawei Technologies Co., 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 of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
apache-2.0
Python
782e0305c1a385775eda129f8d526e4a58d78b7b
Add new Ozwillo footer link
ozwillo/ckanext-ozwillo-theme,ozwillo/ckanext-ozwillo-theme,ozwillo/ckanext-ozwillo-theme,ozwillo/ckanext-ozwillo-theme
ckanext/ozwillo_theme/plugin.py
ckanext/ozwillo_theme/plugin.py
import requests import xml.etree.ElementTree as ET from slugify import slugify from pylons import config as pconfig import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit from ckan.lib.app_globals import set_app_global from ckan.lib.plugins import DefaultTranslation def footer_links(): url = 'http...
import requests import xml.etree.ElementTree as ET from slugify import slugify from pylons import config as pconfig import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit from ckan.lib.app_globals import set_app_global from ckan.lib.plugins import DefaultTranslation def footer_links(): url = 'http...
agpl-3.0
Python
10116f3166d7754fadebda12c23235001447fce9
Add pls to __init__
treycausey/scikit-learn,jm-begon/scikit-learn,Barmaley-exe/scikit-learn,sonnyhu/scikit-learn,YinongLong/scikit-learn,dsullivan7/scikit-learn,hsiaoyi0504/scikit-learn,hainm/scikit-learn,ycaihua/scikit-learn,fzalkow/scikit-learn,466152112/scikit-learn,mattgiguere/scikit-learn,tmhm/scikit-learn,rvraghav93/scikit-learn,0as...
scikits/learn/__init__.py
scikits/learn/__init__.py
""" Machine Learning module in python ================================= scikits.learn is a Python module integrating classique machine learning algorithms in the tightly-nit world of scientific Python packages (numpy, scipy, matplotlib). It aims to provide simple and efficient solutions to learning problems that are ...
""" Machine Learning module in python ================================= scikits.learn is a Python module integrating classique machine learning algorithms in the tightly-nit world of scientific Python packages (numpy, scipy, matplotlib). It aims to provide simple and efficient solutions to learning problems that are ...
bsd-3-clause
Python
3d430b5505ce8307633eda3d01e92713a5abba32
remove more word count stuff
nprapps/graeae,nprapps/graeae,nprapps/graeae,nprapps/graeae
scrapers/seamus/models.py
scrapers/seamus/models.py
from collections import OrderedDict from dateutil import parser from itertools import groupby from pytz import timezone from pyquery import PyQuery from scrapers.homepage.models import ApiEntry import os class Story(ApiEntry): """ Represents a story in the Seamus API """ def __init__(self, element, ru...
from collections import OrderedDict from dateutil import parser from itertools import groupby from pytz import timezone from pyquery import PyQuery from scrapers.homepage.models import ApiEntry import os class Story(ApiEntry): """ Represents a story in the Seamus API """ def __init__(self, element, ru...
mit
Python
6876ce61a2f324c8aa36ba7084b23e5180c14c2a
fix pica conversion thanks to Paul McNett
makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile
reportlab/lib/units.py
reportlab/lib/units.py
#!/bin/env python #Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/lib/units.py __version__=''' $Id$ ''' inch = 72.0 cm = inch / 2.54 mm = cm * 0.1 pica = 12.0 def toLength(s): '''convert a stri...
#!/bin/env python #Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/lib/units.py __version__=''' $Id$ ''' inch = 72.0 cm = inch / 2.54 mm = cm * 0.1 pica = 12.0 def toLength(s): '''convert a stri...
bsd-3-clause
Python
cddccbdf7eb8f329888e58d470f6ad5303b60429
fix line parks
evenly-epic-mule/Monocle,ZeChrales/Monocle,evenly-epic-mule/Monocle,ZeChrales/Monocle,evenly-epic-mule/Monocle,ZeChrales/Monocle
raidex.py
raidex.py
#!/usr/bin/env python3 from datetime import datetime from pkg_resources import resource_filename try: from ujson import dumps from flask import json as flask_json flask_json.dumps = lambda obj, **kwargs: dumps(obj, double_precision=6) except ImportError: from json import dumps from flask import Flask...
#!/usr/bin/env python3 from datetime import datetime from pkg_resources import resource_filename try: from ujson import dumps from flask import json as flask_json flask_json.dumps = lambda obj, **kwargs: dumps(obj, double_precision=6) except ImportError: from json import dumps from flask import Flask...
mit
Python
9e7fe9e2a1ac8d8b7651d4ce9859427844c3c988
Revert "Add support for setting shard_index instead of shard_num"
berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud
solr/run_solr_shard.py
solr/run_solr_shard.py
#!/usr/bin/env python import argparse from mc_solr.constants import * from mc_solr.solr import run_solr_shard if __name__ == "__main__": parser = argparse.ArgumentParser(description="Install Solr and start a shard.", formatter_class=argparse.ArgumentDefaultsHelpFormatter) ...
#!/usr/bin/env python import argparse from mc_solr.constants import * from mc_solr.solr import run_solr_shard if __name__ == "__main__": parser = argparse.ArgumentParser(description="Install Solr and start a shard.", formatter_class=argparse.ArgumentDefaultsHelpFormatter) ...
agpl-3.0
Python
48e682e267f45a731e90a60ce9798272f7a9c24c
Add supportted Mbed platform
0xc0170/pyOCD,0xc0170/pyOCD,mbedmicro/pyOCD,tgarc/pyOCD,wjzhang/pyOCD,c1728p9/pyOCD,flit/pyOCD,matthewelse/pyOCD,molejar/pyOCD,tgarc/pyOCD,devanlai/pyOCD,devanlai/pyOCD,oliviermartin/pyOCD,geky/pyOCD,mesheven/pyOCD,devanlai/pyOCD,adamgreen/pyOCD,NordicSemiconductor/pyOCD,geky/pyOCDgdb,tgarc/pyOCD,flit/pyOCD,bridadan/py...
test/gdb_server.py
test/gdb_server.py
""" mbed CMSIS-DAP debugger Copyright (c) 2006-2013 ARM Limited 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 ...
""" mbed CMSIS-DAP debugger Copyright (c) 2006-2013 ARM Limited 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 ...
apache-2.0
Python
5feebab1580ef511cefd149dc841d2f5802d06cb
add possibility of get context from terminal
buxx/synergine
synergine/core/connection/Terminal.py
synergine/core/connection/Terminal.py
from synergine.core.exception.NotFoundError import NotFoundError class Terminal(): """ Obj who receive synergine data at each cycle """ _name = None @classmethod def get_name(cls): if not cls._name: raise Exception("Terminal must be named") return cls._name d...
from synergine.core.exception.NotFoundError import NotFoundError class Terminal(): """ Obj who receive synergine data at each cycle """ _name = None @classmethod def get_name(cls): if not cls._name: raise Exception("Terminal must be named") return cls._name d...
apache-2.0
Python
1469bba5c87c6bd6c66eb87a695579f032806353
Update data_import.py
anapophenic/knb
data_import.py
data_import.py
import scipy.io import numpy as np from collections import Counter def data_prep(filename,format='explicit'): """ Main function for importing triples from raw INTACT DNA methylation data Inputs: filename: filename for INTACT DNA methylation data format: whether to return the data formatted for explicit...
import scipy.io import numpy as np from collections import Counter def data_prep(filename): """ Main function for importing triples from raw INTACT DNA methylation data Inputs: filename: filename for INTACT DNA methylation data Otputs: N: number of maximum number of coverage X_importance_weighte...
cc0-1.0
Python
bff5fc6f8266d4a788cd2514de806564c95d9440
add removal of empty directories
dan-blanchard/conda-build,sandhujasmine/conda-build,mwcraig/conda-build,shastings517/conda-build,frol/conda-build,mwcraig/conda-build,dan-blanchard/conda-build,ilastik/conda-build,rmcgibbo/conda-build,shastings517/conda-build,ilastik/conda-build,sandhujasmine/conda-build,ilastik/conda-build,sandhujasmine/conda-build,fr...
conda_build/noarch.py
conda_build/noarch.py
import os from os.path import dirname, isdir, join from conda_build.config import config BASH_HEAD = '''\ #!/bin/bash SP_DIR=$($PREFIX/bin/python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") #echo "SP_DIR='$SP_DIR'" ''' def handle_file(f): path = join(config.build_prefix, f) ...
import os from os.path import dirname, isdir, join from conda_build.config import config BASH_HEAD = '''\ #!/bin/bash SP_DIR=$($PREFIX/bin/python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") #echo "SP_DIR='$SP_DIR'" ''' def handle_file(f): path = join(config.build_prefix, f) ...
bsd-3-clause
Python
667955e3376357ac987d3fbf40de6151ba0a980c
implement client.init
mlsteele/one-time-chat,mlsteele/one-time-chat,mlsteele/one-time-chat
client/client.py
client/client.py
import requests import sys class OTC_Client(object): def __init__(self,server_address,pad): self.encrypt_index = 0 self.pad = pad self.decrypt_index = len(pad) self.connect(server_address) raise NotImplementedError("TODO: write a client") def send(self,message,target): ...
class OTC_Client(object): def __init__(self): raise NotImplementedError("TODO: write a client") def send(self,message): payload = {'message':message} r = requets.post(self.server_address,data=payload) raise NotImplementedError("TODO: write send method") def recieve(self): ...
mit
Python
b88dbecd04072f2215347d10ee5135428cce552c
add pymatgen local_env strategy for all bonds below cutoff
materialsvirtuallab/megnet,materialsvirtuallab/megnet,materialsvirtuallab/megnet,materialsvirtuallab/megnet,materialsvirtuallab/megnet
megnet/data/local_env.py
megnet/data/local_env.py
from pymatgen.analysis.local_env import MinimumDistanceNN class MinimumDistanceNNAll(MinimumDistanceNN): """ Determine bonded sites by fixed cutoff Args:. cutoff (float): cutoff radius in Angstrom to look for trial near-neighbor sites (default: 4.0). """ def __init__(self, cuto...
bsd-3-clause
Python
f9a081af27c45c13b1763d25b9da32f32c4d3b00
Add checks to verify that functions imported from saved model contain the attribute "tf._original_func_name".
Intel-tensorflow/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,tensorflow/...
tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/control_flow_upgrade_legacy_v1.py
tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/control_flow_upgrade_legacy_v1.py
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
Python
837b63918c29c1cd45a2a0daf8e6ff6e3b28bfb7
Fix typo breaking the TS6 feature.
merc-devel/merc
merc/features/ts6/sid.py
merc/features/ts6/sid.py
from merc import errors from merc import feature from merc import message from merc import util class SidFeature(feature.Feature): NAME = __name__ install = SidFeature.install @SidFeature.register_server_command class Sid(message.Command): NAME = "SID" MIN_ARITY = 4 def __init__(self, server_name, hopcou...
from merc import errors from merc import feature from merc import message from merc import util class SidFeature(feature.Feature): NAME = __name__ install = SidFeature.install @SidFeature.register_server_command class Sid(message.Command): NAME = "SID" MIN_ARITY = 4 def __init__(self, server_name, hopcou...
mit
Python
6340c57f3676e0fe05795315d4321c15a61c8533
Update version.py
VUIIS/dax,VUIIS/dax
dax/version.py
dax/version.py
VERSION = '1.0.0b3'
VERSION = '1.0.0b2'
mit
Python
107e8103ddfefe7a801509a1079642ae8fa1221c
fix names of network and subnetworks
CiscoSystems/tempest,cisco-openstack/tempest,cisco-openstack/tempest,CiscoSystems/tempest
tempest/scenario/test_network_ipv6.py
tempest/scenario/test_network_ipv6.py
# Copyright 2014 Cisco Systems, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
# Copyright 2014 Cisco Systems, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
apache-2.0
Python
927b851b061c4fcbb6a1798bec27c38f6fc14550
Add todo
robot-tools/iconograph,robot-tools/iconograph,robot-tools/iconograph,robot-tools/iconograph
client/update_grub.py
client/update_grub.py
#!/usr/bin/python3 import os import re import string import subprocess import tempfile class GrubUpdater(object): _VOLUME_ID_REGEX = re.compile(b'^Volume id: (?P<volume_id>.+)$', re.MULTILINE) _HOTKEYS = string.digits + string.ascii_letters def __init__(self, image_dir, boot_dir): self._image_dir = image...
#!/usr/bin/python3 import os import re import string import subprocess import tempfile class GrubUpdater(object): _VOLUME_ID_REGEX = re.compile(b'^Volume id: (?P<volume_id>.+)$', re.MULTILINE) _HOTKEYS = string.digits + string.ascii_letters def __init__(self, image_dir, boot_dir): self._image_dir = image...
apache-2.0
Python
73e36f40213a6737da015057568bfd5589c9673e
Refactor day04 to allow arbitrary hash starts
mpirnat/adventofcode
day04/day04.py
day04/day04.py
#!/usr/bin/env python """ Solve day 4 of Advent of Code. http://adventofcode.com/day/4 """ import hashlib def find_integer(key, hash_start='0'*5): """ Find the smallest integer such that the md5 hash of the given secret key plus the integer yields a hash that begins with a certain number of zeroes (...
#!/usr/bin/env python """ Solve day 4 of Advent of Code. http://adventofcode.com/day/4 """ import hashlib def find_integer(key, zeroes=5): """ Find the smallest integer such that the md5 hash of the given secret key plus the integer yields a hash that begins with a certain number of zeroes (default ...
mit
Python
27165c0dfcf34a794c168ae29e371ac53843c6ec
disable Selenium tests due to reliably problem with Firefox 17
MiltosD/CEFELRC,JuliBakagianni/CEF-ELRC,MiltosD/CEFELRC,zeehio/META-SHARE,JuliBakagianni/META-SHARE,MiltosD/CEFELRC,MiltosD/CEFELRC,zeehio/META-SHARE,JuliBakagianni/META-SHARE,JuliBakagianni/META-SHARE,JuliBakagianni/META-SHARE,MiltosD/CEF-ELRC,JuliBakagianni/META-SHARE,MiltosD/CEF-ELRC,JuliBakagianni/META-SHARE,Miltos...
metashare/test_runner.py
metashare/test_runner.py
import logging from django_selenium.selenium_runner import SeleniumTestRunner from django.core.management import call_command from metashare import settings from metashare.haystack_routers import MetashareRouter # set up logging support LOGGER = logging.getLogger(__name__) LOGGER.addHandler(settings.LOG_HANDLER) d...
import logging from django_selenium.selenium_runner import SeleniumTestRunner from django.core.management import call_command from metashare import settings from metashare.haystack_routers import MetashareRouter # set up logging support LOGGER = logging.getLogger(__name__) LOGGER.addHandler(settings.LOG_HANDLER) d...
bsd-3-clause
Python
eb2746a808efa6317e2d65a4605979ddc7507e6e
fix default connection string
nrempel/rucksack-api
config/base.py
config/base.py
# -*- coding: utf-8 -*- import os basedir = os.path.abspath(os.path.dirname(__file__)) SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL', 'postgres://localhost/') SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db')
# -*- coding: utf-8 -*- import os basedir = os.path.abspath(os.path.dirname(__file__)) SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL', 'localhost') SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db')
mit
Python
8633d0e786d50942bba308a66a5f85793d935577
Allow extra ignore strings to be passed to pyflakes testing.
damnfine/mezzanine,viaregio/mezzanine,stephenmcd/mezzanine,frankier/mezzanine,SoLoHiC/mezzanine,scarcry/snm-mezzanine,AlexHill/mezzanine,dsanders11/mezzanine,dsanders11/mezzanine,geodesign/mezzanine,sjdines/mezzanine,saintbird/mezzanine,dovydas/mezzanine,dsanders11/mezzanine,geodesign/mezzanine,gradel/mezzanine,mush42/...
mezzanine/utils/tests.py
mezzanine/utils/tests.py
from __future__ import with_statement from compiler import parse import os from mezzanine.utils.path import path_for_import # Ignore these warnings in pyflakes. PYFLAKES_IGNORE = ( "import *' used", "'memcache' imported but unused", "'cmemcache' imported but unused", ) def run_pyflakes_for_package(pac...
from __future__ import with_statement from compiler import parse import os from mezzanine.utils.path import path_for_import # Ignore these warnings in pyflakes. PYFLAKES_IGNORE = ( "'from django.conf.urls.defaults import *' used", "'from local_settings import *' used", "'memcache' imported but unused", ...
bsd-2-clause
Python
125a8b81b4b0c580862b91cbf812b723c5c30afd
fix GAE xmpp forwarding
melmothx/jsonbot,melmothx/jsonbot,melmothx/jsonbot
gozerlib/gae/xmpp/bot.py
gozerlib/gae/xmpp/bot.py
# gozerlib/gae/xmpp/bot.py # # """ XMPP bot. """ ## gozerlib imports from gozerlib.botbase import BotBase from gozerlib.socklib.xmpp.presence import Presence from gozerlib.utils.generic import strippedtxt ## basic imports import types import logging ## classes class XMPPBot(BotBase): """ XMPPBot just inheri...
# gozerlib/gae/xmpp/bot.py # # """ XMPP bot. """ ## gozerlib imports from gozerlib.botbase import BotBase from gozerlib.socklib.xmpp.presence import Presence ## basic imports import types import logging ## classes class XMPPBot(BotBase): """ XMPPBot just inherits from BotBase for now. """ def __init__(...
mit
Python
3d59bd8b328f2c25ba6f6932ad00dd9abd4038e9
Increment to version 0.4.3
dgwartney-io/import-io-api-python,dgwartney-io/import-io-api-python
importio2/version.py
importio2/version.py
# # Copyright 2017 Import.io # # 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 Import.io # # 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
954f8c2bc62c614724f53dd7d0fdee3a368fc208
Update fastq-to-fasta.py
ged-lab/khmer,F1000Research/khmer,souravsingh/khmer,souravsingh/khmer,souravsingh/khmer,F1000Research/khmer,F1000Research/khmer,ged-lab/khmer,ged-lab/khmer
scripts/fastq-to-fasta.py
scripts/fastq-to-fasta.py
#! /usr/bin/env python2 # # This file is part of khmer, http://github.com/ged-lab/khmer/, and is # Copyright (C) Michigan State University, 2009-2014. It is licensed under # the three-clause BSD license; see doc/LICENSE.txt. # Contact: khmer-project@idyll.org # # pylint: disable=invalid-name,missing-docstring """ Conv...
#! /usr/bin/env python2 # # This file is part of khmer, http://github.com/ged-lab/khmer/, and is # Copyright (C) Michigan State University, 2009-2014. It is licensed under # the three-clause BSD license; see doc/LICENSE.txt. # Contact: khmer-project@idyll.org # # pylint: disable=invalid-name,missing-docstring """ Conv...
bsd-3-clause
Python
62ea8f97b5ccffabb70c8c931aa83d0773d74cf8
Test statistics print formatting
samuelsh/pyFstress,samuelsh/pyFstress
server/collector.py
server/collector.py
""" Collector service provides methods for collection of test runtime results results and storing results 2017 - samuels(c) """ import time from logger import server_logger class Collector: def __init__(self, test_stats, stop_event): self.logger = server_logger.StatsLogger('__Collector__').logger ...
""" Collector service provides methods for collection of test runtime results results and storing results 2017 - samuels(c) """ import time from logger import server_logger class Collector: def __init__(self, test_stats, stop_event): self.logger = server_logger.StatsLogger('__Collector__').logger ...
mit
Python
7c7ffc87887d921db970255de9a5b4052600566a
Add a test for an obsid with an uncommanded slot
sot/mica,sot/mica
mica/vv/tests/test_vv.py
mica/vv/tests/test_vv.py
import os import numpy as np from .. import vv from .. import process from ... import common def test_get_vv_dir(): obsdir = vv.get_vv_dir(16504) assert obsdir == os.path.abspath(os.path.join(common.MICA_ARCHIVE, 'vv/16/16504_v01')) def test_get_vv_files(): obsfiles = vv.get_vv_files(16504) assert s...
import os import numpy as np from .. import vv from .. import process from ... import common def test_get_vv_dir(): obsdir = vv.get_vv_dir(16504) assert obsdir == os.path.abspath(os.path.join(common.MICA_ARCHIVE, 'vv/16/16504_v01')) def test_get_vv_files(): obsfiles = vv.get_vv_files(16504) assert s...
bsd-3-clause
Python
cad48e91776ded810b23c336380797c88dd456c0
Fix Netflix in light of the new scope selection system
foauth/foauth.org,foauth/foauth.org,foauth/foauth.org
services/netflix.py
services/netflix.py
import urlparse import foauth.providers from oauthlib.oauth1.rfc5849 import SIGNATURE_TYPE_QUERY class Netflix(foauth.providers.OAuth1): # General info about the provider provider_url = 'https://www.netflix.com/' docs_url = 'http://developer.netflix.com/docs' # URLs to interact with the API requ...
import urlparse import foauth.providers from oauthlib.oauth1.rfc5849 import SIGNATURE_TYPE_QUERY class Netflix(foauth.providers.OAuth1): # General info about the provider provider_url = 'https://www.netflix.com/' docs_url = 'http://developer.netflix.com/docs' # URLs to interact with the API requ...
bsd-3-clause
Python
8c353a5596cbcd620eefb3520c86d8117e1dde80
Change version to v1.2.0a for development purposes.
Rapptz/discord.py,Harmon758/discord.py,imayhaveborkedit/discord.py,rapptz/discord.py,Harmon758/discord.py,khazhyk/discord.py
discord/__init__.py
discord/__init__.py
# -*- coding: utf-8 -*- """ Discord API Wrapper ~~~~~~~~~~~~~~~~~~~ A basic wrapper for the Discord API. :copyright: (c) 2015-2019 Rapptz :license: MIT, see LICENSE for more details. """ __title__ = 'discord' __author__ = 'Rapptz' __license__ = 'MIT' __copyright__ = 'Copyright 2015-2019 Rapptz' __version__ = '1.2....
# -*- coding: utf-8 -*- """ Discord API Wrapper ~~~~~~~~~~~~~~~~~~~ A basic wrapper for the Discord API. :copyright: (c) 2015-2019 Rapptz :license: MIT, see LICENSE for more details. """ __title__ = 'discord' __author__ = 'Rapptz' __license__ = 'MIT' __copyright__ = 'Copyright 2015-2019 Rapptz' __version__ = '1.1....
mit
Python
be0410a0a674a1f5b5ba4094bde6e3dc8fba600a
Rework time evolution example.
ezekial4/atomic_neu,ezekial4/atomic_neu
examples/rate_equations.py
examples/rate_equations.py
import numpy as np import matplotlib.pyplot as plt import atomic ad = atomic.element('carbon') temperature = np.logspace(0, 3, 50) density = 1e19 tau = 1e19 / density t_normalized = np.logspace(-7, 0, 50) t_normalized -= t_normalized[0] times = t_normalized * tau rt = atomic.RateEquations(ad) yy = rt.solve(tim...
import numpy as np import matplotlib.pyplot as plt import atomic ad = atomic.element('carbon') temperature = np.logspace(0, 3, 50) density = 1e19 tau = 1e19 / density t_normalized = np.logspace(-4, 0, 50) t_normalized -= t_normalized[0] times = t_normalized * tau rt = atomic.RateEquations(ad) yy = rt.solve(tim...
mit
Python
eb6fde636cda8967f5094a325b12988c51a92133
Bump version
animekita/selvbetjening,animekita/selvbetjening,animekita/selvbetjening,animekita/selvbetjening
selvbetjening/__init__.py
selvbetjening/__init__.py
__version__ = '8.2'
__version__ = '8.1'
mit
Python
602954fc1157bad28888135255e6169a7cbf59a7
bump version to 0.7.2
hovel/django-phonenumber-field,thenewguy/django-phonenumber-field,thenewguy/django-phonenumber-field,invalid-access/django-phonenumber-field,ellmetha/django-phonenumber-field,hovel/django-phonenumber-field,hwkns/django-phonenumber-field,bramd/django-phonenumber-field,ellmetha/django-phonenumber-field,bramd/django-phone...
phonenumber_field/__init__.py
phonenumber_field/__init__.py
# -*- coding: utf-8 -*- __version__ = '0.7.2'
# -*- coding: utf-8 -*- __version__ = '0.7.1'
mit
Python
86fe21eae50f95c1d6996a630ae95a2fe7a5301c
Rename test class for cached task
tkf/buildlet
buildlet/tests/test_cachedtask.py
buildlet/tests/test_cachedtask.py
import unittest from ..task import BaseSimpleTask from ..task.cachedtask import BaseCachedTask from ..runner import simple from ..datastore.inmemory import DataStoreNestableInMemory class ImMemoryCachedTask(BaseCachedTask, BaseSimpleTask): num_run = 0 def run(self): self.num_run += 1 def get_ta...
import unittest from ..task import BaseSimpleTask from ..task.cachedtask import BaseCachedTask from ..runner import simple from ..datastore.inmemory import DataStoreNestableInMemory class ImMemoryCachedTask(BaseCachedTask, BaseSimpleTask): num_run = 0 def run(self): self.num_run += 1 def get_ta...
bsd-3-clause
Python
24c2f348e2a91af82759f393c1757693b0e4d1ac
fix import
stamparm/maltrail,stamparm/maltrail,stamparm/maltrail,stamparm/maltrail
core/ignore.py
core/ignore.py
#!/usr/bin/env python """ simple ignore rule configured by file misc/ignore_event.txt example: #sintax: #src_ip;src_port;dst_ip;dst_port # # '*' is use for any # # ignore all events from source ip 192.168.0.3 # 192.168.0.3;*;*;* # # ignore all events to ssh port 22 # *;*;*;22 """ import csv import gzip import os i...
#!/usr/bin/env python """ simple ignore rule configured by file misc/ignore_event.txt example: #sintax: #src_ip;src_port;dst_ip;dst_port # # '*' is use for any # # ignore all events from source ip 192.168.0.3 # 192.168.0.3;*;*;* # # ignore all events to ssh port 22 # *;*;*;22 """ import csv import gzip import os i...
mit
Python
8d286613dc1cd51fe90338de429f086ed4a264e7
Comment out a test that wasn't passing that I don't really need
LogicalDash/LiSE,LogicalDash/LiSE
allegedb/allegedb/tests/test_load.py
allegedb/allegedb/tests/test_load.py
import pytest import os from allegedb import ORM import networkx as nx scalefreestart = nx.MultiDiGraph(name='scale_free_graph_5') scalefreestart.add_edges_from([(0, 1), (1, 2), (2, 0)]) testgraphs = [ nx.chvatal_graph(), nx.scale_free_graph(5, create_using=scalefreestart), # nx.chordal_cycle_graph(5, c...
import pytest import os from allegedb import ORM import networkx as nx scalefreestart = nx.MultiDiGraph(name='scale_free_graph_5') scalefreestart.add_edges_from([(0, 1), (1, 2), (2, 0)]) testgraphs = [ nx.chvatal_graph(), nx.scale_free_graph(5, create_using=scalefreestart), nx.chordal_cycle_graph(5, cre...
agpl-3.0
Python
83ec77807d3688236f421555e1f74006a0308208
Add missing encoding info to alltheitems.py
wurstmineberg/alltheitems.wurstmineberg.de,wurstmineberg/alltheitems.wurstmineberg.de
alltheitems.py
alltheitems.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Wurstmineberg: All The Items """ import bottle application = bottle.Bottle() document_root = '/var/www/alltheitems.wurstmineberg.de' @application.route('/') def show_index(): """The index page.""" return bottle.static_file('index.html', root=document_root) ...
#!/usr/bin/env python3 """ Wurstmineberg: All The Items """ import bottle application = bottle.Bottle() document_root = '/var/www/alltheitems.wurstmineberg.de' @application.route('/') def show_index(): """The index page.""" return bottle.static_file('index.html', root=document_root) @application.route('/all...
mit
Python
772840642e828ee2ad14b2d0ab937f23c2adaac9
Bump version to 0.1.0rc2
nioinnovation/safepickle
safepickle/__init__.py
safepickle/__init__.py
from .safepickle import load, loads, dump, dumps __title__ = 'safepickle' __version__ = '0.1.0rc2' __author__ = 'n.io' __license__ = 'MIT' __copyright__ = 'Copyright 2017 n.io'
from .safepickle import load, loads, dump, dumps __title__ = 'safepickle' __version__ = '0.1.0rc1' __author__ = 'n.io' __license__ = 'MIT' __copyright__ = 'Copyright 2017 n.io'
apache-2.0
Python
deedcff26e18e6edfff6680697ccbe213565e5c7
add to join_session_command
TeamRemote/remote-sublime,TeamRemote/remote-sublime
remote.py
remote.py
import sublime, sublime_plugin import Session import socket import sys class DiffListener(sublime_plugin.EventListener): """Listens for modifications to the view and gets the diffs using Operational Transformation""" def __init___(self): # watched_views is a sessions of which currently open views...
import sublime, sublime_plugin import Session import socket import sys class DiffListener(sublime_plugin.EventListener): """Listens for modifications to the view and gets the diffs using Operational Transformation""" def __init___(self): # watched_views is a sessions of which currently open views...
mit
Python
6eae9369cc122b23577715951d6b0f59991b0f65
Update choices descriptions in FileTypes
mociepka/saleor,mociepka/saleor,mociepka/saleor
saleor/csv/__init__.py
saleor/csv/__init__.py
class ExportEvents: """The different csv events types.""" EXPORT_PENDING = "export_pending" EXPORT_SUCCESS = "export_success" EXPORT_FAILED = "export_failed" EXPORT_DELETED = "export_deleted" EXPORTED_FILE_SENT = "exported_file_sent" CHOICES = [ (EXPORT_PENDING, "Data export was st...
class ExportEvents: """The different csv events types.""" EXPORT_PENDING = "export_pending" EXPORT_SUCCESS = "export_success" EXPORT_FAILED = "export_failed" EXPORT_DELETED = "export_deleted" EXPORTED_FILE_SENT = "exported_file_sent" CHOICES = [ (EXPORT_PENDING, "Data export was st...
bsd-3-clause
Python
81269d44b12527fc9059498ef1e9443756aee48c
add email test
gregstiehl/chatparse
cornertests.py
cornertests.py
#!/usr/bin/env python3 import chatparse import unittest class CornerTests(unittest.TestCase): def test_email(self): '''test email to make sure it is not a mention''' msg = "user@example.com" expect = {} result = chatparse.parse(msg) self.assertEqual(expect, result) def...
#!/usr/bin/env python3 import chatparse import unittest class CornerTests(unittest.TestCase): def test_userurl(self): '''test for @user in url''' msg = "http://user@example.com" expect = { "links": [ { "url": msg, "title": None, ...
mit
Python
bd1cea280a87818753ec1511207b4561fa01356a
Make help command suggest you can also use it to get more info on commands; minor other improvements
Didero/DideRobot
commands/help.py
commands/help.py
from CommandTemplate import CommandTemplate import GlobalStore class Command(CommandTemplate): triggers = ['help', 'helpfull'] helptext = "Shows the explanation of the provided command, or the list of commands if there aren't any arguments. {commandPrefix}helpfull shows all command aliases as well" def execute(...
from CommandTemplate import CommandTemplate import GlobalStore class Command(CommandTemplate): triggers = ['help', 'helpfull'] helptext = "Shows the explanation of a command, or the list of commands if there aren't any arguments. {commandPrefix}helpfull shows all command aliases as well" def execute(self, bot, ...
mit
Python
59a7c4d059bbd86bdf2dc1572c601aa973698496
use << and >> in the tests
python-parsy/parsy,jneen/parsy,python-parsy/parsy
test/parsy_test.py
test/parsy_test.py
from parsy import string, regex, chain import re import pdb import readline whitespace = regex(r'\s+', re.MULTILINE) comment = regex(r';.*') ignore = (whitespace | comment).many() lexeme = lambda p: p << ignore lparen = lexeme(string('(')) rparen = lexeme(string(')')) number = lexeme(regex(r'\d+')).map(int) symbol =...
from parsy import string, regex, chain import re import pdb import readline whitespace = regex(r'\s+', re.MULTILINE) comment = regex(r';.*') ignore = (whitespace | comment).many() lexeme = lambda p: p.skip(ignore) lparen = lexeme(string('(')) rparen = lexeme(string(')')) number = lexeme(regex(r'\d+')).map(int) symbo...
mit
Python
f106175ed3eb8ec32202b9197cd68f33f57361b3
Define 'updated' property setter and getters
pipex/gitbot,pipex/gitbot,pipex/gitbot
app/models.py
app/models.py
from app import slack, redis, app from app.redis import RedisModel class Channel(RedisModel): __prefix__ = '#' @staticmethod def load_from_slack(): """Update channel list from slack""" slack_response = slack.channels.list() if not slack_response.successful: app.logger...
from app import slack, redis, app from app.redis import RedisModel class Channel(RedisModel): __prefix__ = '#' @staticmethod def load_from_slack(): """Update channel list from slack""" slack_response = slack.channels.list() if not slack_response.successful: app.logger...
apache-2.0
Python
06493206e99b8e63027898fe9bcf73d18264154e
Add initial solution
CubicComet/exercism-python-solutions
space-age/space_age.py
space-age/space_age.py
class SpaceAge(object): def __init__(self, seconds): self.seconds = seconds @property def years(self): return self.seconds/31557600 def on_earth(self): return round(self.years, 2) def on_mercury(self): return round(self.years/0.2408467, 2) def on_venus(self): ...
class SpaceAge(object): def __init__(self): pass
agpl-3.0
Python
3bc508799cff4da89b592b7c97d162ee19d38a3a
Fix __init__ formatting
arista-eosplus/pyeapi
pyeapi/__init__.py
pyeapi/__init__.py
# # Copyright (c) 2014, Arista Networks, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # Redistributions of source code must retain the above copyright notice, # this list of condit...
# # Copyright (c) 2014, Arista Networks, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # Redistributions of source code must retain the above copyright notice, # this list of condit...
bsd-3-clause
Python
1c795df23bd9d554eabcc419dfe830270e26fede
Add some info to the printouts
enjin/contracts
solidity/python/FormulaTestPurchase.py
solidity/python/FormulaTestPurchase.py
from sys import argv from decimal import Decimal from random import randrange from Formula import calculatePurchaseReturn def formulaTest(_supply, _reserveBalance, _reserveRatio, _amount): fixed = calculatePurchaseReturn(_supply, _reserveBalance, _reserveRatio, _amount) real = Decimal(_supply)*((1+Decim...
from sys import argv from decimal import Decimal from random import randrange from Formula import calculatePurchaseReturn def formulaTest(_supply, _reserveBalance, _reserveRatio, _amount): fixed = calculatePurchaseReturn(_supply, _reserveBalance, _reserveRatio, _amount) real = Decimal(_supply)*((1+Decim...
apache-2.0
Python
c6da29f07c30beefef53bfca4b67c4c27f85d69a
fix record category filtering
curaloucura/money-forecast,curaloucura/money-forecast,curaloucura/money-forecast
moneyforecast/records/admin.py
moneyforecast/records/admin.py
import logging from django.contrib import admin from records.models import Category, Record, Budget, SYSTEM_CATEGORIES logger = logging.getLogger(__name__) class CurrentUserAdmin(admin.ModelAdmin): readonly_fields = ('user',) def get_queryset(self, request): qs = super(CurrentUserAdmin, self).get_qu...
from django.contrib import admin from records.models import Category, Record, Budget, SYSTEM_CATEGORIES class CurrentUserAdmin(admin.ModelAdmin): readonly_fields = ('user',) def get_queryset(self, request): qs = super(CurrentUserAdmin, self).get_queryset(request) # make sure all users, even s...
unlicense
Python
3e708149534926f976b73ec4e0a8a6ec3123ef40
update tests
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/util/tests/test_sentry.py
corehq/util/tests/test_sentry.py
# coding=utf-8 import uuid from django.test import SimpleTestCase, override_settings from corehq.util.sentry import sanitize_system_passwords class HQSentryTest(SimpleTestCase): def test_couch_password(self): couch_pw = uuid.uuid4().hex couch_pw2 = uuid.uuid4().hex overridden_dbs = { ...
# coding=utf-8 import uuid from django.test import SimpleTestCase, override_settings from corehq.util.sentry import HQSanitzeSystemPasswordsProcessor class HQSentryTest(SimpleTestCase): def test_couch_password(self): couch_pw = uuid.uuid4().hex couch_pw2 = uuid.uuid4().hex overridden_dbs ...
bsd-3-clause
Python
dcff103f954c9315011e0c8602cfcbd4b2cc076f
fix typo
Aluriak/24hducode2016,Aluriak/24hducode2016
src/source_weather/source_weather.py
src/source_weather/source_weather.py
""" Definition of a source than add dumb data """ from src.source import Source from src import default from . import weather class SourceWeather(Source): """ Throught Open Weather Map generates today weather and expected weather for next days, if possible """ def enrichment(self, data_dict): ...
""" Definition of a source than add dumb data """ from src.source import Source from src import default from . import weather class SourceWeather(Source): """ Throught Open Weather Map generates today weather and expected weather for next days, if possible """ def enrichment(self, data_dict): ...
unlicense
Python
33e65176172da48b3b75e77aa20b68bbd4d95069
Check pywin32 is installed before running
visio2img/sphinxcontrib-visio
sphinxcontrib/visio.py
sphinxcontrib/visio.py
# -*- coding: utf-8 -*- # Copyright 2014 Yassu # # 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...
# -*- coding: utf-8 -*- # Copyright 2014 Yassu # # 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
808d727de4360311fe4bb134b567b96628a1f7f9
bump version number
ephes/django-indieweb,ephes/django-indieweb
indieweb/__init__.py
indieweb/__init__.py
__version__ = '0.0.4'
__version__ = '0.0.3'
bsd-3-clause
Python
d0f43e157f5e51fdb2b4a22eff046c7edb75d2c6
bump version
daler/sphinxleash,daler/sphinxleash
sphinxleash/version.py
sphinxleash/version.py
__version__ = "0.2"
__version__ = "0.1"
mit
Python
b6f04f32556fc8251566212c56159dcfff7bf596
Add unexpected character bug fix
the-raspberry-pi-guy/lidar
pi_approach/Distance_Pi/distance.py
pi_approach/Distance_Pi/distance.py
# Lidar Project Distance Subsystem import serial import socket import time import sys sys.path.insert(0, "/home/pi/lidar/pi_approach/Libraries") import serverxclient as cli arduino_dist = serial.Serial('/dev/ttyUSB0',9600) client = cli.Client() class distance_controller(object): """An all-powerful distance-finding ...
# Lidar Project Distance Subsystem import serial import socket import time import sys sys.path.insert(0, "/home/pi/lidar/pi_approach/Libraries") import serverxclient as cli arduino_dist = serial.Serial('/dev/ttyUSB0',9600) client = cli.Client() class distance_controller(object): """An all-powerful distance-finding ...
mit
Python
940e5d5446a04d6228ea5fad2ac1f9ed4cf109a7
fix doxygen-link.py by skipping invalid entries in libnl.dict
cfriedt/libnl,greearb/libnl-ct,claudelee/libnl,baloo/libnl,baloo/libnl,claudelee/libnl,honsys/libnl,congwang/libnl,tgraf/libnl,UnicronNL/libnl3,dsahern/libnl,mshirley/libnl,HolyShitMan/libnl-1,HolyShitMan/libnl-1,vyos/libnl3,cyclops8456/libnl3,mshirley/libnl,honsys/libnl,vyos/libnl3,kolyshkin/libnl,tklauser/libnl,honsy...
doc/doxygen-link.py
doc/doxygen-link.py
#!/usr/bin/env python from __future__ import print_function import fileinput import re import sys rc_script = re.compile(r'\s*(.*\S)?\s*') def parse_dict(filename): links = {} for line in open(filename, 'r'): m = re.match('^([^=]+)=([^\n]+)$', line); if not m: continue name = m.group(1) value = m.group...
#!/usr/bin/env python import fileinput import re import sys links = {} for line in open(sys.argv[1], 'r'): m = re.match('^([^=]+)=([^\n]+)$', line); if m: link = "<a href=\"" + m.group(2) + "\" class=\"dg\">" + m.group(1) + "</a>" links[m.group(1)] = link def translate(match): return links[match.group(0)] r...
lgpl-2.1
Python
aeb4592f6cde29c237e10452c518006913ab9ecb
Mark the revoke kvs backend deprecated, for removal in Kilo
MaheshIBM/keystone,maestro-hybrid-cloud/keystone,MaheshIBM/keystone,ilay09/keystone,cernops/keystone,rushiagr/keystone,promptworks/keystone,mahak/keystone,roopali8/keystone,ilay09/keystone,ajayaa/keystone,UTSA-ICS/keystone-kerberos,maestro-hybrid-cloud/keystone,klmitch/keystone,dims/keystone,openstack/keystone,himanshu...
keystone/contrib/revoke/backends/kvs.py
keystone/contrib/revoke/backends/kvs.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
Python
40151dd39dc6aa51f50bb311dc81381eeb4cf282
fix precision on lmsensors
Ssawa/Diamond,actmd/Diamond,jaingaurav/Diamond,Netuitive/Diamond,tusharmakkar08/Diamond,hamelg/Diamond,Netuitive/Diamond,anandbhoraskar/Diamond,bmhatfield/Diamond,hamelg/Diamond,actmd/Diamond,tusharmakkar08/Diamond,jaingaurav/Diamond,Netuitive/netuitive-diamond,anandbhoraskar/Diamond,russss/Diamond,Ssawa/Diamond,Ensigh...
src/collectors/lmsensors/lmsensors.py
src/collectors/lmsensors/lmsensors.py
# coding=utf-8 """ This class collects data from libsensors. It should work against libsensors 2.x and 3.x, pending support within the PySensors Ctypes binding: [http://pypi.python.org/pypi/PySensors/](http://pypi.python.org/pypi/PySensors/) Requires: 'sensors' to be installed, configured, and the relevant kernel mod...
# coding=utf-8 """ This class collects data from libsensors. It should work against libsensors 2.x and 3.x, pending support within the PySensors Ctypes binding: [http://pypi.python.org/pypi/PySensors/](http://pypi.python.org/pypi/PySensors/) Requires: 'sensors' to be installed, configured, and the relevant kernel mod...
mit
Python
4f7f4b53d00bf13360526c7b51b72ab862469e3d
Update `test_dcos_command` to work with new CoreOS
dcos/shakedown
tests/acceptance/test_dcos_command.py
tests/acceptance/test_dcos_command.py
import json from shakedown import * def test_run_command(): exit_status, output = run_command(master_ip(), 'cat /etc/motd') assert exit_status assert 'CoreOS' in output def test_run_command_on_master(): exit_status, output = run_command_on_master('uname -a') assert exit_status assert output....
import json from shakedown import * def test_run_command(): exit_status, output = run_command(master_ip(), 'cat /etc/motd') assert exit_status assert output.startswith('Core') def test_run_command_on_master(): exit_status, output = run_command_on_master('uname -a') assert exit_status assert ...
apache-2.0
Python
6c8e0a41adf7d9edc075c60281d7273c09b98b65
write out json
lacker/chess,lacker/chess,lacker/chess
Chess/build.py
Chess/build.py
#!/usr/bin/python import json import shutil import os base_dir = os.path.join(*os.path.split(__file__)[:-1]) images = base_dir + "/images" for image in os.listdir(images): # Strip off the .png name = image.split(".")[0] # The source picture source = os.path.join(images, image) # Check if the destination ...
#!/usr/bin/python import json import shutil import os base_dir = os.path.join(*os.path.split(__file__)[:-1]) images = base_dir + "/images" for image in os.listdir(images): # Strip off the .png name = image.split(".")[0] # The source picture source = os.path.join(images, image) # Check if the destination ...
mit
Python
cddaa0a097ace8eaf671800727ca291112a64bce
Update test.py
jcfromsiberia/RedZone,jcfromsiberia/RedZone,jcfromsiberia/RedZone
cython/test.py
cython/test.py
#!/usr/bin/env python #-*- coding: utf-8 -*- __author__ = 'jc' from RedZone import * context = Context({ "items": [ {"text": "Hello World!", "active": True}, {"text": "Foo", "active": True}, {"text": "Bar", "active": False} ], "numbers": { "first": 5, "second": 11, ...
#!/usr/bin/env python #-*- coding: utf-8 -*- __author__ = 'jc' from RedZone import * from RedZone import * context = Context({ "items": [ {"text": "Hello World!", "active": True}, {"text": "Foo", "active": True}, {"text": "Bar", "active": False} ], "numbers": { "first": 5,...
bsd-2-clause
Python
f6a044e95c1a1bdf69bb57730876c37b37f0cbe3
Add KeplerLIghtCurveFile class
gully/PyKE,christinahedges/PyKE
pyke/lightcurve.py
pyke/lightcurve.py
import numpy as np from astropy.io import fits __all__ = ['LightCurve', 'KeplerLightCurveFile'] class LightCurve(object): """ Implements a basic time-series class for a generic lightcurve. Parameters ---------- time : numpy array-like Time-line. flux : numpy array-like Data f...
import numpy as np __all__ = ['LightCurve'] class LightCurve(object): """ Implements a basic time-series class for a generic lightcurve. Parameters ---------- time : numpy array-like Time-line. flux : numpy array-like Data flux for every time point. """ def __init__(s...
mit
Python
f0a20866fa6d85459b9e09a00d62f0e193edb497
Remove rogue print statement
RedHatInsights/insights-core,RedHatInsights/insights-core
insights/settings.py
insights/settings.py
import sys import os import yaml import pkgutil INSTALL_DIR = os.path.dirname(os.path.abspath(__file__)) NAME = "insights.yaml" DEFAULTS_NAME = "defaults.yaml" def load_and_read(path): if os.path.exists(path): with open(path) as fp: return fp.read() CONFIGS = [ pkgutil.get_data('insight...
import sys import os import yaml import pkgutil INSTALL_DIR = os.path.dirname(os.path.abspath(__file__)) print INSTALL_DIR NAME = "insights.yaml" DEFAULTS_NAME = "defaults.yaml" def load_and_read(path): if os.path.exists(path): with open(path) as fp: return fp.read() CONFIGS = [ pkgutil...
apache-2.0
Python
49fa606664f7fb28799678574b34328d2f16567e
use the queue config for message passing not cache
thenetcircle/dino,thenetcircle/dino,thenetcircle/dino,thenetcircle/dino
dino/server.py
dino/server.py
#!/usr/bin/env python # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
#!/usr/bin/env python # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
Python
6b8f6a2f5a2b7b10b31832ddad85e27c81e51eb9
Add 'section' to IRC colour stylesheet
xtaran/debian-devel-changes-bot,sebastinas/debian-devel-changes-bot,xtaran/debian-devel-changes-bot,lamby/debian-devel-changes-bot,lamby/debian-devel-changes-bot,lamby/debian-devel-changes-bot
DebianDevelChangesBot/utils/irc_colours.py
DebianDevelChangesBot/utils/irc_colours.py
# -*- coding: utf-8 -*- # # Debian Changes Bot # Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.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 3 of the...
# -*- coding: utf-8 -*- # # Debian Changes Bot # Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.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 3 of the...
agpl-3.0
Python
5ef8c450dcfb063b25de74d1ea49b9d880f8e58f
debug checkup
jasuka/pyBot,jasuka/pyBot
modules/logger_daemon.py
modules/logger_daemon.py
##Logger daemon version 1 from time import gmtime, strftime import os def logger_daemon ( self ): if os.path.exists(self.config["log-path"]) == True: if len(self.msg) >= 4: if "353" in self.msg or "366" in self.msg or "412" in self.msg: return else: brackets = self.config["TimestampBrackets"].spli...
##Logger daemon version 1 from time import gmtime, strftime import os def logger_daemon ( self ): if os.path.exists(self.config["log-path"]) == True: if len(self.msg) >= 4: if "353" in self.msg or "366" in self.msg or "412" in self.msg: return else: brackets = self.config["TimestampBrackets"].spli...
mit
Python
c0e6327c8bc5b984969728c64f41648e355a14f2
add deploy step
NeblioTeam/neblio,NeblioTeam/neblio,NeblioTeam/neblio,NeblioTeam/neblio,NeblioTeam/neblio
ci_scripts/test_osx-gui_wallet.py
ci_scripts/test_osx-gui_wallet.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import multiprocessing as mp import neblio_ci_libs as nci working_dir = os.getcwd() build_dir = "build" nci.mkdir_p(build_dir) os.chdir(build_dir) nci.call_with_err_code('brew update') nci.call_with_err_code('brew outdated qt || brew upgrade qt') n...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import multiprocessing as mp import neblio_ci_libs as nci working_dir = os.getcwd() build_dir = "build" nci.mkdir_p(build_dir) os.chdir(build_dir) nci.call_with_err_code('brew update') nci.call_with_err_code('brew outdated qt || brew upgrade qt') n...
mit
Python
1f3a404b1e1fbd53d52d93ca83e8339147327f74
bump version to 0.5.0
ivelum/cub-python
cub/version.py
cub/version.py
version = '0.5.0'
version = '0.4.1'
mit
Python
20d28be2ca57687b6072f9cee043f5dcbe16b1e2
Add ability to parse package extras, like this: 'raven[flask]'
dveselov/rparse
rparse.py
rparse.py
#!/usr/bin/env python # Copyright 2015, Dmitry Veselov from re import sub from plyplus import Grammar, STransformer, \ ParseError, TokenizeError try: # Python 2.x and pypy from itertools import imap as map from itertools import ifilter as filter except ImportError: # Python 3.x alrea...
#!/usr/bin/env python # Copyright 2015, Dmitry Veselov from re import sub from plyplus import Grammar, STransformer, \ ParseError, TokenizeError try: # Python 2.x and pypy from itertools import imap as map from itertools import ifilter as filter except ImportError: # Python 3.x alrea...
mit
Python
dc43f25c72f1f6779c8e9cc52605d6f99ba8a77a
Set Flask's debug=True.
ajdavis/zero-to-app,ajdavis/zero-to-app
server.py
server.py
import urllib from bson import json_util from flask import Flask, redirect, url_for, Response from flask import render_template from flask import request from pymongo import MongoClient from werkzeug.routing import NumberConverter db = MongoClient().test app = Flask(__name__, static_path='/zero-to-app/static') # A...
import urllib from bson import json_util from flask import Flask, redirect, url_for, Response from flask import render_template from flask import request from pymongo import MongoClient from werkzeug.routing import NumberConverter db = MongoClient().test app = Flask(__name__, static_path='/zero-to-app/static') # A...
apache-2.0
Python
069e98f036c77f635a955ea2c48580709089e702
Set default values for `tags` and `availability`
PyconUK/ConferenceScheduler
src/conference_scheduler/resources.py
src/conference_scheduler/resources.py
from typing import NamedTuple, Sequence, Dict, Iterable, List from datetime import datetime class Slot(NamedTuple): venue: str starts_at: datetime duration: int capacity: int session: str class BaseEvent(NamedTuple): name: str duration: int demand: int tags: List[str] unavail...
from typing import NamedTuple, Sequence, Dict, Iterable, List from datetime import datetime class Slot(NamedTuple): venue: str starts_at: datetime duration: int capacity: int session: str class Event(NamedTuple): name: str duration: int demand: int tags: List[str] = [] unavai...
mit
Python
ac1bd603ad066eade7dc89ed2f40528e5c9139ca
make sure /proc isn't a symlink to itself
sipb/homeworld,sipb/homeworld,sipb/homeworld,sipb/homeworld
platform/debian/clean_fakechroot.py
platform/debian/clean_fakechroot.py
#!/usr/bin/env python3 """cleans up any symbolic links pointing with absolute paths to the build directory itself""" import os import sys if len(sys.argv) != 2: print("usage:", sys.argv[0], "<ROOTFS>", file=sys.stderr) sys.exit(1) rootfs = os.path.abspath(sys.argv[1]) for root, dirs, files in os.walk(rootfs)...
#!/usr/bin/env python3 """cleans up any symbolic links pointing with absolute paths to the build directory itself""" import os import sys if len(sys.argv) != 2: print("usage:", sys.argv[0], "<ROOTFS>", file=sys.stderr) sys.exit(1) rootfs = os.path.abspath(sys.argv[1]) for root, dirs, files in os.walk(rootfs)...
mit
Python
f918ad734d6ac9edf176f3c4b596da8e551db7cb
support different scaling for each axis
olivierverdier/sfepy,rc/sfepy,lokik/sfepy,olivierverdier/sfepy,lokik/sfepy,lokik/sfepy,RexFuzzle/sfepy,RexFuzzle/sfepy,lokik/sfepy,sfepy/sfepy,sfepy/sfepy,BubuLK/sfepy,vlukes/sfepy,BubuLK/sfepy,vlukes/sfepy,sfepy/sfepy,rc/sfepy,RexFuzzle/sfepy,vlukes/sfepy,RexFuzzle/sfepy,olivierverdier/sfepy,rc/sfepy,BubuLK/sfepy
script/convert_mesh.py
script/convert_mesh.py
#!/usr/bin/env python import sys sys.path.append('.') from optparse import OptionParser import numpy as nm from sfepy.fem import Mesh usage = """%prog [options] filename_in filename_out Convert a mesh file from one SfePy-supported format to another. Examples: $script/convert_mesh.py database/simple.mesh new.vtk $...
#!/usr/bin/env python import sys sys.path.append('.') from optparse import OptionParser import numpy as nm from sfepy.fem import Mesh usage = """%prog [options] filename_in filename_out Convert a mesh file from one SfePy-supported format to another. """ help = { 'scale' : 'scale factor [default: %default]', } ...
bsd-3-clause
Python
c42b3f733c43f06050d59fc85ba6c9756ba2488d
bump version 0 0.3.0
iancze/Starfish
Starfish/__init__.py
Starfish/__init__.py
# We first need to detect if we're being called as part of the setup # procedure itself in a reliable manner. try: __STARFISH_SETUP__ except NameError: __STARFISH_SETUP__ = False __version__ = "0.3.0" if not __STARFISH_SETUP__: from .spectrum import Spectrum __all__ = [ "constants", ...
# We first need to detect if we're being called as part of the setup # procedure itself in a reliable manner. try: __STARFISH_SETUP__ except NameError: __STARFISH_SETUP__ = False __version__ = "0.3.0-dev" if not __STARFISH_SETUP__: from .spectrum import Spectrum __all__ = [ "constants", ...
bsd-3-clause
Python
a918d12a2081d0b6da8074b3478c5f2c5e380bcd
Fix syntax errors in test resulting from recent changes to command_line program in r4305 or 6; now fails due to assertion errors rather than type errors (progress of a kind) N.B. seems shift was 0,0,0...
dials/dials,dials/dials,dials/dials,dials/dials,dials/dials
test/command_line/tst_discover_better_experimental_model.py
test/command_line/tst_discover_better_experimental_model.py
from __future__ import division import os import libtbx.load_env from libtbx import easy_run from libtbx.test_utils import approx_equal from libtbx.test_utils import open_tmp_directory from scitbx import matrix # apply a random seed to avoid this randomly crashing... I hope import random random.seed(12345) have_dials...
from __future__ import division import os import libtbx.load_env from libtbx import easy_run from libtbx.test_utils import approx_equal from libtbx.test_utils import open_tmp_directory from scitbx import matrix # apply a random seed to avoid this randomly crashing... I hope import random random.seed(12345) have_dials...
bsd-3-clause
Python
2024506ca76d5e7bae3016f1c74800bb02a13e1e
Remove default run behavior for if calling as __name__ == '__main__'.
UMIACS/qav,raushan802/qav
qav/listpack.py
qav/listpack.py
class ListPack(object): BOLD = '\033[1m' OFF = '\033[0m' def __init__(self, lp, sep=": ", padding=" ", indentation=0, width=79): self.sep = sep self.padding = padding self.indentation = indentation self.width = width self._lp = lp self.new_line = '' + (' '...
import random import string class ListPack(object): BOLD = '\033[1m' OFF = '\033[0m' def __init__(self, lp, sep=": ", padding=" ", indentation=0, width=79): self.sep = sep self.padding = padding self.indentation = indentation self.width = width self._lp = lp ...
lgpl-2.1
Python
e0f8555788bd198c7841326b169983672e6e4079
raise a 404 if a section does not exist
mthornhill/django-pressroom,mthornhill/django-pressroom
src/pressroom/views.py
src/pressroom/views.py
from datetime import datetime from django.template.context import RequestContext from django.views.generic import list_detail from django.shortcuts import render_to_response, get_object_or_404 from pressroom.models import Article, Section def index(request): articles = Article.objects.get_published()[...
from datetime import datetime from django.template.context import RequestContext from django.views.generic import list_detail from django.shortcuts import render_to_response from pressroom.models import Article, Section def index(request): articles = Article.objects.get_published()[:5] try: ...
bsd-3-clause
Python
4934d3488321126fb73d236f00f37fe152f05476
Add test database and some notes
notapresent/rbm2m,notapresent/rbm2m
rbm2m/config.py
rbm2m/config.py
# -*- coding: utf-8 -*- import os def get_app_env(): return os.environ.get('RBM2M_ENV', 'Production') class Config(object): APP_ENV = get_app_env() DEBUG = False TESTING = False # TODO: ?charset=utf8 DATABASE_URI = 'mysql://rbm2m:rbm2m@localhost/rbm2m' REDIS_URI = 'redis://@localhost:637...
# -*- coding: utf-8 -*- import os def get_app_env(): return os.environ.get('RBM2M_ENV', 'Production') class Config(object): APP_ENV = get_app_env() DEBUG = False TESTING = False DATABASE_URI = 'mysql://rbm2m:rbm2m@localhost/dbm2m' REDIS_URI = 'redis://@localhost:6379/0' class ProductionCon...
apache-2.0
Python
9a382008eba526a57bbc9be3abfe0d058b1c63af
update wsgi.py
CooloiStudio/Django_deskxd.com,CooloiStudio/Django_deskxd.com,CooloiStudio/Django_deskxd.com,CooloiStudio/Django_deskxd.com
deskxd_com/wsgi.py
deskxd_com/wsgi.py
""" WSGI config for deskxd_com project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os, sys from django.core.wsgi import get_wsgi_application path = '/home/active/Django...
""" WSGI config for deskxd_com project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SE...
mit
Python
7d3b4f149a1028bb68d917fec2bc3a89a0f170ee
set ALLOWED_HOSTS for production
riffschelder/reviewshub
reviewsHub/reviewsHub/settings/production.py
reviewsHub/reviewsHub/settings/production.py
DEBUG = False TEMPLATE_DEBUG = False SECRET_KEY = '$d416i%#@eqim_ms34y42jy%7-+(ml7*7iz8l!w7*7h%et!i3l' ALLOWED_HOSTS = ['.schelder.com', '.schelder.com.'] DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '', 'USER': '', 'PAS...
DEBUG = False TEMPLATE_DEBUG = False SECRET_KEY = '$d416i%#@eqim_ms34y42jy%7-+(ml7*7iz8l!w7*7h%et!i3l' ALLOWED_HOSTS = [] DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '', 'USER': '', 'PASSWORD': '', 'HOST': '', ...
mit
Python
2c5fc14bf9019ecf03d977860520ae2e4d5ec896
add v3.55.0 (#27558)
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack
var/spack/repos/builtin/packages/py-progressbar2/package.py
var/spack/repos/builtin/packages/py-progressbar2/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyProgressbar2(PythonPackage): """A progress bar for Python 2 and Python 3""" homepa...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyProgressbar2(PythonPackage): """A progress bar for Python 2 and Python 3""" homepa...
lgpl-2.1
Python
a2275fc2a2414e0e456aa1fb99bcdfc1aa716781
Allow flake8 to take --snippet option
adrianmoisey/lint-review,zoidbergwill/lint-review,markstory/lint-review,zoidbergwill/lint-review,zoidbergwill/lint-review,adrianmoisey/lint-review,markstory/lint-review,markstory/lint-review
lintreview/tools/flake8.py
lintreview/tools/flake8.py
import os import logging from lintreview.tools import Tool from lintreview.tools import run_command from lintreview.utils import in_path log = logging.getLogger(__name__) class Flake8(Tool): name = 'flake8' # see: http://flake8.readthedocs.org/en/latest/config.html PYFLAKE_OPTIONS = [ 'exclude'...
import os import logging from lintreview.tools import Tool from lintreview.tools import run_command from lintreview.utils import in_path log = logging.getLogger(__name__) class Flake8(Tool): name = 'flake8' # see: http://flake8.readthedocs.org/en/latest/config.html PYFLAKE_OPTIONS = [ 'exclude'...
mit
Python
2519cf06b3cfbdf37f0e79b6222f55f7688ec291
fix import
ENCODE-DCC/pipeline-container,ENCODE-DCC/pipeline-container,ENCODE-DCC/pipeline-container,ENCODE-DCC/pipeline-container
src/test_encode_map.py
src/test_encode_map.py
import unittest import encode_map class TestEncodeMap(unittest.TestCase): def setUp(self): pass def test_strip_extensions(self): pass def test_resolve_reference(self): pass def test_crop(self): pass def test_process(self): pass if __name__ == "__main_...
import unittest import mock import encode_map class TestEncodeMap(unittest.TestCase): def setUp(self): pass def test_strip_extensions(self): pass def test_resolve_reference(self): pass def test_crop(self): pass def test_process(self): pass if __name__...
mit
Python
ac3ba70ed97fb026a24376e1ba9dbfec659fb83e
Update global_defaults_to_system_settings.py
indictranstech/trufil-erpnext,gangadharkadam/v4_erp,indictranstech/focal-erpnext,meisterkleister/erpnext,pombredanne/erpnext,gangadhar-kadam/verve_erp,indictranstech/osmosis-erpnext,suyashphadtare/vestasi-update-erp,mbauskar/sapphire-erpnext,gangadharkadam/saloon_erp,hernad/erpnext,4commerce-technologies-AG/erpnext,Tej...
erpnext/patches/v4_0/global_defaults_to_system_settings.py
erpnext/patches/v4_0/global_defaults_to_system_settings.py
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from collections import Counter from frappe.core.doctype.user.user import STANDARD_USERS def execute(): system_settings = frappe.get_doc("System Settings") #...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from collections import Counter from frappe.core.doctype.user.user import STANDARD_USERS def execute(): system_settings = frappe.get_doc("System Settings") #...
agpl-3.0
Python
8be0c31e2319eb3718ecb3476d22d5b7ce5101e7
Update 07_Weather_Station.py
userdw/RaspberryPi_3_Starter_Kit
07_Weather_Station/07_Weather_Station/07_Weather_Station.py
07_Weather_Station/07_Weather_Station/07_Weather_Station.py
import MCP3202 import time import datetime import os from time import strftime try: while 1: os.system("clear") value1= MCP3202.readADC(0) voltage = round(float(value1 * 5000 / 4096), 2) temperature = (voltage - 550) / 10 tampil = round(float(temperature), 2) print("Weather Station") ...
import MCP3202 import time import datetime import os from time import strftime try: while 1: os.system('clear') value1= MCP3202.readADC(0) # range data 0 - vref (volt) voltage=round(float(value1*5000/4096),2) temperature = (voltage-550)/10 tampil= round(float(temperature),2) print "Weather ...
mit
Python
73fe441f081a4d1b327cf411025e5f7b29ba13d7
improve model recognition
illwieckz/Urcheon,illwieckz/grtoolbox
pak_profiles/common.py
pak_profiles/common.py
#! /usr/bin/env python3 #-*- coding: UTF-8 -*- ### Legal # # Author: Thomas DEBESSE <dev@illwieckz.net> # License: ISC # file_common_deps = { "file_base": "DEPS", "description": "Package DEPS file", "action": "copy", } file_common_external_editor = { "file_ext": [ "xcf", "psd", "ora", ], "description":...
#! /usr/bin/env python3 #-*- coding: UTF-8 -*- ### Legal # # Author: Thomas DEBESSE <dev@illwieckz.net> # License: ISC # file_common_deps = { "file_base": "DEPS", "description": "Package DEPS file", "action": "copy", } file_common_external_editor = { "file_ext": [ "xcf", "psd", "ora", ], "description":...
isc
Python
8be9a250c190d9dd8615da4616cdfe401ad6e0af
Bump version number for 1.7 alpha 1.
seocam/django,daniponi/django,manhhomienbienthuy/django,SujaySKumar/django,kaedroho/django,unaizalakain/django,liavkoren/djangoDev,epandurski/django,fpy171/django,mrfuxi/django,syphar/django,mojeto/django,techdragon/django,gunchleoc/django,django/django,barbuza/django,andreif/django,TridevGuha/django,jdelight/django,ed...
django/__init__.py
django/__init__.py
VERSION = (1, 7, 0, 'alpha', 1) def get_version(*args, **kwargs): # Don't litter django/__init__.py with all the get_version stuff. # Only import if it's actually called. from django.utils.version import get_version return get_version(*args, **kwargs) def setup(): """ Configure the settings ...
VERSION = (1, 7, 0, 'alpha', 0) def get_version(*args, **kwargs): # Don't litter django/__init__.py with all the get_version stuff. # Only import if it's actually called. from django.utils.version import get_version return get_version(*args, **kwargs) def setup(): """ Configure the settings ...
bsd-3-clause
Python
e494e38b28fbafc70a1e5315a780d64e315113b4
Make the way chameleon settings are defined more generic; any Chameleon setting can now be in the chameleon config section.
morepath/more.chameleon
more/chameleon/main.py
more/chameleon/main.py
import morepath import chameleon class ChameleonApp(morepath.App): pass @ChameleonApp.setting_section(section='chameleon') def get_setting_section(): return {'auto_reload': False} @ChameleonApp.template_engine(extension='.pt') def get_chameleon_render(path, original_render, settings): config = setting...
import morepath import chameleon class ChameleonApp(morepath.App): pass @ChameleonApp.setting_section(section='chameleon') def get_setting_section(): return { 'auto_reload': False } @ChameleonApp.template_engine(extension='.pt') def get_chameleon_render(path, original_render, settings): co...
bsd-3-clause
Python
b88abd98834529f1342d69e2e91b79efd68e5e8d
Add get parameter parsing for fakeshibboleth auto mode
uclapi/uclapi,uclapi/uclapi,uclapi/uclapi,uclapi/uclapi
backend/uclapi/dashboard/middleware/fake_shibboleth_middleware.py
backend/uclapi/dashboard/middleware/fake_shibboleth_middleware.py
from django.utils.deprecation import MiddlewareMixin class FakeShibbolethMiddleWare(MiddlewareMixin): def process_request(self, request): if request.POST.get("convert-post-headers") == "1": for key in request.POST: request.META[key] = request.POST[key] if request.GET.g...
from django.utils.deprecation import MiddlewareMixin class FakeShibbolethMiddleWare(MiddlewareMixin): def process_request(self, request): if request.POST.get("convert-post-headers") == "1": for key in request.POST: request.META[key] = request.POST[key]
mit
Python
7f7e3eb729be0c204b54c1fb11d92986abdf00e1
fix version for python 3
msune/dpdk,john-mcnamara-intel/dpdk,msune/dpdk,tsphillips/dpdk-fork,venkynv/dpdk-mirror,msune/dpdk,mixja/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,tsphillips/dpdk-fork,mixja/dpdk,venkynv/dpdk-mirror,john-mcnamara-intel/dpdk,venkynv/dpdk-mirror,mixja/dpdk,msune/dpdk,venkynv/dpdk-mirror,tsphillips/dpdk-fork,...
doc/guides/conf.py
doc/guides/conf.py
# BSD LICENSE # Copyright(c) 2010-2015 Intel Corporation. All rights reserved. # 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 ...
# BSD LICENSE # Copyright(c) 2010-2015 Intel Corporation. All rights reserved. # 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 ...
mit
Python
063d3b0b531dd6e59181094eccc3f88085fc988a
Add option to update newsletter subscription.
geotagx/pybossa,jean/pybossa,stefanhahmann/pybossa,inteligencia-coletiva-lsd/pybossa,jean/pybossa,Scifabric/pybossa,geotagx/pybossa,OpenNewsLabs/pybossa,PyBossa/pybossa,OpenNewsLabs/pybossa,inteligencia-coletiva-lsd/pybossa,PyBossa/pybossa,Scifabric/pybossa,stefanhahmann/pybossa
pybossa/newsletter/__init__.py
pybossa/newsletter/__init__.py
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2014 SF Isle of Man Limited # # PyBossa is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at...
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2014 SF Isle of Man Limited # # PyBossa is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at...
agpl-3.0
Python
595fd1627095d1945f3826c1f7b6223458f14c21
Add additional tests to TestCharacter
BeagleInc/PyReadableDiff
pydiff/tests/test_character.py
pydiff/tests/test_character.py
import pydiff import utils class TestCharacter(utils.TestBase): def setUp(self): super(TestCharacter, self).setUp(pydiff.CharacterDiff) def test_diff_characters_general(self): self.check_xml('New Value.', 'New ValueMoreData.', 'New Value<ins>MoreData</ins>.') ...
import pydiff import utils class TestCharacter(utils.TestBase): def setUp(self): super(TestCharacter, self).setUp(pydiff.CharacterDiff) def test_diff_characters(self): self.check_xml('New Value.', 'New ValueMoreData.', 'New Value<ins>MoreData</ins>.') self.ch...
apache-2.0
Python
ceae688f8428f109e8bc0ce3a9dde332caa4ef01
Improve __unicode__ string
GotlingSystem/apnea,GotlingSystem/apnea
src/apps/dive_log/models.py
src/apps/dive_log/models.py
# coding=utf-8 from django.db import models from django.utils.translation import ugettext as _ from discipline.models import Discipline class Session(models.Model): #pool = models.ForeignKey(Pool) date = models.DateField(verbose_name=_(u'Datum')) time = models.TimeField(verbose_name=_(u'Tid')) comment...
# coding=utf-8 from django.db import models from django.utils.translation import ugettext as _ from discipline.models import Discipline class Session(models.Model): #pool = models.ForeignKey(Pool) date = models.DateField(verbose_name=_(u'Datum')) time = models.TimeField(verbose_name=_(u'Tid')) comment...
mit
Python
5c7f0b8515ca59bc464f81f36dc0f4419530c7b1
add import_validate api url
praekelt/molo,praekelt/molo,praekelt/molo,praekelt/molo
molo/core/content_import/urls.py
molo/core/content_import/urls.py
from django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'^api-auth/', include( 'rest_framework.urls', namespace='rest_framework')), url( r'^repos/$', 'molo.core.content_import.views.get_repos', name='get_repos' ), url( r'^repos/(...
from django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'^api-auth/', include( 'rest_framework.urls', namespace='rest_framework')), url( r'^repos/$', 'molo.core.content_import.views.get_repos', name='get_repos' ), url( r'^repos/(...
bsd-2-clause
Python
74650b7cad318403e0d6c75ec693962c1124fe16
Allow user to set speeds
rzzzwilson/morse,rzzzwilson/morse
morse_trainer/test_send_morse.py
morse_trainer/test_send_morse.py
#!/bin/env python3 # -*- coding: utf-8 -*- """ Test the 'send_morse' module. """ import sys import os import getopt from send_morse import SendMorse # get program name from sys.argv prog_name = sys.argv[0] if prog_name.endswith('.py'): prog_name = prog_name[:-3] def usage(msg=None): if msg: print((...
#!/bin/env python3 # -*- coding: utf-8 -*- """ Test the 'send_morse' module. """ import sys import os import getopt from send_morse import SendMorse # get program name from sys.argv prog_name = sys.argv[0] if prog_name.endswith('.py'): prog_name = prog_name[:-3] def usage(msg=None): if msg: print((...
mit
Python
89fb6886752170520a8dad800bdab37cf77daf6c
Test the handling of non-JSON payloads
python/the-knights-who-say-ni,python/the-knights-who-say-ni
ni/test/test_github.py
ni/test/test_github.py
import asyncio import unittest from aiohttp import hdrs, web from .. import github # Inheriting from web.Request is bad as the docs explicitly say not to create # instances manually. # http://aiohttp.readthedocs.org/en/stable/web_reference.html#aiohttp.web.Request class FakeRequest: def __init__(self, payload=...
import asyncio import unittest from aiohttp import hdrs, web from .. import github # Inheriting from web.Request is bad as the docs explicitly say not to create # instances manually. # http://aiohttp.readthedocs.org/en/stable/web_reference.html#aiohttp.web.Request class FakeRequest: def __init__(self, payload,...
apache-2.0
Python