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
65178c00715647ffdd9ff6b0e1d87ddcaf529861
update logic for database removal from library
nap/plexcleaner
test/test_media_library.py
test/test_media_library.py
import unittest import os import database from plexcleaner.media import Library, Movie from plexcleaner.exception import PlexCleanerException __author__ = 'Jean-Bernard Ratte - jean.bernard.ratte@unary.ca' class TestMediaLibrary(unittest.TestCase): _nb_movie = 98 _effective_size = 100275991932 def setUp...
import unittest import os from plexcleaner.media import Library, Movie from plexcleaner.exception import PlexCleanerException __author__ = 'Jean-Bernard Ratte - jean.bernard.ratte@unary.ca' class TestMediaLibrary(unittest.TestCase): _nb_movie = 98 _effective_size = 100275991932 def test_init(self): ...
apache-2.0
Python
f71bf4ec96735bfe2bc9f2d5196954226a5a46c8
Break down locality by term everytime now.
schae234/Camoco,schae234/Camoco
scripts/CalculateLocalityFDR.py
scripts/CalculateLocalityFDR.py
import camoco as co import glob import pandas as pd import os import numpy as np def read_FDR(glob_path): dfs = [] for x in glob.glob(glob_path): df = pd.read_table(x,sep=',') net,gwas,win,flank,*junk = os.path.basename(x).replace('.','_').split('_') if 'WindowSize' not in df.columns: ...
import camoco as co import glob import pandas as pd import os import numpy as np def read_FDR(glob_path): dfs = [] for x in glob.glob(glob_path): df = pd.read_table(x,sep=',') net,gwas,win,flank,*junk = os.path.basename(x).replace('.','_').split('_') if 'WindowSize' not in df.columns: ...
mit
Python
981cc4b4b124982d303cdcd0a2049f1d537893a1
Update __init__.py
opencb/cellbase,opencb/cellbase,opencb/cellbase,opencb/cellbase,opencb/cellbase,opencb/cellbase,opencb/cellbase
clients/python/pycellbase/__init__.py
clients/python/pycellbase/__init__.py
__version__ = '4.7.0'
__version__ = '4.5.4'
apache-2.0
Python
85f3ad7a088b354295249f62135ec27dc53d7514
use xml with declaration
ZeitOnline/zeit.solr
src/zeit/solr/connection.py
src/zeit/solr/connection.py
# Copyright (c) 2009 gocept gmbh & co. kg # See also LICENSE.txt import hashlib import lxml.etree import lxml.html import os.path import pysolr import urllib2 import zeit.solr.interfaces import zope.app.appsetup.product import zope.interface class SolrConnection(pysolr.Solr): zope.interface.implements(zeit.solr...
# Copyright (c) 2009 gocept gmbh & co. kg # See also LICENSE.txt import hashlib import lxml.etree import lxml.html import os.path import pysolr import urllib2 import zeit.solr.interfaces import zope.app.appsetup.product import zope.interface class SolrConnection(pysolr.Solr): zope.interface.implements(zeit.solr...
bsd-3-clause
Python
22ebbbbf21d537b3f026172749ad7b07f5189f18
Add letters to template
jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot
bills/views.py
bills/views.py
import string from django.db import transaction from django.shortcuts import render, redirect from tot import settings from preferences.views import _mark_selected from bills.utils import get_all_subjects, get_all_locations from opencivicdata.models import Bill, LegislativeSession current_session = LegislativeSessi...
from django.db import transaction from django.shortcuts import render, redirect from tot import settings from preferences.views import _mark_selected from bills.utils import get_all_subjects, get_all_locations from opencivicdata.models import Bill, LegislativeSession current_session = LegislativeSession.objects.get...
mit
Python
2c23f749872b0722e895f3b3415bd66e438f57f9
Update Discover_Hidden_SSID.py
Tylous/SniffAir,Tylous/SniffAir
module/Discover_Hidden_SSID.py
module/Discover_Hidden_SSID.py
import sys import sqlite3 import pandas as dp import pandas sys.path.insert(0, '../lib/') import Queries from Queries import * def main(workspace): ws = workspace q = queries() ws1 = q.db_connect(ws) try: AP = dp.read_sql('select BSSID from accessPoints where ESSID = "Hidden"', ws1) AP_BSSID = AP.to_string(ind...
import sys import sqlite3 import pandas as dp import pandas sys.path.insert(0, '../lib/') import Queries from Queries import * def main(workspace): ws = workspace q = queries() ws1 = q.db_connect(ws) try: AP = dp.read_sql('select BSSID from accessPoints where ESSID = "Hidden"', ws1) AP_BSSID = AP.to_string(ind...
mit
Python
92133e99f153496928594fdf1c5cfa9d9294e762
Remove unneeded import
CactusDev/CactusBot
cactusbot/cactus.py
cactusbot/cactus.py
"""CactusBot!""" import asyncio import logging import time from .sepal import Sepal __version__ = "v0.4-dev" CACTUS_ART = r"""CactusBot initialized! --` ` /++/- ` o+:. :+osy -/:.` oo+o/ /osyy -+///` /shh+ +oo+/ ./ooo` //+o+ /+osy /soo+` ++//- :oyhy /hyo+` /+oo/ /+/// -+/++` ...
"""CactusBot!""" import asyncio import logging import time from .sepal import Sepal, SepalParser __version__ = "v0.4-dev" CACTUS_ART = r"""CactusBot initialized! --` ` /++/- ` o+:. :+osy -/:.` oo+o/ /osyy -+///` /shh+ +oo+/ ./ooo` //+o+ /+osy /soo+` ++//- :oyhy /hyo+` /+oo/ /+//...
mit
Python
270eb7e03394887ff18ee4dfde31c3f8e3bcbb8e
Remove 'PaintGL'
thomasdeniau/pyfauxfur,thomasdeniau/pyfauxfur
GLWidget.py
GLWidget.py
from PyQt4.QtOpenGL import QGLWidget from pyglet.gl import * class GLWidget(QGLWidget): texture = None def resizeGL(self, width, height): glViewport(0, 0, width, height) if self.texture is not None: left = 0 right = self.texture.width bottom = 0...
from PyQt4.QtOpenGL import QGLWidget from pyglet.gl import * class GLWidget(QGLWidget): texture = None def resizeGL(self, width, height): glViewport(0, 0, width, height) if self.texture is not None: left = 0 right = self.texture.width bottom = 0...
bsd-3-clause
Python
932962b3d07a49ab87eb2260b7241eefceab1b3b
remove conf file
DiegoAntonino/SmartThings,DiegoAntonino/SmartThings
SmartThings-Raspberry-Presence_integration-master/python_code/check_presence_conf.py
SmartThings-Raspberry-Presence_integration-master/python_code/check_presence_conf.py
PHONES = { "diego": {"ip": "{IP}", "status": None}, "carla": {"ip": "{IP}", "status": None} } ST_IP = "{IP}"
PHONES = { "diego": {"ip": "192.168.1.220", "status": None}, "carla": {"ip": "192.168.1.157", "status": None} } ST_IP = "192.168.1.152"
apache-2.0
Python
d6433001f3660c9c4506fe5e1f62c0a52edd02f7
Test Cases for is instance of Model function
mostafa-mahmoud/djenerator,aelguindy/djenerator,mostafa-mahmoud/djenerator
project/djenerator/tests.py
project/djenerator/tests.py
#!/usr/bin/env python """ This module contains tests for djenerator app. """ from django.test import TestCase from model_reader import is_instance_of_model from models import ExtendingModel from models import NotExtendingModel from models import TestModel0 from models import TestModel1 from models import TestModelA fro...
#!/usr/bin/env python """ This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase
mit
Python
6631906fc126eadc114a7ee673194da4880dc960
Remove Flask-SQLAlchemy dependency It should be noted that the declarative base still has to be configured like this:
torotil/flask-admin,likaiguo/flask-admin,iurisilvio/flask-admin,toddetzel/flask-admin,mikelambert/flask-admin,lifei/flask-admin,likaiguo/flask-admin,rochacbruno/flask-admin,ArtemSerga/flask-admin,closeio/flask-admin,betterlife/flask-admin,jschneier/flask-admin,torotil/flask-admin,toddetzel/flask-admin,closeio/flask-adm...
flask_admin/contrib/geoa/typefmt.py
flask_admin/contrib/geoa/typefmt.py
from flask_admin.contrib.sqla.typefmt import DEFAULT_FORMATTERS as BASE_FORMATTERS from jinja2 import Markup from wtforms.widgets import html_params from geoalchemy2.shape import to_shape from geoalchemy2.elements import WKBElement from sqlalchemy import func def geom_formatter(view, value): params = html_params(...
from flask_admin.contrib.sqla.typefmt import DEFAULT_FORMATTERS as BASE_FORMATTERS import json from jinja2 import Markup from wtforms.widgets import html_params from geoalchemy2.shape import to_shape from geoalchemy2.elements import WKBElement from sqlalchemy import func from flask import current_app def geom_formatt...
bsd-3-clause
Python
9f088313e2cb55819ca5e807e8fae17d4c58eefe
Support for py3
bananos/instaproxy-console
instaproxy/core.py
instaproxy/core.py
#!/usr/bin/env python import argparse import requests import re class InvalidAuth(Exception): pass class InvalidResponse(Exception): pass class ParserError(Exception): pass LOGIN_PAGE = "http://admin.instantproxies.com/login_do.php" IPS_REGEXP = re.compile('<textarea *[^>]*>(.*)</textarea>') def w...
#!/usr/bin/env python import argparse import requests import re class InvalidAuth(Exception): pass class InvalidResponse(Exception): pass class ParserError(Exception): pass LOGIN_PAGE = "http://admin.instantproxies.com/login_do.php" IPS_REGEXP = re.compile('<textarea *[^>]*>(.*)</textarea>') def w...
apache-2.0
Python
1773b4e6faccb7d929c7cf148adc75a62027b161
Fix sleep function
UrbanCCD-UChicago/plenario,UrbanCCD-UChicago/plenario,UrbanCCD-UChicago/plenario
plenario/api/__init__.py
plenario/api/__init__.py
import json from flask import make_response, Blueprint from point import timeseries, detail, meta, dataset_fields, grid, detail_aggregate from common import cache, make_cache_key from shape import get_all_shape_datasets,\ export_shape, aggregate_point_data from time import sleep from sensor import w...
import json from flask import make_response, Blueprint from point import timeseries, detail, meta, dataset_fields, grid, detail_aggregate from common import cache from shape import get_all_shape_datasets,\ export_shape, aggregate_point_data from time import sleep from sensor import weather_stations,...
mit
Python
570dd056450bf8b0d24daebb2854015ee4c5e38c
Add "delete" for jobs, switch to -- style commands
mesosphere/chronos-utils
chronos-job.py
chronos-job.py
#! /usr/bin/env python import argparse import datetime import httplib import json def main(args=None): parser = argparse.ArgumentParser(prog="chronos-job") parser.add_argument("--create", metavar="<n>", type=int, help="create <n> sleep jobs (default: 1)") parser.add_argument("--delete", me...
#! /usr/bin/env python import argparse import datetime import httplib import json def main(args): parser = argparse.ArgumentParser(prog="chronos-job") parser.add_argument("-n", default=1, type=int, help="number of Chronos jobs to create (default: 1)") args = parser.parse_args() payload ...
apache-2.0
Python
5dcf9f9c9db5515e5d471bcde193373def625b04
fix typo
tobi-wan-kenobi/bumblebee-status,tobi-wan-kenobi/bumblebee-status
modules/contrib/arch-update.py
modules/contrib/arch-update.py
"""Check updates to Arch Linux. Requires the following executable: * checkupdates (from pacman-contrib) """ import logging import core.module import core.widget import core.decorators import util.cli class Module(core.module.Module): @core.decorators.every(minutes=60) def __init__(self, config, theme...
"""Check updates to Arch Linux. Requires the following executable: * checkupdates (from pacman-contrib) """ import logging import core.module import core.widget import core.decorators import util.cli class Module(core.module.Module): @core.decorators.every(minutes=60) def __init__(self, config, theme...
mit
Python
55e911dabdbe8333e61561d5e35897668455f34d
Fix imports
mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju
deploy_stack.py
deploy_stack.py
#!/usr/bin/env python __metaclass__ = type from jujupy import ( check_wordpress, Environment, until_timeout, ) import sys def deploy_stack(environments): """"Deploy a Wordpress stack in the specified environment. :param environment: The name of the desired environment. """ envs = [Envi...
#!/usr/bin/env python __metaclass__ = type from jujupy import Environment, check_wordpress import sys def deploy_stack(environments): """"Deploy a Wordpress stack in the specified environment. :param environment: The name of the desired environment. """ envs = [Environment(e) for e in environments...
agpl-3.0
Python
f441ace45c98980d106e8fa26d62cc01311912eb
fix test naming bug in interp_asm_test
futurecore/pydgin,cornell-brg/pydgin,cornell-brg/pydgin,cornell-brg/pydgin,moreati/pydgin,cornell-brg/pydgin,futurecore/pydgin,moreati/pydgin,moreati/pydgin,futurecore/pydgin,futurecore/pydgin,moreati/pydgin
interp_asm_test.py
interp_asm_test.py
import sys import subprocess sys.path.append('/Users/dmlockhart/vc/git-brg/parc/pymtl') from inspect import getmembers, ismodule, isfunction import pisa.pisa_inst_addu_test import pisa.pisa_inst_subu_test import pisa.pisa_inst_and_test import pisa.pisa_inst_or_test import pisa.pisa_inst_xor_test import pisa.pisa_inst...
import sys import subprocess sys.path.append('/Users/dmlockhart/vc/git-brg/parc/pymtl') from inspect import getmembers, ismodule, isfunction import pisa.pisa_inst_addu_test import pisa.pisa_inst_subu_test import pisa.pisa_inst_and_test import pisa.pisa_inst_or_test import pisa.pisa_inst_xor_test import pisa.pisa_inst...
bsd-3-clause
Python
74b8f5fd91d3e2b7c62400312c2ab9e57db92480
Remove admin redirect and index view set at /
Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django
derrida/urls.py
derrida/urls.py
"""derrida URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ """ from annotator_store import views as annotator_views from django.conf import settings from django.conf.urls import url, include from django.contrib ...
"""derrida URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ """ from annotator_store import views as annotator_views from django.conf import settings from django.conf.urls import url, include from django.contrib ...
apache-2.0
Python
0530d74585092b0f345d4a828860a282104bc817
add clarifying comment
genome/flow-workflow,genome/flow-workflow,genome/flow-workflow
flow_workflow/historian/messages.py
flow_workflow/historian/messages.py
from flow.protocol.message import Message class UpdateMessage(Message): required_fields = { 'net_key': basestring, 'operation_id': int, 'name': basestring, 'workflow_plan_id': int, } optional_fields = { 'parent_net_key': basestring, ...
from flow.protocol.message import Message class UpdateMessage(Message): required_fields = { 'net_key': basestring, 'operation_id': int, 'name': basestring, 'workflow_plan_id': int, } optional_fields = { 'parent_net_key': basestring, ...
agpl-3.0
Python
4a41defddaf58bd6bda9a1df0025fd6c299e0daf
handle missing query param
podhub-io/follower
podhub/follower/views.py
podhub/follower/views.py
from . import app from feed import Feed from flask import jsonify, request @app.route('/') def index(): return jsonify() @app.route('/audio') def feed(): url = request.args.get('feed_url') if not url: return jsonify(error_message='feed_url required.') index = request.args.get('index') i...
from . import app from feed import Feed from flask import jsonify, request @app.route('/') def index(): return jsonify() @app.route('/audio') def feed(): url = request.args.get('feed_url') index = request.args.get('index') if not index: index = -1 feed = Feed(url=url) try: ...
bsd-3-clause
Python
b8319cf58b311edd1c35b0149373f2f5789dd127
Test insert_at_index, insert_after
abourget/formalchemy-abourget
formalchemy/tests/test_renderers.py
formalchemy/tests/test_renderers.py
from formalchemy.tests import * from formalchemy.renderers import * import datetime __doc__ = r""" Let's test the behavior of a Field element, returning a modified copy of itself when we call some methods on it: >>> fs = FieldSet(User) >>> fs.password AttributeField(password) >>> fs.password.renderer <Text...
from formalchemy.tests import * from formalchemy.renderers import * import datetime __doc__ = r""" Let's test the behavior of a Field element, returning a modified copy of itself when we call some methods on it: >>> fs = FieldSet(User) >>> fs.password AttributeField(password) >>> fs.password.renderer <Text...
mit
Python
49239dda366b8600d14170d136c32c6119d90e0e
fix os import error on linux for free system memory calculation
Evfro/polara
polara/tools/systools.py
polara/tools/systools.py
from __future__ import division import os import sys import ctypes # Getting memory info, based on # http://stackoverflow.com/a/2017659/6621667 and # https://doeidoei.wordpress.com/2009/03/22/python-tip-3-checking-available-ram-with-python/ class MemoryStatus(ctypes.Structure): _fields_ = [ ("dwLength", c...
from __future__ import division import sys import ctypes # Getting memory info, based on # http://stackoverflow.com/a/2017659/6621667 and # https://doeidoei.wordpress.com/2009/03/22/python-tip-3-checking-available-ram-with-python/ class MemoryStatus(ctypes.Structure): _fields_ = [ ("dwLength", ctypes.c_ul...
mit
Python
e30af18f4e4ba2ca2b83e87a223b81c5bf2affbb
add to precedence list
un33k/django-ipware,un33k/django-ipware
ipware/defaults.py
ipware/defaults.py
from django.conf import settings # Search for the real IP address in the following order IPWARE_META_PRECEDENCE_LIST = getattr(settings, 'IPWARE_META_PRECEDENCE_LIST', ( 'HTTP_X_FORWARDED_FOR', # client, proxy1, proxy2 'HTTP_CLIENT_IP', 'HTTP_X_REAL_IP', 'HTTP_X_FORWARDED', ...
from django.conf import settings # Search for the real IP address in the following order IPWARE_META_PRECEDENCE_LIST = getattr(settings, 'IPWARE_META_PRECEDENCE_LIST', ( 'HTTP_X_FORWARDED_FOR', # client, proxy1, proxy2 (set by: Proxy or LB) 'HTTP_X_REAL_IP', # client (set by: Proxy or LB) ...
mit
Python
82d663a270f380c765a84736cb536d67dadc1656
Add plot_map function
tobig/islplot
islplot/plotter.py
islplot/plotter.py
import matplotlib.pyplot as _plt import islpy as _islpy def _get_point_coordinates(point): return (int(point.get_coordinate_val(_islpy.dim_type.set, 0).get_num_si()), int(point.get_coordinate_val(_islpy.dim_type.set, 1).get_num_si())) def plot_points(set_data, color="black", size=15): """ Plot...
import matplotlib.pyplot as _plt import islpy as _islpy def _get_point_coordinates(point): return (int(point.get_coordinate_val(_islpy.dim_type.set, 0).get_num_si()), int(point.get_coordinate_val(_islpy.dim_type.set, 1).get_num_si())) def plot_points(set_data, color="black", size=15): """ Plot...
mit
Python
919ec22e009b3e764e6808d9d68b0c574d2bbb78
Add ability to write IP captures
noxrepo/pox,MurphyMc/pox,noxrepo/pox,MurphyMc/pox,MurphyMc/pox,noxrepo/pox,MurphyMc/pox,noxrepo/pox,MurphyMc/pox
pox/lib/pxpcap/writer.py
pox/lib/pxpcap/writer.py
# Copyright 2013 James McCauley # # 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 writi...
# Copyright 2013 James McCauley # # 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 writi...
apache-2.0
Python
97047677d8ddb6502619eb0d9cf721dfb5afbb38
Enable registration fields single line mode in enter_code.py (like it was in the XIB).
hsoft/cocoalib
ui/enter_code.py
ui/enter_code.py
ownerclass = 'HSFairwareReminder' ownerimport = 'HSFairwareReminder.h' result = Window(450, 228, "Enter Key") result.canClose = False result.canResize = False result.canMinimize = False titleLabel = Label(result, "Enter your key") promptLabel = Label(result, "Type the key you received when you contributed to %@, as we...
ownerclass = 'HSFairwareReminder' ownerimport = 'HSFairwareReminder.h' result = Window(450, 228, "Enter Key") result.canClose = False result.canResize = False result.canMinimize = False titleLabel = Label(result, "Enter your key") promptLabel = Label(result, "Type the key you received when you contributed to %@, as we...
bsd-3-clause
Python
febad9b0339055925da6b3718dbd8929aec6e487
set is not list-like
Kjwon15/autotweet
autotweet/database.py
autotweet/database.py
from sqlalchemy import Column, ForeignKey, Integer, String, Table, create_engine from sqlalchemy.orm import relationship, scoped_session, sessionmaker from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() GRAM_LENGTH = 2 association_table = Table( 'association', Base.metadata, Co...
from sqlalchemy import Column, ForeignKey, Integer, String, Table, create_engine from sqlalchemy.orm import relationship, scoped_session, sessionmaker from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() GRAM_LENGTH = 2 association_table = Table( 'association', Base.metadata, Co...
mit
Python
d2131677ca7ceae1138bd60aafbed1ae1861a354
Add an optional token to MyAPIfilms calls.
EmilStenstrom/nephele
providers/moviedata/imdb.py
providers/moviedata/imdb.py
import re from providers.moviedata.provider import MoviedataProvider from urllib import urlencode from access_keys import ACCESS_KEYS from application import APPLICATION as APP IDENTIFIER = "MyAPIfilms" class Provider(MoviedataProvider): def get_url(self, movie): parameters = { "title": movie[...
import re from providers.moviedata.provider import MoviedataProvider from urllib import urlencode from application import APPLICATION as APP IDENTIFIER = "IMDB" class Provider(MoviedataProvider): def get_url(self, movie): parameters = { "title": movie["name"], "limit": 1, ...
mit
Python
7d0b2c5331f568bbfb328d1290ce4b9ca412f012
Fix typo after search & replace.
dinoperovic/django-shop-catalog,dinoperovic/django-shop-catalog
catalog/settings.py
catalog/settings.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.utils.translation import ugettext_lazy as _ SLUG_FIELD_HELP_TEXT = _( 'Can only contain the letters a-z, A-Z, digits, minus and underscores, ' 'and can\'t start with a digit.') PRODUCT_CHANGE_FORM_TEM...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.utils.translation import ugettext_lazy as _ SLUG_FIELD_HELP_TEXT = _( 'Can only contain the letters a-z, A-Z, digits, minus and underscores, ' 'and can\'t start with a digit.') PRODUCT_CHANGE_FORM_TEM...
bsd-3-clause
Python
d1a003e2f6917b213fcf93ae0aa9443cbc2af425
deal with exceptions in callsite context manager
bndl/bndl,bndl/bndl
bndl/util/callsite.py
bndl/util/callsite.py
from functools import wraps import contextlib import inspect import linecache import os.path import sys import threading _callsite = threading.local() def _get_callsite(*internal, name=None): internal = [inspect.getfile(i) if not isinstance(i, str) else i for i in internal] + [__file__] internal = [os.path.d...
from functools import wraps import contextlib import inspect import linecache import os.path import sys import threading _callsite = threading.local() def _get_callsite(*internal, name=None): internal = [inspect.getfile(i) if not isinstance(i, str) else i for i in internal] + [__file__] internal = [os.path.d...
apache-2.0
Python
2d6132c8f113ccb82ab0472091b200f7c26bea2f
Add user model
EmadMokhtar/halaqat,EmadMokhtar/halaqat,EmadMokhtar/halaqat
back_office/models.py
back_office/models.py
from django.db import models from django.utils.translation import ugettext as _ from Django.contrib.auth.models import User FEMALE = 'F' MALE = 'M' class Teacher(models.Model): """ halaqat teachers informations """ GENDET_CHOICES = ( (MALE, _('Male')), (FEMALE, _('Female')), ) ...
from django.db import models from django.utils.translation import ugettext as _ FEMALE = 'F' MALE = 'M' class Teacher(models.Model): """ halaqat teachers informations """ GENDET_CHOICES = ( (MALE, _('Male')), (FEMALE, _('Female')), ) name = models.CharField(max_length=100, ver...
mit
Python
709e4ad34a60d50ec1907e8c91863a2c58677b6c
fix wsgi script
bartscheers/banana,bartscheers/banana,bartscheers/banana
bananaproject/wsgi.py
bananaproject/wsgi.py
""" WSGI config for django_monetdb_testproject project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``...
""" WSGI config for django_monetdb_testproject project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``...
bsd-3-clause
Python
81efd0e2cd72eaf045d82f18c8e31972b143c3db
customize errors
munisisazade/developer_portal,munisisazade/developer_portal,munisisazade/developer_portal
develop/urls.py
develop/urls.py
"""develop URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-ba...
"""develop URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-ba...
mit
Python
5a4b5f5a5dcecbbdb4cbb691c26e7bc7576ec5db
Improve help text
damngamerz/coala,NiklasMM/coala,coala/coala,SambitAcharya/coala,JohnS-01/coala,coala/coala,scriptnull/coala,NalinG/coala,SanketDG/coala,mr-karan/coala,AdeshAtole/coala,Uran198/coala,aptrishu/coala,yashLadha/coala,andreimacavei/coala,Asnelchristian/coala,d6e/coala,coala/coala,tushar-rishav/coala,SambitAcharya/coala,Tanm...
bears/misc/KeywordBear.py
bears/misc/KeywordBear.py
from coalib.results.Result import Result from coalib.bears.LocalBear import LocalBear from coalib.misc.i18n import _ class KeywordBear(LocalBear): def run(self, filename, file, cs_keywords: list, ci_keywords: list): """ Checks the code files for give...
from coalib.results.Result import Result from coalib.bears.LocalBear import LocalBear from coalib.misc.i18n import _ class KeywordBear(LocalBear): def run(self, filename, file, cs_keywords: list, ci_keywords: list): """ Checks the code files for give...
agpl-3.0
Python
b35b6b2b13897ede87c7fcd8c92f9f896ca036e2
Add as_tuple utility
opesci/devito,opesci/devito
devito/tools.py
devito/tools.py
import ctypes import numpy as np from sympy import symbols def as_tuple(item, type=None, length=None): """ Force item to a tuple. Partly extracted from: https://github.com/OP2/PyOP2/. """ # Empty list if we get passed None if item is None: t = () else: # Convert iterable ...
import ctypes import numpy as np from sympy import symbols def flatten(l): return [item for sublist in l for item in sublist] def filter_ordered(elements, key=None): """Filter elements in a list while preserving order""" seen = set() if key is None: key = lambda x: x return [e for e in ...
mit
Python
e03dd02254e921dea6e7eaf6b2a74a59dc7691e8
implement 'timestamp-download'
makefu/bepasty-server,bepasty/bepasty-server,bepasty/bepasty-server,makefu/bepasty-server,makefu/bepasty-server,bepasty/bepasty-server,bepasty/bepasty-server
bepasty/views/download.py
bepasty/views/download.py
# Copyright: 2013 Bastian Blank <bastian@waldi.eu.org> # License: BSD 2-clause, see LICENSE for details. import errno import time from flask import Response, current_app, render_template, stream_with_context from flask.views import MethodView from werkzeug.exceptions import NotFound from ..utils.name import ItemName...
# Copyright: 2013 Bastian Blank <bastian@waldi.eu.org> # License: BSD 2-clause, see LICENSE for details. import errno from flask import Response, current_app, render_template, stream_with_context from flask.views import MethodView from werkzeug.exceptions import NotFound from ..utils.name import ItemName from . impo...
bsd-2-clause
Python
8a673d3548ea12e417bfb69237892f4c8a5cbfb5
Set a 20 second timeout on API requests
maedox/python-copperegg
copperegg/__init__.py
copperegg/__init__.py
# -*- coding: utf-8 -*- """Python wrapper for the CopperEgg API """ __author__ = "Pål Nilsen (@maedox)" __version__ = "0.1" import json try: import requests except ImportError: print("""The requests module is required. """ """See http://docs.python-requests.org/ for instructions.""") raise ...
# -*- coding: utf-8 -*- """Python wrapper for the CopperEgg API """ __author__ = "Pål Nilsen (@maedox)" __version__ = "0.1" import json try: import requests except ImportError: print("""The requests module is required. """ """See http://docs.python-requests.org/ for instructions.""") raise ...
mit
Python
cb4eb8ad28e79f0abcb15827fbfdc6b0e2e906a0
Prepare version number for next development cycle.
martin-neuhaeusser/benchexec,IljaZakharov/benchexec,IljaZakharov/benchexec,dbeyer/benchexec,martin-neuhaeusser/benchexec,IljaZakharov/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,martin-neuhaeusser/benchexec,dbeyer/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,dbeyer/benchexec,sosy-lab/ben...
benchexec/__init__.py
benchexec/__init__.py
# BenchExec is a framework for reliable benchmarking. # This file is part of BenchExec. # # Copyright (C) 2007-2015 Dirk Beyer # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Lic...
# BenchExec is a framework for reliable benchmarking. # This file is part of BenchExec. # # Copyright (C) 2007-2015 Dirk Beyer # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Lic...
apache-2.0
Python
82089836ca96a3320e8bd718a588ae0b2205ab04
Remove approved sets from IUScholarWorks so everything is harvested (#553)
laurenbarker/SHARE,laurenbarker/SHARE,aaxelb/SHARE,aaxelb/SHARE,laurenbarker/SHARE,CenterForOpenScience/SHARE,aaxelb/SHARE,CenterForOpenScience/SHARE,CenterForOpenScience/SHARE
providers/edu/iu/apps.py
providers/edu/iu/apps.py
from share.provider import OAIProviderAppConfig class AppConfig(OAIProviderAppConfig): name = 'providers.edu.iu' version = '0.0.1' title = 'iu' long_title = 'Indiana University Libraries\' IUScholarWorks' home_page = 'https://scholarworks.iu.edu' url = 'https://scholarworks.iu.edu/dspace-oai/r...
from share.provider import OAIProviderAppConfig class AppConfig(OAIProviderAppConfig): name = 'providers.edu.iu' version = '0.0.1' title = 'iu' long_title = 'Indiana University Libraries\' IUScholarWorks' home_page = 'https://scholarworks.iu.edu' url = 'https://scholarworks.iu.edu/dspace-oai/r...
apache-2.0
Python
0660fa7c4b2519f9bcd1eb8d5d1ec7b4797c26cf
Update sms.py
devrand/djcourse
code/sms/sms.py
code/sms/sms.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from twilio.rest import TwilioRestClient # pip install twilio import sys sys.path.append("..") from course_config import * # u need TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, twilio from_ telephone number # u could obtain it on twilio site client = TwilioRestClient(TWIL...
#!/usr/bin/env python # -*- coding: utf-8 -*- from twilio.rest import TwilioRestClient # pip install twilio import sys sys.path.append("..") from course_config import * # need TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, twilio from_ telephone number client = TwilioRestClient(TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN) ...
mit
Python
2c231fd0446a84c87610ca34ba1b255ea7d9677e
Remove old URLs
potatolondon/djangae,potatolondon/djangae
djangae/urls.py
djangae/urls.py
from django.conf import settings from django.conf.urls import url, include from . import views urlpatterns = [ url(r'^start$', views.start), url(r'^stop$', views.stop), url(r'^warmup$', views.warmup), url(r'^clearsessions$', views.clearsessions), ]
from django.conf import settings from django.conf.urls import url, include from . import views urlpatterns = [ url(r'^start$', views.start), url(r'^stop$', views.stop), url(r'^warmup$', views.warmup), url(r'^clearsessions$', views.clearsessions), url(r'^queue/deferred/?$', views.deferred), ur...
bsd-3-clause
Python
e2ff9ab9a7b9256f85df94d8876cc773eda4d5ff
Reformat the file (PEP8)
xujun10110/Sreg,twb725/Sreg,xujun10110/Sreg,Jacob08/Sreg,forblackking/Sreg,n0tr00t/Sreg,sdgdsffdsfff/Sreg,XuMorain/Sreg,Jacob08/Sreg,twb725/Sreg,n0tr00t/Sreg,xl7dev/Sreg,LubyRuffy/Sreg,xl7dev/Sreg,LubyRuffy/Sreg,forblackking/Sreg,yangRy/Sreg,yangRy/Sreg,sdgdsffdsfff/Sreg,XuMorain/Sreg
common/color.py
common/color.py
#!/usr/bin/env python # coding=utf8 # author=e0@2015<ff0000team> def inBlack(s): return highlight('') + "%s[30;2m%s%s[0m" % (chr(27), s, chr(27)) def inRed(s): return highlight('') + "%s[31;2m%s%s[0m" % (chr(27), s, chr(27)) def inGreen(s): return highlight('') + "%s[32;2m%s%s[0m" % (chr(27), s, chr(2...
#!/usr/bin/env python # coding=utf8 # author=e0@2015<ff0000team> def inBlack(s): return highlight('') + "%s[30;2m%s%s[0m"%(chr(27), s, chr(27)) def inRed(s): return highlight('') + "%s[31;2m%s%s[0m"%(chr(27), s, chr(27)) def inGreen(s): return highlight('') + "%s[32;2m%s%s[0m"%(chr(27), s, chr(27)) def inY...
mit
Python
8374ef6bd78eb564a6d846b882c99a67e116394e
Fix push commands
jvrsantacruz/python-semantic-release,relekang/python-semantic-release,relekang/python-semantic-release,riddlesio/python-semantic-release,wlonk/python-semantic-release
semantic_release/git_helpers.py
semantic_release/git_helpers.py
from git import Repo from invoke import run from semantic_release.settings import load_config def get_commit_log(): repo = Repo('.git') for commit in repo.iter_commits(): yield commit.message def commit_new_version(version): add = run('git add {}'.format(load_config().get('version_variable').sp...
from git import Repo from invoke import run from semantic_release.settings import load_config def get_commit_log(): repo = Repo('.git') for commit in repo.iter_commits(): yield commit.message def commit_new_version(version): add = run('git add {}'.format(load_config().get('version_variable').sp...
mit
Python
6cfa08d21d85d3324c946795a7956fe3aa77f063
Fix CSV writing in test BOM-639 (#21762)
cpennington/edx-platform,mitocw/edx-platform,msegado/edx-platform,angelapper/edx-platform,EDUlib/edx-platform,stvstnfrd/edx-platform,cpennington/edx-platform,eduNEXT/edx-platform,edx-solutions/edx-platform,msegado/edx-platform,edx-solutions/edx-platform,angelapper/edx-platform,edx/edx-platform,edx/edx-platform,eduNEXT/...
openedx/core/djangoapps/user_api/management/tests/test_bulk_user_org_email_optout.py
openedx/core/djangoapps/user_api/management/tests/test_bulk_user_org_email_optout.py
""" Test the test_bulk_user_org_email_optout management command """ from __future__ import absolute_import import io import os import tempfile from contextlib import contextmanager import mock import pytest from django.core.management import call_command pytestmark = pytest.mark.django_db CSV_DATA = u"""1,Universi...
""" Test the test_bulk_user_org_email_optout management command """ from __future__ import absolute_import import os import tempfile from contextlib import contextmanager import mock import pytest from django.core.management import call_command pytestmark = pytest.mark.django_db CSV_DATA = """1,UniversityX 2,Colle...
agpl-3.0
Python
f6b7230591957e69232cde13719c3bab4f729274
Remove trailing comma
gogoair/foremast,gogoair/foremast
src/foremast/pipeline/construct_pipeline_block.py
src/foremast/pipeline/construct_pipeline_block.py
"""Construct a block section of Stages in a Spinnaker Pipeline.""" import json import logging from pprint import pformat from ..utils import generate_encoded_user_data, get_template LOG = logging.getLogger(__name__) def construct_pipeline_block(env='', generated=None, ...
"""Construct a block section of Stages in a Spinnaker Pipeline.""" import json import logging from pprint import pformat from ..utils import generate_encoded_user_data, get_template LOG = logging.getLogger(__name__) def construct_pipeline_block(env='', generated=None, ...
apache-2.0
Python
d85452f6f8174c98ce8b6a1ec2b26c8574b3deb7
Update WAVE/FLAC read comparison script.
HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper
scripts/compare_wave_and_flac_reads.py
scripts/compare_wave_and_flac_reads.py
""" Script that compares the speed of clip reads from WAVE and FLAC files. A run of this script on 2022-07-11 produced the following output: Read 10000 clips in 13.2 seconds, a rate of 757.0 clips per second. Read 10000 clips in 1.9 seconds, a rate of 5176.8 clips per second. """ from pathlib import Path im...
from pathlib import Path import random import time import soundfile as sf DIR_PATH = Path('/Users/harold/Desktop/NFC/FLAC Test') # DIR_PATH = Path('/Volumes/Recordings1/FLAC Test') FILE_NAME_STEM = 'FLOOD-21C_20180901_194500' CLIP_COUNT = 10000 CLIP_DURATION = .6 SAMPLE_RATE = 24000 CLIP_LENGTH = int(round(CLIP_DUR...
mit
Python
fa4984f28c80f1eec773bdcaab3a3f26b6efa054
Archive handling incorporated into reactToAMQPMessage()
edeposit/edeposit.amqp.storage,edeposit/edeposit.amqp.storage
src/edeposit/amqp/storage/__init__.py
src/edeposit/amqp/storage/__init__.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Interpreter version: python 2.7 # # Imports ===================================================================== import structures from structures import Publication from structures import DBPublication from structures import Archive from structures import DBArchive...
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Interpreter version: python 2.7 # # Imports ===================================================================== import structures from structures import Publication from structures import DBPublication as _DBPublication from structures import SaveRequest from struc...
mit
Python
02dcef6b4cdc8e075e7db6a04128675707f6cb2c
Add test duplicate threads
pbl-cloud/paas-manager,pbl-cloud/paas-manager,pbl-cloud/paas-manager
test/test_hadoopmodules.py
test/test_hadoopmodules.py
import unittest from paas_manager.hadoop_modules import HadoopModules class Test_HadoopModules(unittest.TestCase): hadoopModules = HadoopModules() mock_path = "test/mock_exec_hadoop.sh" def test_start_hadoop(self): jar_path = "path" args = [] command = ["ssh", "localhost", "test/...
import unittest from paas_manager.hadoop_modules import HadoopModules class Test_HadoopModules(unittest.TestCase): hadoopModules = HadoopModules() mock_path = "test/mock_exec_hadoop.sh" def test_start_hadoop(self): jar_path = "path" args = [] command = ["ssh", "localhost", "test/...
mit
Python
0f7c7c3f6b998a121b167888929f1c47669dc2dc
Remove initialization of unused variable
supriyantomaftuh/roboto,anthrotype/roboto,bowlofstew/roboto,moyogo/roboto,bowlofstew/roboto,googlefonts/roboto,moyogo/roboto,Cartman0/roboto,anthrotype/roboto,urandu/roboto,supriyantomaftuh/roboto,googlefonts/roboto,Cartman0/roboto,urandu/roboto
scripts/lib/fontbuild/generateGlyph.py
scripts/lib/fontbuild/generateGlyph.py
from anchors import alignComponentsToAnchors def parseComposite(composite): c = composite.split("=") d = c[1].split("/") glyphName = d[0] if len(d) == 1: offset = [0,0] else: offset = [int(i) for i in d[1].split(",")] accentString = c[0] accents = accentString.split("+") ...
from anchors import alignComponentsToAnchors def parseComposite(composite): c = composite.split("=") d = c[1].split("/") glyphName = d[0] if len(d) == 1: offset = [0,0] else: offset = [int(i) for i in d[1].split(",")] accentString = c[0] accents = accentString.split("+") ...
apache-2.0
Python
2c36f10094bdb4b09aaba9478207d4cae075a677
Add notes to the test for myself.
WikiWatershed/tr-55
test/test_water_quality.py
test/test_water_quality.py
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division import unittest from tr55.water_quality import get_volume_of_runoff, get_pollutant_load from tr55.tables import POLLUTION_LOADS class TestWaterQuality(unittest.TestCase): def tes...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division import unittest from tr55.water_quality import get_volume_of_runoff, get_pollutant_load from tr55.tables import POLLUTION_LOADS class TestWaterQuality(unittest.TestCase): def tes...
apache-2.0
Python
e35ff2f0e45289c40a57c9488156829c60f9d3a0
Change unicode ip to string
praekelt/vumi-http-proxy,praekelt/vumi-http-proxy
vumi_http_proxy/clickme.py
vumi_http_proxy/clickme.py
#!/usr/bin/env python import click from vumi_http_proxy import http_proxy @click.command() @click.option('--interface', default="0.0.0.0", help='eg 0.0.0.0') @click.option('--port', default=8080, help='eg 80') def cli(interface, port): """This script runs vumi-http-proxy on <interface>:<port>""" interface = ...
#!/usr/bin/env python import click from vumi_http_proxy import http_proxy @click.command() @click.option('--interface', default="0.0.0.0", help='eg 0.0.0.0') @click.option('--port', default=8080, help='eg 80') def cli(interface, port): cli.interface = str(interface) cli.port = port """This script runs vu...
bsd-3-clause
Python
f61d6485b71a08fce68e5e0673c67bf4614c39f5
Use SqlalchemyIntegration.
jazzband/jazzband-site,jazzband/website,jazzband/website,jazzband/site,jazzband/website,jazzband/jazzband-site,jazzband/site,jazzband/website
jazzband/errors.py
jazzband/errors.py
import logging from flask import render_template import sentry_sdk from sentry_sdk.integrations.flask import FlaskIntegration from sentry_sdk.integrations.logging import LoggingIntegration from sentry_sdk.integrations.sqlalchemy import SqlalchemyIntegration from spinach.contrib.sentry_sdk_spinach import SpinachIntegra...
import logging from flask import render_template import sentry_sdk from sentry_sdk.integrations.flask import FlaskIntegration from sentry_sdk.integrations.logging import LoggingIntegration from spinach.contrib.sentry_sdk_spinach import SpinachIntegration def init_app(app): @app.errorhandler(404) def page_not...
mit
Python
2725faaff750801a647e6af4405bf1d67fc827da
bump version
minervaproject/wagtail-jinja2
wagtail_jinja2/__init__.py
wagtail_jinja2/__init__.py
__version__ = '0.1.1'
__version__ = '0.1.0'
mit
Python
e8a59be63c469ac0da54ba788e5d05237c800a31
Remove stale, unfinished code
hivelocity/djiki,hivelocity/djiki
djiki/models.py
djiki/models.py
from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ class Versioned(object): def last_revision(self): try: return self.revisions.order_by('-created')[0] except IndexError: return None def last_change(self): last = self.last_revision() i...
from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ class Versioned(object): def last_revision(self): try: return self.revisions.order_by('-created')[0] except IndexError: return None def last_change(self): last = self.last_revision() i...
bsd-2-clause
Python
571c676cc5562fcdf4a8fdb1758c4eba5cd4ba35
test whitenoise
Newton-Labs/IOT-Service,Newton-Labs/IOT-Service,Newton-Labs/IOT-Service,Newton-Labs/IOT-Service
config/wsgi.py
config/wsgi.py
""" WSGI config for django_iot project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION...
""" WSGI config for django_iot project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION...
mit
Python
a4d245f84a18c754f7e6b95c4588e1e47df0554e
Fix operator whitespace in mkiccp.py
drj11/pypng,drj11/pypng
code/mkiccp.py
code/mkiccp.py
#!/usr/bin/env python # $URL$ # $Rev$ # Make ICC Profile # References # # [ICC 2001] ICC Specification ICC.1:2001-04 (Profile version 2.4.0) # [ICC 2004] ICC Specification ICC.1:2004-10 (Profile version 4.2.0.0) # Local module. import iccp def black(m): """Return a function that maps all values from [0.0,m] to 0...
#!/usr/bin/env python # $URL$ # $Rev$ # Make ICC Profile # References # # [ICC 2001] ICC Specification ICC.1:2001-04 (Profile version 2.4.0) # [ICC 2004] ICC Specification ICC.1:2004-10 (Profile version 4.2.0.0) # Local module. import iccp def black(m): """Return a function that maps all values from [0.0,m] to 0...
mit
Python
0ab782c04febdfa1c5daf945fb01fe1f68498c31
Add gz compression
DoomHammer/ohWafHelpers,openhome/ohWafHelpers
jenkins_release.py
jenkins_release.py
#!/usr/bin/env python """jenkins_release - release ohWafHelpers to linn public (openhome) artifacts """ import os import sys import tarfile try: import boto3 except: print('\nAWS fetch requires boto3 module') print("Please install this using 'pip install boto3'\n") else: # create AWS credentials file (i...
#!/usr/bin/env python """jenkins_release - release ohWafHelpers to linn public (openhome) artifacts """ import os import sys import tarfile try: import boto3 except: print('\nAWS fetch requires boto3 module') print("Please install this using 'pip install boto3'\n") else: # create AWS credentials file (i...
mit
Python
dd6ff5f2706bdc4a8e1c19ba9b31151c65baf242
Fix broadcast command.
unicefuganda/edtrac,unicefuganda/edtrac,unicefuganda/edtrac
education/management/commands/broadcast.py
education/management/commands/broadcast.py
from django.core.management.base import BaseCommand from optparse import make_option from education.send import broadcast class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option("-t", "--text", dest="text"), ) def handle(self, **options): text = options['text'] o...
from django.core.management.base import BaseCommand from optparse import make_option from rapidsms_httprouter.router import get_router from rapidsms.models import Connection class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option("-p", "--phone", dest="phone"), make_optio...
bsd-3-clause
Python
5238ebc5c3b9e86db27791fcce4913a6d83ea7a9
prepare for 0.9.2 release
perdona/titanium_mobile,smit1625/titanium_mobile,peymanmortazavi/titanium_mobile,smit1625/titanium_mobile,bhatfield/titanium_mobile,prop/titanium_mobile,ashcoding/titanium_mobile,sriks/titanium_mobile,KangaCoders/titanium_mobile,AngelkPetkov/titanium_mobile,csg-coder/titanium_mobile,AngelkPetkov/titanium_mobile,jvkops/...
build/titanium_version.py
build/titanium_version.py
version = '0.9.2'
version = '0.9.1'
apache-2.0
Python
9fd2661335e867b2ff2de45fe410189695b8d3a5
Update account_bank_statement_import.py
OCA/bank-statement-import,OCA/bank-statement-import,OCA/bank-statement-import
account_bank_statement_import_camt_oca/models/account_bank_statement_import.py
account_bank_statement_import_camt_oca/models/account_bank_statement_import.py
# Copyright 2013-2016 Therp BV <https://therp.nl> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). import logging from io import BytesIO import zipfile from odoo import api, models _logger = logging.getLogger(__name__) class AccountBankStatementImport(models.TransientModel): _inherit = 'acco...
# Copyright 2013-2016 Therp BV <https://therp.nl> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). import logging from io import BytesIO import zipfile from odoo import api, models _logger = logging.getLogger(__name__) class AccountBankStatementImport(models.TransientModel): _inherit = 'acco...
agpl-3.0
Python
7c57a679330f7300f465f0f9767511f2fdcf6170
Fix Indenting
freiheit/Bay-Oh-Woolph,dark-echo/Bay-Oh-Woolph
cogs/points.py
cogs/points.py
from discord.ext import commands from utils import * import discord import asyncio from member import Member class Points: def __init__(self,bot): self.bot = bot #Test method to populate an array from discord -Infinite @bot.command() @asyncio.coroutine def getmembers(self): #Intialize arr...
from discord.ext import commands from utils import * import discord import asyncio from member import Member class Points: def __init__(self,bot): self.bot = bot #Test method to populate an array from discord -Infinite @bot.command() @asyncio.coroutine def getmembers(): #Intialize array listOfMem...
agpl-3.0
Python
1637a75106bc857a6838c3072ae114312c6470d9
Allow spaces and dots in filenames (#3)
dimatteomaurizio/dirtreex
dirtreex.py
dirtreex.py
#!/usr/bin/env python import argparse import os from walkdir import filtered_walk parser = argparse.ArgumentParser(description='Print the directory-tree code for the LaTeX dirtree package.') parser.add_argument(dest='path', type=str, help="Root directory of the tree") parser.add_argument('-d', '--maxDepth', dest='max...
#!/usr/bin/env python import argparse import os from walkdir import filtered_walk parser = argparse.ArgumentParser(description='Print the directory-tree code for the LaTeX dirtree package.') parser.add_argument(dest='path', type=str, help="Root directory of the tree") parser.add_argument('-d', '--maxDepth', dest='max...
mit
Python
d4d4334ad01cd805fce9e5cdcea4ed1a1abb9c69
Return a tuple instead of list. Patch by Mikhail Stepura for CASSANDRA-6770.
pofallon/cassandra,driftx/cassandra,MasahikoSawada/cassandra,jsanda/cassandra,ptuckey/cassandra,aarushi12002/cassandra,matthewtt/cassandra_read,chbatey/cassandra-1,emolsson/cassandra,Bj0rnen/cassandra,phact/cassandra,hengxin/cassandra,strapdata/cassandra,dkua/cassandra,boneill42/cassandra,sayanh/ViewMaintenanceCassandr...
pylib/cqlshlib/usertypes.py
pylib/cqlshlib/usertypes.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
Python
8c06dd607165c109de23aa41098a8b45e02dcbd8
Remove unintentional debugging
matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse
synapse/events/spamcheck.py
synapse/events/spamcheck.py
# -*- coding: utf-8 -*- # Copyright 2017 New Vector Ltd. # # 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 l...
# -*- coding: utf-8 -*- # Copyright 2017 New Vector Ltd. # # 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 l...
apache-2.0
Python
0eef9d22c6d4a09e77642ff4219eb7e73422aa03
Clean formatting.
rec/josh
color_names.py
color_names.py
colors_dict=dict( ENDC='\033[0m', RED='\033[31m', GREEN='\033[32m', GOLD='\033[33m', BLUE='\033[34m', PURPLE='\033[35m', LIGHTBLUE='\033[36m', GRAY='\033[37m', RED_BG='\033[41m', GREEN_BG='\033[42m', GOLD_BG='\033[43m', BLUE_BG='\033[44m', PURPLE_BG='\033[45m', LI...
colors_dict = dict( ENDC = '\033[0m', RED = '\033[31m', GREEN = '\033[32m', GOLD = '\033[33m', BLUE = '\033[34m', PURPLE = '\033[35m', LIGHTBLUE = '\033[36m', GRAY = '\033[37m', RED_BG = '\033[41m', GREEN_BG = '\033[42m', GOLD_BG = '\033[43m', BLUE_BG = '\033[44m', PU...
mit
Python
78a8efd361cb1b7e90dadbecc3a28faae8f59189
fix typo
Raytray/pyytcast
cleanup_podcasts.py
cleanup_podcasts.py
import os def main(): mypath = "/var/www/files" downloads_folder = "downloads" files = [f for f in os.listdir("{}/{}".format(mypath, downloads_folder)) if f.endswith(".mp3")] feeds = [f for f in os.listdir(mypath) if f.endswith(".xml")] to_delete = files for feed_name in feeds: ...
import os def main(): mypath = "/var/www/files" downloads_folder = "downloads" files = [f for f in os.listdir("{}/{}".format(mypath, downloads_folder)) if f.endswith(".mp3")] feeds = [f for f in os.listdir(mypath) if f.endswith(".xml")] to_delete = files for feed_name in feeds: ...
mit
Python
2188441610e3696b3b697b8858c4f162d3635119
modify login view to redirect login page
buildbuild/buildbuild,buildbuild/buildbuild,buildbuild/buildbuild
buildbuild/users/views.py
buildbuild/users/views.py
from django.http import HttpResponseRedirect,request from django.views.generic.base import RedirectView from django.views.generic.edit import FormView from django.views.generic.list import ListView from django.views.generic import DetailView from django.contrib.auth import login from django.contrib.auth import logout...
from django.http import HttpResponseRedirect,request from django.views.generic.base import RedirectView from django.views.generic.edit import FormView from django.views.generic.list import ListView from django.views.generic import DetailView from django.contrib.auth import login from django.contrib.auth import logout...
bsd-3-clause
Python
393c621c8775405ec2582f529f93c35d3ed64ae6
Refactor to use the validation API.
chrippa/livestreamer,chhe/livestreamer,chhe/streamlink,hmit/livestreamer,streamlink/streamlink,jtsymon/livestreamer,mmetak/streamlink,gtmanfred/livestreamer,javiercantero/streamlink,Masaz-/livestreamer,blxd/livestreamer,ethanhlc/streamlink,back-to/streamlink,Saturn/livestreamer,ethanhlc/streamlink,okaywit/livestreamer,...
src/livestreamer/plugins/furstream.py
src/livestreamer/plugins/furstream.py
import re from livestreamer.plugin import Plugin from livestreamer.plugin.api import http, validate from livestreamer.stream import RTMPStream _url_re = re.compile("^http(s)?://(\w+\.)?furstre\.am/stream/.+") _stream_url_re = re.compile("<source src=\"([^\"]+)\"") _schema = validate.Schema( validate.transform(_s...
import re from livestreamer.exceptions import PluginError from livestreamer.plugin import Plugin from livestreamer.plugin.api import http from livestreamer.stream import RTMPStream class Furstream(Plugin): @classmethod def can_handle_url(cls, url): return re.match("^http(s)?://(\w+\.)?furstre\.am/st...
bsd-2-clause
Python
0a4fc3efa63a2d6ed12a62117814f0c595ea3ddf
update version to 0.4.5
desihub/desimodel,desihub/desimodel
py/desimodel/_version.py
py/desimodel/_version.py
__version__ = '0.4.5'
__version__ = '0.4.4.dev53'
bsd-3-clause
Python
c52db37db15ac776f505d5f8fc70df8445a1a97f
Remove old *RST command
WCP52/docs,WCP52/docs,WCP52/docs
testing/gui/serial_comm.py
testing/gui/serial_comm.py
#!/usr/bin/env python """ This file contains the functions necessary to establish and use a serial connection to the Gain/Phase Analyzer In order to set up a connection to the gain/phase analyzer properly, you must first call connect_gpa(). It returns a serial object which is then used to initialize board periphera...
#!/usr/bin/env python """ This file contains the functions necessary to establish and use a serial connection to the Gain/Phase Analyzer In order to set up a connection to the gain/phase analyzer properly, you must first call connect_gpa(). It returns a serial object which is then used to initialize board periphera...
bsd-3-clause
Python
662e67fbee35ffb29beecdfcf7ce4ceee7a763de
bump version
danpoland/pyramid-restful-framework
pyramid_restful/__init__.py
pyramid_restful/__init__.py
from .settings import reload_api_settings __version__ = '0.8.0' VERSION = __version__ def includeme(config): reload_api_settings(config.registry.settings)
from .settings import reload_api_settings __version__ = '0.7.2' VERSION = __version__ def includeme(config): reload_api_settings(config.registry.settings)
bsd-2-clause
Python
cc4f2e7e8b3cf9b11f92c983bd07dfeab31f8a4a
Add Terminator to beam_file rule.
matwey/pybeam
pybeam/beam_construct.py
pybeam/beam_construct.py
# # Copyright (c) 2013 Matwey V. Kornilov <matwey.kornilov@gmail.com> # # 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, ...
# # Copyright (c) 2013 Matwey V. Kornilov <matwey.kornilov@gmail.com> # # 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, ...
mit
Python
c0965127b63a5cd9bbe67442f8cd43778767273e
Disable completely as failing with mbedTLS.
pfalcon/micropython,pfalcon/micropython,pfalcon/micropython,pfalcon/micropython,pfalcon/micropython
tests/extmod/ussl_basic.py
tests/extmod/ussl_basic.py
# very basic test of ssl module, just to test the methods exist # Way too basic, doesn't really work across different TLS libs print("SKIP") raise SystemExit try: import uio as io import ussl as ssl except ImportError: print("SKIP") raise SystemExit # create in client mode try: ss = ssl.wrap_sock...
# very basic test of ssl module, just to test the methods exist try: import uio as io import ussl as ssl except ImportError: print("SKIP") raise SystemExit # create in client mode try: ss = ssl.wrap_socket(io.BytesIO()) except OSError as er: print('wrap_socket:', repr(er)) # create in server ...
mit
Python
75eaeff70de3490dd0817d932f5bfb46a22137dc
Make sure to close file handle when saving workbook
kz26/PyExcelerate
pyexcelerate/Workbook.py
pyexcelerate/Workbook.py
from . import Worksheet from .Writer import Writer from . import Utility import time class Workbook(object): # map for attribute sets => style attribute id's STYLE_ATTRIBUTE_MAP = {'fonts':'_font', 'fills':'_fill', 'num_fmts':'_format', 'borders':'_borders'} STYLE_ID_ATTRIBUTE = 'id' def __init__(self, encoding='u...
from . import Worksheet from .Writer import Writer from . import Utility import time class Workbook(object): # map for attribute sets => style attribute id's STYLE_ATTRIBUTE_MAP = {'fonts':'_font', 'fills':'_fill', 'num_fmts':'_format', 'borders':'_borders'} STYLE_ID_ATTRIBUTE = 'id' def __init__(self, encoding='u...
bsd-2-clause
Python
4c5d9866f3ec0fd570eaa2b3a4c073d9dd74c3cf
Write test for CTRL-C interrupt
BakeCode/performance-testing,BakeCode/performance-testing
tests/routine/test_tool.py
tests/routine/test_tool.py
import unittest from performance.routine import Tool, Config from performance.web import Request from io import StringIO import sys from threading import Thread import _thread import time class ToolTestCase(unittest.TestCase): def setUp(self): self.host = 'http://www.google.com' self.requests = []...
import unittest from performance.routine import Tool, Config from performance.web import Request from io import StringIO import sys class ToolTestCase(unittest.TestCase): def setUp(self): self.host = 'http://www.google.com' self.requests = [] self.requests.append(Request(url='/')) ...
mit
Python
e76433fa0f7c239d43efa84ef987bad9c5850c7a
Comment on automatic initiating user logging in celery
opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor
nodeconductor/server/celery.py
nodeconductor/server/celery.py
from __future__ import absolute_import import os from celery import Celery from celery import signals from django.conf import settings from nodeconductor.core.middleware import set_current_user, get_current_user, reset_current_user # set the default Django settings module for the 'celery' program. os.environ.setdef...
from __future__ import absolute_import import os from celery import Celery from celery import signals from django.conf import settings from nodeconductor.core.middleware import set_current_user, get_current_user, reset_current_user # set the default Django settings module for the 'celery' program. os.environ.setdef...
mit
Python
870704c1005c3d9338afeb88ca56b7b015cc1850
Fix XML tag naming
TD22057/T-Home,TD22057/T-Home
python/tHome/eagle/parse.py
python/tHome/eagle/parse.py
#=========================================================================== # # Parse XML messages into an object. # #=========================================================================== import xml.etree.ElementTree as ET from . import messages #=================================================================...
#=========================================================================== # # Parse XML messages into an object. # #=========================================================================== import xml.etree.ElementTree as ET from . import messages #=================================================================...
bsd-2-clause
Python
98988c227c3ce1bd26608aa762fb321b811da26a
Bump version to 5.1.0
alphagov/notifications-utils
notifications_utils/version.py
notifications_utils/version.py
__version__ = '5.1.0'
__version__ = '5.0.0'
mit
Python
acc7871118abc7b57cd3f5aa8d418f9bd2991a6a
Implement Filter.__eq__
sherlocke/pywatson
pywatson/question/filter.py
pywatson/question/filter.py
from enum import Enum class FilterType(Enum): date_range_filter = 'dateRangeFilter' metadata_filter = 'metadataFilter' prefix_filter = 'prefixFilter' query_filter = 'queryFilter' class Filter(object): """Use a Filter to restrict answers using metadata""" def __init__(self, filter_type, fiel...
from enum import Enum class FilterType(Enum): date_range_filter = 'dateRangeFilter' metadata_filter = 'metadataFilter' prefix_filter = 'prefixFilter' query_filter = 'queryFilter' class Filter(object): """Use a Filter to restrict answers using metadata""" def __init__(self, filter_type, fiel...
mit
Python
75f71693eea9ecf6187b3fe9d2bf3738e0fc902b
duplicate import
Danfocus/Flexget,gazpachoking/Flexget,drwyrm/Flexget,ianstalk/Flexget,oxc/Flexget,poulpito/Flexget,jacobmetrick/Flexget,drwyrm/Flexget,OmgOhnoes/Flexget,JorisDeRieck/Flexget,tobinjt/Flexget,malkavi/Flexget,crawln45/Flexget,OmgOhnoes/Flexget,qk4l/Flexget,jacobmetrick/Flexget,Danfocus/Flexget,OmgOhnoes/Flexget,LynxyssCZ/...
tests/test_cached_input.py
tests/test_cached_input.py
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin from datetime import timedelta import pytest from flexget.utils.cached_input import cached from flexget import plugin from flexget.entry import Entry class InputPersist(obje...
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin from datetime import timedelta import pytest from flexget.utils.cached_input import cached from flexget import plugin from flexget.entry import Entry class InputPersist(obje...
mit
Python
3671ed25daeee90942946364529d4652e87914c9
Make copy test more robust
JIC-CSB/dtoolcore
tests/test_copy_dataset.py
tests/test_copy_dataset.py
"""Test the dtoolcore.copy function.""" import os from . import tmp_dir_fixture # NOQA from . import TEST_SAMPLE_DATA def test_copy(tmp_dir_fixture): # NOQA import dtoolcore src_dir = os.path.join(tmp_dir_fixture, "src") dest_dir = os.path.join(tmp_dir_fixture, "dest") for directory in [src_dir,...
"""Test the dtoolcore.copy function.""" import os from . import tmp_dir_fixture # NOQA from . import TEST_SAMPLE_DATA def test_copy(tmp_dir_fixture): # NOQA import dtoolcore src_dir = os.path.join(tmp_dir_fixture, "src") dest_dir = os.path.join(tmp_dir_fixture, "dest") for directory in [src_dir,...
mit
Python
803338db95a3a9368395c9ed1b63c1802187d940
Make test_examplefiles show a better error when there are strange files hanging out in the examplefiles dir.
kirbyfan64/pygments-unofficial,kirbyfan64/pygments-unofficial,nsfmc/pygments,dbrgn/pygments-mirror,Khan/pygments,kirbyfan64/pygments-unofficial,dbrgn/pygments-mirror,kirbyfan64/pygments-unofficial,nsfmc/pygments,Khan/pygments,kirbyfan64/pygments-unofficial,nsfmc/pygments,Khan/pygments,Khan/pygments,kirbyfan64/pygments-...
tests/test_examplefiles.py
tests/test_examplefiles.py
# -*- coding: utf-8 -*- """ Pygments tests with example files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: 2006-2008 by Georg Brandl. :license: BSD, see LICENSE for more details. """ import os import unittest from pygments import highlight from pygments.lexers import get_lexer_for_filename, get_lexe...
# -*- coding: utf-8 -*- """ Pygments tests with example files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: 2006-2008 by Georg Brandl. :license: BSD, see LICENSE for more details. """ import os import unittest from pygments import highlight from pygments.lexers import get_lexer_for_filename, get_lexe...
bsd-2-clause
Python
c8ccd7d93c3daac3fa3e2f258f84530ca7752489
tweak test setup
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine
qa_tests/disagg_unittest.py
qa_tests/disagg_unittest.py
# Copyright (c) 2010-2011, GEM Foundation. # # OpenQuake is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 # only, as published by the Free Software Foundation. # # OpenQuake is distributed in the hope that it will be useful, # but WITHOUT AN...
# Copyright (c) 2010-2011, GEM Foundation. # # OpenQuake is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 # only, as published by the Free Software Foundation. # # OpenQuake is distributed in the hope that it will be useful, # but WITHOUT AN...
agpl-3.0
Python
082f94f446cac9003be0e24a9dc2b27d3357c15a
Use specific exception.
zmughal/pygments-mirror,zmughal/pygments-mirror,zmughal/pygments-mirror,sol/pygments,zmughal/pygments-mirror,zmughal/pygments-mirror,zmughal/pygments-mirror,zmughal/pygments-mirror,zmughal/pygments-mirror,sol/pygments,zmughal/pygments-mirror,zmughal/pygments-mirror,zmughal/pygments-mirror,sol/pygments,sol/pygments,sol/...
tests/test_examplefiles.py
tests/test_examplefiles.py
# -*- coding: utf-8 -*- """ Pygments tests with example files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: 2006-2008 by Georg Brandl. :license: BSD, see LICENSE for more details. """ import os import unittest from pygments import highlight from pygments.lexers import get_lexer_for_filename, get_lexe...
# -*- coding: utf-8 -*- """ Pygments tests with example files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: 2006-2007 by Georg Brandl. :license: BSD, see LICENSE for more details. """ import os import unittest from pygments import highlight from pygments.lexers import get_lexer_for_filename, get_lexe...
bsd-2-clause
Python
1fe82d43e4f6678cc9645d9827cc0d4c109d1663
make use of test generators for test_examplefiles
spencerlyon2/pygments,spencerlyon2/pygments,spencerlyon2/pygments,spencerlyon2/pygments,spencerlyon2/pygments,spencerlyon2/pygments,spencerlyon2/pygments,spencerlyon2/pygments,spencerlyon2/pygments,spencerlyon2/pygments,spencerlyon2/pygments,spencerlyon2/pygments,spencerlyon2/pygments,spencerlyon2/pygments,spencerlyon2...
tests/test_examplefiles.py
tests/test_examplefiles.py
# -*- coding: utf-8 -*- """ Pygments tests with example files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: 2006-2008 by Georg Brandl. :license: BSD, see LICENSE for more details. """ import os import unittest from pygments import highlight from pygments.lexers import get_lexer_for_filename, get_lexe...
# -*- coding: utf-8 -*- """ Pygments tests with example files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: 2006-2008 by Georg Brandl. :license: BSD, see LICENSE for more details. """ import os import unittest from pygments import highlight from pygments.lexers import get_lexer_for_filename, get_lexe...
bsd-2-clause
Python
5489e6583d4778e20f624bb53382f3608dab1839
Install Tornado in user
codelv/enaml-native,codelv/enaml-native,codelv/enaml-native,codelv/enaml-native
tests/test_remote_debug.py
tests/test_remote_debug.py
""" Copyright (c) 2017, Jairus Martin. Distributed under the terms of the MIT License. The full license is in the file LICENSE, distributed with this software. Created on Oct 4, 2017 @author: jrm """ import sh import sys def main(): # Make sure instance is cleared from enaml.application import Application...
""" Copyright (c) 2017, Jairus Martin. Distributed under the terms of the MIT License. The full license is in the file LICENSE, distributed with this software. Created on Oct 4, 2017 @author: jrm """ import sh import sys def main(): # Make sure instance is cleared from enaml.application import Application...
mit
Python
86b2006d46f31a7020ebcb7f6a95d76ea1dba674
Fix transform3D for pyside2
pbmanis/acq4,pbmanis/acq4,meganbkratz/acq4,acq4/acq4,acq4/acq4,campagnola/acq4,pbmanis/acq4,acq4/acq4,meganbkratz/acq4,acq4/acq4,pbmanis/acq4,campagnola/acq4,campagnola/acq4,meganbkratz/acq4,meganbkratz/acq4,campagnola/acq4
pyqtgraph/Transform3D.py
pyqtgraph/Transform3D.py
# -*- coding: utf-8 -*- from .Qt import QtCore, QtGui from . import functions as fn from .Vector import Vector import numpy as np class Transform3D(QtGui.QMatrix4x4): """ Extension of QMatrix4x4 with some helpful methods added. """ def __init__(self, *args): if len(args) == 1: if i...
# -*- coding: utf-8 -*- from .Qt import QtCore, QtGui from . import functions as fn from .Vector import Vector import numpy as np class Transform3D(QtGui.QMatrix4x4): """ Extension of QMatrix4x4 with some helpful methods added. """ def __init__(self, *args): if len(args) == 1 and isinstance(ar...
mit
Python
939d742b9bb32a0d18298a97355085d82b330aab
Disable segmentation test
mmcauliffe/python-acoustic-similarity,mmcauliffe/python-acoustic-similarity,mmcauliffe/python-acoustic-similarity
tests/test_segmentation.py
tests/test_segmentation.py
from acousticsim.representations import Mfcc #def test_segmentation(concatenated, do_long_tests): # rep = Mfcc(None,freq_lims = (80,8000), num_coeffs=13, win_len=0.025, # time_step=0.01, num_filters = 26, use_power = False, # attributes=None, deltas = False) # rep....
from acousticsim.representations import Mfcc def test_segmentation(concatenated, do_long_tests): if not do_long_tests: return rep = Mfcc(None,freq_lims = (80,8000), num_coeffs=13, win_len=0.025, time_step=0.01, num_filters = 26, use_power = False, attri...
mit
Python
b9ec31879af42bfc504fd36dcade78ebaff0c0e9
add version code
by46/recipe,by46/recipe,by46/recipe,by46/recipe,by46/recipe
recipe/commands/__init__.py
recipe/commands/__init__.py
from basecommand import Command from listcommand import ListCommand from project import ProjectCommand from version import VersionCommand Command.register() Command.register(ProjectCommand) Command.register(ListCommand) Command.register(VersionCommand)
from basecommand import Command from listcommand import ListCommand from project import ProjectCommand Command.register() Command.register(ProjectCommand) Command.register(ListCommand)
mit
Python
5e5fa13161ba51985c53d9b73fad56301da5a21f
add CHANNEL_TYPE_TEXT, CONN_IFACE_CONTACTS and CONN_IFACE_CONTACT_CAPA
community-ssu/telepathy-gabble,Ziemin/telepathy-gabble,Ziemin/telepathy-gabble,jku/telepathy-gabble,jku/telepathy-gabble,community-ssu/telepathy-gabble,mlundblad/telepathy-gabble,jku/telepathy-gabble,community-ssu/telepathy-gabble,community-ssu/telepathy-gabble,Ziemin/telepathy-gabble,mlundblad/telepathy-gabble,Ziemin/...
tests/twisted/constants.py
tests/twisted/constants.py
""" Some handy constants for other tests to share and enjoy. """ HT_CONTACT = 1 HT_ROOM = 2 CHANNEL = "org.freedesktop.Telepathy.Channel" CHANNEL_IFACE_GROUP = CHANNEL + ".Interface.Group" CHANNEL_TYPE_TEXT = CHANNEL + ".Type.Text" CHANNEL_TYPE_TUBES = CHANNEL + ".Type.Tubes" CHANNEL_IFACE_TUBE = CHANNEL + ".Interfac...
""" Some handy constants for other tests to share and enjoy. """ HT_CONTACT = 1 HT_ROOM = 2 CHANNEL = "org.freedesktop.Telepathy.Channel" CHANNEL_IFACE_GROUP = CHANNEL + ".Interface.Group" CHANNEL_TYPE_TUBES = CHANNEL + ".Type.Tubes" CHANNEL_IFACE_TUBE = CHANNEL + ".Interface.Tube.DRAFT" CHANNEL_TYPE_STREAM_TUBE = CH...
lgpl-2.1
Python
f6b3fdbb182f685c3b76daa60a66000ee8ab65bc
Update package version
amateja/pytest-flask
pytest_flask/__init__.py
pytest_flask/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = "0.7.1"
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = "0.7.0"
mit
Python
af741a0c7c2bf530b212744ecc1458bfe161bd75
Update adapter_16mers.py
hackseq/2017_project_6,hackseq/2017_project_6,hackseq/2017_project_6,hackseq/2017_project_6
select_random_subset/adapter_16mers.py
select_random_subset/adapter_16mers.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Oct 21 14:15:18 2017 @author: nikka.keivanfar """ chmod +x select_random_subset/adapter_16mers.py #to do: fasta as input #to do: scrap dictionaries, make sets P5_read1 = 'AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT' P7 = 'CAAGCAGAAGACGG...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Oct 21 14:15:18 2017 @author: nikka.keivanfar """ chmod +x select_random_subset/adapter_16mers.py #to do: fasta as input #to do: scrap dictionaries, make sets P5_read1 = 'AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT' P7 = 'CAAGCAGAAGACGG...
mit
Python
295c19d63dd0af4340ebf576ff8ac29fb39fae82
Update for wowp 0.1.3
janpipek/chagallpy,janpipek/chagallpy,janpipek/chagallpy
chagallpy/__init__.py
chagallpy/__init__.py
__version__ = str('0.1.0') import sys def generate(): from wowp.actors.experimental import Chain from wowp.actors.mapreduce import Map from wowp.util import ConstructorWrapper from chagallpy.thumbnail_creator import ThumbnailCreator from chagallpy.image_sorter import ImageSorter from chagall...
__version__ = str('0.1.0') import sys def generate(): from wowp.actors.experimental import Chain from wowp.actors.mapreduce import Map from chagallpy.thumbnail_creator import ThumbnailCreator from chagallpy.image_sorter import ImageSorter from chagallpy.exif_data_reader import ExifDataReader ...
mit
Python
890082e5d4274f4a7cc49c619003cfd2d9f22845
raise errors from loadxl
hms-dbmi/fourfront,hms-dbmi/fourfront,hms-dbmi/fourfront,hms-dbmi/fourfront,4dn-dcic/fourfront,4dn-dcic/fourfront,4dn-dcic/fourfront,4dn-dcic/fourfront,hms-dbmi/fourfront
src/encoded/tests/features/conftest.py
src/encoded/tests/features/conftest.py
import pytest # this file was previously used to setup the test fixtures for the BDD tests. # now, it holds the app_settings / app / workbook needed to test a full # app, including elasticsearch and loaded workbook inserts @pytest.fixture def external_tx(): pass @pytest.fixture(scope='session') def app_settings...
import pytest # this file was previously used to setup the test fixtures for the BDD tests. # now, it holds the app_settings / app / workbook needed to test a full # app, including elasticsearch and loaded workbook inserts @pytest.fixture def external_tx(): pass @pytest.fixture(scope='session') def app_settings...
mit
Python
a5fa0dc73002e50266bfc6712636120110d76249
add reference comment
sql-machine-learning/sqlflow,sql-machine-learning/sqlflow,sql-machine-learning/sqlflow,sql-machine-learning/sqlflow,sql-machine-learning/sqlflow,sql-machine-learning/sqlflow
example/fraud_detection/creditcard_data.py
example/fraud_detection/creditcard_data.py
# Reference: https://github.com/tensorflow/models/blob/master/samples/core/get_started/iris_data.py # which released under the Apache License 2.0 import pandas as pd import tensorflow as tf TRAIN_DATA_FILE = './creditcard.csv.train' TEST_DATA_FILE = './creditcard.csv.test' CSV_COLUMN_NAMES = ["Time"] + ["V"+str(i) f...
import pandas as pd import tensorflow as tf TRAIN_DATA_FILE = './creditcard.csv.train' TEST_DATA_FILE = './creditcard.csv.test' CSV_COLUMN_NAMES = ["Time"] + ["V"+str(i) for i in range(1,29)] + ["Amount", "Class"] def load_data(y_name='Class'): """Returns the iris dataset as (train_x, train_y), (test_x, test_y)....
apache-2.0
Python
9a8875b3788b7ed97641e8da81b138c93b8d8daa
Change DisableView to match release notes
Bouke/django-two-factor-auth,Bouke/django-two-factor-auth
two_factor/views/profile.py
two_factor/views/profile.py
from django.conf import settings from django.contrib.auth.decorators import login_required from django.shortcuts import redirect, resolve_url from django.views.decorators.cache import never_cache from django.views.generic import FormView, TemplateView from django_otp import devices_for_user, user_has_device from ..for...
from django.conf import settings from django.contrib.auth.decorators import login_required from django.shortcuts import redirect, resolve_url from django.views.decorators.cache import never_cache from django.views.generic import FormView, TemplateView from django_otp import devices_for_user, user_has_device from ..for...
mit
Python
acd046e60332b929fcd71a0092d41f9e682af6c6
remove print line
cloud4rpi/cloud4rpi
c4r/ds18b20.py
c4r/ds18b20.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re W1_DEVICES = '/sys/bus/w1/devices/' W1_SENSOR_PATTERN = re.compile('(10|22|28)-.+', re.IGNORECASE) SUPPORTED_TYPE = 'ds18b20' def sensor_full_path(sensor): return os.path.join(W1_DEVICES, sensor, 'w1_slave') def __create_sensor(address): ret...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re W1_DEVICES = '/sys/bus/w1/devices/' W1_SENSOR_PATTERN = re.compile('(10|22|28)-.+', re.IGNORECASE) SUPPORTED_TYPE = 'ds18b20' def sensor_full_path(sensor): return os.path.join(W1_DEVICES, sensor, 'w1_slave') def __create_sensor(address): ret...
mit
Python
e6444613cd79fe9391cb76fca28bc09c64ed0d41
package testapp in linux
marshall/titanium,marshall/titanium,marshall/titanium,marshall/titanium,marshall/titanium,marshall/titanium
build/package-testapp.py
build/package-testapp.py
#!/usr/bin/env python # this script creates build/<os>/titanium_testapp folder # after running this script, you can execute the test app with <os>/titanium_testapp/titanium_testapp import os, os.path as path, shutil, glob import distutils.dir_util as dir_util import sys app_name = 'titanium_testapp' versio...
#!/usr/bin/env python # this script creates build/<os>/titanium_testapp folder # after running this script, you can execute the test app with <os>/titanium_testapp/titanium_testapp import os, os.path as path, shutil, glob import distutils.dir_util as dir_util app_name = 'titanium_testapp' version = '0.2' ...
apache-2.0
Python
d648f7bc936e163a48e85fc2b07d6bb1d862e886
work on CLI parser
ogrisel/cardice
cardice/cli.py
cardice/cli.py
import argparse import sys USAGE = """cardice command [options...]""" def make_parser(): """Parse commandline arguments using a git-like subcommands scheme""" common_parser = argparse.ArgumentParser( add_help=False, ) common_parser.add_argument( "--cardice-folder", default="~...
import argparse import sys def parse_arguments(args): # TODO pass class CommandHandler(object): def __init__(self, common_opts): self.common_opts = common_opts def handle(self, cmd, options): """Execute the specified command parameterized by CLI options""" getattr(self, cmd...
mit
Python
435b989d75b9e57cf2fe5fec6892c481a278a102
Update an example capabilities file
mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase
examples/capabilities/selenoid_cap_file.py
examples/capabilities/selenoid_cap_file.py
# Desired capabilities example file for Selenoid Grid # # The same result can be achieved on the command-line. Eg: # --cap-string='{"selenoid:options": {"enableVNC": true}}' capabilities = { "acceptSslCerts": True, "acceptInsecureCerts": True, "screenResolution": "1920x1080x24", "selenoid:options":...
# Desired capabilities example file for Selenoid Grid # # The same result can be achieved on the command-line with: # --cap-string='{"selenoid:options": {"enableVNC": true}}' capabilities = { "screenResolution": "1280x1024x24", "selenoid:options": { "enableVNC": True, "enableVideo": False, ...
mit
Python