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
a492e805fa51940d746a1d251232bc4f13417165
fix waftools/man.py to install manpages again.
theeternalsw0rd/xmms2,dreamerc/xmms2,theeternalsw0rd/xmms2,six600110/xmms2,six600110/xmms2,dreamerc/xmms2,xmms2/xmms2-stable,chrippa/xmms2,oneman/xmms2-oneman,krad-radio/xmms2-krad,theefer/xmms2,theefer/xmms2,krad-radio/xmms2-krad,oneman/xmms2-oneman,theefer/xmms2,oneman/xmms2-oneman,six600110/xmms2,oneman/xmms2-oneman...
waftools/man.py
waftools/man.py
import Common, Object, Utils, Node, Params import sys, os import gzip from misc import copyobj def gzip_func(task): env = task.m_env infile = task.m_inputs[0].abspath(env) outfile = task.m_outputs[0].abspath(env) input = open(infile, 'r') output = gzip.GzipFile(outfile, mode='w') output.write(...
import Common, Object, Utils, Node, Params import sys, os import gzip from misc import copyobj def gzip_func(task): env = task.m_env infile = task.m_inputs[0].abspath(env) outfile = task.m_outputs[0].abspath(env) input = open(infile, 'r') output = gzip.GzipFile(outfile, mode='w') output.write(...
lgpl-2.1
Python
735a52b8ad4ebf7b6b8bb47e14667cd9004e624b
add some mappings
gsathya/dsalgo,gsathya/dsalgo
algo/lru.py
algo/lru.py
mapping = {} class Node: def __init__(self, val): self.next = None self.prev = None self.value = val class DoublyLinkedList: def __init__(self): self.head = None def insert(self, val): node = Node(val) mapping[val] = node head = self.hea...
class Node: def __init__(self, val): self.next = None self.prev = None self.value = val class DoublyLinkedList: def __init__(self): self.head = None def insert(self, val): node = Node(val) head = self.head if self.head == None: self.head...
mit
Python
6bb58e13b657c1546f4f5d1afa70d48a9187f168
Update server.py
volodink/itstime4science,volodink/itstime4science,volodink/itstime4science
gprs/server.py
gprs/server.py
from socket import * from modules import decode_packet import sys from modules import params Parser = params.Parser() argv = Parser.createParser() ip_and_port = argv.parse_args(sys.argv[1:]) #host = ip_and_port.ip #port = int(ip_and_port.port) host = "0.0.0.0" port = 5100 addr = (host, port) print(host,port) tcp_socke...
from socket import * from modules import decode_packet import sys from modules import params Parser = params.Parser() argv = Parser.createParser() ip_and_port = argv.parse_args(sys.argv[1:]) #host = ip_and_port.ip #port = int(ip_and_port.port) host = "0.0.0.0" port = 5300 addr = (host, port) print(host,port) tcp_socke...
mit
Python
85775847e93b35ac19e09962bc2b10f9be666e33
Update analysis.py with new finallist.py method
lukasschwab/MathIA
analysis.py
analysis.py
import random import linecache from unidecode import unidecode # Process links into list finallist = [None] * 5716809 with open('links-simple-sorted.txt', 'r') as src: for line in src: [oNode, dNode] = line.split(':') finallist[int(oNode)] = dNode.rstrip('\n')[1:] # ACTUALLY: pick a random line in links-sorted, ...
import random import linecache from unidecode import unidecode # ACTUALLY: pick a random line in links-sorted, and translate the numbers from there # Get a random node, and pull that line from the links doc––want this to be an option # Pull from links because some titles don't have link lines lineno = random.randint(...
mit
Python
6a3f0ade1d8fe16eeda6d339220b7ef877b402e5
Add no-break options
KaiyiZhang/Secipt,KaiyiZhang/Secipt,KaiyiZhang/Secipt
LFI.TESTER.py
LFI.TESTER.py
''' @KaiyiZhang Github ''' import sys import urllib2 import getopt import time target = '' depth = 6 file = 'etc/passwd' html = '' prefix = '' url = '' keyword = 'root' force = False def usage(): print "LFI.Tester.py Help:" print "Usage: LFI.TESTER.py -t [-d] [-f] [-k]" print " -t,--target The test url" prin...
''' @KaiyiZhang Github ''' import sys import urllib2 import getopt import time target = '' depth = 6 file = 'etc/passwd' html = '' prefix = '' url = '' keyword='root' def usage(): print "LFI.Tester.py Help:" print "Usage: LFI.TESTER.py -t [-d] [-f] [-k]" print " -t,--target The test url" print " -d,--depth ...
apache-2.0
Python
68c0c054e5b9874f8a6423c35fb83c9de351b9e0
fix doc build
jbogaardt/chainladder-python,jbogaardt/chainladder-python
examples/plot_benktander.py
examples/plot_benktander.py
""" ==================================================================== Benktander: Relationship between Chainladder and BornhuetterFerguson ==================================================================== This example demonstrates the relationship between the Chainladder and BornhuetterFerguson methods by way fo...
""" ==================================================================== Benktander: Relationship between Chainladder and BornhuetterFerguson ==================================================================== This example demonstrates the relationship between the Chainladder and BornhuetterFerguson methods by way fo...
mit
Python
15307ebe2c19c1a3983b0894152ba81fdde34619
Add comment on dist of first function
charanpald/tyre-hug
exp/descriptivestats.py
exp/descriptivestats.py
import pandas import numpy import matplotlib.pyplot as plt def univariate_stats(): # Generate 1000 random numbers from a normal distribution num_examples = 1000 z = pandas.Series(numpy.random.randn(num_examples)) # Minimum print(z.min()) # Maximum print(z.max()) # Mean print(z.mea...
import pandas import numpy import matplotlib.pyplot as plt def univariate_stats(): num_examples = 1000 z = pandas.Series(numpy.random.randn(num_examples)) # Minimum print(z.min()) # Maximum print(z.max()) # Mean print(z.mean()) # Median print(z.median()) # Variance pri...
mit
Python
9af7c8bfc22a250ce848d50ca26877e177f767c1
Fix execution on Monday
flopezag/fiware-management-scripts,flopezag/fiware-management-scripts
management.py
management.py
from logging import _nameToLevel as nameToLevel from argparse import ArgumentParser from Common.emailer import Emailer from DesksReminder.reminders import HelpDeskTechReminder, HelpDeskLabReminder, HelpDeskOtherReminder, \ UrgentDeskReminder, AccountsDeskReminder from HelpDesk.synchr...
from logging import _nameToLevel as nameToLevel from argparse import ArgumentParser from Common.emailer import Emailer from DesksReminder.reminders import HelpDeskTechReminder, HelpDeskLabReminder, HelpDeskOtherReminder, \ UrgentDeskReminder, AccountsDeskReminder from HelpDesk.synchr...
apache-2.0
Python
ecd2821a99dee895f3ab7c5dbcc6d86983268560
Update src url for dev in views
patrickbeeson/text-me
__init__.py
__init__.py
from flask import Flask, request, redirect, url_for from twilio.rest import TwilioRestClient from PIL import Image, ImageDraw, ImageFont import time app = Flask(__name__, static_folder='static', static_url_path='') client = TwilioRestClient( account='ACb01b4d6edfb1b41a8b80f5fed2c19d1a', token='97e6b9c0074b27...
from flask import Flask, request, redirect, url_for from twilio.rest import TwilioRestClient from PIL import Image, ImageDraw, ImageFont import time app = Flask(__name__, static_folder='static', static_url_path='') client = TwilioRestClient( account='ACb01b4d6edfb1b41a8b80f5fed2c19d1a', token='97e6b9c0074b27...
mit
Python
598bb39414825ff8ab561babb470b85f06c58020
Update __init__.py
scipsycho/mlpack
__init__.py
__init__.py
from mlpack.linear_regression import linear_regression from mlpack.logistic_regression import logistic_regression """ MlPack ====== Provides 1. A Variety of Machine learning packages 2. Good and Easy hand written programs with good documentation 3. Linear Regression, Logistic Regression Available subpackages ...
from mlpack import linear_regression from mlpack import logistic_regression """ MlPack ====== Provides 1. A Variety of Machine learning packages 2. Good and Easy hand written programs with good documentation 3. Linear Regression, Logistic Regression Available subpackages --------------------- 1. Linear Regr...
mit
Python
b8d0344f0ca5c906e43d4071bc27a8d2acf114d1
bump version
wistful/webmpris
webmpris/__init__.py
webmpris/__init__.py
__version__ = '1.1' __description__ = 'REST API to control media players via MPRIS2 interfaces' requires = [ 'pympris' ] README = """webmpris is a REST API to control media players via MPRIS2 interfaces. Supported intefaces: org.mpris.MediaPlayer2 via /players/<id>/Root org.mpris.MediaPlayer2.Player ...
__version__ = '1.0' __description__ = 'REST API to control media players via MPRIS2 interfaces' requires = [ 'pympris' ] README = """webmpris is a REST API to control media players via MPRIS2 interfaces. Supported intefaces: org.mpris.MediaPlayer2 via /players/<id>/Root org.mpris.MediaPlayer2.Player ...
mit
Python
9acf7857167bb87438c7c0bebca1a7eda93ac23b
Make saml2idp compatible with Django 1.9
mobify/dj-saml-idp,mobify/dj-saml-idp,mobify/dj-saml-idp
saml2idp/registry.py
saml2idp/registry.py
# -*- coding: utf-8 -*- from __future__ import absolute_import """ Registers and loads Processor classes from settings. """ import logging from importlib import import_module from django.core.exceptions import ImproperlyConfigured from . import exceptions from . import saml2idp_metadata logger = logging.getLogger(...
# -*- coding: utf-8 -*- from __future__ import absolute_import """ Registers and loads Processor classes from settings. """ # Python imports import logging # Django imports from django.utils.importlib import import_module from django.core.exceptions import ImproperlyConfigured # Local imports from . import exceptions f...
mit
Python
b8cd1b6869651cd0cbe2cbeebc59c641f13e0e5b
Add todo for scopes permissions
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
polyaxon/scopes/permissions/scopes.py
polyaxon/scopes/permissions/scopes.py
from scopes.authentication.ephemeral import is_ephemeral_user from scopes.authentication.internal import is_internal_user from scopes.permissions.base import PolyaxonPermission class ScopesPermission(PolyaxonPermission): """ Scopes based Permissions, depends on the authentication backend. """ ENTITY =...
from scopes.authentication.ephemeral import is_ephemeral_user from scopes.authentication.internal import is_internal_user from scopes.permissions.base import PolyaxonPermission class ScopesPermission(PolyaxonPermission): """ Scopes based Permissions, depends on the authentication backend. """ ENTITY =...
apache-2.0
Python
c202a3a945453a4955f0acbf369227f8c9cee148
Rename link in init
analysiscenter/dataset
__init__.py
__init__.py
import os from .batchflow import * __path__ = [os.path.join(os.path.dirname(__file__), 'batchflow')]
import os from .dataset import * __path__ = [os.path.join(os.path.dirname(__file__), 'dataset')]
apache-2.0
Python
4a4731eda22170a77bb24dd3c7fc8ff4cafecf9d
bump version to 2.7b1
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 (...) """ __revision__ = "$Id$" # Distutils version # # Updated automatically by the Python release process. # #--start constants-- __version__ = "2.7b1" #-...
"""distutils The main package for the Python Module Distribution Utilities. Normally used from a setup script as from distutils.core import setup setup (...) """ __revision__ = "$Id$" # Distutils version # # Updated automatically by the Python release process. # #--start constants-- __version__ = "2.7a4" #-...
mit
Python
86eb16da4a6c3579eb514fa5ca73def7be8afd84
Add noqa codestyle
GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek,makinacorpus/Geotrek
geotrek/api/v2/views/__init__.py
geotrek/api/v2/views/__init__.py
from rest_framework import response, permissions from rest_framework.views import APIView from django.conf import settings from django.contrib.gis.geos import Polygon from .authent import StructureViewSet # noqa from .common import TargetPortalViewSet, ThemeViewSet, SourceViewSet, ReservationSystemViewSet, LabelViewS...
from rest_framework import response, permissions from rest_framework.views import APIView from django.conf import settings from django.contrib.gis.geos import Polygon from .authent import StructureViewSet # noqa from .common import TargetPortalViewSet, ThemeViewSet, SourceViewSet, ReservationSystemViewSet, LabelViewS...
bsd-2-clause
Python
f9a1da6e60bfbd9c9e5be769f1223d628cec6481
set the module version
brain-tec/connector,acsone/connector,hugosantosred/connector,brain-tec/connector,anybox/connector,Endika/connector,sylvain-garancher/connector,gurneyalex/connector,maljac/connector,maljac/connector,mohamedhagag/connector,esousy/connector,MindAndGo/connector,open-synergy/connector,acsone/connector,dvitme/connector,MindA...
base_external_referentials/__openerp__.py
base_external_referentials/__openerp__.py
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009 Akretion (<http://www.akretion.com>). All Rights Reserved # authors: Raphaël Valyi, Sharoon Thomas # # This program is free software: you...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009 Akretion (<http://www.akretion.com>). All Rights Reserved # authors: Raphaël Valyi, Sharoon Thomas # # This program is free software: you...
agpl-3.0
Python
6eeb2b4f79c2f735552cf7c061b48425d3299e51
Use argparse.
nbeaver/equajson
validate_equajson.py
validate_equajson.py
#! /usr/bin/env python3 import json import jsonschema import sys import os import argparse def main(equajson_path, schema_path): global filepath filepath = equajson_path with open(schema_path) as schema_file: try: equajson_schema = json.load(schema_file) except: ...
#! /usr/bin/env python3 import json import jsonschema import sys import os def main(equajson_path, schema_path): global filepath filepath = equajson_path with open(schema_path) as schema_file: try: equajson_schema = json.load(schema_file) except: s...
mit
Python
e6cb1617e588d6b276fe01c401f2c1b34cf88d5f
fix stuff
dborstelmann/Penguins-GH6,dborstelmann/Penguins-GH6,dborstelmann/Penguins-GH6
api/read.py
api/read.py
import datetime from django.http import JsonResponse from dateutil.parser import parse from django.contrib.auth.decorators import login_required from api.models import ( Applicant, Client, Disabilities, EmploymentEducation, Enrollment, HealthAndDV, IncomeBenefits, Services ) def get_applicants(request): appli...
import datetime from django.http import JsonResponse from dateutil.parser import parse from django.contrib.auth.decorators import login_required from api.models import ( Applicant, Client, Disabilities, EmploymentEducation, Enrollment, HealthAndDV, IncomeBenefits, Services ) def get_applicants(request): appli...
mit
Python
ae7b583cab8d38b04ce57571f50221b4a2e429f6
Update base.py
raiderrobert/django-webhook
webhook/base.py
webhook/base.py
""" Base webhook implementation """ import json from django.http import HttpResponse from django.views.generic import View from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt class WebhookBase(View): """ Simple Webhook base class to handle the most stand...
""" Base webhook implementation """ import json from django.http import HttpResponse from django.views.generic import View from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt class WebhookBase(View): """ Simple Webhook base class to handle the most stand...
mit
Python
46b860e93d8a9e8dda3499b7306e30ebcd0e0174
handle session stopped
rohitw1991/frappe,gangadharkadam/tailorfrappe,indictranstech/trufil-frappe,gangadharkadam/vervefrappe,letzerp/framework,gangadhar-kadam/verve_frappe,RicardoJohann/frappe,vjFaLk/frappe,gangadharkadam/v5_frappe,rohitwaghchaure/frappe,suyashphadtare/propshikhari-frappe,saurabh6790/frappe,indictranstech/ebuy-now-frappe,gan...
webnotes/app.py
webnotes/app.py
import sys, os import json sys.path.insert(0, '.') sys.path.insert(0, 'app') sys.path.insert(0, 'lib') from werkzeug.wrappers import Request, Response from werkzeug.local import LocalManager from webnotes.middlewares import StaticDataMiddleware from werkzeug.exceptions import HTTPException from werkzeug.contrib.profi...
import sys, os import json sys.path.insert(0, '.') sys.path.insert(0, 'app') sys.path.insert(0, 'lib') from werkzeug.wrappers import Request, Response from werkzeug.local import LocalManager from webnotes.middlewares import StaticDataMiddleware from werkzeug.exceptions import HTTPException from werkzeug.contrib.profi...
mit
Python
e38fa3f55b0e60a1d6c7fa0cf194e6f3bd4b899d
add histogram util
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/util/datadog/gauges.py
corehq/util/datadog/gauges.py
from functools import wraps from celery.task import periodic_task from corehq.util.datadog import statsd, datadog_logger from corehq.util.soft_assert import soft_assert def datadog_gauge_task(name, fn, run_every, enforce_prefix='commcare'): """ helper for easily registering datadog gauges to run periodically ...
from functools import wraps from celery.task import periodic_task from corehq.util.datadog import statsd, datadog_logger from corehq.util.soft_assert import soft_assert def datadog_gauge_task(name, fn, run_every, enforce_prefix='commcare'): """ helper for easily registering datadog gauges to run periodically ...
bsd-3-clause
Python
3643f0ce1b7ea7982e8081ae29e726c73471cc4b
update description
tony/vcspull,tony/vcspull
vcspull/__about__.py
vcspull/__about__.py
__title__ = 'vcspull' __package_name__ = 'vcspull' __description__ = 'synchronize your repos' __version__ = '1.0.0' __author__ = 'Tony Narlock' __email__ = 'tony@git-pull.com' __license__ = 'BSD' __copyright__ = 'Copyright 2013-2016 Tony Narlock'
__title__ = 'vcspull' __package_name__ = 'vcspull' __description__ = 'vcs project manager' __version__ = '1.0.0' __author__ = 'Tony Narlock' __email__ = 'tony@git-pull.com' __license__ = 'BSD' __copyright__ = 'Copyright 2013-2016 Tony Narlock'
mit
Python
42561d709a2ecfee71103dfbb55116cec1128b71
fix redirect after upload
ecaldwe1/zika,vecnet/zika,ecaldwe1/zika,vecnet/zika,ecaldwe1/zika,ecaldwe1/zika,ecaldwe1/zika,vecnet/zika,vecnet/zika,vecnet/zika
website/apps/home/views/UploadView.py
website/apps/home/views/UploadView.py
#!/bin/env python2 # -*- coding: utf-8 -*- # # This file is part of the VecNet Zika modeling interface. # For copyright and licensing information about this package, see the # NOTICE.txt and LICENSE.txt files in its top-level directory; they are # available at https://github.com/vecnet/zika # # This Source Code Form is...
#!/bin/env python2 # -*- coding: utf-8 -*- # # This file is part of the VecNet Zika modeling interface. # For copyright and licensing information about this package, see the # NOTICE.txt and LICENSE.txt files in its top-level directory; they are # available at https://github.com/vecnet/zika # # This Source Code Form is...
mpl-2.0
Python
c9a915692b30458717ead2f83fce77ce295e5ed9
add recipe_folder member (#10527)
conan-io/conan,conan-io/conan,conan-io/conan
conans/pylint_plugin.py
conans/pylint_plugin.py
"""Pylint plugin for ConanFile""" import astroid from astroid import MANAGER def register(linter): """Declare package as plugin This function needs to be declared so astroid treats current file as a plugin. """ pass def transform_conanfile(node): """Transform definition of ConanFile class s...
"""Pylint plugin for ConanFile""" import astroid from astroid import MANAGER def register(linter): """Declare package as plugin This function needs to be declared so astroid treats current file as a plugin. """ pass def transform_conanfile(node): """Transform definition of ConanFile class s...
mit
Python
4b5ae262bab0bc0c83555d39400049f20aaca9cd
Add CONVERSATION_LABEL_MAX_LENGTH constant
vkosuri/ChatterBot,gunthercox/ChatterBot
chatterbot/constants.py
chatterbot/constants.py
""" ChatterBot constants """ ''' The maximum length of characters that the text of a statement can contain. This should be enforced on a per-model basis by the data model for each storage adapter. ''' STATEMENT_TEXT_MAX_LENGTH = 400 ''' The maximum length of characters that the text label of a conversation can contai...
""" ChatterBot constants """ ''' The maximum length of characters that the text of a statement can contain. This should be enforced on a per-model basis by the data model for each storage adapter. ''' STATEMENT_TEXT_MAX_LENGTH = 400 # The maximum length of characters that the name of a tag can contain TAG_NAME_MAX_LE...
bsd-3-clause
Python
7a1e57fa5c6d2c6330a73e8fab95c5ef6fa0ea35
Fix indentation
thewtex/tomviz,cjh1/tomviz,cjh1/tomviz,mathturtle/tomviz,mathturtle/tomviz,OpenChemistry/tomviz,cryos/tomviz,cryos/tomviz,thewtex/tomviz,OpenChemistry/tomviz,cryos/tomviz,mathturtle/tomviz,OpenChemistry/tomviz,cjh1/tomviz,OpenChemistry/tomviz,thewtex/tomviz
tomviz/python/SetNegativeVoxelsToZero.py
tomviz/python/SetNegativeVoxelsToZero.py
def transform_scalars(dataset): """Set negative voxels to zero""" from tomviz import utils import numpy as np data = utils.get_array(dataset) data[data<0] = 0 #set negative voxels to zero # set the result as the new scalars. utils.set_array(dataset, data)
def transform_scalars(dataset): """Set negative voxels to zero""" from tomviz import utils import numpy as np data = utils.get_array(dataset) data[data<0] = 0 #set negative voxels to zero # set the result as the new scalars. utils.set_array(dataset, data)
bsd-3-clause
Python
46e2997cb51e45dc58f5a97cea6642ba64d03188
Fix 9.0 version
SerpentCS/purchase-workflow,SerpentCS/purchase-workflow,Eficent/purchase-workflow,SerpentCS/purchase-workflow,Eficent/purchase-workflow
purchase_all_shipments/__openerp__.py
purchase_all_shipments/__openerp__.py
# Author: Leonardo Pistone # Copyright 2015 Camptocamp SA # # 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 # License, or (at your option) any la...
# Author: Leonardo Pistone # Copyright 2015 Camptocamp SA # # 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 # License, or (at your option) any la...
agpl-3.0
Python
5aca45a68a229f43a25dd97d2c680716c9baabf5
add travis env to sgen
tz70s/pro-sy-kuo,tz70s/pro-sy-kuo,tz70s/pro-sy-kuo,tz70s/pro-sy-kuo
scripts/sgen.py
scripts/sgen.py
#!/usr/bin/python # Generate original static file to another with new prefix # ./sgen index.html old_prefix static_index.html new_prefix import sys from os import walk, path, environ # File lists # The two file lists should be aligned. root = environ['TRAVIS_BUILD_DIR'] files = [] for (dirpath, dirname, filenames)...
#!/usr/bin/python # Generate original static file to another with new prefix # ./sgen index.html old_prefix static_index.html new_prefix import sys from os import walk, path # File lists # The two file lists should be aligned. files = [] for (dirpath, dirname, filenames) in walk("../static"): for f in filename...
mit
Python
24cebbd351875103067162733cf682320df29cf6
Update VMfileconvert_V2.py
jcornford/pyecog
pyecog/light_code/VMfileconvert_V2.py
pyecog/light_code/VMfileconvert_V2.py
import glob, os, numpy, sys try: import stfio except: sys.path.append('C:\Python27\Lib\site-packages') import stfio def main(): searchpath = os.getcwd() exportdirectory = searchpath+'/ConvertedFiles/' # Make export directory if not os.path.exists(exportdirectory): os.mak...
import glob, os, numpy import stfio def main(): searchpath = os.getcwd() exportdirectory = searchpath+'/ConvertedFiles/' # Make export directory if not os.path.exists(exportdirectory): os.makedirs(exportdirectory) # Walk through and find abf files pattern = '*.a...
mit
Python
393bde7e7f3902f734e8c01f265b216f2d3eef26
remove leftover
DUlSine/DUlSine,DUlSine/DUlSine
models/dulsine_commons.py
models/dulsine_commons.py
# -*- coding: utf-8 -*- # vim: set ts=4 # Common enumerations used in some places CIVILITES = ( ('M.', 'Monsieur'), ('Mme', 'Madame'), ('Mlle', 'Mademoiselle') ) CIRCUITS = ( ('O', 'ouvert'), ('F', 'ferme'), ('N', 'pas de circuit') ) TYPES_ACTEURS = ( ('P', 'Professionn...
# -*- coding: utf-8 -*- # vim: set ts=4 # Common enumerations used in some places CIVILITES = ( ('M.', 'Monsieur'), ('Mme', 'Madame'), ('Mlle', 'Mademoiselle') ) CIRCUITS = ( ('O', 'ouvert'), ('F', 'ferme'), ('N', 'pas de circuit') ) TYPES_ACTEURS = ( ('P', 'Professionn...
agpl-3.0
Python
f9a99102a7053e444021926d08750f04a662fd9f
remove unnecessary print statements
jmfranck/pyspecdata,jmfranck/pyspecdata,jmfranck/pyspecdata,jmfranck/pyspecdata
pyspecdata/load_files/open_subpath.py
pyspecdata/load_files/open_subpath.py
from ..core import * from ..datadir import dirformat import os.path from zipfile import ZipFile def open_subpath(file_reference,*subpath,**kwargs): """ Parameters ---------- file_reference: str or tuple If a string, then it's the name of a directory. If it's a tuple, then, it has three ...
from ..core import * from ..datadir import dirformat import os.path from zipfile import ZipFile def open_subpath(file_reference,*subpath,**kwargs): """ Parameters ---------- file_reference: str or tuple If a string, then it's the name of a directory. If it's a tuple, then, it has three ...
bsd-3-clause
Python
ba370231fe80280dec806c7c2515061e8607b360
Add SCA into mbio
wzmao/mbio,wzmao/mbio,wzmao/mbio
Correlation/__init__.py
Correlation/__init__.py
__author__ = 'Wenzhi Mao' __all__ = [] def _Startup(): from mbio import _ABSpath global _path__ _path__ = _ABSpath() from os import path Clist = ['mi.c', 'omes.c'] for c in Clist: if not path.exists(_path__+'/'+c.replace('.c', '_c.so')): from mbio import _make ...
__author__ = 'Wenzhi Mao' __all__ = [] def _Startup(): from mbio import _ABSpath global _path__ _path__ = _ABSpath() from os import path Clist = ['mi.c', 'omes.c'] for c in Clist: if not path.exists(_path__+'/'+c.replace('.c', '_c.so')): from mbio import _make ...
mit
Python
2277c82efdc456e5873987eabac88810b2cece5b
Fix pep8 whitespace violation.
chauhanhardik/populo,openfun/edx-platform,gsehub/edx-platform,Edraak/circleci-edx-platform,chauhanhardik/populo_2,simbs/edx-platform,nikolas/edx-platform,mcgachey/edx-platform,rue89-tech/edx-platform,AkA84/edx-platform,synergeticsedx/deployment-wipro,4eek/edx-platform,LICEF/edx-platform,TeachAtTUM/edx-platform,JCBaraho...
lms/djangoapps/courseware/features/video.py
lms/djangoapps/courseware/features/video.py
#pylint: disable=C0111 from lettuce import world, step from common import * ############### ACTIONS #################### @step('when I view it it does autoplay') def does_autoplay(step): assert(world.css_find('.video')[0]['data-autoplay'] == 'True') @step('the course has a Video component') def view_video(ste...
#pylint: disable=C0111 from lettuce import world, step from common import * ############### ACTIONS #################### @step('when I view it it does autoplay') def does_autoplay(step): assert(world.css_find('.video')[0]['data-autoplay'] == 'True') @step('the course has a Video component') def view_video(ste...
agpl-3.0
Python
54b0feebb18816a936f4a7f323a77808f9973eb2
Update testes.py
kauaramirez/devops-aula05
Src/testes.py
Src/testes.py
import jogovelha import sys erroInicializar = False jogo = jogovelha.inicializar() if len(jogo) != 3: erroInicializar = True else: for linha in jogo: if len(linha) != 3: erroInicializar = True else: for elemento in linha: if elemento != "X": ...
import jogovelha import sys erroInicializar = False jogo = jogovelha.inicializar() if len(jogo) != 3: erroInicializar = True else: for linha in jogo: if len(linha) != 3: erroInicializar = True else: for elemento in linha: if elemento != ".": ...
apache-2.0
Python
73ceff96b2f065517a7d67cb0b25361f5bd61388
Delete fixture after running tests
cpsaltis/pythogram-core
src/gramcore/filters/tests/test_edges.py
src/gramcore/filters/tests/test_edges.py
"""Tests for module gramcore.filters.edges""" import os import numpy from PIL import Image, ImageDraw from nose.tools import assert_equal from skimage import io from gramcore.filters import edges def setup(): """Create image fixture The background color is set by default to black (value == 0). .. not...
"""Tests for module gramcore.filters.edges""" import os import numpy from PIL import Image, ImageDraw from nose.tools import assert_equal from skimage import io from gramcore.filters import edges def setup(): """Create image fixture The background color is set by default to black (value == 0). .. not...
mit
Python
bd8caf6ab48bb1fbefdced7f33edabbdf017894a
Change of names
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Demo/sockets/echosvr.py
Demo/sockets/echosvr.py
#! /usr/local/python # Python implementation of an 'echo' tcp server: echo all data it receives. # # This is the simplest possible server, sevicing a single request only. import sys from socket import * # The standard echo port isn't very useful, it requires root permissions! # ECHO_PORT = 7 ECHO_PORT = 50000 + 7 BU...
#! /usr/local/python # Python implementation of an 'echo' tcp server: echo all data it receives. # # This is the simplest possible server, sevicing a single request only. import sys from socket import * # The standard echo port isn't very useful, it requires root permissions! # ECHO_PORT = 7 ECHO_PORT = 50000 + 7 BU...
mit
Python
dac5de12f9e775d50bb1e441016ae9625052e149
expand ALLOWED_HOSTS
uktrade/navigator,uktrade/navigator,uktrade/navigator,uktrade/navigator
app/navigator/settings/prod.py
app/navigator/settings/prod.py
from .base import * DEBUG = False # As the app is running behind a host-based router supplied by Heroku or other # PaaS, we can open ALLOWED_HOSTS ALLOWED_HOSTS = ['*'] INSTALLED_APPS += [ 'raven.contrib.django.raven_compat' ] SECURE_SSL_REDIRECT = True SECURE_HSTS_SECONDS = 31536000 SESSION_COOKIE_SECURE = Tru...
from .base import * DEBUG = False ALLOWED_HOSTS = [ 'selling-online-overseas.export.great.gov.uk', 'navigator.cloudapps.digital', 'navigator.london.cloudapps.digital', 'www.great.gov.uk'] INSTALLED_APPS += [ 'raven.contrib.django.raven_compat' ] SECURE_SSL_REDIRECT = True SECURE_HSTS_SECONDS = 31...
mit
Python
64804965e031f365937ef8fe70dc749c4532053d
fix abstract scraper, can't use lxml's url parsing because we need a custom user agent
texastribune/the-dp,texastribune/the-dp,texastribune/the-dp,texastribune/the-dp
tx_highered/scripts/initial_wikipedia.py
tx_highered/scripts/initial_wikipedia.py
#! /usr/bin/env python try: from django.utils.timezone import now except ImportError: from datetime.datetime import now import requests from lxml.html import document_fromstring, tostring from tx_highered.models import Institution def get_wiki_title(name): endpoint = "http://en.wikipedia.org/w/api.php" ...
#! /usr/bin/env python import datetime import requests from lxml.html import parse, tostring from tx_highered.models import Institution def get_wiki_title(name): endpoint = "http://en.wikipedia.org/w/api.php" params = dict(action="opensearch", search=name, limit=1, namespace=0, ...
apache-2.0
Python
db3f71f537a85396d777ba28d3ad6c8156137c24
Change pg key
juruen/cavalieri,juruen/cavalieri,juruen/cavalieri,juruen/cavalieri
src/python/pagerduty.py
src/python/pagerduty.py
import json import urllib2 PD_URL = "https://events.pagerduty.com/generic/2010-04-15/create_event.json" TIMEOUT = 10 def request(action, json_str): obj = json.loads(json_str) description = "%s %s is %s ( %s )" % ( obj.get('host', 'unknown host'), obj.get('service', 'unknown service'),...
import json import urllib2 PD_URL = "https://events.pagerduty.com/generic/2010-04-15/create_event.json" TIMEOUT = 10 def request(action, json_str): obj = json.loads(json_str) description = "%s %s is %s ( %s )" % ( obj.get('host', 'unknown host'), obj.get('service', 'unknown service'),...
mit
Python
3999e9812a766066dcccf6a4d07174144cb9f72d
Add Minecraft Wiki link to version item
wurstmineberg/bitbar-server-status
wurstmineberg.45s.py
wurstmineberg.45s.py
#!/usr/local/bin/python3 import requests people = requests.get('https://api.wurstmineberg.de/v2/people.json').json() status = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json() print(len(status['list'])) print('---') print('Version: {ver}|href=http://minecraft.gamepedia.com/{ver}...
#!/usr/local/bin/python3 import requests people = requests.get('https://api.wurstmineberg.de/v2/people.json').json() status = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json() print(len(status['list'])) print('---') print('Version: {}|color=gray'.format(status['version'])) for w...
mit
Python
d792201bc311a15e5df48259008331b771c59aca
Fix CSS problem when Flexx is enbedded in page-app
jrversteegh/flexx,JohnLunzer/flexx,zoofIO/flexx,JohnLunzer/flexx,jrversteegh/flexx,JohnLunzer/flexx,zoofIO/flexx
flexx/ui/layouts/_layout.py
flexx/ui/layouts/_layout.py
""" Layout widgets """ from . import Widget class Layout(Widget): """ Abstract class for widgets that organize their child widgets. Panel widgets are layouts that do not take the natural size of their content into account, making them more efficient and suited for high-level layout. Other layout...
""" Layout widgets """ from . import Widget class Layout(Widget): """ Abstract class for widgets that organize their child widgets. Panel widgets are layouts that do not take the natural size of their content into account, making them more efficient and suited for high-level layout. Other layout...
bsd-2-clause
Python
a9cfdf8fdb6853f175cdc31abc2dec91ec6dcf3a
fix import
SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree
InvenTree/part/tasks.py
InvenTree/part/tasks.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from django.utils.translation import gettext_lazy as _ import InvenTree.helpers import InvenTree.tasks import common.notifications import part.models logger = logging.getLogger("inventree") def notify_low_stock(part: part.models.Part)...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from django.utils.translation import gettext_lazy as _ import InvenTree.helpers import InvenTree.tasks import common.notifications import part.models from part import tasks as part_tasks logger = logging.getLogger("inventree") def not...
mit
Python
26a21a9f5da718852c193420a0132ad822139ec0
Remove PHPBB crap
ronakkhunt/kuma,hoosteeno/kuma,surajssd/kuma,ollie314/kuma,chirilo/kuma,ronakkhunt/kuma,Elchi3/kuma,bluemini/kuma,safwanrahman/kuma,davehunt/kuma,scrollback/kuma,safwanrahman/kuma,groovecoder/kuma,hoosteeno/kuma,cindyyu/kuma,MenZil/kuma,anaran/kuma,robhudson/kuma,darkwing/kuma,mozilla/kuma,utkbansal/kuma,SphinxKnight/k...
apps/devmo/context_processors.py
apps/devmo/context_processors.py
from django.conf import settings from django.utils import translation def i18n(request): return {'LANGUAGES': settings.LANGUAGES, 'LANG': settings.LANGUAGE_URL_MAP.get(translation.get_language()) or translation.get_language(), 'DIR': 'rtl' if translation.get_language_bi...
from django.conf import settings from django.utils import translation def i18n(request): return {'LANGUAGES': settings.LANGUAGES, 'LANG': settings.LANGUAGE_URL_MAP.get(translation.get_language()) or translation.get_language(), 'DIR': 'rtl' if translation.get_language_bi...
mpl-2.0
Python
2bf43e3ba86cc248e752175ffb82f4eab1803119
delete question module had bug previously
unicefuganda/uSurvey,unicefuganda/uSurvey,unicefuganda/uSurvey,unicefuganda/uSurvey,unicefuganda/uSurvey
survey/models/question_module.py
survey/models/question_module.py
from survey.models import BaseModel from django.db import models class QuestionModule(BaseModel): name = models.CharField(max_length=255) description = models.TextField(null=True, blank=True) def remove_related_questions(self): self.question_templates.all().delete() def __unicode__(self): ...
from survey.models import BaseModel from django.db import models class QuestionModule(BaseModel): name = models.CharField(max_length=255) description = models.TextField(null=True, blank=True) def remove_related_questions(self): self.question_templates.delete() def __unicode__(self): ...
bsd-3-clause
Python
e21e2ff9b8258be5533261f7834438c80b0082cc
Use iter(...) instead of .iter()
jeffreyliu3230/osf.io,hmoco/osf.io,jmcarp/osf.io,kwierman/osf.io,felliott/osf.io,pattisdr/osf.io,arpitar/osf.io,brianjgeiger/osf.io,mfraezz/osf.io,jinluyuan/osf.io,MerlinZhang/osf.io,caseyrollins/osf.io,RomanZWang/osf.io,brianjgeiger/osf.io,kch8qx/osf.io,acshi/osf.io,rdhyee/osf.io,haoyuchen1992/osf.io,cslzchen/osf.io,m...
framework/tasks/handlers.py
framework/tasks/handlers.py
# -*- coding: utf-8 -*- import logging import functools from flask import g from celery import group from website import settings logger = logging.getLogger(__name__) def celery_before_request(): g._celery_tasks = [] def celery_teardown_request(error=None): if error is not None: return try:...
# -*- coding: utf-8 -*- import logging import functools from flask import g from celery import group from website import settings logger = logging.getLogger(__name__) def celery_before_request(): g._celery_tasks = [] def celery_teardown_request(error=None): if error is not None: return try:...
apache-2.0
Python
9e2f9b040d0dde3237daca1c483c8b2bf0170663
Update Arch package to 2.7
bowlofstew/packages,biicode/packages,biicode/packages,bowlofstew/packages
archlinux/archpack_settings.py
archlinux/archpack_settings.py
# # Biicode Arch Linux package settings. # # Check PKGBUILD_template docs for those settings and # what they mean. # def settings(): return { "version": "2.7", "release_number": "1", "arch_deps": ["cmake>=3.0.2", "zlib", "glibc", "sqlite", ...
# # Biicode Arch Linux package settings. # # Check PKGBUILD_template docs for those settings and # what they mean. # def settings(): return { "version": "2.6.1", "release_number": "1", "arch_deps": ["cmake>=3.0.2", "zlib", "glibc", "sqlite", ...
bsd-2-clause
Python
ecd33e00eb5eb8ff58358e01a6d618262e8381a6
Update upstream version of vo
larrybradley/astropy,MSeifert04/astropy,tbabej/astropy,dhomeier/astropy,tbabej/astropy,StuartLittlefair/astropy,mhvk/astropy,astropy/astropy,lpsinger/astropy,DougBurke/astropy,aleksandr-bakanov/astropy,StuartLittlefair/astropy,dhomeier/astropy,joergdietrich/astropy,MSeifert04/astropy,stargaser/astropy,pllim/astropy,Stu...
astropy/io/vo/setup_package.py
astropy/io/vo/setup_package.py
from distutils.core import Extension from os.path import join from astropy import setup_helpers def get_extensions(build_type='release'): VO_DIR = 'astropy/io/vo/src' return [Extension( "astropy.io.vo.tablewriter", [join(VO_DIR, "tablewriter.c")], include_dirs=[VO_DIR])] def get_pa...
from distutils.core import Extension from os.path import join from astropy import setup_helpers def get_extensions(build_type='release'): VO_DIR = 'astropy/io/vo/src' return [Extension( "astropy.io.vo.tablewriter", [join(VO_DIR, "tablewriter.c")], include_dirs=[VO_DIR])] def get_pa...
bsd-3-clause
Python
dc7ac28109609e2a90856dbaf01ae8bbb2fd6985
Repair the test (adding a docstring to the module type changed the docstring for an uninitialized module object).
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/test_module.py
Lib/test/test_module.py
# Test the module type from test_support import verify, vereq, verbose, TestFailed import sys module = type(sys) # An uninitialized module has no __dict__ or __name__, and __doc__ is None foo = module.__new__(module) verify(foo.__dict__ is None) try: s = foo.__name__ except AttributeError: pass else: rai...
# Test the module type from test_support import verify, vereq, verbose, TestFailed import sys module = type(sys) # An uninitialized module has no __dict__ or __name__, and __doc__ is None foo = module.__new__(module) verify(foo.__dict__ is None) try: s = foo.__name__ except AttributeError: pass else: rai...
mit
Python
5abac5e7cdc1d67ec6ed0996a5b132fae20af530
Use the URLs input in the UI boxes
scraperwiki/difference-tool,scraperwiki/difference-tool,scraperwiki/difference-tool,scraperwiki/difference-tool
compare_text_of_urls.py
compare_text_of_urls.py
#!/usr/bin/env python from __future__ import print_function import json import os from os.path import join, dirname, abspath import subprocess import sys from get_text_from_url import process_page def main(argv=None): if argv is None: argv = sys.argv arg = argv[1:] # Enter two URLs with a spac...
#!/usr/bin/env python from __future__ import print_function import json import os from os.path import join, dirname, abspath import subprocess import sys from get_text_from_url import process_page def main(argv=None): if argv is None: argv = sys.argv arg = argv[1:] # Enter two URLs with a spac...
agpl-3.0
Python
f81c36d4fe31815ed6692b573ad660067151d215
Drop use of 'oslo' namespace package
openstack/python-zaqarclient
zaqarclient/_i18n.py
zaqarclient/_i18n.py
# Copyright 2014 Red Hat, 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 by...
# Copyright 2014 Red Hat, 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 by...
apache-2.0
Python
962114f65db5de4a0e58ebec93ec8f06147ae790
add RAMONVolume#data
neurodata/ndio,jhuapl-boss/intern,neurodata/ndio,neurodata/ndio,openconnectome/ndio
ndio/ramon/RAMONVolume.py
ndio/ramon/RAMONVolume.py
from __future__ import absolute_import from .enums import * from .errors import * import numpy from .RAMONBase import RAMONBase class RAMONVolume(RAMONBase): """ RAMONVolume Object for storing neuroscience data with a voxel volume """ def __init__(self, xyz_offset=(0, 0, 0), ...
from __future__ import absolute_import from .enums import * from .errors import * import numpy from .RAMONBase import RAMONBase class RAMONVolume(RAMONBase): """ RAMONVolume Object for storing neuroscience data with a voxel volume """ def __init__(self, xyz_offset=(0, 0, 0), ...
apache-2.0
Python
1cba70e91b6592253a74d2c030e9c57faf0a1485
add header to backend.py
Mustard-Systems-Ltd/pyzmq,yyt030/pyzmq,Mustard-Systems-Ltd/pyzmq,swn1/pyzmq,caidongyun/pyzmq,Mustard-Systems-Ltd/pyzmq,dash-dash/pyzmq,swn1/pyzmq,caidongyun/pyzmq,dash-dash/pyzmq,ArvinPan/pyzmq,ArvinPan/pyzmq,ArvinPan/pyzmq,dash-dash/pyzmq,caidongyun/pyzmq,yyt030/pyzmq,yyt030/pyzmq,swn1/pyzmq
zmq/sugar/backend.py
zmq/sugar/backend.py
"""Import basic exposure of libzmq C API as a backend""" #----------------------------------------------------------------------------- # Copyright (C) 2013 Brian Granger, Min Ragan-Kelley # # This file is part of pyzmq # # Distributed under the terms of the New BSD License. The full license is in # the file COPY...
# this will be try/except when other try: from zmq.core import ( Context, Socket, IPC_PATH_MAX_LEN, Frame, Message, Stopwatch, device, proxy, strerror, zmq_errno, zmq_poll, zmq_version_info, constants, ) except ImportError: # here will ...
bsd-3-clause
Python
9d3d06e760cb4210405a3b720eb67c5da0478f72
remove succes_message variable
adnedelcu/SyncSettings,mfuentesg/SyncSettings
sync_settings/thread_progress.py
sync_settings/thread_progress.py
# -*- coding: utf-8 -*- #Credits to @wbond package_control import sublime, threading class ThreadProgress(): """ Animates an indicator, [= ], in the status area while a thread runs :param thread: The thread to track for activity :param message: The message to display next to the activit...
# -*- coding: utf-8 -*- #Credits to @wbond package_control import sublime, threading class ThreadProgress(): """ Animates an indicator, [= ], in the status area while a thread runs :param thread: The thread to track for activity :param message: The message to display next to the activit...
mit
Python
c691c256682bec5f9a242ab71ab42d296bbf88a9
Add `Post`, `Tag` models to Admin
avinassh/nightreads,avinassh/nightreads
nightreads/posts/admin.py
nightreads/posts/admin.py
from django.contrib import admin from .models import Post, Tag admin.site.register(Post) admin.site.register(Tag)
from django.contrib import admin # Register your models here.
mit
Python
e77380401d04feb1ff283add4dca9f6bad57f330
Rewrite order/tests/MemberViewTests.
noracami/haveaniceday,noracami/haveaniceday
haveaniceday/order/tests.py
haveaniceday/order/tests.py
from django.test import TestCase from .models import Member from website_component.models import CustomWebPage, CustomComponent # Create your tests here. class OrderViewTests(TestCase): def test_order_view(self): response = self.client.get('/order/') self.assertEqual(response.status_code, 200) ...
from django.test import TestCase from .models import Member # Create your tests here. class OrderViewTests(TestCase): def test_order_view(self): response = self.client.get('/order/') self.assertEqual(response.status_code, 200) self.assertTemplateUsed(response, 'order/home.html') class Memb...
mit
Python
4f2b4b07131c462873b87b869e8df1de41af5848
Add some test code
morrislab/rnascan,morrislab/rnascan,morrislab/rnascan,morrislab/rnascan
RNACompete/SeqStruct.py
RNACompete/SeqStruct.py
# Copyright 2000-2002 Brad Chapman. # Copyright 2004-2005 by M de Hoon. # Copyright 2007-2015 by Peter Cock. # All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # Modified Copyright...
# Copyright 2000-2002 Brad Chapman. # Copyright 2004-2005 by M de Hoon. # Copyright 2007-2015 by Peter Cock. # All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # Modified Copyright...
agpl-3.0
Python
951c0dbcfeb016dbde6e1a7a3f0eacc506c9211e
Rename sockjs router prefix to /ws/api/
jessamynsmith/boards-backend,jessamynsmith/boards-backend,GetBlimp/boards-backend
ws.py
ws.py
import json from tornado import web, ioloop from sockjs.tornado import SockJSRouter, SockJSConnection from blimp.utils.websockets import WebSocketsRequest class RESTAPIConnection(SockJSConnection): def on_open(self, info): self.send_json({'connected': True}) def on_message(self, data): resp...
import json from tornado import web, ioloop from sockjs.tornado import SockJSRouter, SockJSConnection from blimp.utils.websockets import WebSocketsRequest class EchoConnection(SockJSConnection): def on_open(self, info): self.send_json({'connected': True}) def on_message(self, data): respons...
agpl-3.0
Python
4fe8a1c1b294f0d75a901d4e8e80f47f5583e44e
Fix for test failure introduced by basic auth changes
edx/edx-e2e-tests,raeeschachar/edx-e2e-mirror,raeeschachar/edx-e2e-mirror,edx/edx-e2e-tests
pages/lms/info.py
pages/lms/info.py
from e2e_framework.page_object import PageObject from ..lms import BASE_URL class InfoPage(PageObject): """ Info pages for the main site. These are basically static pages, so we use one page object to represent them all. """ # Dictionary mapping section names to URL paths SECTION_PATH = {...
from e2e_framework.page_object import PageObject from ..lms import BASE_URL class InfoPage(PageObject): """ Info pages for the main site. These are basically static pages, so we use one page object to represent them all. """ # Dictionary mapping section names to URL paths SECTION_PATH = {...
agpl-3.0
Python
4d942291734641bbdd6a71e16167fefca37a68e7
Fix default config file path on auto creation
eiginn/passpie,marcwebbie/passpie,scorphus/passpie,scorphus/passpie,marcwebbie/passpie,eiginn/passpie
passpie/config.py
passpie/config.py
import copy import logging import os import yaml DEFAULT_CONFIG_PATH = os.path.join(os.path.expanduser('~'), '.passpierc') DB_DEFAULT_PATH = os.path.join(os.path.expanduser('~'), '.passpie') DEFAULT_CONFIG = { 'path': DB_DEFAULT_PATH, 'short_commands': False, 'key_length': 4096, 'genpass_length': 32,...
import copy import logging import os import yaml DEFAULT_CONFIG_PATH = os.path.join(os.path.expanduser('~'), '.passpierc') DB_DEFAULT_PATH = os.path.join(os.path.expanduser('~'), '.passpie') DEFAULT_CONFIG = { 'path': DB_DEFAULT_PATH, 'short_commands': False, 'key_length': 4096, 'genpass_length': 32,...
mit
Python
2559fa50a80ac90f36c3aed251bf397f1af83dd2
bump version to 0.1b2
fkmclane/paste,fkmclane/paste
paste/__init__.py
paste/__init__.py
name = 'paste' version = '0.1b2'
name = 'paste' version = '0.1b1'
mit
Python
a9808c822e598fd17148b8fc4063ea11f0a270e9
Add bawler specific exception
beezz/pg_bawler,beezz/pg_bawler
pg_bawler/core.py
pg_bawler/core.py
''' ============== pg_bawler.core ============== Base classes for LISTEN / NOTIFY. Postgresql documentation for `LISTEN <https://www.postgresql.org/docs/current/static/sql-listen.html>`_ / `NOTIFY <https://www.postgresql.org/docs/current/static/sql-notify.html>`_. ''' import asyncio import logging import aiopg LOG...
''' ============== pg_bawler.core ============== Base classes for LISTEN / NOTIFY. Postgresql documentation for `LISTEN <https://www.postgresql.org/docs/current/static/sql-listen.html>`_ / `NOTIFY <https://www.postgresql.org/docs/current/static/sql-notify.html>`_. ''' import asyncio import logging import aiopg LOG...
bsd-3-clause
Python
d350c180606060e9539c12d7d49eed4d6802ac8b
Bump to 1.1.5
kezabelle/pilkit,fladi/pilkit
pilkit/pkgmeta.py
pilkit/pkgmeta.py
__title__ = 'pilkit' __author__ = 'Matthew Tretter' __version__ = '1.1.5' __license__ = 'BSD' __all__ = ['__title__', '__author__', '__version__', '__license__']
__title__ = 'pilkit' __author__ = 'Matthew Tretter' __version__ = '1.1.4' __license__ = 'BSD' __all__ = ['__title__', '__author__', '__version__', '__license__']
bsd-3-clause
Python
3ce78ad88d8c963dfb819b323b40b2415d8624b2
Split create user feature into two functions
brianquach/udacity-nano-fullstack-game
api.py
api.py
#!/usr/bin/env python """ Copyright 2016 Brian Quach Licensed under MIT (https://github.com/brianquach/udacity-nano-fullstack-conference/blob/master/LICENSE) # noqa """ import endpoints from protorpc import remote from resource import StringMessage from resource import USER_REQUEST @endpoints.api(name='poker', ver...
#!/usr/bin/env python """ Copyright 2016 Brian Quach Licensed under MIT (https://github.com/brianquach/udacity-nano-fullstack-conference/blob/master/LICENSE) # noqa """ import endpoints from protorpc import remote from resource import StringMessage from resource import USER_REQUEST @endpoints.api(name='poker', ver...
mit
Python
ce8ba26877505481795edd024c3859b14c548ffd
Refactor comics.py
dhinakg/BitSTAR,StarbotDiscord/Starbot,dhinakg/BitSTAR,StarbotDiscord/Starbot
plugins/comics.py
plugins/comics.py
# Copyright 2017 Starbot Discord Project # # 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...
# Copyright 2017 Starbot Discord Project # # 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
318e6b5fd2382766c065574f6b202fd09e68cf6e
increment version #
lfairchild/PmagPy,lfairchild/PmagPy,lfairchild/PmagPy
pmagpy/version.py
pmagpy/version.py
""" Module contains current pmagpy version number. Version number is displayed by GUIs and used by setuptools to assign number to pmagpy/pmagpy-cli. """ "pmagpy-3.11.1" version = 'pmagpy-3.11.1'
""" Module contains current pmagpy version number. Version number is displayed by GUIs and used by setuptools to assign number to pmagpy/pmagpy-cli. """ "pmagpy-3.11.0" version = 'pmagpy-3.11.0'
bsd-3-clause
Python
7150413cccbf8f812b3fd4a1fc2b82a4020aed9f
fix heroku postgresql path to allow sqlalchemy upgrade
Impactstory/paperbuzz-api,Impactstory/paperbuzz-api
app.py
app.py
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_compress import Compress from flask_debugtoolbar import DebugToolbarExtension import sentry_sdk from sentry_sdk.integrations.flask import FlaskIntegration from sqlalchemy.pool import NullPool import logging import sys import os import requests...
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_compress import Compress from flask_debugtoolbar import DebugToolbarExtension import sentry_sdk from sentry_sdk.integrations.flask import FlaskIntegration from sqlalchemy.pool import NullPool import logging import sys import os import requests...
mit
Python
b8bf769d55a61f9d29b15c4b657d9df293045304
convert to int
cbott/RobotServer,cbott/RobotServer,cbott/RobotServer
app.py
app.py
#!/usr/bin/env python from flask import Flask, render_template, Response, request from i2c import I2C from camera_pi import Camera RobotArduino = I2C(); #The robot's arduino controller app = Flask(__name__, template_folder='site') @app.route('/') def index(): """Main page: controller + video stream""" return...
#!/usr/bin/env python from flask import Flask, render_template, Response, request from i2c import I2C from camera_pi import Camera RobotArduino = I2C(); #The robot's arduino controller app = Flask(__name__, template_folder='site') @app.route('/') def index(): """Main page: controller + video stream""" return...
mit
Python
f67807b0f2064e1c6374fe4c10ed87c7a9222426
mark all events after processing it
Zauberstuhl/foaasBot
bot.py
bot.py
#! /usr/bin/env python from time import gmtime, strftime from foaas import foaas from diaspy_client import Client import re import urllib2 def log_write(text): f = open('bot.log', 'a') f.write(strftime("%a, %d %b %Y %H:%M:%S ", gmtime())) f.write(text) f.write('\n') f.close() client=Client() notify = clie...
#! /usr/bin/env python from time import gmtime, strftime from foaas import foaas from diaspy_client import Client import re import urllib2 def log_write(text): f = open('bot.log', 'a') f.write(strftime("%a, %d %b %Y %H:%M:%S ", gmtime())) f.write(text) f.write('\n') f.close() client=Client() notify = clie...
mit
Python
fae0989a5dc6886b11896f6ba5c6484cd1c1f735
Fix error on unknown command and blank game name
flukiluke/eris
bot.py
bot.py
import asyncio import discord import text_adventure class Bot(object): def __init__(self, client, config): self.client = client self.config = config self.game_obj = None @asyncio.coroutine def do_command(self, message, command, *args): try: yield from getattr(se...
import asyncio import discord import text_adventure class Bot(object): def __init__(self, client, config): self.client = client self.config = config self.game_obj = None @asyncio.coroutine def do_command(self, message, command, *args): yield from getattr(self, command)(mess...
mit
Python
b8fb30a06ff15000a2d7542e7089b6c8ac1074e5
Add --allow-drilled flag to cli.py, and increase recursion limit
matthewearl/strippy
cli.py
cli.py
# Copyright (c) 2015 Matthew Earl # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distr...
# Copyright (c) 2015 Matthew Earl # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distr...
mit
Python
2352ce413cebb9f0fd7b1f26bb33bd0325abedfd
make more pylint friendly
rouault/pycsw,kalxas/pycsw,PublicaMundi/pycsw,geopython/pycsw,mwengren/pycsw,benhowell/pycsw,kevinpdavies/pycsw,ingenieroariel/pycsw,tomkralidis/pycsw,ricardogsilva/pycsw,ckan-fcd/pycsw-fcd,tomkralidis/pycsw,rouault/pycsw,benhowell/pycsw,mwengren/pycsw,kalxas/pycsw,kalxas/pycsw,ricardogsilva/pycsw,ocefpaf/pycsw,bukun/p...
csw.py
csw.py
#!/usr/bin/python -u # -*- coding: ISO-8859-15 -*- # ================================================================= # # $Id$ # # Authors: Tom Kralidis <tomkralidis@hotmail.com> # # Copyright (c) 2010 Tom Kralidis # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and ...
#!/usr/bin/python -u # -*- coding: ISO-8859-15 -*- # ================================================================= # # $Id$ # # Authors: Tom Kralidis <tomkralidis@hotmail.com> # # Copyright (c) 2010 Tom Kralidis # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and ...
mit
Python
22aead72594e5aa7047858c04beb3018e93c59fe
Revert "started 0.2.x"
vsemionov/boomerang,vsemionov/boomerang,vsemionov/boomerang
api/apps.py
api/apps.py
from __future__ import unicode_literals from django.apps import AppConfig APP_NAME = 'vsemionov.notes.api' APP_VERSION = '0.1.0' class ApiConfig(AppConfig): name = 'api'
from __future__ import unicode_literals from django.apps import AppConfig APP_NAME = 'vsemionov.notes.api' APP_VERSION = '0.2' class ApiConfig(AppConfig): name = 'api'
mit
Python
492005db9a7c34b2648de8b7335bdbdd18ffb13b
Update setup.py with release version.
google/gps_building_blocks,google/gps_building_blocks
py/setup.py
py/setup.py
# Lint as: python3 # Copyright 2020 Google LLC # # 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 agr...
# Lint as: python3 # Copyright 2020 Google LLC # # 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 agr...
apache-2.0
Python
d31d767ec4c4452e8a1d5f9dd896ade19e4ac645
Fix tests
martmists/asynctwitch
run_test.py
run_test.py
import asynctwitch as at class Bot(at.CommandBot, at.RankedBot): pass bot = Bot( user='justinfan100' # read-only client ) @bot.command("test", desc="Some test command") async def test(m, arg1:int): pass bot.add_rank("test rank", points=10) @bot.override async def raw_event(data): print(data) @bot...
import asynctwitch as at class Bot(at.CommandBot, at.RankedBot): pass bot = Bot( user='justinfan100' # read-only client ) @bot.command("test", desc="Some test command") async def test(m, arg1:int): pass bot.add_rank("test rank", points=10) @bot.override async def raw_event(data): print(data) @bot...
bsd-3-clause
Python
38a086d2c5ebf73f7ad0108def2304262a2e0452
Add trailing comma
pinax/phileo,pinax/pinax-likes,pinax/phileo
runtests.py
runtests.py
#!/usr/bin/env python import os import sys import django from django.conf import settings DEFAULT_SETTINGS = dict( INSTALLED_APPS=[ "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.sites", "pinax.likes", "pinax.likes...
#!/usr/bin/env python import os import sys import django from django.conf import settings DEFAULT_SETTINGS = dict( INSTALLED_APPS=[ "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.sites", "pinax.likes", "pinax.likes...
mit
Python
cc626bef4bb9ad4888362476a3ce9f92154f7d53
Resolve #74 -- Use result.get instastad of ready
KristianOellegaard/django-health-check,KristianOellegaard/django-health-check
health_check/contrib/celery/plugin_health_check.py
health_check/contrib/celery/plugin_health_check.py
# -*- coding: utf-8 -*- from datetime import datetime, timedelta from django.conf import settings from health_check.backends.base import ( BaseHealthCheckBackend, ServiceUnavailable, ServiceReturnedUnexpectedResult) from health_check.plugins import plugin_dir from .tasks import add class CeleryHealthCheck(B...
# -*- coding: utf-8 -*- from datetime import datetime, timedelta from time import sleep from django.conf import settings from health_check.backends.base import ( BaseHealthCheckBackend, ServiceUnavailable ) from health_check.plugins import plugin_dir from .tasks import add class CeleryHealthCheck(BaseHealthChec...
mit
Python
f641c4be6e88aac1e1968ca8f07c5294d4dfe6fa
Bump version
initios/factura-pdf
facturapdf/__about__.py
facturapdf/__about__.py
__title__ = 'facturapdf' __summary__ = 'Create PDF invoice according to Spanish regulations.' __version__ = '0.0.3' __license__ = 'BSD 3-Clause License' __uri__ = 'https://github.com/initios/factura-pdf' __author__ = 'Carlos Goce' __email__ = 'cgonzalez@initios.com'
__title__ = 'facturapdf' __summary__ = 'Create PDF invoice according to Spanish regulations.' __version__ = '0.0.2' __license__ = 'BSD 3-Clause License' __uri__ = 'https://github.com/initios/factura-pdf' __author__ = 'Carlos Goce' __email__ = 'cgonzalez@initios.com'
bsd-3-clause
Python
1e3199618f55be86fa5e4259d1c6e4a7074e57ca
Update environment.py
RaulAlvarez/selenide
features/environment.py
features/environment.py
""" Copyright 2017 Raul Alvarez 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 writ...
""" Copyright 2017 Raul Alvarez 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 writ...
apache-2.0
Python
576ea74646935c00e051a46244b8f56165710df0
Add multicast send
eriol/circuits,treemo/circuits,treemo/circuits,treemo/circuits,eriol/circuits,nizox/circuits,eriol/circuits
circuits/node/server.py
circuits/node/server.py
# Module: server # Date: ... # Author: ... """Server ... """ from circuits.net.sockets import TCPServer from circuits import handler, BaseComponent from .protocol import Protocol class Server(BaseComponent): """Server ... """ channel = 'node' __protocol = {} def __init__(self, b...
# Module: server # Date: ... # Author: ... """Server ... """ from circuits.net.sockets import TCPServer from circuits import handler, BaseComponent from .protocol import Protocol class Server(BaseComponent): """Server ... """ channel = 'node' __protocol = {} def __init__(self, b...
mit
Python
8c68031928f54d38c92308504bc93bf61ead57f5
Update clashcallerbot_reply.py added get list of messages older than current datetime, updated outline
JoseALermaIII/clashcallerbot-reddit,JoseALermaIII/clashcallerbot-reddit
clashcallerbot_reply.py
clashcallerbot_reply.py
#! python3 # -*- coding: utf-8 -*- """Checks messages in database and sends PM if expiration time passed. This module checks messages saved in a MySQL-compatible database and sends a reminder via PM if the expiration time has passed. If so, the message is removed from the database. """ import praw import praw.excepti...
#! python3 # -*- coding: utf-8 -*- """Checks messages in database and sends PM if expiration time passed. This module checks messages saved in a MySQL-compatible database and sends a reminder via PM if the expiration time has passed. If so, the message is removed from the database. """ import praw import praw.excepti...
mit
Python
2cbae4650422f7982ef50e564e9e27e7fd294be8
Add ability to nix product to admin
Ritsyy/fjord,lgp171188/fjord,mozilla/fjord,DESHRAJ/fjord,hoosteeno/fjord,DESHRAJ/fjord,Ritsyy/fjord,hoosteeno/fjord,rlr/fjord,staranjeet/fjord,lgp171188/fjord,Ritsyy/fjord,staranjeet/fjord,hoosteeno/fjord,lgp171188/fjord,rlr/fjord,staranjeet/fjord,mozilla/fjord,mozilla/fjord,mozilla/fjord,lgp171188/fjord,Ritsyy/fjord,r...
fjord/feedback/admin.py
fjord/feedback/admin.py
from django.contrib import admin from django.core.exceptions import PermissionDenied from fjord.feedback.models import Product, Response class ProductAdmin(admin.ModelAdmin): list_display = ( 'id', 'enabled', 'on_dashboard', 'display_name', 'db_name', 'translation_...
from django.contrib import admin from django.core.exceptions import PermissionDenied from fjord.feedback.models import Product, Response class ProductAdmin(admin.ModelAdmin): list_display = ( 'id', 'enabled', 'on_dashboard', 'display_name', 'db_name', 'translation_...
bsd-3-clause
Python
e19e2d69baabac3adedfae4e7a8c6ef5bb3d6f53
Fix alembic script
EIREXE/SpaceDock,EIREXE/SpaceDock,EIREXE/SpaceDock,EIREXE/SpaceDock
alembic/versions/4e0500347ce7_add_multigame_tables.py
alembic/versions/4e0500347ce7_add_multigame_tables.py
"""add multigame tables Revision ID: 4e0500347ce7 Revises: 29344aa34d9 Create Date: 2016-04-05 23:51:58.647657 """ # revision identifiers, used by Alembic. revision = '4e0500347ce7' down_revision = '29344aa34d9' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alemb...
"""add multigame tables Revision ID: 4e0500347ce7 Revises: 29344aa34d9 Create Date: 2016-03-30 12:26:36.632566 """ # revision identifiers, used by Alembic. revision = '4e0500347ce7' down_revision = '29344aa34d9' from alembic import op import sqlalchemy as sa def upgrade(): op.create_table( 'publisher'...
mit
Python
bd98a1b1119b34a5435855478d733ca582ebcf0c
Update version to dev
simplecrypto/powerpool,nickgzzjr/powerpool,simplecrypto/powerpool,cinnamoncoin/powerpool,cinnamoncoin/powerpool,nickgzzjr/powerpool
powerpool/__init__.py
powerpool/__init__.py
__version__ = "0.6.3-dev" __version_info__ = (0, 6, 3)
__version__ = "0.6.2" __version_info__ = (0, 6, 2)
bsd-2-clause
Python
ff99addf5ac6589b4ee2c53ef1debf4e9c07b47d
Bump version 0.2 Stable
fulfilio/nereid-catalog,prakashpp/nereid-catalog,priyankarani/nereid-catalog
__tryton__.py
__tryton__.py
#This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. { 'name': 'Nereid Catalog', 'version': '2.0.0.2', 'author': 'Openlabs Technologies & Consulting (P) LTD', 'email': 'info@openlabs.co.in', 'website': 'http://w...
#This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. { 'name': 'Nereid Catalog', 'version': '2.0.0.1', 'author': 'Openlabs Technologies & Consulting (P) LTD', 'email': 'info@openlabs.co.in', 'website': 'http://w...
bsd-3-clause
Python
d826e54996bc504d245286b50f7ab5671f1999ae
Update solution.py
lilsweetcaligula/Algorithms,lilsweetcaligula/Algorithms,lilsweetcaligula/Algorithms
data_structures/linked_list/problems/find_pattern_in_linked_list/py/solution.py
data_structures/linked_list/problems/find_pattern_in_linked_list/py/solution.py
import LinkedList # Problem description: Find a string pattern represented as a linked list in a target linked list. # Solution time complexity: O(n^2) # Comments: A brute force solution w/o any optimizations. Simply traverse a list looking for the pattern. # If the node ...
import LinkedList # Problem description: Find a pattern represented as a linked list in a target linked list. # Solution time complexity: O(n^2) # Comments: A brute force solution w/o any optimizations. Simply traverse a list looking for the pattern. # If the node travers...
mit
Python
7c527f486e2e129861915f73e0625ec00388e15e
Fix failing MPI tests
joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue
test/hoomd_script/test_multiple_contexts.py
test/hoomd_script/test_multiple_contexts.py
# -*- coding: iso-8859-1 -*- from hoomd_script import * import hoomd_script; context.initialize() import unittest import os # unit test to run a simple polymer system with pair and bond potentials class multi_context(unittest.TestCase): def test_run(self): self.c1 = context.SimulationContext() sel...
# -*- coding: iso-8859-1 -*- from hoomd_script import * import hoomd_script; context.initialize() import unittest import os # unit test to run a simple polymer system with pair and bond potentials class multi_context(unittest.TestCase): def test_run(self): self.c1 = context.SimulationContext() sel...
bsd-3-clause
Python
145c31a283bb458bdce72169ea16f07040236ee5
add comment about settings.py
opencorato/represent-boundaries,datamade/represent-boundaries,opencorato/represent-boundaries,datamade/represent-boundaries,datamade/represent-boundaries,opencorato/represent-boundaries
settings.py
settings.py
""" To run `django-admin.py syncdb --settings settings --noinput` before testing. """ SECRET_KEY = 'x' DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'travis_ci_test', } } INSTALLED_APPS=( 'django.contrib.admin', 'django.contrib.auth', 'djan...
SECRET_KEY = 'x' DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'travis_ci_test', } } INSTALLED_APPS=( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.gis', 'boundaries', )
mit
Python
417ab5241c852cdcd072143bc2444f20f2117623
Update capture profiler to new spec of providing board instead of string.
kobejohn/PQHelper
tests/execution_profiles/capture_profile.py
tests/execution_profiles/capture_profile.py
import cProfile from pqhelper import capture def main(): cProfile.run('test_solution(catapult)') def test_solution(board_string): board = capture.Board(board_string) print capture.capture(board) skeleton = ''' ..*..*.. .gm..mg. .ms..sm. .rs..sr. .ggmmgg. .rsggsr. .rsrrsr. ssgssgss''' giant_rat = ''' ...
import cProfile from pqhelper import capture def main(): cProfile.run('test_solution(catapult)') def test_solution(board_string): print capture.capture(board_string) skeleton = ''' ..*..*.. .gm..mg. .ms..sm. .rs..sr. .ggmmgg. .rsggsr. .rsrrsr. ssgssgss''' giant_rat = ''' ...mm... ..mrym.. .mgyrgm. mygryg...
mit
Python
a12d61e9a9b85c436d5b21b39862497b7e3ed903
update tpp.py for gen3
sc0tt/Reddit-Live-Console
tpp.py
tpp.py
#This script will show updates to the Twitch Plays Pokemon live feed on reddit. #You can only show important updates by passing the --important flag when you run the script #This could be easily adapted for other live feeds (or totally generic) but for now #it is hardcoded for the TPP feed. #python-requests is require...
#This script will show updates to the Twitch Plays Pokemon live feed on reddit. #You can only show important updates by passing the --important flag when you run the script #This could be easily adapted for other live feeds (or totally generic) but for now #it is hardcoded for the TPP feed. #python-requests is require...
mit
Python
c81eb510c72511c1f692f02f7bb63ef4caa51d27
Add management functions for migration
mfitzp/smrtr,mfitzp/smrtr
apps/concept/management/commands/update_concept_totals.py
apps/concept/management/commands/update_concept_totals.py
from optparse import make_option import sys from django.core.management.base import BaseCommand from concept.models import Concept class Command(BaseCommand): args = "" help = "Update concept total_question counts (post db import)" def handle(self, *args, **options): for concept in Concept.obj...
from optparse import make_option import sys from django.core.management.base import BaseCommand from education.models import Concept class Command(BaseCommand): args = "" help = "Update concept total_question counts (post db import)" def handle(self, *args, **options): for concept in Concept.o...
bsd-3-clause
Python
6a39a514ae82f412c107dd87944cdb17b6a9d036
remove isinstance assert in test_remove_site_packages_64bit
MSLNZ/msl-loadlib,MSLNZ/msl-loadlib,MSLNZ/msl-loadlib,MSLNZ/msl-loadlib,MSLNZ/msl-loadlib
tests/test_server32_remove_site_packages.py
tests/test_server32_remove_site_packages.py
import os import sys try: import pytest except ImportError: # the 32-bit server does not need pytest installed class Mark(object): @staticmethod def skipif(condition, reason=None): def func(function): return function return func class pytest(object)...
import os import sys try: import pytest except ImportError: # the 32-bit server does not need pytest installed class Mark(object): @staticmethod def skipif(condition, reason=None): def func(function): return function return func class pytest(object)...
mit
Python
79ef0fe21b136b80889a8e6e06339074ac73a1f1
Comment out section
mattstibbs/blockbuster-server,mattstibbs/blockbuster-server
run.py
run.py
__author__ = 'matt' # import datetime import blockbuster # blockbuster.app.debug = blockbuster.config.debug_mode # # blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@") # blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@ BlockBuster " + blockbuster.__version__ + " " # ...
__author__ = 'matt' import datetime import blockbuster blockbuster.app.debug = blockbuster.config.debug_mode blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@") blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@ BlockBuster " + blockbuster.__version__ + " " ...
mit
Python
35028b84d4757e1343a97da653670db049ac5e8d
replace default handler with static handler
ihadzic/jim,ihadzic/jim,ihadzic/jim
web.py
web.py
#!/usr/bin/env python2 import tornado import log from tornado import web, httpserver _http_server = None _https_server = None _html_root = './' _log = None # TODO: SSL needs this # ssl_options['certfile'] - server certificate # ssl_options['keyfile'] - server key # ssl_options['ca_certs'] - CA certificate def run_s...
#!/usr/bin/env python2 import tornado import log import magic from tornado import web, httpserver _http_server = None _https_server = None _html_root = './' _log = None _magic = None class DefaultHandler(tornado.web.RequestHandler): def get(self, match): _log.info("incoming request: {}".format(self.reque...
mit
Python
d3f03d6e2cf48929f8233e52720b07242ccd64da
Put tweets back
samanehsan/spark_github,samanehsan/spark_github,samanehsan/learn-git,samanehsan/learn-git
web.py
web.py
""" Heroku/Python Quickstart: https://blog.heroku.com/archives/2011/9/28/python_and_django""" import os import random import requests from flask import Flask import tweepy import settings app = Flask(__name__) @app.route('/') def home_page(): return 'Hello from the SPARK learn-a-thon!' def get_instagram_im...
""" Heroku/Python Quickstart: https://blog.heroku.com/archives/2011/9/28/python_and_django""" import os import random import requests from flask import Flask import tweepy import settings app = Flask(__name__) @app.route('/') def home_page(): return 'Hello from the SPARK learn-a-thon!' def get_instagram_im...
apache-2.0
Python
c772951ffbe06be23ff56d0281b78d7b9eac456b
Add option to generate executable name from the current branch
pycket/pycket,vishesh/pycket,magnusmorton/pycket,krono/pycket,pycket/pycket,cderici/pycket,magnusmorton/pycket,samth/pycket,samth/pycket,magnusmorton/pycket,cderici/pycket,vishesh/pycket,cderici/pycket,vishesh/pycket,samth/pycket,krono/pycket,pycket/pycket,krono/pycket
pycket/entry_point.py
pycket/entry_point.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # from pycket.expand import load_json_ast_rpython, expand_to_ast, PermException from pycket.interpreter import interpret_one, ToplevelEnv, interpret_module, GlobalConfig from pycket.error import SchemeException from pycket.option_helper import parse_args, ensure_json_ast f...
#! /usr/bin/env python # -*- coding: utf-8 -*- # from pycket.expand import load_json_ast_rpython, expand_to_ast, PermException from pycket.interpreter import interpret_one, ToplevelEnv, interpret_module, GlobalConfig from pycket.error import SchemeException from pycket.option_helper import parse_args, ensure_json_ast f...
mit
Python
17fe4613518def551e637764e644c5d58b1665d9
Add BodeAnalyser instrument to instrument table
liquidinstruments/pymoku
pymoku/instruments.py
pymoku/instruments.py
import sys from . import _instrument from . import _oscilloscope from . import _waveform_generator from . import _phasemeter from . import _specan from . import _lockinamp from . import _datalogger from . import _bodeanalyser from . import _stream_instrument from . import _frame_instrument from . import _input_instrum...
import sys from . import _instrument from . import _oscilloscope from . import _waveform_generator from . import _phasemeter from . import _specan from . import _lockinamp from . import _datalogger from . import _bodeanalyser from . import _stream_instrument from . import _frame_instrument from . import _input_instrum...
mit
Python
c034282423d47a6530ed0bb77c54e133de72115b
add more verbose output to PushwooshClient when debut=True
Pushwoosh/pushwoosh-python-lib
pypushwoosh/client.py
pypushwoosh/client.py
import logging import requests from .base import PushwooshBaseClient log = logging.getLogger('pypushwoosh.client.log') class PushwooshClient(PushwooshBaseClient): """ Implementation of the Pushwoosh API Client. """ headers = {'User-Agent': 'PyPushwooshClient', 'Content-Type': 'appli...
import logging import requests from .base import PushwooshBaseClient log = logging.getLogger('pypushwoosh.client.log') class PushwooshClient(PushwooshBaseClient): """ Implementation of the Pushwoosh API Client. """ headers = {'User-Agent': 'PyPushwooshClient', 'Content-Type': 'appli...
mit
Python
17474a74a8c382c1cc5923c0e2128e4a4e776553
Add method I am yet to use
israelg99/eva
eva/util/nutil.py
eva/util/nutil.py
import numpy as np def to_rgb(pixels): return np.repeat(pixels, 3 if pixels.shape[2] == 1 else 1, 2) def binarize(arr, generate=np.random.uniform): return (generate(size=arr.shape) < arr).astype('i') def quantisize(arr, levels): return (np.digitize(arr, np.arange(levels) / levels) - 1).astype('i')
import numpy as np def to_rgb(pixels): return np.repeat(pixels, 3 if pixels.shape[2] == 1 else 1, 2) def binarize(arr, generate=np.random.uniform): return (generate(size=arr.shape) < arr).astype('i')
apache-2.0
Python
fb2cfe4759fb98de644932af17a247428b2cc0f5
Fix Auth API key check causing error 500s
nikdoof/test-auth
api/auth.py
api/auth.py
from django.http import HttpResponseForbidden from django.contrib.auth.models import AnonymousUser from api.models import AuthAPIKey class APIKeyAuthentication(object): def is_authenticated(self, request): params = {} for key,value in request.GET.items(): params[key.lower()] = value ...
from django.http import HttpResponseForbidden from django.contrib.auth.models import AnonymousUser from api.models import AuthAPIKey class APIKeyAuthentication(object): def is_authenticated(self, request): params = {} for key,value in request.GET.items(): params[key.lower()] = value ...
bsd-3-clause
Python