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
0ec01e1c5770c87faa5300b80c3b9d6bcb0df41b
Make sure to return python values, not lxml objects
vkurup/python-tcxparser,vkurup/python-tcxparser,SimonArnu/python-tcxparser
tcxparser.py
tcxparser.py
"Simple parser for Garmin TCX files." from lxml import objectify __version__ = '0.4.0' class TcxParser: def __init__(self, tcx_file): tree = objectify.parse(tcx_file) self.root = tree.getroot() self.activity = self.root.Activities.Activity @property def latitude(self): ...
"Simple parser for Garmin TCX files." from lxml import objectify __version__ = '0.3.0' class TcxParser: def __init__(self, tcx_file): tree = objectify.parse(tcx_file) self.root = tree.getroot() self.activity = self.root.Activities.Activity @property def latitude(self): ...
bsd-2-clause
Python
3f18e4891b64c45fbda9ae88e9b508b5bc2cb03a
Add infinite loop; Add env vars
ps-jay/temp2dash
temp2dash.py
temp2dash.py
import json import os import requests import sys import time import traceback from temperusb import TemperHandler URL = os.environ['DASHING_URL'] SCALE = float(os.environ['TEMP_SCALE']) OFFSET = float(os.environ['TEMP_OFFSET']) SENSOR = int(os.environ['TEMP_SENSOR']) SLEEP = int(os.environ['SLEEP_TIME']) th = TemperH...
import json import requests import sys from temperusb import TemperHandler URL="http://dashing:3030/widgets/inside" SCALE=1.0 OFFSET=-3.0 th = TemperHandler() devs = th.get_devices() if len(devs) != 1: print "Expected exactly one TEMPer device, found %d" % len(devs) sys.exit(1) dev = devs[0] dev.set_calibr...
mit
Python
285ca0f2a469d0d11baad1120a5b0b1d0074aef3
Update dbworker.py (#2)
Kondra007/telegram-xkcd-password-generator
dbworker.py
dbworker.py
# -*- coding: utf-8 -*- from tinydb import TinyDB, Query from tinydb.operations import increment, decrement from texts import strings from config import db_file from utils import get_language DEFAULT_WORD_COUNT = 3 DEFAULT_PREFIX_SUFFIX = True DEFAULT_SEPARATOR = True db = TinyDB(db_file) def get_settings_text(us...
# -*- coding: utf-8 -*- from tinydb import TinyDB, Query from tinydb.operations import increment, decrement from texts import strings from config import db_file from utils import get_language DEFAULT_WORD_COUNT = 3 DEFAULT_PREFIX_SUFFIX = True DEFAULT_SEPARATOR = True db = TinyDB(db_file) def get_settings_text(us...
mit
Python
991c6bc16388e4470193462c4ce63468b22ca79a
Remove __author__
google/dpy
__init__.py
__init__.py
from ioc import * __copyright__ = "Copyright 2013 Google Inc." __license__ = "MIT, see LICENSE"
from ioc import * __author__ = "Wes Alvaro" __copyright__ = "Copyright 2013 Google Inc." __license__ = "MIT, see LICENSE"
mit
Python
19e12f1e492272bf4a69e0bc99106e78788b9c14
Add PEP8 line terminator before EOF
thismachinechills/save_skype
__init__.py
__init__.py
from extract import *
from extract import *
agpl-3.0
Python
5768d1ebcfec46e564c8b420773d911c243327ff
Fix non-threadsafe failure in serializer - now using thread local serializer instance.
commoncode/django-ddp,commoncode/django-ddp,commoncode/django-ddp,django-ddp/django-ddp,django-ddp/django-ddp,django-ddp/django-ddp,commoncode/django-ddp,django-ddp/django-ddp
dddp/msg.py
dddp/msg.py
"""Django DDP utils for DDP messaging.""" from dddp import THREAD_LOCAL as this from django.core.serializers import get_serializer def serializer_factory(): """Make a new DDP serializer.""" return get_serializer('ddp')() def obj_change_as_msg(obj, msg): """Generate a DDP msg for obj with specified msg t...
"""Django DDP utils for DDP messaging.""" import collections from django.core.serializers import get_serializer _SERIALIZER = None def obj_change_as_msg(obj, msg): """Generate a DDP msg for obj with specified msg type.""" global _SERIALIZER if _SERIALIZER is None: _SERIALIZER = get_serializer('ddp...
mit
Python
0a42ec9eeccc5969bf1eb8a92cd7d66ade4daf76
Make executable
Merlin04/ddgquery,Merlin04/ddgquery
ddgquery.py
ddgquery.py
#! /usr/bin/env python import os, time # use python3 while True: os.system("espeak -v en-us 'What would you like to know about?'") #time.sleep(4) query = input("What would you like to know about?\n") if query == "help": print("Add -u to get a helpful URL\nAdd -l to launch the URL in your brows...
import os, time # use python3 while True: os.system("espeak -v en-us 'What would you like to know about?'") #time.sleep(4) query = input("What would you like to know about?\n") if query == "help": print("Add -u to get a helpful URL\nAdd -l to launch the URL in your browser\nAdd -s to get a Duck...
mit
Python
338e2ba155df0759113c65ced6be6714092b9aaf
Use Alex's awesome new version of the GtkQuartz theme engine
bl8/bockbuild,bl8/bockbuild,BansheeMediaPlayer/bockbuild,bl8/bockbuild,BansheeMediaPlayer/bockbuild,mono/bockbuild,BansheeMediaPlayer/bockbuild,mono/bockbuild
packages/gtk-quartz-engine.py
packages/gtk-quartz-engine.py
Package ('gtk-quartz-engine', 'master', sources = [ 'git://github.com/nirvanai/gtk-quartz-engine.git' ], override_properties = { 'configure': 'libtoolize --force --copy && ' 'aclocal && ' 'autoheader && ' 'automake --add-missing && ' 'autoconf && ' './configure --prefix=%{prefix}' } )
Package ('gtk-quartz-engine', 'master', sources = [ 'git://github.com/jralls/gtk-quartz-engine.git' ], override_properties = { 'configure': 'libtoolize --force --copy && ' 'aclocal && ' 'autoheader && ' 'automake --add-missing && ' 'autoconf && ' './configure --prefix=%{prefix}' } )
mit
Python
12130cef6c9b08e0928ed856972ace3c2000e6f8
Fix error accessing class variable
ueg1990/mooc_aggregator_restful_api
mooc_aggregator_restful_api/udacity.py
mooc_aggregator_restful_api/udacity.py
''' This module retrieves the course catalog and overviews of the Udacity API Link to Documentation: https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf ''' import json import requests class UdacityAPI(object): ''' This class defines attributes and method...
''' This module retrieves the course catalog and overviews of the Udacity API Link to Documentation: https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf ''' import json import requests class UdacityAPI(object): ''' This class defines attributes and method...
mit
Python
ac63fca5b1e688fb465431fd1760db6b1c766fea
Bump to version 0.14
pudo/spendb,johnjohndoe/spendb,pudo/spendb,johnjohndoe/spendb,USStateDept/FPA_Core,openspending/spendb,openspending/spendb,USStateDept/FPA_Core,openspending/spendb,spendb/spendb,spendb/spendb,nathanhilbert/FPA_Core,CivicVision/datahub,johnjohndoe/spendb,pudo/spendb,CivicVision/datahub,USStateDept/FPA_Core,CivicVision/d...
openspending/_version.py
openspending/_version.py
__version__ = '0.14.0'
__version__ = '0.13.1'
agpl-3.0
Python
b7b23f9840af377f37617f3bbb79556342d74133
replace prints with calls to logger
ihadzic/jim,ihadzic/jim,ihadzic/jim
__main__.py
__main__.py
#/usr/bin/env python2 import web import log import ConfigParser _log = log.TrivialLogger() _config_file_list = ['./jim.cfg', '/etc/jim.cfg'] _config_file_parser = ConfigParser.RawConfigParser() _config_ok = True try: _config_file_list = _config_file_parser.read(_config_file_list) except: _log.error("cannot pa...
#/usr/bin/env python2 import web import ConfigParser _config_file_list = ['./jim.cfg', '/etc/jim.cfg'] _config_file_parser = ConfigParser.RawConfigParser() _config_ok = True try: _config_file_list = _config_file_parser.read(_config_file_list) except: print("cannot parse configuration file(s)") _config_ok ...
mit
Python
6a5a7a1e1eafa91543d8e274e63d258332149a29
Update __version__.py
crcresearch/orcidfind
orcidfind/__version__.py
orcidfind/__version__.py
# Single source of metadata about the project that's used by setup.py and # docs/conf.py # Some segments of public version identifer (PEP 440) VERSION_RELEASE = "0.1" VERSION_PRE_RELEASE = "a5" # e.g., "a4", "b1", "rc3" or "" (final release) VERSION_POST_RELEASE = "" # e.g., ".post1" VERSION = VERSION_RELEASE + ...
# Single source of metadata about the project that's used by setup.py and # docs/conf.py # Some segments of public version identifer (PEP 440) VERSION_RELEASE = "0.1" VERSION_PRE_RELEASE = "a4" # e.g., "a4", "b1", "rc3" or "" (final release) VERSION_POST_RELEASE = "" # e.g., ".post1" VERSION = VERSION_RELEASE + ...
apache-2.0
Python
d032d2597525e02fd71a524c5a9619c09c640365
Bump version number.
akx/coffin
coffin/__init__.py
coffin/__init__.py
""" Coffin ~~~~~~ `Coffin <http://www.github.com/dcramer/coffin>` is a package that resolves the impedance mismatch between `Django <http://www.djangoproject.com/>` and `Jinja2 <http://jinja.pocoo.org/2/>` through various adapters. The aim is to use Coffin as a drop-in replacement for Django's template system to whate...
""" Coffin ~~~~~~ `Coffin <http://www.github.com/dcramer/coffin>` is a package that resolves the impedance mismatch between `Django <http://www.djangoproject.com/>` and `Jinja2 <http://jinja.pocoo.org/2/>` through various adapters. The aim is to use Coffin as a drop-in replacement for Django's template system to whate...
bsd-3-clause
Python
5261e7b75718b866f95285bd03171c861175dccc
Move question into random_questions function
andrewlrogers/srvy
collection/srvy.py
collection/srvy.py
#!/usr/bin/python import sys import time from time import sleep from datetime import datetime import random import sqlite3 import csv from configparser import ConfigParser try: from gpiozero import Button except ImportError: print("gpiozero is not installed.") pass try: import pygame except ImportErro...
#!/usr/bin/python import sys import time from time import sleep from datetime import datetime import random import sqlite3 import csv from configparser import ConfigParser try: from gpiozero import Button except ImportError: print("gpiozero is not installed.") pass try: import pygame except ImportErro...
mit
Python
93e8e63c3cf8d360af018b6ce3abe224b8ad374c
Add further testinfra tests
betacloud/ansible-docker,betacloud/ansible-docker
molecule/default/tests/test_default.py
molecule/default/tests/test_default.py
def test_apt_preferences_docker_compose_file(host): f = host.file("/etc/apt/preferences.d/docker-compose") assert f.exists assert f.is_file def test_apt_preferences_docker_file(host): f = host.file("/etc/apt/preferences.d/docker") assert f.exists assert f.is_file def test_systemd_overlay_fil...
def test_apt_preferences_docker_compose_file(host): f = host.file("/etc/apt/preferences.d/docker-compose") assert f.exists assert f.is_file def test_apt_preferences_docker_file(host): f = host.file("/etc/apt/preferences.d/docker") assert f.exists assert f.is_file
apache-2.0
Python
8dc853e90b587b9245b87c14f5cb2e93215d3283
Change test_output data structure to dict of dict
barbagroup/pygbe,barbagroup/pygbe,barbagroup/pygbe
tests/convergence_tests/sphere_lspr.py
tests/convergence_tests/sphere_lspr.py
from pygbe.util import an_solution from convergence_lspr import (mesh_ratio, run_convergence, picklesave, pickleload, report_results, mesh) def main(): print('{:-^60}'.format('Running sphere_lspr test')) try: test_outputs = pickleload() except FileNotFoundError: ...
from pygbe.util import an_solution from convergence_lspr import (mesh_ratio, run_convergence, picklesave, pickleload, report_results, mesh) def main(): print('{:-^60}'.format('Running sphere_lspr test')) try: test_outputs = pickleload() except FileNotFoundError: ...
bsd-3-clause
Python
0ac869ce67017c9ffb8a8b32ff57346980144371
use global es in reindexers
dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq
corehq/ex-submodules/pillowtop/reindexer/reindexer.py
corehq/ex-submodules/pillowtop/reindexer/reindexer.py
from corehq.elastic import get_es_new from pillowtop.es_utils import set_index_reindex_settings, \ set_index_normal_settings, get_index_info_from_pillow, initialize_mapping_if_necessary from pillowtop.pillow.interface import PillowRuntimeContext class PillowReindexer(object): def __init__(self, pillow, chang...
from pillowtop.es_utils import set_index_reindex_settings, \ set_index_normal_settings, get_index_info_from_pillow, initialize_mapping_if_necessary from pillowtop.pillow.interface import PillowRuntimeContext class PillowReindexer(object): def __init__(self, pillow, change_provider): self.pillow = pil...
bsd-3-clause
Python
f5600008defcd5fe4c9c397c0b7170f6f5e9a5e4
Add header info and submodule imports to init
jkitzes/macroeco
__init__.py
__init__.py
__author__ = "Justin Kitzes, Mark Wilber, Chloe Lewis" __copyright__ = "Copyright 2012, Regents of University of California" __credits__ = [] __license__ = "BSD 2-clause" __version__ = "0.1" __maintainer__ = "Justin Kitzes" __email__ = "jkitzes@berkeley.edu" __status__ = "Development" import compare import data import...
bsd-2-clause
Python
5281d535f67dfa2cebd8f70ee1f342c213d11b29
change filename
benleb/PyGlow,bjornt/PyGlow
__init__.py
__init__.py
from .PyGlow import *
from .pyglow import *
mit
Python
67406893c1b9b727f313a374affe9868ec986fa6
Bump to 2.6.2c1.
pypa/setuptools,pypa/setuptools,pypa/setuptools
__init__.py
__init__.py
"""distutils The main package for the Python Module Distribution Utilities. Normally used from a setup script as from distutils.core import setup setup (...) """ # This module should be kept compatible with Python 2.1. __revision__ = "$Id$" # Distutils version # # Please coordinate with Marc-Andre Lemburg ...
"""distutils The main package for the Python Module Distribution Utilities. Normally used from a setup script as from distutils.core import setup setup (...) """ # This module should be kept compatible with Python 2.1. __revision__ = "$Id$" # Distutils version # # Please coordinate with Marc-Andre Lemburg ...
mit
Python
b913e6d1b4323dbc52fbe2697dc9bf7fa2b80c24
Add Python 2 deprecation warning, closes #1179
dials/dials,dials/dials,dials/dials,dials/dials,dials/dials
__init__.py
__init__.py
from __future__ import absolute_import, division, print_function import logging import os import sys import warnings if sys.version_info.major == 2: warnings.warn( "Python 2 is no longer fully supported. Please consider using the DIALS 2.2 release branch. " "For more information on Python 2.7 supp...
from __future__ import absolute_import, division, print_function import logging import os import sys logging.getLogger("dials").addHandler(logging.NullHandler()) # Invert FPE trap defaults, https://github.com/cctbx/cctbx_project/pull/324 if "boost.python" in sys.modules: import boost.python boost.python.ext...
bsd-3-clause
Python
9d085f0478ca55b59390515c82ca3e367cef5522
Replace Bootstrap's html5shiv with es5-shim.
peterhil/ninhursag,peterhil/ninhursag,peterhil/skeleton,peterhil/skeleton,peterhil/skeleton,peterhil/ninhursag,peterhil/ninhursag
app/assets.py
app/assets.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask.ext.assets import Environment, Bundle css_application = Bundle( 'less/main.less', filters='less', debug=False, output='gen/app.css' ) css_all = Bundle( # 'vendor/some/library.css', css_application, filters='cssmin', output='gen...
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask.ext.assets import Environment, Bundle css_application = Bundle( 'less/main.less', filters='less', debug=False, output='gen/app.css' ) css_all = Bundle( # 'vendor/some/library.css', css_application, filters='cssmin', output='gen...
mit
Python
12c57f6b785167c4f9e6427520360ce64d845e96
Fix documentation links in Edward2 docstring.
tensorflow/probability,tensorflow/probability
tensorflow_probability/python/experimental/edward2/__init__.py
tensorflow_probability/python/experimental/edward2/__init__.py
# Copyright 2018 The TensorFlow Probability Authors. # # 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...
# Copyright 2018 The TensorFlow Probability Authors. # # 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
5b8725caecd01ccb4d0d3e0c40b910cbdf19258b
Fix country form input
Dbastos1710/Spotify_Youtube
spotify_country_top_n.py
spotify_country_top_n.py
import requests import webbrowser import json import urllib.request import urllib.parse import re token = "Bearer " + input("OAuth Token: ") #BQDWxOubOFzx8fjeDi9E3Npt_fd9GiGXVgdiC3tS9LWHgajM3dRe2w3DjVVtjv0ZgHZAKt6zw2cD9PEBcLf-TFxtpOnb89THvPNMH-gbAO9Ho_8eSchxzO7JdaQ1Rg6eLBmzGIPjUp-5NM9Umpk62uKuAwPw7kSB0fb_B1uYdR...
import requests import webbrowser import json import urllib.request import urllib.parse import re token = "Bearer " + input("OAuth Token: ") #BQDWxOubOFzx8fjeDi9E3Npt_fd9GiGXVgdiC3tS9LWHgajM3dRe2w3DjVVtjv0ZgHZAKt6zw2cD9PEBcLf-TFxtpOnb89THvPNMH-gbAO9Ho_8eSchxzO7JdaQ1Rg6eLBmzGIPjUp-5NM9Umpk62uKuAwPw7kSB0fb_B1uYdR...
mit
Python
a1052c02a11539d34a7c12c7a86d103c2b445b52
Fix and improve BRIEF example
vighneshbirodkar/scikit-image,pratapvardhan/scikit-image,robintw/scikit-image,Britefury/scikit-image,rjeli/scikit-image,warmspringwinds/scikit-image,paalge/scikit-image,Midafi/scikit-image,chriscrosscutler/scikit-image,keflavich/scikit-image,chriscrosscutler/scikit-image,juliusbierk/scikit-image,rjeli/scikit-image,SamH...
doc/examples/plot_brief.py
doc/examples/plot_brief.py
""" ======================= BRIEF binary descriptor ======================= This example demonstrates the BRIEF binary description algorithm. The descriptor consists of relatively few bits and can be computed using a set of intensity difference tests. The short binary descriptor results in low memory footprint and ve...
""" ======================= BRIEF binary descriptor ======================= This example demonstrates the BRIEF binary description algorithm. The descriptor consists of relatively few bits and can be computed using a set of intensity difference tests. The short binary descriptor results in low memory footprint and ve...
bsd-3-clause
Python
284befadcfd3e4785067d827c67958d01b80d4a2
fix method name (underscore prefix)
PaintScratcher/perfrunner,vmx/perfrunner,EricACooper/perfrunner,vmx/perfrunner,pavel-paulau/perfrunner,dkao-cb/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,thomas-couchbase/perfrunner,dkao-cb/perfrunner,mikewied/perfrunner,pavel-paulau/perfrunner,pavel-paulau/perfrunner,mikewied/perfrunner,thomas-couchbase/p...
perfrunner/tests/rebalance.py
perfrunner/tests/rebalance.py
import time from perfrunner.tests import PerfTest from multiprocessing import Event def with_delay(method): def wrapper(self, *args, **kwargs): time.sleep(self.rebalance_settings.start_after) method(self, *args, **kwargs) time.sleep(self.rebalance_settings.stop_after) self.shutdo...
import time from perfrunner.tests import PerfTest from multiprocessing import Event def with_delay(method): def wrapper(self, *args, **kwargs): time.sleep(self.rebalance_settings.start_after) method(self, *args, **kwargs) time.sleep(self.rebalance_settings.stop_after) self.shutdo...
apache-2.0
Python
624745fbb311877f5b2251cf3eefe0cc15b5cca2
add some code for document
markshao/pagrant
pagrant/commands/test.py
pagrant/commands/test.py
#!/usr/bin/python #coding:utf8 __author__ = ['markshao'] import os from optparse import Option from nose import main from pagrant.basecommand import Command from pagrant.commands.init import PAGRANT_CONFIG_FILE_NAME from pagrant.environment import Environment from pagrant.exceptions import PagrantConfigError, TestE...
#!/usr/bin/python #coding:utf8 __author__ = ['markshao'] import os from optparse import Option from nose import main from pagrant.basecommand import Command from pagrant.commands.init import PAGRANT_CONFIG_FILE_NAME from pagrant.environment import Environment from pagrant.exceptions import PagrantConfigError, TestE...
mit
Python
f3517847990f2007956c319a7784dbfc2d73b91a
Remove formatting
jmcs/ellipsis
ellipsis.py
ellipsis.py
#!/usr/bin/python3 # -*- coding: utf-8 -*- import os import subprocess import sys cwd = os.getcwd() home = os.getenv('HOME') devnull = open(os.devnull, 'w') def find_svn_root(path): try: svn_cmd = ['/usr/bin/svn', 'info'] svn_info = subprocess.check_output(svn_cmd, stderr=devnull).decode() ...
#!/usr/bin/python3 # -*- coding: utf-8 -*- import os import subprocess import sys cwd = os.getcwd() home = os.getenv('HOME') devnull = open(os.devnull, 'w') def find_svn_root(path): try: svn_cmd = ['/usr/bin/svn', 'info'] svn_info = subprocess.check_output(svn_cmd, stderr=devnull).decode() ...
mit
Python
c9ed81608ea6d017dbe23e012d0e137c1ce9ef10
remove eddy from test
kaczmarj/neurodocker,kaczmarj/neurodocker
neurodocker/interfaces/tests/test_fsl.py
neurodocker/interfaces/tests/test_fsl.py
"""Tests for neurodocker.interfaces.FSL""" from neurodocker.interfaces.tests import utils class TestFSL(object): def test_docker(self): specs = { 'pkg_manager': 'yum', 'instructions': [ ('base', 'centos:7'), ('fsl', {'version': '5.0.11'}), ...
"""Tests for neurodocker.interfaces.FSL""" from neurodocker.interfaces.tests import utils class TestFSL(object): def test_docker(self): specs = { 'pkg_manager': 'yum', 'instructions': [ ('base', 'centos:7'), ('fsl', {'version': '5.0.10', 'eddy_5011...
apache-2.0
Python
4824b929bfa7a18a9f7796a9b93ad17909feeb56
Switch parameter has been added.
jbosboom/streamjit,jbosboom/streamjit
lib/opentuner/streamjit/sjparameters.py
lib/opentuner/streamjit/sjparameters.py
import deps #fix sys.path import opentuner from opentuner.search.manipulator import (IntegerParameter, FloatParameter, SwitchParameter) class sjIntegerParameter(IntegerParameter): def __init__(self, name, min, max,value, javaClassPath = None, **kwargs): self.value = value ...
import deps #fix sys.path import opentuner from opentuner.search.manipulator import (IntegerParameter, FloatParameter) class sjIntegerParameter(IntegerParameter): def __init__(self, name, min, max,value, javaClassPath = None, **kwargs): self.value = value self.javaClassPa...
mit
Python
531dcc85b3579712ab5576a50e7dd10457444fb4
remove old class definitions
TUW-GEO/ecmwf_models
ecmwf_models/__init__.py
ecmwf_models/__init__.py
import pkg_resources try: __version__ = pkg_resources.get_distribution(__name__).version except: __version__ = 'unknown'
import pkg_resources try: __version__ = pkg_resources.get_distribution(__name__).version except: __version__ = 'unknown' from ecmwf_models.interface import ERAInterimImg from ecmwf_models.interface import ERAInterimDs
mit
Python
977cf58125a204010197c95827457843503e2c5b
Disable BSF Campus for RCA Alliance Française
ideascube/ideascube,ideascube/ideascube,ideascube/ideascube,ideascube/ideascube
ideascube/conf/kb_rca_alliancefrancaise.py
ideascube/conf/kb_rca_alliancefrancaise.py
# -*- coding: utf-8 -*- """KoomBook conf""" from .kb import * # noqa LANGUAGE_CODE = 'fr' IDEASCUBE_NAME = 'Alliance française de Bangui' # Disable BSF Campus for now HOME_CARDS = [card for card in HOME_CARDS if card['id'] != 'bsfcampus']
# -*- coding: utf-8 -*- """KoomBook conf""" from .kb import * # noqa LANGUAGE_CODE = 'fr' IDEASCUBE_NAME = 'Alliance française de Bangui'
agpl-3.0
Python
5ba36cb51fc2d93dd05430c3f5a0d24262b32985
Remove unnecessary type change
oreilly-japan/deep-learning-from-scratch
common/gradient.py
common/gradient.py
# coding: utf-8 import numpy as np def _numerical_gradient_1d(f, x): h = 1e-4 # 0.0001 grad = np.zeros_like(x) for idx in range(x.size): tmp_val = x[idx] x[idx] = float(tmp_val) + h fxh1 = f(x) # f(x+h) x[idx] = tmp_val - h fxh2 = f(x) # f(x-h) ...
# coding: utf-8 import numpy as np def _numerical_gradient_1d(f, x): h = 1e-4 # 0.0001 grad = np.zeros_like(x) for idx in range(x.size): tmp_val = x[idx] x[idx] = float(tmp_val) + h fxh1 = f(x) # f(x+h) x[idx] = tmp_val - h fxh2 = f(x) # f(x-h) ...
mit
Python
ab42cc26e8a994974cb5beb1550715e6f838d7cb
fix file outputting
Treeki/network-q-formats
BUN/bunpack.py
BUN/bunpack.py
#!/usr/bin/env python import struct, sys from PIL import Image u8 = struct.Struct('<B') def convert_palette(pal): result = [] s = struct.Struct('<BBB') for i in range(len(pal) // 3): result.append(s.unpack_from(pal, i * 3)) return result def extract_image(data, offset, pal): width = u8.unpack_from(data, of...
#!/usr/bin/env python import struct, sys from PIL import Image u8 = struct.Struct('<B') def convert_palette(pal): result = [] s = struct.Struct('<BBB') for i in range(len(pal) // 3): result.append(s.unpack_from(pal, i * 3)) return result def extract_image(data, offset, pal): width = u8.unpack_from(data, of...
mit
Python
d5cb8ea39236f52f3ee9d2f9f8485dc5f737a5bb
Send a message every few minutes to keep Travis happy
benedictpaten/cactus,benedictpaten/cactus,benedictpaten/cactus,benedictpaten/cactus,benedictpaten/cactus
allTests.py
allTests.py
#!/usr/bin/env python #Copyright (C) 2011 by Benedict Paten (benedictpaten@gmail.com) # #Released under the MIT license, see LICENSE.txt import unittest import os from threading import Thread import time from cactus.setup.cactus_setupTest import TestCase as setupTest from cactus.blast.cactus_blastTest import TestCase...
#!/usr/bin/env python #Copyright (C) 2011 by Benedict Paten (benedictpaten@gmail.com) # #Released under the MIT license, see LICENSE.txt import unittest import os from cactus.setup.cactus_setupTest import TestCase as setupTest from cactus.blast.cactus_blastTest import TestCase as blastTest from cactus.pipeline.cactus...
mit
Python
a94bbac73a40f85e0239bbab72c0ffce5258f707
Update test_geocoding.py
sdpython/actuariat_python,sdpython/actuariat_python,sdpython/actuariat_python
_unittests/ut_data/test_geocoding.py
_unittests/ut_data/test_geocoding.py
# -*- coding: utf-8 -*- """ @brief test log(time=16s) """ import os import unittest import warnings import pandas from pyquickhelper.loghelper import fLOG, get_password from pyquickhelper.pycode import ( add_missing_development_version, get_temp_folder, is_travis_or_appveyor, ExtTestCase) class TestGeoco...
# -*- coding: utf-8 -*- """ @brief test log(time=16s) """ import os import unittest import warnings import pandas from pyquickhelper.loghelper import fLOG from pyquickhelper.pycode import add_missing_development_version, get_temp_folder, is_travis_or_appveyor, ExtTestCase class TestGeocoding(ExtTestCase): d...
mit
Python
82acbc312b36bfdf4e1a0a1c26019d2c5879e036
Fix context processor settings to support Django 1.7
opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor
nodeconductor/server/admin/settings.py
nodeconductor/server/admin/settings.py
ADMIN_INSTALLED_APPS = ( 'fluent_dashboard', 'admin_tools', 'admin_tools.theming', 'admin_tools.menu', 'admin_tools.dashboard', 'django.contrib.admin', ) # FIXME: Move generic (not related to admin) context processors to base_settings # Note: replace 'django.core.context_processors' with 'djang...
ADMIN_INSTALLED_APPS = ( 'fluent_dashboard', 'admin_tools', 'admin_tools.theming', 'admin_tools.menu', 'admin_tools.dashboard', 'django.contrib.admin', ) # FIXME: Move generic (not related to admin) context processors to base_settings ADMIN_TEMPLATE_CONTEXT_PROCESSORS = ( 'django.contrib.au...
mit
Python
a0e65ec74447984b97afa7a3405199eebd49269a
Add DB calls
habibmasuro/omniwallet,OmniLayer/omniwallet,habibmasuro/omniwallet,VukDukic/omniwallet,VukDukic/omniwallet,OmniLayer/omniwallet,Nevtep/omniwallet,Nevtep/omniwallet,OmniLayer/omniwallet,achamely/omniwallet,habibmasuro/omniwallet,achamely/omniwallet,OmniLayer/omniwallet,Nevtep/omniwallet,habibmasuro/omniwallet,VukDukic/o...
api/mastercoin_verify.py
api/mastercoin_verify.py
import os import glob import re from flask import Flask, request, jsonify, abort, json import psycopg2, psycopg2.extras import msc_apps sqlconn = msc_apps.sql_connect() data_dir_root = os.environ.get('DATADIR') app = Flask(__name__) app.debug = True @app.route('/properties') def properties(): prop_glob = glob.glob...
import os import glob import re from flask import Flask, request, jsonify, abort, json data_dir_root = os.environ.get('DATADIR') app = Flask(__name__) app.debug = True @app.route('/properties') def properties(): prop_glob = glob.glob(data_dir_root + '/properties/*.json') response = [] for property_file in pro...
agpl-3.0
Python
23865e7155974dbc9a9be3d9e6c51ed7b96200ea
add next to profile form
felinx/poweredsites,felinx/poweredsites,felinx/poweredsites
poweredsites/forms/profile.py
poweredsites/forms/profile.py
# -*- coding: utf-8 -*- # # Copyright(c) 2010 poweredsites.org # # 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...
# -*- coding: utf-8 -*- # # Copyright(c) 2010 poweredsites.org # # 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
c22d4f5aa412b6aa624212bf5728c94fbef5d375
Modify attributes for Bucketlist Model, Modify relationship between User model and Bucketlist Model
brayoh/bucket-list-api
app/models.py
app/models.py
from datetime import datetime from passlib.apps import custom_app_context as pwd_context from app import db class User(db.Model): """This class represents the users database table.""" __tablename__ = "users" id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(255), unique=Tru...
from datetime import datetime from passlib.apps import custom_app_context as pwd_context from app import db class User(db.Model): """This class represents the users database table.""" __tablename__ = "users" id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(255), unique=Tru...
mit
Python
4ceb0b3cb2b952a491b4173313559c7b4bc06c2b
Update __init__.py
CENDARI/editorsnotes,CENDARI/editorsnotes,CENDARI/editorsnotes,CENDARI/editorsnotes,CENDARI/editorsnotes
editorsnotes/__init__.py
editorsnotes/__init__.py
__version__ = '0.2.1' VERSION = __version__
__version__ = '2.0.1' VERSION = __version__
agpl-3.0
Python
053785b92dc925b27ba036a2b560ab509180fd1e
Add Lowdown to Sphinx extensions load list.
4degrees/lucidity,nebukadhezer/lucidity
doc/conf.py
doc/conf.py
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. '''Lucidity documentation build configuration file''' import os import re # -- General ------------------------------------------------------------------ # Extensions extensions = [ 'sphinx.ext.autodoc', ...
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. '''Lucidity documentation build configuration file''' import os import re # -- General ------------------------------------------------------------------ # Extensions extensions = [ 'sphinx.ext.autodoc', ...
apache-2.0
Python
2d8644d5cc0085db4615de6bfabdd024a6a19469
fix demo issue
nextoa/comb
comb/demo/redis.py
comb/demo/redis.py
# -*- coding: utf-8 -*- import comb.slot import comb.mq.redis as RedisHelper import redis class Slot(comb.slot.Slot): def initialize(self): """ This block is execute before thread initial Example:: class UserSlot(Slot): def initialize(self,*args,**kwargs): ...
# -*- coding: utf-8 -*- import comb.slot import comb.mq.redis as RedisHelper import redis class Slot(comb.slot.Slot): def initialize(self): """ This block is execute before thread initial Example:: class UserSlot(Slot): def initialize(self,*args,**kwargs): ...
mit
Python
379ae8c6dc026ff33d28b4df00e5d435fc4fc85a
FIX depends
ingadhoc/account-invoicing
account_invoice_control/__openerp__.py
account_invoice_control/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
agpl-3.0
Python
889159bf9f8d8a067ad0e7c740b68f73da83ef6c
test some floats too.
synthicity/activitysim,synthicity/activitysim
activitysim/abm/test/test_skims.py
activitysim/abm/test/test_skims.py
from collections import OrderedDict from future.utils import iteritems import numpy as np import pytest from activitysim.abm.tables import skims @pytest.fixture(scope="session") def matrix_dimension(): return 5922 @pytest.fixture(scope="session") def num_of_matrices(): return 845 @pytest.fixture(scope="...
from collections import OrderedDict from future.utils import iteritems import numpy as np import pytest from activitysim.abm.tables import skims @pytest.fixture(scope="session") def matrix_dimension(): return 5922 @pytest.fixture(scope="session") def num_of_matrices(): return 845 @pytest.fixture(scope="...
agpl-3.0
Python
387e0729ea7c92920f15abcc04eaa52a320447fd
return url for eval.
mzweilin/HashTag-Understanding,mzweilin/HashTag-Understanding,mzweilin/HashTag-Understanding
job.py
job.py
import lib.search.bing_search as bing import lib.tweet.parseTwitter as twitter from lib.querygen.tweets2query import QueryGenerator import lib.summarization.tagdef as tagdef from lib.summarization import extractor import string import logging logging.basicConfig(level=logging.INFO) logger = logging def main(): i...
import lib.search.bing_search as bing import lib.tweet.parseTwitter as twitter from lib.querygen.tweets2query import QueryGenerator import lib.summarization.tagdef as tagdef from lib.summarization import extractor import string import logging logging.basicConfig(level=logging.INFO) logger = logging def main(): i...
apache-2.0
Python
e4649b40ee5ba1bb9c7d43acb4e599b210f9dd4a
Rename test and function to a more appropriate ones.
bsamorodov/selenium-py-training-samorodov
php4dvd/test_deletefilm.py
php4dvd/test_deletefilm.py
# -*- coding: utf-8 -*- from selenium import webdriver from selenium.common.exceptions import NoSuchElementException import unittest class DeleteFilm(unittest.TestCase): def setUp(self): self.driver = webdriver.Firefox() self.driver.implicitly_wait(10) self.base_url = "http://hub.wart.ru/"...
# -*- coding: utf-8 -*- from selenium import webdriver from selenium.common.exceptions import NoSuchElementException import unittest class AddFilm(unittest.TestCase): def setUp(self): self.driver = webdriver.Firefox() self.driver.implicitly_wait(10) self.base_url = "http://hub.wart.ru/" ...
bsd-2-clause
Python
4644a70f20901f221fe307adc94d7cfb9059649a
Bump version
thombashi/pytablereader,thombashi/pytablereader,thombashi/pytablereader
pytablereader/__version__.py
pytablereader/__version__.py
# encoding: utf-8 from datetime import datetime __author__ = "Tsuyoshi Hombashi" __copyright__ = "Copyright 2016-{}, {}".format(datetime.now().year, __author__) __license__ = "MIT License" __version__ = "0.23.1" __maintainer__ = __author__ __email__ = "tsuyoshi.hombashi@gmail.com"
# encoding: utf-8 from datetime import datetime __author__ = "Tsuyoshi Hombashi" __copyright__ = "Copyright 2016-{}, {}".format(datetime.now().year, __author__) __license__ = "MIT License" __version__ = "0.23.0" __maintainer__ = __author__ __email__ = "tsuyoshi.hombashi@gmail.com"
mit
Python
c4a77bf510bf23e25f259aaae8c1effa65e45a85
fix bug when trying to get a slice (of pizza)
ccxt/ccxt,ccxt/ccxt,ccxt/ccxt,ccxt/ccxt,ccxt/ccxt
python/ccxtpro/base/cache.py
python/ccxtpro/base/cache.py
import collections class Delegate: def __init__(self, name): self.name = name def __get__(self, instance, owner): return getattr(instance, self.name) class ArrayCache(list): # implicitly called magic methods don't invoke __getattribute__ # https://docs.python.org/3/reference/datamod...
import collections class Delegate: def __init__(self, name): self.name = name def __get__(self, instance, owner): return getattr(instance, self.name) class ArrayCache(list): # implicitly called magic methods don't invoke __getattribute__ # https://docs.python.org/3/reference/datamod...
mit
Python
07fa886690539d097b212375598d7ca3239664ba
Make option group items appear the same in the cart as text options for consistency
chrisglass/django-shop-simplevariations,chrisglass/django-shop-simplevariations
shop_simplevariations/cart_modifier.py
shop_simplevariations/cart_modifier.py
#-*- coding: utf-8 -*- from shop.cart.cart_modifiers_base import BaseCartModifier from shop_simplevariations.models import CartItemOption, CartItemTextOption class ProductOptionsModifier(BaseCartModifier): ''' This modifier adds an extra field to the cart to let the lineitem "know" about product options an...
#-*- coding: utf-8 -*- from shop.cart.cart_modifiers_base import BaseCartModifier from shop_simplevariations.models import CartItemOption, CartItemTextOption class ProductOptionsModifier(BaseCartModifier): ''' This modifier adds an extra field to the cart to let the lineitem "know" about product options an...
bsd-3-clause
Python
8ebba5de25de289046bdca46f1613a337f1aacbf
Improve CommentForm tests
pbanaszkiewicz/amy,pbanaszkiewicz/amy,pbanaszkiewicz/amy
amy/extcomments/tests.py
amy/extcomments/tests.py
from django.test import TestCase from django.urls import reverse import django_comments from workshops.models import Organization, Person class TestEmailFieldRequiredness(TestCase): def test_email_field_requiredness(self): """Regression test for #1944. Previously a user without email address wou...
from django.test import TestCase import django_comments from workshops.models import Organization, Person class TestEmailFieldRequiredness(TestCase): def test_email_field_requiredness(self): """Regression test for #1944. Previously a user without email address would not be able to add a comment....
mit
Python
afbc63d29a23170d17ce18e0c39a403de974aede
Use of websockets for the episodes listing
rkohser/gustaf,rkohser/gustaf,rkohser/gustaf
app/handlers/__init__.py
app/handlers/__init__.py
__author__ = 'roland' from handlers.mainhandler import MainHandler from handlers.showhandler import ShowHandler
__author__ = 'roland'
mit
Python
36f2c75f177b076ce54cb1d056b715edb15377f8
Bump app version number.
kernelci/kernelci-backend,kernelci/kernelci-backend
app/handlers/__init__.py
app/handlers/__init__.py
__version__ = "2015.7.4" __versionfull__ = __version__
__version__ = "2015.7.3" __versionfull__ = __version__
lgpl-2.1
Python
dd791f210379907b909c1a52492a380d17c88058
add arguments
jmlero/python-compressandmove
compressandmove.py
compressandmove.py
#!/usr/bin/env python # file.py Code # # Copyright (c) Jose M. Molero # # All rights reserved. # # MIT License # # 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, includin...
#!/usr/bin/env python # file.py Code # # Copyright (c) Jose M. Molero # # All rights reserved. # # MIT License # # 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, includin...
mit
Python
e17efc67e20e1db1f11c00853dd26da250e3655e
add access rule for event_moodle
steedos/odoo,GauravSahu/odoo,joariasl/odoo,Endika/odoo,FlorianLudwig/odoo,Drooids/odoo,n0m4dz/odoo,mustafat/odoo-1,dkubiak789/odoo,kittiu/odoo,ccomb/OpenUpgrade,0k/OpenUpgrade,ihsanudin/odoo,numerigraphe/odoo,ingadhoc/odoo,jfpla/odoo,alexcuellar/odoo,jfpla/odoo,SerpentCS/odoo,csrocha/OpenUpgrade,jfpla/odoo,tvibliani/od...
addons/event_moodle/__openerp__.py
addons/event_moodle/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
Python
ea8ea2e6203ee6cb7580444207446c0bb82f7239
Add solution for Lesson_5_Analyzing_Data.10-Using_match_and_project.
krzyste/ud032,krzyste/ud032
Lesson_5_Analyzing_Data/10-Using_match_and_project/followers.py
Lesson_5_Analyzing_Data/10-Using_match_and_project/followers.py
#!/usr/bin/env python """ Write an aggregation query to answer this question: Of the users in the "Brasilia" timezone who have tweeted 100 times or more, who has the largest number of followers? The following hints will help you solve this problem: - Time zone is found in the "time_zone" field of the user object in e...
#!/usr/bin/env python """ Write an aggregation query to answer this question: Of the users in the "Brasilia" timezone who have tweeted 100 times or more, who has the largest number of followers? The following hints will help you solve this problem: - Time zone is found in the "time_zone" field of the user object in e...
agpl-3.0
Python
93cc7c44efdd01c0e6d5a218301da7686b4f7289
implement postmaster redirection
cloudfleet/despatch
app/server.py
app/server.py
import requests from salmon.routing import nolocking, route, stateless, route_like from salmon.mail import MailResponse from config import settings import json import logging log = logging.getLogger(__name__) log.level = logging.DEBUG def forward_postmaster(message, domain): log.info("===========================...
import requests from salmon.routing import nolocking, route, stateless from salmon.mail include MailResponse from config import settings import json import logging log = logging.getLogger(__name__) log.level = logging.DEBUG @route("postmaster@(domain)", inbox=".+", domain=".+") @stateless def forward_postmaster(mess...
agpl-3.0
Python
cc12728d7160a10f0c182c0cccfde0fd15cadb75
Add a reset function stub
mozilla/spicedham,mozilla/spicedham
spicedham/basewrapper.py
spicedham/basewrapper.py
class BaseWrapper(object): """ A base class for backend plugins. """ def reset(self, really): """ Resets the training data to a blank slate. """ if really: raise NotImplementedError() def get_key(self, tag, key, default=None): """ Gets ...
class BaseWrapper(object): """ A base class for backend plugins. """ def get_key(self, tag, key, default=None): """ Gets the value held by the tag, key composite key. If it doesn't exist, return default. """ raise NotImplementedError() def get_key_list(sel...
mpl-2.0
Python
88cc2242ccd91d7574dab0f687c3a0c755a9a4aa
convert stock prices from strings to floats before saving/returning
jakemmarsh/neural-network-stock-predictor,jakemmarsh/neural-network-stock-predictor
analyzer.py
analyzer.py
import json, urllib2 from neuralNetwork import NN def getHistoricalData(stockSymbol): historicalPrices = [] # login to API urllib2.urlopen("http://api.kibot.com/?action=login&user=guest&password=guest") # get 10 days of data from API (business days only, could be < 10) url = "http://api.kibo...
import json, urllib2 from neuralNetwork import NN def getHistoricalData(stockSymbol): historicalPrices = [] # login to API urllib2.urlopen("http://api.kibot.com/?action=login&user=guest&password=guest") # get 10 days of data from API (business days only, could be < 10) url = "http://api.kibo...
mit
Python
ccdc17645440cf191f9cca27f32b2211fad4ccd0
Load coordinates info into the main table
RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline
luigi/tasks/release/load_coordinates.py
luigi/tasks/release/load_coordinates.py
# -*- coding: utf-8 -*- """ Copyright [2009-2017] EMBL-European Bioinformatics Institute 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...
# -*- coding: utf-8 -*- """ Copyright [2009-2017] EMBL-European Bioinformatics Institute 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...
apache-2.0
Python
ff6b9eddc27ee2b897ab20198d562ef1dfe257d5
support get docker info
dc-project/blog,dc-project/blog
app/dash.py
app/dash.py
#!/usr/bin/env python3 # coding=utf-8 """ @version:0.1 @author: ysicing @file: blog/dash.py @time: 2017/9/20 22:46 """ from flask import Blueprint, render_template,jsonify from app.plugins.docker import DockerApi dash = Blueprint('dash', __name__) docker = DockerApi(host=None, timeout=None) @dash.route('/dash/')...
#!/usr/bin/env python3 # coding=utf-8 """ @version:0.1 @author: ysicing @file: blog/dash.py @time: 2017/9/20 22:46 """ from flask import Blueprint, render_template dash = Blueprint('dash', __name__) @dash.route('/dash/') def dash_index(): return render_template('dash.html')
agpl-3.0
Python
95945f98b3c4689dc1fb5066f5102154cc4a6a28
bump version
objectified/vdist,objectified/vdist
setup.py
setup.py
from setuptools import setup, find_packages setup( name='vdist', version='0.3.5', description='Create OS packages from Python projects using Docker containers', long_description='Create OS packages from Python projects using Docker containers', author='L. Brouwer', author_email='objectified@gma...
from setuptools import setup, find_packages setup( name='vdist', version='0.3.4', description='Create OS packages from Python projects using Docker containers', long_description='Create OS packages from Python projects using Docker containers', author='L. Brouwer', author_email='objectified@gma...
mit
Python
7dcbb064e9bd87e30d322e695452ab140c30b5ed
Support for --version
benjamin-hodgson/Contexts
src/contexts/__main__.py
src/contexts/__main__.py
import sys from .plugin_discovery import load_plugins from . import run_with_plugins, main def cmd(): if '--version' in sys.argv: print_version() sys.exit(0) try: import colorama except ImportError: pass else: colorama.init() plugin_list = load_plugins() ...
import sys from .plugin_discovery import load_plugins from . import run_with_plugins, main def cmd(): try: import colorama except ImportError: pass else: colorama.init() plugin_list = load_plugins() exit_code = run_with_plugins(plugin_list) sys.exit(exit_code) if __n...
mit
Python
cdaa708e185b252ddebb542e89a9c4d5e6740f2c
Include old (>24h) messages in news feed
balanceofcowards/pyttrss
feedline.py
feedline.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Rapidly display fresh headlines from a TinyTinyRSS instance on the command line. (c) 2017 Andreas Fischer <_@ndreas.de> """ import subprocess import argparse import getpass import json import os.path import readchar from ttrss import TinyTinyRSS def get_conn(): ""...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Rapidly display fresh headlines from a TinyTinyRSS instance on the command line. (c) 2017 Andreas Fischer <_@ndreas.de> """ import subprocess import argparse import getpass import json import os.path import readchar from ttrss import TinyTinyRSS def get_conn(): ""...
mit
Python
d0b6e2b9b3a936ea16a7c48fd951bb4f297c1190
Update setup.py to point to correct site
python-daisychain/daisychain
setup.py
setup.py
try: from setuptools import setup, find_packages except: from distutils.core import setup, find_packages install_requires = ['py3compat >= 0.2'] setup( name='daisychain', version='0.1', description='Configuration-based OO-dependency resolution workflow engine', author='Jeff Edwards', autho...
try: from setuptools import setup, find_packages except: from distutils.core import setup, find_packages install_requires = ['py3compat >= 0.2'] setup( name='daisychain', version='0.1', description='Configuration-based OO-dependency resolution workflow engine', author='Jeff Edwards', autho...
mit
Python
a88a9ad6ed64c3bf4b5a9e40a41a68e9581654e7
Fix nox config. (#4599)
googleapis/python-bigquery-datatransfer,googleapis/python-bigquery-datatransfer
nox.py
nox.py
# Copyright 2017, Google LLC All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2017, Google LLC All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
Python
82cc05e882698bdf2248ae0ae1589bb6455d0ca5
update fetch
jmrnilsson/beei
fetch/rb.py
fetch/rb.py
import robotparser from utils import config from splinter import Browser def index(session): url = config.rb_url() _robot_can_fetch(session, url) def fetch(): with Browser(**config.browser_kwargs()) as browser: browser.visit(url) styles = [] group_names = brows...
import robotparser from utils import config from splinter import Browser def index(session): url = config.rb_url() _robot_can_fetch(session, url) def fetch(): with Browser(**config.browser_kwargs()) as browser: browser.visit(url) styles = [] group_names = brows...
mit
Python
5839d76a0e29a3fa6b07a460ff3f0d8cf9b889b7
Remove alpha release
remind101/stacker_blueprints,remind101/stacker_blueprints
setup.py
setup.py
import os from setuptools import setup, find_packages src_dir = os.path.dirname(__file__) install_requires = [ "troposphere~=1.8.0", "awacs~=0.6.0", "stacker~=0.8.1", ] tests_require = [ "nose~=1.0", "mock~=2.0.0", ] def read(filename): full_path = os.path.join(src_dir, filename) with o...
import os from setuptools import setup, find_packages src_dir = os.path.dirname(__file__) install_requires = [ "troposphere~=1.8.0", "awacs~=0.6.0", "stacker~=0.8.1", ] tests_require = [ "nose~=1.0", "mock~=2.0.0", ] def read(filename): full_path = os.path.join(src_dir, filename) with o...
bsd-2-clause
Python
38791c7bb480ea5c9efdb4bab3a9c785e5078153
bump to version 0.1alpha9
hookbox/hookbox,hookbox/hookbox,hookbox/hookbox,gameclosure/hookbox,gameclosure/hookbox,gameclosure/hookbox,hookbox/hookbox,gameclosure/hookbox
setup.py
setup.py
from setuptools import setup, find_packages import os, sys static_types = [ '*.js', '*.html', '*.css', '*.ico', '*.gif', '*.jpg', '*.png', '*.txt*', '*.py', '*.template' ] #if sys.platform != "win32": # _install_requires.append("Twisted") _install_requires = [ 'cs...
from setuptools import setup, find_packages import os, sys static_types = [ '*.js', '*.html', '*.css', '*.ico', '*.gif', '*.jpg', '*.png', '*.txt*', '*.py', '*.template' ] #if sys.platform != "win32": # _install_requires.append("Twisted") _install_requires = [ 'cs...
mit
Python
7156cc172b3ba87e3247367c6bf51cc24ce9a902
Update PyPI usage
urschrei/convertbng,urschrei/convertbng
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ setup.py Created by Stephan Hügel on 2015-06-21 """ from __future__ import unicode_literals import os import re import io from setuptools import setup, find_packages, Distribution def read(*names, **kwargs): with io.open( os.path.join(os.path.dirname(__fil...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ setup.py Created by Stephan Hügel on 2015-06-21 """ from __future__ import unicode_literals import os import re import io from setuptools import setup, find_packages, Distribution def read(*names, **kwargs): with io.open( os.path.join(os.path.dirname(__fil...
mit
Python
2f766e439b9d91ab4d4682245a2360bc1e5c2bb5
Update version
mpld3/mplexporter
setup.py
setup.py
import matplotlib import os MPLBE = os.environ.get('MPLBE') if MPLBE: matplotlib.use(MPLBE) try: from setuptools import setup except ImportError: from distutils.core import setup DESCRIPTION = "General Matplotlib Exporter" LONG_DESCRIPTION = open('README.md').read() NAME = "mplexporter" AUTHOR = "Jake V...
import matplotlib import os MPLBE = os.environ.get('MPLBE') if MPLBE: matplotlib.use(MPLBE) try: from setuptools import setup except ImportError: from distutils.core import setup DESCRIPTION = "General Matplotlib Exporter" LONG_DESCRIPTION = open('README.md').read() NAME = "mplexporter" AUTHOR = "Jake V...
bsd-3-clause
Python
6797300eeeb014debc5472927c5b5711597881ea
bump to 0.2.1
mwhooker/jones,mwhooker/jones,mwhooker/jones,mwhooker/jones
setup.py
setup.py
""" Copyright 2012 DISQUS 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 distrib...
""" Copyright 2012 DISQUS 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 distrib...
apache-2.0
Python
d611830525e93e1c1a364ed88695d62003490e07
Bump version number
mpharrigan/trajprocess,mpharrigan/trajprocess
setup.py
setup.py
from setuptools import setup, find_packages setup( name="trajprocess", version='2.0.5', packages=find_packages(), requires=['numpy', 'mdtraj', 'nose'], zip_safe=False, include_package_data=True, )
from setuptools import setup, find_packages setup( name="trajprocess", version='2.0.4', packages=find_packages(), requires=['numpy', 'mdtraj', 'nose'], zip_safe=False, include_package_data=True, )
mit
Python
abfdbaee5f80c7c02436268016718a5362f9083d
make setup.py pypi conform
ecoron/SerpScrap,ecoron/SerpScrap
setup.py
setup.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from setuptools import setup, find_packages version = '0.1.5' setup( name='SerpScrap', version=version, description='''A python module to scrape and extract data like links, titles, descriptions, ratings, from search engine result pages and listed ur...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from setuptools import setup, find_packages version = '0.1.5' setup( name='SerpScrap', version=version, description='A python module to scrape and extract data like links, titles, descriptions, ratings, from search engine result pages.', long_description=...
mit
Python
8649b296e05c432dd3841d8c5dc8d9aebd6d09db
update global test script
architecture-building-systems/CEAforArcGIS,architecture-building-systems/CEAforArcGIS
cea/test.py
cea/test.py
""" Test all the main scripts in one go - drink coffee while you wait :) """ import properties import demand import emissions import embodied import graphs properties.test_properties() demand.test_demand() emissions.test_lca_operation() embodied.test_lca_embodied() graphs.test_graph_demand() print 'full test complete...
""" Test all the main scripts in one go - drink coffee while you wait :) """ import properties import demand import emissions import embodied import graphs properties.test_properties() demand.test_demand() emissions.test_lca_operation() embodied.test_lca_embodied() graphs.test_graph_demand()
mit
Python
90c07db3c507e1394cf0a72e73f9c7cc425b20a4
return False
mgaitan/one
one.py
one.py
def one(iterable): """Return the object in the given iterable that evaluates to True. If the given iterable has more than one object that evaluates to True, or if there is no object that fulfills such condition, return False. >>> one((True, False, False)) True >>> one((True, False, True)) ...
def one(iterable): """ Return X if X is the only one value where bool(i) is True for each every i in the iterable. In any other case return None. >>> one((True, False, False)) True >>> one((True, False, True)) False >>> one((0, 0, 'a')) 'a' >>> one((0, False, None)) False ...
bsd-3-clause
Python
6726af1a15c3b64ea9cbb68e18a7983477713842
Update 0.91
Deavelleye/dj-CerberusAC,Deavelleye/dj-CerberusAC,Deavelleye/dj-CerberusAC,Deavelleye/dj-CerberusAC
src/cerberus_ac/admin.py
src/cerberus_ac/admin.py
# -*- coding: utf-8 -*- """Admin module.""" # from cerberus_ac.views import EditUserPermissions # from .models import * # # # class SecurityAdmin(AdminSite): # pass # # class DataAdmin(AdminSite): # pass # # class AuditAdmin(AdminSite): # pass # # security_admin_site = SecurityAdmin(name='SecurityAdmin')...
# -*- coding: utf-8 -*- """Admin module.""" # from django.contrib import admin # from django.contrib.admin.sites import AdminSite # # from cerberus_ac.views import EditUserPermissions # from .models import * # # # class SecurityAdmin(AdminSite): # pass # # class DataAdmin(AdminSite): # pass # # class AuditAdm...
isc
Python
baab52477f637364f0a1a974b4ee13114c667bca
allow multiple encodings in headers (i.e. "From: =?iso-8859-2?Q?...?= <email@address.com>")
valhallasw/cia-mail
cia-mail.py
cia-mail.py
#!/usr/local/bin/python # # Copyright (C) Merlijn van Deen <valhallasw@gmail.com>, 2009 # # Distributed under the terms of the MIT license. # import sys, time from email.Parser import Parser from email.Header import Header, decode_header from xml.sax.saxutils import escape from xmlrpclib import ServerProxy e = Parser...
#!/usr/local/bin/python # # Copyright (C) Merlijn van Deen <valhallasw@gmail.com>, 2009 # # Distributed under the terms of the MIT license. # import sys, time from email.Parser import Parser from email.Header import Header, decode_header from xml.sax.saxutils import escape from xmlrpclib import ServerProxy e = Parser...
mit
Python
8453607c1fb1cb1835bc1323f4c59366015e93fe
Create a command-line vulgarizer
Rosuav/shed,Rosuav/shed,Rosuav/shed,Rosuav/shed,Rosuav/shed
estimate.py
estimate.py
import sys from fractions import Fraction from math import log10 def vulgarize(rpt): """Calculate a vulgar fraction for a given continued fraction""" f = Fraction(0) if tuple(rpt) == (0,): return f # Avoid dividing by zero for term in reversed(rpt): f = 1 / (term + f) return 1/f def magnitude(x): """Give an i...
import sys from fractions import Fraction from math import log10 digits = sys.argv[1] print("Estimating %s as a fraction..." % digits) def vulgarize(rpt): """Calculate a vulgar fraction for a given continued fraction""" f = Fraction(0) if tuple(rpt) == (0,): return f # Avoid dividing by zero for term in reversed(...
mit
Python
0e2ef0a70fa6627c0eb4a292e69d3ed1f8500f36
Add the ability to graph the results
Rosuav/shed,Rosuav/shed,Rosuav/shed,Rosuav/shed,Rosuav/shed
estimate.py
estimate.py
import sys from fractions import Fraction from math import log10 def vulgarize(rpt): """Calculate a vulgar fraction for a given continued fraction""" f = Fraction(0) if tuple(rpt) == (0,): return f # Avoid dividing by zero for term in reversed(rpt): f = 1 / (term + f) return 1/f def magnitude(x): """Give an i...
import sys from fractions import Fraction from math import log10 def vulgarize(rpt): """Calculate a vulgar fraction for a given continued fraction""" f = Fraction(0) if tuple(rpt) == (0,): return f # Avoid dividing by zero for term in reversed(rpt): f = 1 / (term + f) return 1/f def magnitude(x): """Give an i...
mit
Python
a54cb5529e5611b2d21c837d5422e31abd8d2819
Add :q alias for quit
bebraw/Placidity
placidity/commands/quit/quit.py
placidity/commands/quit/quit.py
class Quit: aliases = ('quit', 'quit()', ':q', ) description = 'Quits the application' def execute(self): raise SystemExit
class Quit: aliases = ('quit', 'quit()', ) description = 'Quits the application' def execute(self): raise SystemExit
mit
Python
e2d009c2e64340d101319824af1130bb92b4b021
Add debug logger method to utils
data-8/DS8-Interact,data-8/DS8-Interact,data-8/DS8-Interact
app/util.py
app/util.py
import os def chown(username, path, destination): """Set owner and group of file to that of the parent directory.""" s = os.stat(path) os.chown(os.path.join(path, destination), s.st_uid, s.st_gid) def construct_path(path, format, *args): """Constructs a path using locally available variables.""" r...
import os def chown(username, path, destination): """Set owner and group of file to that of the parent directory.""" s = os.stat(path) os.chown(os.path.join(path, destination), s.st_uid, s.st_gid) def construct_path(path, format, *args): """Constructs a path using locally available variables.""" r...
apache-2.0
Python
cf6ddfdac8a56194ad1297921a390be541d773cc
Remove last digit of version number if it's 0.
shaurz/devo
app_info.py
app_info.py
# coding=UTF8 import datetime name = "Devo" release_date = datetime.date(2012, 12, 13) version = (1, 0, 0) version_string = ".".join(str(x) for x in (version if version[2] != 0 else version[:2])) identifier = "com.iogopro.devo" copyright = u"Copyright © 2010-2012 Luke McCarthy" developer = "Developer: Luke McCa...
# coding=UTF8 import datetime name = "Devo" release_date = datetime.date(2012, 12, 13) version = (1, 0, 0) version_string = ".".join(str(x) for x in version) identifier = "com.iogopro.devo" copyright = u"Copyright © 2010-2012 Luke McCarthy" developer = "Developer: Luke McCarthy <luke@iogopro.co.uk>" company_na...
mit
Python
1e7c95ee7d920a5d0f312608b323c7449ca4fe1c
Bump version.
Floobits/floobits-emacs
floobits.py
floobits.py
#!/usr/bin/env python # coding: utf-8 import os from floo import emacs_handler from floo.common import migrations from floo.common import reactor from floo.common import utils from floo.common import shared as G def cb(port): print('Now listening on %s' % port) def main(): G.__VERSION__ = '0.11' G.__PL...
#!/usr/bin/env python # coding: utf-8 import os from floo import emacs_handler from floo.common import migrations from floo.common import reactor from floo.common import utils from floo.common import shared as G def cb(port): print('Now listening on %s' % port) def main(): G.__VERSION__ = '0.11' G.__PL...
apache-2.0
Python
5950997c8925804338f224f1278c3018479dab09
scale pixels to 16 shades
KFW/peggy.pi.pic
ppp.py
ppp.py
#! /usr/bin/python """ ppp.py peggy.pi.pic Take picture with Raspberry Pi camera and then display as 25 x 25 pixel image (16 shades) on Peggy2 """ # http://picamera.readthedocs.org/en/release-1.9/recipes1.html#capturing-to-a-pil-image import io import time import picamera from PIL import Image # Create the in-mem...
#! /usr/bin/python """ ppp.py peggy.pi.pic Take picture with Raspberry Pi camera and then display as 25 x 25 pixel image (16 shades) on Peggy2 """ # http://picamera.readthedocs.org/en/release-1.9/recipes1.html#capturing-to-a-pil-image import io import time import picamera from PIL import Image # Create the in-mem...
mit
Python
7bf84875d5999a537a5689df4c1bb9ff6ce950ae
Remove forgotten test link
Data2Semantics/linkitup,Data2Semantics/linkitup,Data2Semantics/linkitup
src/app/sameas/plugin.py
src/app/sameas/plugin.py
''' Created on 4 Nov 2013 @author: cmarat ''' from flask import request, jsonify from flask.ext.login import login_required import requests from app import app SAMEAS_URL = "http://sameas.org/json" @app.route('/sameas', methods=['POST']) @login_required def link_to_sameas(): # Retrieve the article from the p...
''' Created on 4 Nov 2013 @author: cmarat ''' from flask import request, jsonify from flask.ext.login import login_required import requests from app import app SAMEAS_URL = "http://sameas.org/json" @app.route('/sameas', methods=['POST']) @login_required def link_to_sameas(): # Retrieve the article from the p...
mit
Python
e8c71806e5f10c46fe4ac3e81322e9a44b42f933
Simplify todo example
hhatto/autopep8,SG345/autopep8,MeteorAdminz/autopep8,vauxoo-dev/autopep8,Vauxoo/autopep8,Vauxoo/autopep8,vauxoo-dev/autopep8,MeteorAdminz/autopep8,SG345/autopep8,hhatto/autopep8
test/todo.py
test/todo.py
"""Incomplete fixes.""" # E501: This should be wrapped similar to how pprint does it {'2323k2323': 24232323, '2323323232323': 3434343434343434, '34434343434535535': 3434343434343434, '4334343434343': 3434343434} # See below {'2323323232323': 3434343434343434, '2323k2323': 24232323, '34434343434535535': 343434343434...
"""Incomplete fixes.""" # E501: This should be wrapped similar to how pprint does it {'2323k2323': 24232323, '2323323232323': 3434343434343434, '34434343434535535': 3434343434343434, '4334343434343': 3434343434} # See below {'2323323232323': 3434343434343434, '2323k2323': 24232323, '34434343434535535': 343434343434...
mit
Python
631a231fc2a63dfc0b6d051aa6cef49bd67d80a6
add WSGI
gabisurita/99party,gabisurita/99party,gabisurita/99party
run.py
run.py
from app import app import mapping import models wsgi = app.wsgifunc() if __name__ == "__main__": models.createDB() app.run()
from app import app import mapping import models if __name__ == "__main__": models.createDB() app.run()
apache-2.0
Python
e7df2d658cdb0a3664b914d0577ea08da2845f08
fix run.py python interpreter
TransitSurveyor/API,TransitSurveyor/API,TransitSurveyor/Dashboard,TransitSurveyor/Dashboard,TransitSurveyor/Dashboard
run.py
run.py
#!flask/bin/python from api import app app.run(debug = True)
#!env/bin/python from api import app app.run(debug = True)
mit
Python
603cf4cab90e6655a5aa26269a93376d13dd7fe1
Fix package installing
colajam93/aurpackager,colajam93/aurpackager,colajam93/aurpackager,colajam93/aurpackager
lib/pacman/sync.py
lib/pacman/sync.py
from lib.pacman.command import execute def refresh_force(): """pacman -Syy""" execute('sudo -S pacman -Syy', discard_output=True) def system_upgrade(): """pacman -Syu""" execute('sudo -S pacman -Syu --noconfirm', discard_output=True) def install(package, asdeps=False): """pacman -S [--asdeps] ...
from lib.pacman.command import execute def refresh_force(): """pacman -Syy""" execute('sudo -S pacman -Syy', discard_output=True) def system_upgrade(): """pacman -Syu""" execute('sudo -S pacman -Syu --noconfirm', discard_output=True) def install(package, asdeps=False): """pacman -S [--asdeps] ...
mit
Python
612c809a68640fea9130952fdd626ee0118646bb
Fix code style for task group model
selahssea/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,andrei-karalionak/ggrc-core,edofic/ggrc-core,selahssea/ggrc-core,andrei-karalionak/ggrc-core,josthkko/ggrc-core,kr41/ggrc-core,jmakov/ggrc-core,prasannav7/ggrc-core,prasannav7/ggrc-core,andrei-karalionak/ggrc-core,AleksNeStu/ggrc-core,NejcZupec/ggrc-core,p...
src/ggrc_workflows/models/task_group.py
src/ggrc_workflows/models/task_group.py
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: dan@reciprocitylabs.com # Maintained By: dan@reciprocitylabs.com from ggrc import db from ggrc.models.mixins import ( Titled, Slugged, Describ...
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: dan@reciprocitylabs.com # Maintained By: dan@reciprocitylabs.com from ggrc import db from ggrc.models.mixins import ( Titled, Slugged, Describ...
apache-2.0
Python
e37174e733b7b186a40cc82ffe95c3d10014bd2f
Check for errors
innogames/igcollect
src/redis.py
src/redis.py
#!/usr/bin/env python # # igcollect - Redis # # Copyright (c) 2016 InnoGames GmbH # from argparse import ArgumentParser from subprocess import check_output from time import time def parse_args(): parser = ArgumentParser() parser.add_argument('--prefix', default='redis') return parser.parse_args() def m...
#!/usr/bin/env python # # igcollect - Redis # # Copyright (c) 2016 InnoGames GmbH # from argparse import ArgumentParser from subprocess import Popen, PIPE from time import time def parse_args(): parser = ArgumentParser() parser.add_argument('--prefix', default='redis') return parser.parse_args() def m...
mit
Python
9d8de33a72e821bf0fb7415f73ba8cfabc3ba93b
Update version 0.7.6 -> 0.7.7
XiaonuoGantan/pywebsocket,XiaonuoGantan/pywebsocket
src/setup.py
src/setup.py
#!/usr/bin/env python # # Copyright 2012, Google 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...
#!/usr/bin/env python # # Copyright 2012, Google 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...
bsd-3-clause
Python
394581407a7788b315da97f870a6dcd0bfe4bd54
fix js MIME type
adrian7/ExchangeRates,landsurveyorsunited/ExchangeRates,adrian7/ExchangeRates,hippasus/ExchangeRates,landsurveyorsunited/ExchangeRates
src/utils.py
src/utils.py
#!/usr/local/bin/python # -*- coding: utf-8 -*- import json def is_none(target): return target is None def is_none_or_empty(target): return is_none(target) or len(target) == 0 def write_json_output(response, dic): response_text, content_type = json.dumps(dic), "application/json" _do_write(response, ...
#!/usr/local/bin/python # -*- coding: utf-8 -*- import json def is_none(target): return target is None def is_none_or_empty(target): return is_none(target) or len(target) == 0 def write_json_output(response, dic): response_text, content_type = json.dumps(dic), "application/json" _do_write(response, ...
mit
Python
6226c17ed1e9313dc202b44fc69b098a09140983
fix translation
cderici/pycket,magnusmorton/pycket,vishesh/pycket,magnusmorton/pycket,vishesh/pycket,cderici/pycket,samth/pycket,vishesh/pycket,pycket/pycket,krono/pycket,samth/pycket,samth/pycket,krono/pycket,magnusmorton/pycket,pycket/pycket,pycket/pycket,krono/pycket,cderici/pycket
pycket/values_regex.py
pycket/values_regex.py
from pycket.base import W_Object from pycket.error import SchemeException from pycket import values, values_string from pycket import regexp from rpython.rlib.rsre import rsre_core CACHE = regexp.RegexpCache() class W_AnyRegexp(W_Object): _immutable_fields_ = ["source"] errorname = "regexp" def __init_...
from pycket.base import W_Object from pycket.error import SchemeException from pycket import values, values_string from pycket import regexp from rpython.rlib.rsre import rsre_core CACHE = regexp.RegexpCache() class W_AnyRegexp(W_Object): _immutable_fields_ = ["source"] errorname = "regexp" def __init_...
mit
Python
1069574db36d86745fa4357ff2bc35334883ad86
Bump app version to 2019.7.1
kernelci/kernelci-backend,kernelci/kernelci-backend
app/handlers/__init__.py
app/handlers/__init__.py
__version__ = "2019.7.1" __versionfull__ = __version__
__version__ = "2019.7.0" __versionfull__ = __version__
lgpl-2.1
Python
20d5e52221713ef1ab1bc9cd74b47520bea69ac6
Add tasks TODO
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
api/experiments/tasks.py
api/experiments/tasks.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import logging from api.settings import CeleryTasks from api.celery_api import app from experiments.models import Experiment from experiments.task_status import ExperimentStatus logger = logging.getLogger('polyaxon.api.experimen...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import logging import polyaxon as plx from api.settings import CeleryTasks from api.celery_api import app from experiments.models import Experiment from experiments.task_status import ExperimentStatus logger = logging.getLogge...
apache-2.0
Python
9e8b6f47f25d4445031e0c996bc8c92ba6da4cd3
Remove unnecessary else
AndyDeany/pygame-template
pygametemplate/core.py
pygametemplate/core.py
"""Module containing the core functions of pygametemplate.""" import os import sys import traceback from datetime import datetime import ctypes import pygame from pygametemplate.exceptions import CaughtFatalException TEST = bool(int(os.environ.get("TEST", "0"))) PATH = os.getcwd() def path_to(*path): """Retu...
"""Module containing the core functions of pygametemplate.""" import os import sys import traceback from datetime import datetime import ctypes import pygame from pygametemplate.exceptions import CaughtFatalException TEST = bool(int(os.environ.get("TEST", "0"))) PATH = os.getcwd() def path_to(*path): """Retu...
mit
Python
c306c3b408e880edfc6d49e31575dc91a31783bd
Switch reset command to use call_command instead of subprocess.
cfe-lab/Kive,cfe-lab/Kive,cfe-lab/Kive,cfe-lab/Kive,cfe-lab/Kive
kive/metadata/management/commands/reset.py
kive/metadata/management/commands/reset.py
from optparse import make_option import os import shutil from django.core.management.base import BaseCommand from django.core.management import call_command import kive.settings # @UnresolvedImport class Command(BaseCommand): help = 'Resets the database and loads sample data.' option_list = BaseComman...
from optparse import make_option import os import shutil import subprocess import sys from django.core.management.base import BaseCommand from django.core.management import call_command import kive.settings # @UnresolvedImport class Command(BaseCommand): help = 'Resets the database and loads sample data.' ...
bsd-3-clause
Python
d77e3fbc0d59ca31ce028cc31f5d1e06f08900f4
Fix color effect decorator in GoL example (#20)
a5kin/hecate,a5kin/hecate
examples/game_of_life.py
examples/game_of_life.py
from hecate import core from hecate import seeds from hecate.core import color_effects class GameOfLife(core.CellularAutomaton): """ The Idea of classic CA built with HECATE framework """ state = core.IntegerProperty(max_val=1) class Topology: dimensions = 2 lattice = core.OrthogonalLatti...
from hecate import core from hecate import seeds from hecate.core import color_effects class GameOfLife(core.CellularAutomaton): """ The Idea of classic CA built with HECATE framework """ state = core.IntegerProperty(max_val=1) class Topology: dimensions = 2 lattice = core.OrthogonalLatti...
mit
Python