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
e2228be1026bbf6b1b7f17791630c1ed9d365f0c
remove the debug print
rajpushkar83/cloudmesh,rajpushkar83/cloudmesh,rajpushkar83/cloudmesh,rajpushkar83/cloudmesh,rajpushkar83/cloudmesh,rajpushkar83/cloudmesh,rajpushkar83/cloudmesh
cloudmesh_web/modules/git.py
cloudmesh_web/modules/git.py
from cloudmesh.util.gitinfo import GitInfo from cloudmesh_common.logger import LOGGER from flask import Blueprint, render_template from flask.ext.login import login_required from pprint import pprint, pprint from sh import git import requests log = LOGGER(__file__) git_module = Blueprint('git_module', __name__) @gi...
from cloudmesh.util.gitinfo import GitInfo from cloudmesh_common.logger import LOGGER from flask import Blueprint, render_template from flask.ext.login import login_required from pprint import pprint, pprint from sh import git import requests log = LOGGER(__file__) git_module = Blueprint('git_module', __name__) @gi...
apache-2.0
Python
f5e1b6482d36b92309ad06fee0be279371ca6a32
change queue for dump
sunlightlabs/read_FEC,sunlightlabs/read_FEC,sunlightlabs/read_FEC,sunlightlabs/read_FEC
fecreader/downloads/views.py
fecreader/downloads/views.py
import json from celeryproj.tasks import dump_filing_sked_celery, dump_committee_sked_celery from celery.result import AsyncResult from django.shortcuts import redirect from django.shortcuts import get_object_or_404, render_to_response from reconciliation.utils.json_helpers import render_to_json, render_to_json_via_...
import json from celeryproj.tasks import dump_filing_sked_celery, dump_committee_sked_celery from celery.result import AsyncResult from django.shortcuts import redirect from django.shortcuts import get_object_or_404, render_to_response from reconciliation.utils.json_helpers import render_to_json, render_to_json_via_...
bsd-3-clause
Python
eefa4ccdac979d58d3cf2511d7f6d4d19a6de0ca
remove ENGINE from conf before creating backend
dimagi/rapidsms-threadless-router,dimagi/rapidsms-threadless-router,caktus/rapidsms-threadless-router
threadless_router/router.py
threadless_router/router.py
import copy from rapidsms.conf import settings from rapidsms.router import Router as LegacyRouter class Router(LegacyRouter): """ RapidSMS router with the threading and Queue parts removed """ def __init__(self): super(Router, self).__init__() self.start() def start(self): self....
from rapidsms.conf import settings from rapidsms.router import Router as LegacyRouter class Router(LegacyRouter): """ RapidSMS router with the threading and Queue parts removed """ def __init__(self): super(Router, self).__init__() self.start() def start(self): self.info("startin...
bsd-3-clause
Python
54b7d45d25d311f184276b7d7ba701c2fa1ae2db
fix bp bug (closes #758)
laurent-george/weboob,Konubinix/weboob,frankrousseau/weboob,frankrousseau/weboob,sputnick-dev/weboob,eirmag/weboob,willprice/weboob,yannrouillard/weboob,Boussadia/weboob,franek/weboob,Boussadia/weboob,yannrouillard/weboob,Boussadia/weboob,nojhan/weboob-devel,RouxRC/weboob,RouxRC/weboob,Konubinix/weboob,laurent-george/w...
modules/bp/pages/accountlist.py
modules/bp/pages/accountlist.py
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Nicolas Duhamel # # This file is part of weboob. # # weboob 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 y...
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Nicolas Duhamel # # This file is part of weboob. # # weboob 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 y...
agpl-3.0
Python
1f28c855a11d658ac312191d57b37253cf69a2b1
fix modify_corpus to know own directory
benjaminwilson/word2vec-norm-experiments,benjaminwilson/word2vec-norm-experiments
modify_corpus.py
modify_corpus.py
""" Modifies an input text for the experiments according to the parameters defined in parameters.py Assumes the filenames from filenames.sh Writes out files listing the words chosen. Requires sufficient diskspace to write out the modified text at intermediate steps. """ from __future__ import print_function import os f...
""" Modifies an input text for the experiments according to the parameters defined in parameters.py Assumes the filenames from filenames.sh Writes out files listing the words chosen. Requires sufficient diskspace to write out the modified text at intermediate steps. """ from __future__ import print_function from parame...
apache-2.0
Python
3fbfe633899b9e95534ff612a3f509ba0c1a1a65
Add comments
suclearnub/scubot
modules/roles.py
modules/roles.py
import discord import shlex rolesTriggerString = '!role' # String to listen for as trigger async def parse_roles_command(message, client): server_roles = message.server.roles # Grab a list of all roles as Role objects server_roles_str = [x.name for x in server_roles] # String-ify it into their names msg =...
import discord import shlex rolesTriggerString = '!role' async def parse_roles_command(message, client): server_roles = message.server.roles server_roles_str = [x.name for x in server_roles] msg = shlex.split(message.content) role = [i for i,x in enumerate(server_roles_str) if x == msg[1]] if len(...
mit
Python
b55bdbc192d2a28987b42a8e495f070958eb592d
Remove slicing.
pbs/cmsplugin-filer,pbs/cmsplugin-filer,pbs/cmsplugin-filer,pbs/cmsplugin-filer
cmsplugin_filer_image/migrations/0002_delete_duplicate_thumbnailoptions.py
cmsplugin_filer_image/migrations/0002_delete_duplicate_thumbnailoptions.py
from django.db import migrations from django.db.models import Count def forward(apps, schema_editor): """ Get all the duplicates for ThumbnailOption. Point each FilerImage where the duplicates are used to the correct ThumbnailOption. Delete remaining ThumbnailOption duplicates. """ Thumbna...
from django.db import migrations from django.db.models import Count def forward(apps, schema_editor): """ Get all the duplicates for ThumbnailOption. Point each FilerImage where the duplicates are used to the correct ThumbnailOption. Delete remaining ThumbnailOption duplicates. """ Thumbna...
bsd-3-clause
Python
e06416aca47adf82942fe31b416cec830c8b46f2
Add operation to delete an Event
pferreir/indico,mvidalgarcia/indico,mic4ael/indico,pferreir/indico,indico/indico,DirkHoffmann/indico,OmeGak/indico,mic4ael/indico,indico/indico,ThiefMaster/indico,DirkHoffmann/indico,DirkHoffmann/indico,OmeGak/indico,mic4ael/indico,mvidalgarcia/indico,indico/indico,indico/indico,mvidalgarcia/indico,pferreir/indico,OmeG...
indico/modules/events/operations.py
indico/modules/events/operations.py
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
mit
Python
2689f26434a23cf81e72c2ca6320f46d092bc22b
Add missing import to server/application_context.py
justacec/bokeh,percyfal/bokeh,ptitjano/bokeh,quasiben/bokeh,aavanian/bokeh,bokeh/bokeh,ptitjano/bokeh,draperjames/bokeh,stonebig/bokeh,aavanian/bokeh,schoolie/bokeh,stonebig/bokeh,maxalbert/bokeh,bokeh/bokeh,DuCorey/bokeh,KasperPRasmussen/bokeh,clairetang6/bokeh,KasperPRasmussen/bokeh,bokeh/bokeh,ericmjl/bokeh,schoolie...
bokeh/server/application_context.py
bokeh/server/application_context.py
''' Provides the ``ApplicationContext`` class. ''' from __future__ import absolute_import import logging log = logging.getLogger(__name__) from .session import ServerSession from .exceptions import ProtocolError class ApplicationContext(object): ''' Server-side holder for bokeh.application.Application plus any ...
''' Provides the ``ApplicationContext`` class. ''' from __future__ import absolute_import import logging log = logging.getLogger(__name__) from .session import ServerSession class ApplicationContext(object): ''' Server-side holder for bokeh.application.Application plus any associated data. This holds da...
bsd-3-clause
Python
9c3e34a6e8793ad79e605fa956f0ac60a4bb6fcf
Use transactions on server side also (probably worth performance penalty)
altaurog/django-caspy,altaurog/django-caspy,altaurog/django-caspy
caspy/api/urls.py
caspy/api/urls.py
import re from django.conf.urls import patterns, url from django.db import transaction from rest_framework.decorators import api_view from rest_framework.response import Response from . import views urlre_p1 = re.compile(r'\(\?P<\w+>.*\(\?#(:\w+)\)\)') urlre_p2 = re.compile(r'^\^|\$$') def rev(viewname): for ur...
import re from django.conf.urls import patterns, url from rest_framework.decorators import api_view from rest_framework.response import Response from . import views urlre_p1 = re.compile(r'\(\?P<\w+>.*\(\?#(:\w+)\)\)') urlre_p2 = re.compile(r'^\^|\$$') def rev(viewname): for urlp in urlpatterns: if urlp...
bsd-3-clause
Python
3703d9fd3cb211c52a9d2beddc2d9b2ce99cb1a0
Remove double import
cjh1/tomviz,cjh1/tomviz,cryos/tomviz,thewtex/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz,mathturtle/tomviz,thewtex/tomviz,mathturtle/tomviz,cryos/tomviz,thewtex/tomviz,cjh1/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz,cryos/tomviz,mathturtle/tomviz
tomviz/python/STEM_probe.py
tomviz/python/STEM_probe.py
def generate_dataset(array): """Generate STEM probe function""" import numpy as np #----USER SPECIFIED VARIABLES-----# ###voltage### ###alpha_max### ###Nxy### ###Nz### ###dxy### ###df_min### ###df_max### ###c3### ###f_a2### ###phi_a2### ###f_a3### ###phi_a3##...
def generate_dataset(array): import numpy as np """Generate STEM probe function""" import numpy as np #----USER SPECIFIED VARIABLES-----# ###voltage### ###alpha_max### ###Nxy### ###Nz### ###dxy### ###df_min### ###df_max### ###c3### ###f_a2### ###phi_a2### ###...
bsd-3-clause
Python
a7b95dada6098dc2837c4072a7820818c6efc538
Change URLs to format used in templates (consistent with news app)
mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject
molly/apps/feeds/events/urls.py
molly/apps/feeds/events/urls.py
from django.conf.urls.defaults import * from .views import IndexView, ItemListView, ItemDetailView urlpatterns = patterns('', (r'^$', IndexView, {}, 'index'), (r'^(?P<slug>[a-z\-]+)/$', ItemListView, {}, 'item-list'), (r'^(?P<slug>[a-z\-]+)/(?P<id>\d+)/$', ItemDetailView, {...
from django.conf.urls.defaults import * from .views import IndexView, ItemListView, ItemDetailView urlpatterns = patterns('', (r'^$', IndexView, {}, 'index'), (r'^(?P<slug>[a-z\-]+)/$', ItemListView, {}, 'item_list'), (r'^(?P<slug>[a-z\-]+)/(?P<id>\d+)/$', ItemDetailView, {...
apache-2.0
Python
2955f9d5bbf08c7abd01de83faea8292d309b7cd
use proper url for post-action
ScorpionResponse/freelancefinder,ScorpionResponse/freelancefinder,ScorpionResponse/freelancefinder
freelancefinder/jobs/urls.py
freelancefinder/jobs/urls.py
""" Configure urls for the jobs app. The default base for these urls is /jobs/ """ from django.conf.urls import url from .views import (JobListView, JobDetailView, PostListView, PostActionView, FreelancerListView, FreelancerDetailView) urlpatterns = [ url(r'^job-list/$', JobListView.as_view()...
""" Configure urls for the jobs app. The default base for these urls is /jobs/ """ from django.conf.urls import url from .views import (JobListView, JobDetailView, PostListView, PostActionView, FreelancerListView, FreelancerDetailView) urlpatterns = [ url(r'^job-list/$', JobListView.as_view()...
bsd-3-clause
Python
f6ac29be0d81786cea3e803f59a8861b020034b7
Fix revision numbers.
Ademan/NumPy-GSoC,teoliphant/numpy-refactor,efiring/numpy-work,teoliphant/numpy-refactor,jasonmccampbell/numpy-refactor-sprint,teoliphant/numpy-refactor,teoliphant/numpy-refactor,jasonmccampbell/numpy-refactor-sprint,chadnetzer/numpy-gaurdro,Ademan/NumPy-GSoC,illume/numpy3k,chadnetzer/numpy-gaurdro,jasonmccampbell/nump...
numpy/version.py
numpy/version.py
version='1.0b2' import os svn_version_file = os.path.join(os.path.dirname(__file__), 'core','__svn_version__.py') if os.path.isfile(svn_version_file): import imp svn = imp.load_module('numpy.core.__svn_version__', open(svn_version_file), ...
version='0.9.9' import os svn_version_file = os.path.join(os.path.dirname(__file__), 'core','__svn_version__.py') if os.path.isfile(svn_version_file): import imp svn = imp.load_module('numpy.core.__svn_version__', open(svn_version_file), ...
bsd-3-clause
Python
d667566c6ea49d2730e667ecb625f7a5c09e64ac
fix to json
NCSSM-CS/CSAssess,NCSSM-CS/CSAssess,NCSSM-CS/CSAssess,NCSSM-CS/CSAssess
controller/getQuestion.py
controller/getQuestion.py
#!/usr/local/bin/python3 """ created_by: Ebube Chuba created_date: 3/4/2015 last_modified_by: Ebube Chuba last_modified date: 3/6/2015 """ # imports import json import utils from sql.user import User from sql.question import Question from sql.topic import Topic # Format of JSON - EC # requestType: ge...
#!/usr/local/bin/python3 """ created_by: Ebube Chuba created_date: 3/4/2015 last_modified_by: Ebube Chuba last_modified date: 3/6/2015 """ # imports import json import utils from sql.user import User from sql.question import Question from sql.topic import Topic # Format of JSON - EC # requestType: ge...
mit
Python
603836378728b3152af20cc73b269206d02fc5dc
Add indentation fix to safeprint
gappleto97/Senior-Project
common/safeprint.py
common/safeprint.py
import multiprocessing, sys from datetime import datetime from common import settings print_lock = multiprocessing.RLock() max_digits = multiprocessing.Value('i', 0) def safeprint(msg, verbosity=0): """Prints in a thread-lock, taking a single object as an argument""" pid = str(multiprocessing.current_process(...
import multiprocessing, sys from datetime import datetime from common import settings print_lock = multiprocessing.RLock() max_digits = multiprocessing.Value('i', 0) def safeprint(msg, verbosity=0): """Prints in a thread-lock, taking a single object as an argument""" pid = str(multiprocessing.current_process(...
mit
Python
2b1acef4c204ba2913a8afef5607f6b628e117b7
Fix spurious rebuilds of apks for Android build.
littlstar/chromium.src,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,zcbenz/cefode-chromium,M4sse/chromium.src,nacl-webkit/chrome_deps,anirudhSK/chromium,jaruba/chromium.src,hgl888/chromium-crosswalk,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,mogoweb/chromium-cros...
build/build_output_dirs_android.gyp
build/build_output_dirs_android.gyp
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'targets': [ { # Target for creating common output build directories. Creating output # dirs beforehand ensures that build scripts can...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'targets': [ { # Target for creating common output build directories. Creating output # dirs beforehand ensures that build scripts can...
bsd-3-clause
Python
1077c627302448a38ec3a6bd059e70f5e4cbfb86
add handshake events handling
facebook/wangle,facebook/wangle,facebook/wangle
build/fbcode_builder/specs/fbzmq.py
build/fbcode_builder/specs/fbzmq.py
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import specs.fbthrift as fbthrift import specs.folly as folly import specs.gmock as gmock import ...
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import specs.fbthrift as fbthrift import specs.folly as folly import specs.gmock as gmock import ...
apache-2.0
Python
536716d095b152355dfb00cff713552a96b95857
Comment out lines accidentally left in the last commit. Oops.
rdaland/PhoMEnt
calc_weights.py
calc_weights.py
import sys import megatableau, data_prob import scipy, scipy.optimize # Argument parsing assert len(sys.argv)==2 tableau_file_name = sys.argv[1] # Read in data mt = megatableau.MegaTableau(tableau_file_name) w_0 = -scipy.rand(len(mt.weights)) nonpos_reals = [(-25,0) for wt in mt.weights] def one_minus_probability(we...
import sys import megatableau, data_prob import scipy, scipy.optimize # Argument parsing assert len(sys.argv)==2 tableau_file_name = sys.argv[1] # Read in data mt = megatableau.MegaTableau(tableau_file_name) w_0 = -scipy.rand(len(mt.weights)) nonpos_reals = [(-25,0) for wt in mt.weights] def one_minus_probability(we...
bsd-3-clause
Python
8d663651c672f3fb1f53cd07dbd1ec20c5daaa90
Update comment in migration
kdeloach/model-my-watershed,WikiWatershed/model-my-watershed,kdeloach/model-my-watershed,kdeloach/model-my-watershed,kdeloach/model-my-watershed,project-icp/bee-pollinator-app,lliss/model-my-watershed,project-icp/bee-pollinator-app,kdeloach/model-my-watershed,lliss/model-my-watershed,WikiWatershed/model-my-watershed,Wi...
src/mmw/apps/modeling/migrations/0010_scenario_inputmod_hash.py
src/mmw/apps/modeling/migrations/0010_scenario_inputmod_hash.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('modeling', '0009_scenario_results_to_json'), ] operations = [ migrations.AddField( model_name='scenario', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('modeling', '0009_scenario_results_to_json'), ] operations = [ migrations.AddField( model_name='scenario', ...
apache-2.0
Python
0e53893527f63e16e9398d18f1d19578bc14334a
add trailing comma
texastribune/tribwire,texastribune/tribwire,texastribune/tribwire,texastribune/tribwire
tribwire/urls.py
tribwire/urls.py
from django.conf.urls import patterns, url from . import views urlpatterns = patterns('', url(r'^$', views.index, name='index'), url(r'^link_form.html$', views.CreateLink.as_view(), name='link_form'), )
from django.conf.urls import patterns, url from . import views urlpatterns = patterns('', url(r'^$', views.index, name='index'), url(r'^link_form.html$', views.CreateLink.as_view(), name='link_form'))
apache-2.0
Python
ecead583151cb7af4e0cfcf0054423954d0eac3b
Update files.py
scotthaleen/python-secret-sauce
src/files.py
src/files.py
# -*- coding: utf-8 -*- import os from generators import numbers ''' file IO functions ''' def slurp(filePath): # read contents of file to string with open(filePath) as x: data = x.read() return data def slurpA(filePath): # same as slurp but return Array of lines instead of string with open(fileP...
# -*- coding: utf-8 -*- import os from generators import numbers ''' file IO functions ''' def slurp(filePath): # read contents of file to string with open(filePath) as x: data = x.read() return data def slurpA(filePath): # same as slurp but return Array of lines instead of string with open(fileP...
mit
Python
00cea9f8e51f53f338e19adf0165031d2f9cad77
Enable markdown extensions for TOC and linebreaks
Courgetteandratatouille/v6_ui,Courgetteandratatouille/v6_ui,olaurendeau/v6_ui,c2corg/v6_ui,c2corg/v6_ui,c2corg/v6_ui,Courgetteandratatouille/v6_ui,olaurendeau/v6_ui,olaurendeau/v6_ui,c2corg/v6_ui,Courgetteandratatouille/v6_ui,olaurendeau/v6_ui
c2corg_ui/templates/utils/format.py
c2corg_ui/templates/utils/format.py
import bbcode import markdown import html from c2corg_ui.format.wikilinks import C2CWikiLinkExtension from markdown.extensions.nl2br import Nl2BrExtension from markdown.extensions.toc import TocExtension _markdown_parser = None _bbcode_parser = None def _get_markdown_parser(): global _markdown_parser if no...
import bbcode import markdown import html from c2corg_ui.format.wikilinks import C2CWikiLinkExtension _markdown_parser = None _bbcode_parser = None def _get_markdown_parser(): global _markdown_parser if not _markdown_parser: extensions = [ C2CWikiLinkExtension(), ] _mark...
agpl-3.0
Python
70a1a4b22a49b9330810faf2819d6e380d69822a
remove whitespace
berendkleinhaneveld/Registrationshop,berendkleinhaneveld/Registrationshop
ui/interactor.py
ui/interactor.py
""" Interactor This class can be used to simply managing callback resources. Callbacks are often used by interactors with vtk and callbacks are hard to keep track of. Use multiple inheritance to inherit from this class to get access to the convenience methods. Observers for vtk events can be added through AddObserver...
""" Interactor This class can be used to simply managing callback resources. Callbacks are often used by interactors with vtk and callbacks are hard to keep track of. Use multiple inheritance to inherit from this class to get access to the convenience methods. Observers for vtk events can be added through AddObserve...
mit
Python
7a78140e1c870ba0a1c3d1659a48c615967b5f0b
change R to f in NB forms
dgasmith/EEX_scratch
eex/metadata/nb_terms.py
eex/metadata/nb_terms.py
""" Contains all of the metadata for non-bonded terms. """ _nb_functional_forms = { "LJ": { "AB": { "form": "A/(r ** 12) - B/(r ** 6)", "parameters": ["A", "B"], "units": { "A": "[energy] * [length] ** 12", "B": "[energy] * [length] ** 6",...
""" Contains all of the metadata for non-bonded terms. """ _nb_functional_forms = { "LJ": { "AB": { "form": "A/(R ** 12) - B/(R ** 6)", "parameters": ["A", "B"], "units": { "A": "[energy] * [length] ** 12", "B": "[energy] * [length] ** 6",...
bsd-3-clause
Python
38ddf9c51bc87ad48bd0776dac6332983b3ab2f9
Fix error on fragmenting sequences smaller than the window size
mchelem/cref2,mchelem/cref2,mchelem/cref2
cref/sequence/fragment.py
cref/sequence/fragment.py
def fragment(sequence, size=5): """ Fragment a string sequence using a sliding window given by size :param sequence: String containing the sequence :param size: Size of the window :return: a fragment of the sequence with the given size """ if size > 0 and len(sequence) > size: for...
def fragment(sequence, size=5): """ Fragment a string sequence using a sliding window given by size :param sequence: String containing the sequence :param size: Size of the window :return: a fragment of the sequence with the given size """ if size > 0: for i in range(len(sequence)...
mit
Python
39f6a4a5039287cd80d1efe3741d562e1102256b
add hot load phase to view query tests
mikewied/perfrunner,couchbase/perfrunner,couchbase/perfrunner,PaintScratcher/perfrunner,pavel-paulau/perfrunner,vmx/perfrunner,PaintScratcher/perfrunner,mikewied/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,couchbase/perfrunner,thomas-couchbase/perfrunner,EricACooper/perfrunner,hsharsha/perfrunner,couchbase/...
perfrunner/tests/query.py
perfrunner/tests/query.py
from perfrunner.helpers.cbmonitor import with_stats from perfrunner.tests.index import IndexTest class QueryTest(IndexTest): COLLECTORS = {'latency': True, 'query_latency': True} @with_stats def access(self): super(QueryTest, self).timer() def run(self): self.load() self.wai...
from perfrunner.helpers.cbmonitor import with_stats from perfrunner.tests.index import IndexTest class QueryTest(IndexTest): COLLECTORS = {'latency': True, 'query_latency': True} @with_stats def access(self): super(QueryTest, self).timer() def run(self): self.load() self.wai...
apache-2.0
Python
10054e8d810820603246483a093961b2c4574032
Update models.py
Ksynko/django-contactinfo,Ksynko/django-contactinfo
contactinfo/models.py
contactinfo/models.py
from django.db import models from django.conf import settings from __future__ import unicode_literals from django_countries.fields import CountryField class LocationType(models.Model): name = models.CharField(max_length=30) slug = models.CharField(max_length=30) def __unicode__(self): return sel...
from django.db import models from django.conf import settings from django_countries.fields import CountryField class LocationType(models.Model): name = models.CharField(max_length=30) slug = models.CharField(max_length=30) def __unicode__(self): return self.name def get_default_locationtype():...
bsd-3-clause
Python
9df117e49b35f1bcd478fc9c89d69a32592b2518
Remove OpenID in tests
hasgeek/funnel,hasgeek/funnel,hasgeek/lastuser,hasgeek/lastuser,hasgeek/lastuser,hasgeek/funnel,hasgeek/lastuser,hasgeek/lastuser,hasgeek/funnel,hasgeek/funnel
tests/unit/lastuser_core/test_registry_LoginProviderRegistry.py
tests/unit/lastuser_core/test_registry_LoginProviderRegistry.py
# -*- coding: utf-8 -*- from lastuserapp import app from lastuser_core import login_registry from lastuser_core.registry import LoginProviderRegistry import unittest class TestLoginProviderRegistry(unittest.TestCase): def test_LoginProviderRegistry(self): """ Test for verifying creation of Login...
# -*- coding: utf-8 -*- from lastuserapp import app from lastuser_core import login_registry from lastuser_core.registry import LoginProviderRegistry import unittest class TestLoginProviderRegistry(unittest.TestCase): def test_LoginProviderRegistry(self): """ Test for verifying creation of Login...
agpl-3.0
Python
7e0a04621c6762bf846495d9f201d4cf757935c9
Update phy.io
kwikteam/phy,rossant/phy,kwikteam/phy,kwikteam/phy,rossant/phy,rossant/phy
phy/io/tests/test_mock.py
phy/io/tests/test_mock.py
# -*- coding: utf-8 -*- """Tests of mock datasets.""" #------------------------------------------------------------------------------ # Imports #------------------------------------------------------------------------------ import numpy as np from numpy.testing import assert_array_equal as ae from pytest import rais...
# -*- coding: utf-8 -*- """Tests of mock datasets.""" #------------------------------------------------------------------------------ # Imports #------------------------------------------------------------------------------ import numpy as np from numpy.testing import assert_array_equal as ae from pytest import rais...
bsd-3-clause
Python
2f2f29e6ceeb51bd58aa635ad91415e3f720c0e8
Add option to generator runner to run it vs all events
synw/django-chartflo,synw/django-chartflo,synw/django-chartflo
chartflo/management/commands/gen.py
chartflo/management/commands/gen.py
# -*- coding: utf-8 -*- from __future__ import print_function from django.core.management.base import BaseCommand from chartflo.apps import GENERATORS from .gencharts import get_changes_events, get_last_run_q, get_events_q from mqueue.models import MEvent class Command(BaseCommand): help = "" def add_argume...
# -*- coding: utf-8 -*- from __future__ import print_function from django.core.management.base import BaseCommand from chartflo.apps import GENERATORS from .gencharts import get_changes_events, get_last_run_q, get_events_q class Command(BaseCommand): help = "" def add_arguments(self, parser): parser...
mit
Python
20e5246d59bcd5d89842096d5698bac1ceeb9996
fix CUDA init of RMM-DIIS
mlouhivu/gpaw-accelerator-benchmarks,mlouhivu/gpaw-accelerator-benchmarks
copper-sheet/input.py
copper-sheet/input.py
### ### GPAW benchmark: Copper Sheet ### from __future__ import print_function from ase.lattice.cubic import FaceCenteredCubic from gpaw import GPAW, Mixer, ConvergenceError from gpaw.mpi import size, rank try: from gpaw.eigensolvers.rmm_diis import RMM_DIIS except ImportError: from gpaw.eigensolvers.rmmdiis i...
### ### GPAW benchmark: Copper Sheet ### from __future__ import print_function from ase.lattice.cubic import FaceCenteredCubic from gpaw import GPAW, Mixer, ConvergenceError from gpaw.mpi import size, rank try: from gpaw.eigensolvers.rmm_diis import RMM_DIIS except ImportError: from gpaw.eigensolvers.rmmdiis i...
mit
Python
e9ab24f6871af83fc8f3dc2e69b48700dafef90c
update path for video
selepo/svtplay-dl,selepo/svtplay-dl,spaam/svtplay-dl,iwconfig/svtplay-dl,olof/svtplay-dl,iwconfig/svtplay-dl,olof/svtplay-dl,qnorsten/svtplay-dl,spaam/svtplay-dl,dalgr/svtplay-dl,dalgr/svtplay-dl,qnorsten/svtplay-dl
lib/svtplay_dl/service/facebook.py
lib/svtplay_dl/service/facebook.py
from __future__ import absolute_import import re import json import copy from svtplay_dl.service import Service, OpenGraphThumbMixin from svtplay_dl.utils.urllib import unquote_plus from svtplay_dl.fetcher.http import HTTP from svtplay_dl.error import ServiceError class Facebook(Service, OpenGraphThumbMixin): su...
from __future__ import absolute_import import re import json import copy from svtplay_dl.service import Service, OpenGraphThumbMixin from svtplay_dl.utils.urllib import unquote_plus from svtplay_dl.fetcher.http import HTTP from svtplay_dl.error import ServiceError class Facebook(Service, OpenGraphThumbMixin): su...
mit
Python
72cd061d8f4bed462d9e217a916708cd7cdd3aa5
fix exception catching
cheral/orange3-text,cheral/orange3-text,cheral/orange3-text
orangecontrib/text/wikipedia.py
orangecontrib/text/wikipedia.py
import numpy as np import wikipedia from Orange import data from orangecontrib.text.corpus import Corpus class WikipediaAPI: attributes = ('pageid', 'revision_id') metas = ('title', 'content', 'summary', 'url') @classmethod def search(cls, lang, queries, attributes, progress_callback=None): ...
import numpy as np import wikipedia from Orange import data from orangecontrib.text.corpus import Corpus class WikipediaAPI: attributes = ('pageid', 'revision_id') metas = ('title', 'content', 'summary', 'url') @classmethod def search(cls, lang, queries, attributes, progress_callback=None): ...
bsd-2-clause
Python
741e26cd731e1e31b299b6f623c89a32b7531b6f
Update 'bugcomics' name
jodal/comics,datagutten/comics,jodal/comics,jodal/comics,jodal/comics,datagutten/comics,datagutten/comics,datagutten/comics
comics/comics/bugcomic.py
comics/comics/bugcomic.py
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = 'Bug Martini' language = 'en' url = 'http://www.bugmartini.com/' start_date = '2009-10-19' rights = 'Adam Huber' class Crawler(CrawlerBase): ...
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = 'Bug' language = 'en' url = 'http://www.bugmartini.com/' start_date = '2009-10-19' rights = 'Adam Huber' class Crawler(CrawlerBase): history...
agpl-3.0
Python
fee245628d492f64f3fe02563d3059317d456ed6
Use raw string for Windows paths
mikedh/trimesh,mikedh/trimesh,mikedh/trimesh,dajusc/trimesh,dajusc/trimesh,mikedh/trimesh
trimesh/interfaces/vhacd.py
trimesh/interfaces/vhacd.py
import os import platform from .generic import MeshScript from ..constants import log from distutils.spawn import find_executable _search_path = os.environ['PATH'] if platform.system() == 'Windows': # split existing path by delimiter _search_path = [i for i in _search_path.split(';') if len(i) > 0] _sear...
import os import platform from .generic import MeshScript from ..constants import log from distutils.spawn import find_executable _search_path = os.environ['PATH'] if platform.system() == 'Windows': # split existing path by delimiter _search_path = [i for i in _search_path.split(';') if len(i) > 0] _sear...
mit
Python
4b4683453db0ddc42cb32a72e3992b8bfa31a602
add missing 'import posixpath'.
MIT-LCP/wfdb-python
wfdb/io/_coreio.py
wfdb/io/_coreio.py
import posixpath from wfdb.io import _url def _open_file( pn_dir, file_name, mode="r", *, buffering=-1, encoding=None, errors=None, newline=None, check_access=False, ): """ Open a data file as a random-access file object. See the documentation of `open` and `wfdb.io._...
from wfdb.io import _url def _open_file( pn_dir, file_name, mode="r", *, buffering=-1, encoding=None, errors=None, newline=None, check_access=False, ): """ Open a data file as a random-access file object. See the documentation of `open` and `wfdb.io._url.openurl` for d...
mit
Python
53f7acf5fc04ca6f86456fda95504ba41046d860
Add Django Custom Tag SSO
philanthropy-u/edx-platform,philanthropy-u/edx-platform,philanthropy-u/edx-platform,philanthropy-u/edx-platform
openedx/features/specializations/templatetags/sso_meta_tag.py
openedx/features/specializations/templatetags/sso_meta_tag.py
from django import template from django.template.loader import get_template register = template.Library() @register.simple_tag(takes_context=True) def sso_meta(context): return get_template('features/specializations/sso_meta_template.html').render(context.flatten())
from django import template from django.template import Template register = template.Library() @register.simple_tag(takes_context=True) def sso_meta(context): return Template('<meta name="title" content="${ title }">' + ' ' + '<meta name="description" content="${ subtitle }">' + ' ' + ...
agpl-3.0
Python
d6dc1638f11736b6cbb4063a260d824becb277bc
Add urlunparse.
chhe/livestreamer,Saturn/livestreamer,intact/livestreamer,lyhiving/livestreamer,blxd/livestreamer,chhe/livestreamer,javiercantero/streamlink,Dobatymo/livestreamer,Klaudit/livestreamer,chhe/streamlink,jtsymon/livestreamer,Feverqwe/livestreamer,mmetak/streamlink,gravyboat/streamlink,derrod/livestreamer,okaywit/livestream...
src/livestreamer/compat.py
src/livestreamer/compat.py
import os import sys is_py2 = (sys.version_info[0] == 2) is_py3 = (sys.version_info[0] == 3) is_py33 = (sys.version_info[0] == 3 and sys.version_info[1] == 3) is_win32 = os.name == "nt" if is_py2: _str = str str = unicode range = xrange def bytes(b, enc="ascii"): return _str(b) elif is_py3: ...
import os import sys is_py2 = (sys.version_info[0] == 2) is_py3 = (sys.version_info[0] == 3) is_py33 = (sys.version_info[0] == 3 and sys.version_info[1] == 3) is_win32 = os.name == "nt" if is_py2: _str = str str = unicode range = xrange def bytes(b, enc="ascii"): return _str(b) elif is_py3: ...
bsd-2-clause
Python
1800118e416f68e10cea8094951b915bedea7067
Fix doc strings, method names on OCDCandidateContest
california-civic-data-coalition/django-calaccess-processed-data,california-civic-data-coalition/django-calaccess-processed-data
calaccess_processed/models/proxies/opencivicdata/candidatecontests.py
calaccess_processed/models/proxies/opencivicdata/candidatecontests.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Proxy models for augmenting our source data tables with methods useful for processing. """ from __future__ import unicode_literals from django.db import models from opencivicdata.elections.models import CandidateContest from .base import OCDProxyModelMixin class OCDCa...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Proxy models for augmenting our source data tables with methods useful for processing. """ from __future__ import unicode_literals from django.db import models from opencivicdata.elections.models import CandidateContest from .base import OCDProxyModelMixin class OCDCa...
mit
Python
d5ac585da2aef7feea107250cdf81652aa5f32ce
Fix to mongo metadata
samuel/kokki
kokki/cookbooks/mongodb/metadata.py
kokki/cookbooks/mongodb/metadata.py
__description__ = "MongoDB database" __config__ = { "mongodb.dbpath": dict( description = "Path where to store the MongoDB database", default = "/var/lib/mongodb", ), "mongodb.logpath": dict( description = "Path where to store the MongoDB log", default = "/var/log/mongodb/mo...
__description__ = "MongoDB database" __config__ = { "mongodb.dbpath": dict( description = "Path where to store the MongoDB database", default = "/var/lib/mongodb", ), "mongodb.logpath": dict( description = "Path where to store the MongoDB log", default = "/var/log/mongodb/mo...
bsd-3-clause
Python
27bf030df4c2f46eef8cdcd9441bd5d21a22e5cc
Fix public API root view links
tuomas777/parkkihubi
parkings/api/public/urls.py
parkings/api/public/urls.py
from django.conf.urls import include, url from rest_framework.routers import DefaultRouter from .parking_area import PublicAPIParkingAreaViewSet from .parking_area_statistics import PublicAPIParkingAreaStatisticsViewSet router = DefaultRouter() router.register(r'parking_area', PublicAPIParkingAreaViewSet, base_name='...
from django.conf.urls import include, url from rest_framework.routers import DefaultRouter from .parking_area import PublicAPIParkingAreaViewSet from .parking_area_statistics import PublicAPIParkingAreaStatisticsViewSet router = DefaultRouter() router.register(r'parking_area', PublicAPIParkingAreaViewSet) router.regi...
mit
Python
dcc5208f091ad11a853afecc3a9260cc14bc08c7
Tweak to doc string
4dn-dcic/fourfront,hms-dbmi/fourfront,hms-dbmi/fourfront,hms-dbmi/fourfront,hms-dbmi/fourfront,4dn-dcic/fourfront,4dn-dcic/fourfront,4dn-dcic/fourfront,hms-dbmi/fourfront
src/encoded/commands/load_ontology_terms.py
src/encoded/commands/load_ontology_terms.py
#!/usr/bin/env python3 import argparse import logging from pyramid.path import DottedNameResolver from pyramid.paster import get_app from encoded import configure_dbsession import sys import os from datetime import datetime logger = logging.getLogger(__name__) EPILOG = __doc__ def main(): start = datetime.now(...
#!/usr/bin/env python3 import argparse import logging from pyramid.path import DottedNameResolver from pyramid.paster import get_app from encoded import configure_dbsession import sys import os from datetime import datetime logger = logging.getLogger(__name__) EPILOG = __doc__ def main(): start = datetime.now(...
mit
Python
f1a4220ecd5f6e24d79fbde9e62e861c814ae5c0
increase version to 0.2.0
XiaonuoGantan/pywebsocket,XiaonuoGantan/pywebsocket
src/setup.py
src/setup.py
#!/usr/bin/env python # # Copyright 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
#!/usr/bin/env python # # Copyright 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
bsd-3-clause
Python
ce843bd14c78b180f9961836625893c6e9d08a19
Update version number to 0.7.1. Review URL: https://codereview.appspot.com/5651087
XiaonuoGantan/pywebsocket,XiaonuoGantan/pywebsocket
src/setup.py
src/setup.py
#!/usr/bin/env python # # Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
#!/usr/bin/env python # # Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
bsd-3-clause
Python
eb12be375904430f26e7faa6b92624504e348446
Improve script structure
franzpl/sweep,spatialaudio/sweep
log_sweep_rect_window/log_sweep_rect_window.py
log_sweep_rect_window/log_sweep_rect_window.py
#!/usr/bin/env python3 """The influence of windowing of sweep signals when using a Rect Window. """ import sys sys.path.append('..') import measurement_chain import plotting import calculation import generation import matplotlib.pyplot as plt import windows from scipy.signal import lfilter import numpy as np ...
#!/usr/bin/env python3 """On the influence of windowing of sweep signals. """ # Parameters of the measuring system fs = 44100 fstart = 1 fstop = 22050 duration = 1 pad = 4 import sys sys.path.append('..') import measurement_chain import plotting import calculation import generation import numpy as np import matp...
mit
Python
f19f8ed67546da5cb9d67f0793d036d64fe916eb
Update doc.conf.py
JuliaFEM/JuliaFEM.jl
docs/doc.conf.py
docs/doc.conf.py
import os import sys import re import juliadoc extensions = ['sphinx.ext.mathjax', 'juliadoc.julia', 'juliadoc.jldoctest', 'juliadoc.jlhelp'] master_doc = 'index' html_theme_path = [juliadoc.get_theme_dir()] html_sidebars = juliadoc.default_sidebars()
import juliadoc extensions = ['juliadoc.julia', 'juliadoc.jlhelp'] html_theme_path = [juliadoc.get_theme_dir()] html_sidebars = juliadoc.default_sidebars()
mit
Python
867815fecc204c03bc49fa121630a75491336278
allow space in toolkit version, #2353
IBMStreams/streamsx.topology,IBMStreams/streamsx.topology,IBMStreams/streamsx.topology,IBMStreams/streamsx.topology,IBMStreams/streamsx.topology,IBMStreams/streamsx.topology,IBMStreams/streamsx.topology
com.ibm.streamsx.topology/opt/python/packages/streamsx/spl/toolkit.py
com.ibm.streamsx.topology/opt/python/packages/streamsx/spl/toolkit.py
# coding=utf-8 # Licensed Materials - Property of IBM # Copyright IBM Corp. 2017,2019 """ SPL toolkit integration. ******** Overview ******** SPL operators are defined by an SPL toolkit. When a ``Topology`` contains invocations of SPL operators, their defining toolkit must be made known using :py:func:`add_toolkit`...
# coding=utf-8 # Licensed Materials - Property of IBM # Copyright IBM Corp. 2017,2019 """ SPL toolkit integration. ******** Overview ******** SPL operators are defined by an SPL toolkit. When a ``Topology`` contains invocations of SPL operators, their defining toolkit must be made known using :py:func:`add_toolkit`...
apache-2.0
Python
26dbff0a13207674250cb0019cdac07ee49e2530
Bump version string on setup.py up to 0.2.2
pipoket/booru-grabber
src/setup.py
src/setup.py
# -*- coding: cp949 -*- import os import sys import glob import py2exe import subprocess from distutils.core import setup from cx_Freeze import setup, Executable if sys.platform != "win32": print "This script is only for Win32 build as of now!" sys.exit(1) base = "Win32GUI" setup( name = "booru-gra...
# -*- coding: cp949 -*- import os import sys import glob import py2exe import subprocess from distutils.core import setup from cx_Freeze import setup, Executable if sys.platform != "win32": print "This script is only for Win32 build as of now!" sys.exit(1) base = "Win32GUI" setup( name = "booru-gra...
mit
Python
054a45fa7a4005ab6eb08bfb6a33e4e984526c05
Change version to 0.4.2
googlearchive/pywebsocket,GoogleChromeLabs/pywebsocket3,GoogleChromeLabs/pywebsocket3,google/pywebsocket,googlearchive/pywebsocket,googlearchive/pywebsocket,google/pywebsocket,GoogleChromeLabs/pywebsocket3,google/pywebsocket
src/setup.py
src/setup.py
#!/usr/bin/env python # # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
#!/usr/bin/env python # # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
bsd-3-clause
Python
ae4148f205cdb01a30016c3e2b46ecb05a2dd4fb
Fix topic
bit-bots/bitbots_behaviour
bitbots_body_behavior/src/bitbots_body_behavior/body_behavior.py
bitbots_body_behavior/src/bitbots_body_behavior/body_behavior.py
#!/usr/bin/env python3 """ BehaviorModule ^^^^^^^^^^^^^^ .. moduleauthor:: Martin Poppinga <1popping@informatik.uni-hamburg.de> Starts the body behavior """ import actionlib import os import rospy from geometry_msgs.msg import PoseWithCovarianceStamped from tf2_geometry_msgs import PoseStamped from humanoid_league_m...
#!/usr/bin/env python3 """ BehaviorModule ^^^^^^^^^^^^^^ .. moduleauthor:: Martin Poppinga <1popping@informatik.uni-hamburg.de> Starts the body behavior """ import actionlib import os import rospy from geometry_msgs.msg import PoseWithCovarianceStamped from tf2_geometry_msgs import PoseStamped from humanoid_league_m...
bsd-3-clause
Python
abdd39654a67ea66dde9fbd5cdd253b14551e1ec
Simplify output message
elifesciences/builder,elifesciences/builder
src/tasks.py
src/tasks.py
"""Miscellanious admin tasks. If you find certain 'types' of tasks accumulating, they might be better off in their own module. This module really is for stuff that has no home.""" from buildercore import core, bootstrap from fabric.api import local, task from utils import confirm, errcho from decorators import require...
"""Miscellanious admin tasks. If you find certain 'types' of tasks accumulating, they might be better off in their own module. This module really is for stuff that has no home.""" from buildercore import core, bootstrap from fabric.api import local, task from utils import confirm, errcho from decorators import require...
mit
Python
db8aa8a85069452a01303776e6213eefeaf43b22
Update P04_readWord moved spacing to separate properties
JoseALermaIII/python-tutorials,JoseALermaIII/python-tutorials
books/AutomateTheBoringStuffWithPython/Chapter13/P04_readWord.py
books/AutomateTheBoringStuffWithPython/Chapter13/P04_readWord.py
# This program uses the python-docx module to manipulate Word documents import docx doc = docx.Document("demo.docx") print(len(doc.paragraphs)) print(doc.paragraphs[0].text) print(doc.paragraphs[1].text) print(len(doc.paragraphs[1].runs)) print(doc.paragraphs[1].runs[0].text) print(doc.paragraphs[1].runs[1].text) pri...
# This program uses the python-docx module to manipulate Word documents import docx doc = docx.Document("demo.docx") print(len(doc.paragraphs)) print(doc.paragraphs[0].text) print(doc.paragraphs[1].text) print(len(doc.paragraphs[1].runs)) print(doc.paragraphs[1].runs[0].text) print(doc.paragraphs[1].runs[1].text) pri...
mit
Python
7e55437db6685f0e8c494159fa9cf4cedbb45810
Allow retry_failed_photo_verifications to take a list of receipt_ids to retry
mitocw/edx-platform,CourseTalk/edx-platform,naresh21/synergetics-edx-platform,miptliot/edx-platform,JioEducation/edx-platform,msegado/edx-platform,lduarte1991/edx-platform,simbs/edx-platform,chrisndodge/edx-platform,hamzehd/edx-platform,iivic/BoiseStateX,cecep-edu/edx-platform,devs1991/test_edx_docmode,synergeticsedx/d...
lms/djangoapps/verify_student/management/commands/retry_failed_photo_verifications.py
lms/djangoapps/verify_student/management/commands/retry_failed_photo_verifications.py
""" Django admin commands related to verify_student """ from verify_student.models import SoftwareSecurePhotoVerification from django.core.management.base import BaseCommand class Command(BaseCommand): """ This method finds those PhotoVerifications with a status of MUST_RETRY and attempts to verify them....
""" Django admin commands related to verify_student """ from verify_student.models import SoftwareSecurePhotoVerification from django.core.management.base import BaseCommand class Command(BaseCommand): """ This method finds those PhotoVerifications with a status of MUST_RETRY and attempts to verify them....
agpl-3.0
Python
7011fb0031da0f1ed2b65e3db5f6768ced74c36e
Add date field to unbalanced move line. Otherwise the following might happen: File "/path/to/odoo/addons/account_fiscal_year_closing/models/account_fiscalyear_closing.py", line 328, in button_calculate res = self.calculate() File "/path/to/odoo/addons/account_fiscal_year_closing/models/account_fiscalyear_closing.py", l...
OCA/account-closing,OCA/account-closing
account_fiscal_year_closing/wizards/account_fiscal_year_closing_unbalanced_move.py
account_fiscal_year_closing/wizards/account_fiscal_year_closing_unbalanced_move.py
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class AccountFiscalYearClosingUnbalancedMove(models.TransientModel): _name = "account.fiscalyear.closing.unbalanced.move" _description = "Account fiscalyear closing unbalanced move" journal_id = fields.Many2o...
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class AccountFiscalYearClosingUnbalancedMove(models.TransientModel): _name = "account.fiscalyear.closing.unbalanced.move" _description = "Account fiscalyear closing unbalanced move" journal_id = fields.Many2o...
agpl-3.0
Python
cb32cf0f0160d1f582787119d0480de3ba8b9b53
change the size of input to remedy OOM issue.
tensorflow/tensorflow,davidzchen/tensorflow,yongtang/tensorflow,sarvex/tensorflow,freedomtan/tensorflow,aam-at/tensorflow,tensorflow/tensorflow,paolodedios/tensorflow,annarev/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,aam-at/tensorflow,cxxgtxy/t...
tensorflow/python/keras/layers/preprocessing/image_preprocessing_distribution_test.py
tensorflow/python/keras/layers/preprocessing/image_preprocessing_distribution_test.py
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
Python
c5666f554b455e6ee3857aeeb415f9ac28dd5332
Improve Vale of Glamorgan import script
DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations,andylolz/UK-Polling-Stations,chris48s/UK-Polling-Stations,andylolz/UK-Polling-Stations,andylolz/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations
polling_stations/apps/data_collection/management/commands/import_vale_of_glamorgan.py
polling_stations/apps/data_collection/management/commands/import_vale_of_glamorgan.py
""" Import Vale of Glamorgan """ from data_collection.management.commands import BaseShpShpImporter class Command(BaseShpShpImporter): """ Imports the Polling Station data from Vale of Glamorgan """ council_id = 'W06000014' districts_name = 'Polling Districts' stations_name = 'Polling Stat...
""" Import Vale of Glamorgan """ from data_collection.management.commands import BaseShpShpImporter class Command(BaseShpShpImporter): """ Imports the Polling Station data from Vale of Glamorgan """ council_id = 'W06000014' districts_name = 'Polling Districts' stations_name = 'Polling Stat...
bsd-3-clause
Python
00b5edfc2087687b535428729a6ce566a9642a8b
test added to check if a container is found
rrpg/engine,rrpg/engine
core/commands/open.py
core/commands/open.py
# -*- coding: utf-8 -*- from models import item_container, item import core.command from core.localisation import _ class open(core.command.command): def run(self): """ c.run() Open an item container in the area where the player is. The result of the command is a list of the items of the container """ i...
# -*- coding: utf-8 -*- from models import item_container, item import core.command from core.localisation import _ class open(core.command.command): def run(self): """ c.run() Open an item container in the area where the player is. The result of the command is a list of the items of the container """ i...
mit
Python
4dc0381b7ed7c6d5105a17710d667deca4d418f3
disable msi login (#4322)
samedder/azure-cli,yugangw-msft/azure-cli,QingChenmsft/azure-cli,samedder/azure-cli,samedder/azure-cli,samedder/azure-cli,QingChenmsft/azure-cli,yugangw-msft/azure-cli,yugangw-msft/azure-cli,QingChenmsft/azure-cli,yugangw-msft/azure-cli,QingChenmsft/azure-cli,yugangw-msft/azure-cli,yugangw-msft/azure-cli
src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py
src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
mit
Python
3a62f69c7ee1a453fe5cd5cee77b39df23b2d5ff
Convert RepositorySearchResult to ShortRepository
sigmavirus24/github3.py
github3/search/repository.py
github3/search/repository.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .. import models from .. import repos class RepositorySearchResult(models.GitHubCore): def _update_attributes(self, data): result = data.copy() #: Score of the result self.score = self._get_attribute(result, 'score') ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from ..models import GitHubCore from ..repos import Repository class RepositorySearchResult(GitHubCore): def _update_attributes(self, data): result = data.copy() #: Score of the result self.score = self._get_attribute(result...
bsd-3-clause
Python
1eb3df5ca3c86effa85ba76a8bdf549f3560f3a5
Add reporting unit URL to region serializer.
consbio/landscapesim,consbio/landscapesim,consbio/landscapesim
landscapesim/serializers/regions.py
landscapesim/serializers/regions.py
import json from rest_framework import serializers from django.core.urlresolvers import reverse from landscapesim.models import Region class ReportingUnitSerializer(serializers.Serializer): type = serializers.SerializerMethodField() properties = serializers.SerializerMethodField() geometry = serializers...
import json from rest_framework import serializers from landscapesim.models import Region class ReportingUnitSerializer(serializers.Serializer): type = serializers.SerializerMethodField() properties = serializers.SerializerMethodField() geometry = serializers.SerializerMethodField() class Meta: ...
bsd-3-clause
Python
2cc829d468b9c5efefcb3707e55f71d6a81a64b7
add structured mesh test; not working
amaxwell/datatank_py
test/datagraph_mesh_test.py
test/datagraph_mesh_test.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # This software is under a BSD license. See LICENSE.txt for details. import numpy as np from datatank_py.DTDataFile import DTDataFile from datatank_py.DTMesh2D import DTMesh2D from datatank_py.DTStructuredMesh2D import DTStructuredMesh2D from datatank_py.DTStructuredGrid...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This software is under a BSD license. See LICENSE.txt for details. import numpy as np from datatank_py.DTDataFile import DTDataFile from datatank_py.DTMesh2D import DTMesh2D if __name__ == '__main__': output_file = DTDataFile("dg_mesh_test.dtbin", tru...
bsd-3-clause
Python
34c20fb80a22e816e1c3e8ef887b415e32949d64
Update check_all_managed_nodes_status.py
r0h4n/node-agent,Tendrl/node_agent,r0h4n/node-agent,Tendrl/node-agent,r0h4n/node-agent,Tendrl/node_agent,Tendrl/node-agent,Tendrl/node-agent
tendrl/node_agent/node_sync/check_all_managed_nodes_status.py
tendrl/node_agent/node_sync/check_all_managed_nodes_status.py
import etcd import uuid from tendrl.commons.event import Event from tendrl.commons.objects.job import Job from tendrl.commons.message import Message from tendrl.commons.utils import etcd_utils def run(): try: nodes = NS._int.client.read("/nodes") except etcd.EtcdKeyNotFound: return for n...
import etcd from tendrl.commons.utils import etcd_utils def run(): try: nodes = NS._int.client.read("/nodes") except etcd.EtcdKeyNotFound: return for node in nodes.leaves: node_id = node.key.split('/')[-1] try: NS._int.client.write( "/nodes/{0}...
lgpl-2.1
Python
cc5a9719ff4c91f385c973a759f63fd650f0388e
Remove old style urls
eldarion/kaleo,pinax/pinax-invitations
pinax/invitations/tests/urls.py
pinax/invitations/tests/urls.py
from django.conf.urls import url, include urlpatterns = [ url(r"^", include("pinax.invitations.urls", namespace="pinax_invitations")), ]
try: from django.conf.urls import patterns, include except ImportError: from django.conf.urls.defaults import patterns, include urlpatterns = patterns( "", (r"^", include("pinax.invitations.urls", namespace="pinax_invitations")), )
unknown
Python
acff6f07daca9e6703439a4d7fc7a287a42c4bcc
Bump version
markstory/lint-review,markstory/lint-review,markstory/lint-review
lintreview/__init__.py
lintreview/__init__.py
__version__ = '2.26.3'
__version__ = '2.36.2'
mit
Python
e26d57cc18fcd7ce9fde05fe7fce50d4cd9e7949
increase xmatch timeout to 5min
imbasimba/astroquery,imbasimba/astroquery,ceb8/astroquery,ceb8/astroquery
astroquery/xmatch/__init__.py
astroquery/xmatch/__init__.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst from astropy import config as _config class Conf(_config.ConfigNamespace): """ Configuration parameters for `astroquery.xmatch`. """ url = _config.ConfigItem( 'http://cdsxmatch.u-strasbg.fr/xmatch/api/v1/sync', 'xMatch URL...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from astropy import config as _config class Conf(_config.ConfigNamespace): """ Configuration parameters for `astroquery.xmatch`. """ url = _config.ConfigItem( 'http://cdsxmatch.u-strasbg.fr/xmatch/api/v1/sync', 'xMatch URL...
bsd-3-clause
Python
0a05eff834fea8b122af58db3404af26b3ddb125
Fix default field datetime format for html5 datetime-local
hasadna/OpenCommunity,yaniv14/OpenCommunity,hasadna/OpenCommunity,hasadna/OpenCommunity,yaniv14/OpenCommunity,yaniv14/OpenCommunity,nonZero/OpenCommunity,nonZero/OpenCommunity,nonZero/OpenCommunity,yaniv14/OpenCommunity,hasadna/OpenCommunity,nonZero/OpenCommunity
src/ocd/formats/he/formats.py
src/ocd/formats/he/formats.py
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j בF Y' TIME_FORMAT = 'H:i:s' DAT...
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j בF Y' TIME_FORMAT = 'H:i:s' DAT...
bsd-3-clause
Python
f72bc39e42288a51246900b7e4e4f7ef87ba2369
Fix typo
giumas/python-acoustics,antiface/python-acoustics,FRidh/python-acoustics,python-acoustics/python-acoustics,felipeacsi/python-acoustics
unittest/test_atmosphere.py
unittest/test_atmosphere.py
import unittest from acoustics.atmosphere import Atmosphere class AtmosphereCase(unittest.TestCase): def test_standard_atmosphere(self): a = Atmosphere() self.assertEqual(a.temperature, 293.15) self.assertEqual(a.pressure, 101.325) self.assertEqual(a.rel...
import unittest from acoustics.atmosphere import atmosphere class AtmosphereCase(unittest.TestCase): def test_standard_atmosphere(self): a = Atmosphere() self.assertEqual(a.temperature, 293.15) self.assertEqual(a.pressure, 101.325) self.assertEqual(a.rel...
bsd-3-clause
Python
42d9d9a6663347ff4bb9ad3c649140e09396ec98
Add refresh_token method
devicehive/devicehive-python
devicehive/handler.py
devicehive/handler.py
class Handler(object): """Handler class.""" def __init__(self, transport, token, options): self._transport = transport self._token = token self.options = options def refresh_token(self): self._token.refresh() return self._token.access_token() def handle_connect...
class Handler(object): """Handler class.""" def __init__(self, transport, token, options): self._transport = transport self._token = token self.options = options def handle_connected(self): raise NotImplementedError def handle_event(self, event): raise NotImple...
apache-2.0
Python
582e3ce5a7b306b4a65ffd8ec19f016e0ccbc83d
Update ipc_lista1.6.py
any1m1c/ipc20161
lista1/ipc_lista1.6.py
lista1/ipc_lista1.6.py
#ipc_lista1.6 #Professor: Jucimar Junior #Any Mendes Carvalho - # # # # #Faça um programa que peça o raio de um círculo, calcule
#ipc_lista1.6 #Professor: Jucimar Junior #Any Mendes Carvalho - # # # # #Faça um programa que peça o raio de um círculo,
apache-2.0
Python
3ab2520a23e59dfa52e6b027b6ec15c8b93d3bae
Update ipc_lista1.8.py
any1m1c/ipc20161
lista1/ipc_lista1.8.py
lista1/ipc_lista1.8.py
#ipc_lista1.8 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # #Faça um programa que pergunte quanto você ganha por hora e o número de horas trabalhdas
#ipc_lista1.8 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # #Faça um programa que pergunte quanto você ganha por hora e o número de horas
apache-2.0
Python
18a027b97bffd83d5202a2f069e79a559b5ac73a
Update ipc_lista1.8.py
any1m1c/ipc20161
lista1/ipc_lista1.8.py
lista1/ipc_lista1.8.py
#ipc_lista1.8 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # #Faça um programa que pergunte quanto você ganha por hora e o número de horas trabalhadas no mês. #Calcule e mostre o total do seu salário no referido mês. QntHora = input("Entre com o valor de seu rendimento por hora:
#ipc_lista1.8 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # #Faça um programa que pergunte quanto você ganha por hora e o número de horas trabalhadas no mês. #Calcule e mostre o total do seu salário no referido mês. QntHora = input("Entre com o valor de seu rendimento por hora
apache-2.0
Python
5f2e53af756b9759a76c46f3ff0fe003a268133d
Bump base package requirement (#8572)
DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core
linkerd/setup.py
linkerd/setup.py
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from codecs import open # To use a consistent encoding from os import path from setuptools import setup HERE = path.abspath(path.dirname(__file__)) # Get version info ABOUT = {} with open(path.join(HER...
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from codecs import open # To use a consistent encoding from os import path from setuptools import setup HERE = path.abspath(path.dirname(__file__)) # Get version info ABOUT = {} with open(path.join(HER...
bsd-3-clause
Python
338a6edd46c1bab0065b19f4c82b07ecb6c75ccc
change list of files, into json
dave-lab41/pelops,d-grossman/pelops,d-grossman/pelops,dave-lab41/pelops,Lab41/pelops,Lab41/pelops
etl/veriFileList2Json.py
etl/veriFileList2Json.py
import json import sys # turn the list of files into json for working with def main(): inFileName = sys.argv[1] outFileName = '{0}.json'.format(inFileName) inFile = open(inFileName, 'r') outFile = open(outFileName, 'w') for line in inFile: d = dict() line = line.strip() at...
import json import sys # turn the list of files into json for working with def main(): inFileName = sys.argv[1] outFileName = '{0}.json'.format(inFileName) inFile = open(inFileName, 'r') outFile = open(outFileName, 'w') for line in inFile: d = dict() line = line.strip() at...
apache-2.0
Python
93ed84050b9fbbe14f3d0d61f5dcdc4c22eedc3c
Update logserver.py
bengjerstad/multiuselogserver,bengjerstad/multiuselogserver,bengjerstad/multiuselogserver
logserver/logserver.py
logserver/logserver.py
import hug import json import sqlite3 import pandas as pd conn = sqlite3.connect('check.db') c = conn.cursor() @hug.directive() def cors(support='*', response=None, **kwargs): '''Returns passed in parameter multiplied by itself''' response and response.set_header('Access-Control-Allow-Origin', support) @hug.g...
import hug import json import sqlite3 import pandas as pd conn = sqlite3.connect('check.db') c = conn.cursor() @hug.directive() def cors(support='*', response=None, **kwargs): '''Returns passed in parameter multiplied by itself''' response and response.set_header('Access-Control-Allow-Origin', support) @hug.g...
mit
Python
b87d811f3e48928b5a41e5b2e0e52fceee2c75b4
Update version 0.9.2 -> 0.9.3
dwavesystems/dimod,dwavesystems/dimod
dimod/package_info.py
dimod/package_info.py
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
Python
f86ae2d132d6c6cb83e0e8afd65abed474cc5dea
Update version 0.7.8 -> 0.7.9
dwavesystems/dimod,dwavesystems/dimod
dimod/package_info.py
dimod/package_info.py
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
Python
521b4fbec142306fad2347a5dd3a56aeec2f9498
Remove deleted places from place index
aapris/linkedevents,aapris/linkedevents,tuomas777/linkedevents,City-of-Helsinki/linkedevents,City-of-Helsinki/linkedevents,tuomas777/linkedevents,City-of-Helsinki/linkedevents,tuomas777/linkedevents,aapris/linkedevents
events/search_indexes.py
events/search_indexes.py
from haystack import indexes from .models import Event, Place, PublicationStatus from django.utils.html import strip_tags class EventIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.CharField(document=True, use_template=True) autosuggest = indexes.EdgeNgramField(model_attr='name') start_time ...
from haystack import indexes from .models import Event, Place, PublicationStatus from django.utils.html import strip_tags class EventIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.CharField(document=True, use_template=True) autosuggest = indexes.EdgeNgramField(model_attr='name') start_time ...
mit
Python
9beab775c299117a7b1b68904c437b0b9a52c17a
Add module level docstring explaining when _pmf functions are useful.
dit/dit,dit/dit,dit/dit,chebee7i/dit,Autoplectic/dit,dit/dit,chebee7i/dit,Autoplectic/dit,chebee7i/dit,Autoplectic/dit,dit/dit,Autoplectic/dit,chebee7i/dit,Autoplectic/dit
dit/divergences/kl.py
dit/divergences/kl.py
""" These are special interest implementations that should be used only in very particular situations. cross_entropy_pmf relative_entropy_pmf DKL_pmf These functions should be used only if the pmfs that are passed in have the same exact length and correspond to the same outcome probabilities. They also ass...
import dit import numpy as np def cross_entropy_pmf(p, q=None): """ Calculates the cross entropy from probability mass functions `p` and `q`. If `q` is None, then it is set to be `p`. Then the entropy of `p` is calculated. Assumption: Linearly distributed probabilities. """ if q is None:...
bsd-3-clause
Python
c65b6adafcdf791030090a72f4490171012ce4fd
Use a buggy pox module
ucb-sts/sts,jmiserez/sts,jmiserez/sts,ucb-sts/sts
config/fuzz_pox_simple.py
config/fuzz_pox_simple.py
from config.experiment_config_lib import ControllerConfig from sts.topology import MeshTopology from sts.control_flow import Fuzzer from sts.input_traces.input_logger import InputLogger from sts.simulation_state import SimulationConfig # Use POX as our controller start_cmd = ('''./pox.py samples.buggy ''' ...
from config.experiment_config_lib import ControllerConfig from sts.topology import MeshTopology from sts.control_flow import Fuzzer from sts.input_traces.input_logger import InputLogger from sts.simulation_state import SimulationConfig # Use POX as our controller start_cmd = ('''./pox.py openflow.discovery forwarding...
apache-2.0
Python
23bba70700add35015aeeb3ff0bcee425e9cfd3f
Update Curso.py
AEDA-Solutions/matweb,AEDA-Solutions/matweb,AEDA-Solutions/matweb,AEDA-Solutions/matweb,AEDA-Solutions/matweb
backend/Models/Curso/Curso.py
backend/Models/Curso/Curso.py
class Curso(object): def __init__(self,curso): self.id = curso.getId() self.nome = curso.getNome() self.id_campus = curso.getId_campus() self.id_grau = curso.getId_grau() self.codigo = curso.getCodigo() self.permanencia_minima = curso.getPermanencia_minima() ...
class Curso(object): def __init__(self,curso): self.id = curso.getId() self.nome = curso.getNome() self.id_campus = curso.getId_campus() self.id_grau = curso.getId_grau() self.codigo = curso.getCodigo() self.permanencia_minima = curso.getPermanencia_minima() ...
mit
Python
84f4626a623283c3c4d98d9be0ccd69fe837f772
Update download URL and add more output to downloader.
lucasb-eyer/BiternionNet
download_data.py
download_data.py
#!/usr/bin/env python from lbtoolbox.download import download import os import inspect import tarfile def here(f): me = inspect.getsourcefile(here) return os.path.join(os.path.dirname(os.path.abspath(me)), f) def download_extract(urlbase, name, into): print("Downloading " + name) fname = download(...
#!/usr/bin/env python from lbtoolbox.download import download import os import inspect import tarfile def here(f): me = inspect.getsourcefile(here) return os.path.join(os.path.dirname(os.path.abspath(me)), f) def download_extract(url, into): fname = download(url, into) print("Extracting...") w...
mit
Python
c938a280f9b976031635cc0e96371960640acdc5
Update version to reflect changes
whowutwut/confluent,xcat2/confluent,jjohnson42/confluent,xcat2/confluent,michaelfardu/thinkconfluent,jufm/confluent,jjohnson42/confluent,michaelfardu/thinkconfluent,xcat2/confluent,chenglch/confluent,chenglch/confluent,jjohnson42/confluent,michaelfardu/thinkconfluent,chenglch/confluent,xcat2/confluent,jufm/confluent,xc...
confluent_server/setup.py
confluent_server/setup.py
from setuptools import setup setup( name='confluent_server', version='0.1.9', author='Jarrod Johnson', author_email='jbjohnso@us.ibm.com', url='http://xcat.sf.net/', description='confluent systems management server', packages=['confluent', 'confluent/config', 'confluent/interface', ...
from setuptools import setup setup( name='confluent_server', version='0.1.8', author='Jarrod Johnson', author_email='jbjohnso@us.ibm.com', url='http://xcat.sf.net/', description='confluent systems management server', packages=['confluent', 'confluent/config', 'confluent/interface', ...
apache-2.0
Python
0d47c8ffb4182c1a2455d3e2e834626fcb7e727b
Fix flake8 errors
emencia/dr-dump
drdump/drdump.py
drdump/drdump.py
# -*- coding: utf-8 -*- from __future__ import absolute_import import pkg_resources class ApplicationsList(object): def __init__(self, apps): self._apps = apps def __iter__(self): return iter(self._apps) @classmethod def from_packages(cls, extra_apps=()): packages = [d for...
# -*- coding: utf-8 -*- from __future__ import absolute_import import pkg_resources class ApplicationsList(object): def __init__(self, apps): self._apps = apps def __iter__(self): return iter(self._apps) @classmethod def from_packages(cls, extra_apps=()): packages = [d for d...
mit
Python
3878ebcd4c5584fa205bd9984e90db416e6c2ada
Add default for type field
bashu/django-airports
airports/models.py
airports/models.py
# -*- coding: utf-8 -*- from django.contrib.gis.db import models try: from django.utils.encoding import force_unicode as force_text except (NameError, ImportError): from django.utils.encoding import force_text from django.utils.encoding import python_2_unicode_compatible from django.core.validators import Min...
# -*- coding: utf-8 -*- from django.contrib.gis.db import models try: from django.utils.encoding import force_unicode as force_text except (NameError, ImportError): from django.utils.encoding import force_text from django.utils.encoding import python_2_unicode_compatible from django.core.validators import Min...
mit
Python
c94c86df52184af6b07dcf58951688cea178b8e6
Make lua autoconfig work better.
DMOJ/judge,DMOJ/judge,DMOJ/judge
dmoj/executors/LUA.py
dmoj/executors/LUA.py
from .base_executor import ScriptExecutor class Executor(ScriptExecutor): ext = '.lua' name = 'LUA' command = 'lua' command_paths = ['lua', 'lua5.3', 'lua5.2', 'lua5.1'] address_grace = 131072 test_program = "io.write(io.read('*all'))" @classmethod def get_version_flags(cls, command):...
from .base_executor import ScriptExecutor class Executor(ScriptExecutor): ext = '.lua' name = 'LUA' command = 'lua' address_grace = 131072 test_program = "io.write(io.read('*all'))" @classmethod def get_version_flags(cls, command): return ['-v']
agpl-3.0
Python
3c35369a5a7b67e934d59c321439e3d3e5495970
Fix dependency
snare/scruffy
example/duckman/setup.py
example/duckman/setup.py
import sys from setuptools import setup setup( name = "duckman", version = "0.1", author = "snare", author_email = "snare@ho.ax", description = ("Ya thrust yer pelvis HUAGHH"), license = "Buy snare a beer", keywords = "duckman", url = "https://github.com/snare/scruffy", packages=['...
import sys from setuptools import setup setup( name = "duckman", version = "0.1", author = "snare", author_email = "snare@ho.ax", description = ("Ya thrust yer pelvis HUAGHH"), license = "Buy snare a beer", keywords = "duckman", url = "https://github.com/snare/scruffy", packages=['...
mit
Python
47e0a3e3822253c5dfbd55d98c8235e28b8c5419
Update __init__.py
stuaxo/vext
vext/__init__.py
vext/__init__.py
import logging from os import environ from os.path import join from distutils.sysconfig import get_python_lib if environ.get("VEXT_DEBUG_LOG", "0") == "1": logging.basicConfig(level=logging.DEBUG) else: logging.basicConfig(level=logging.ERROR) vext_pth = join(get_python_lib(), 'vext_importer.pth') logge...
import logging from os import environ from os.path import join from distutils.sysconfig import get_python_lib if "VEXT_DEBUG_LOG" in environ: logging.basicConfig(level=logging.DEBUG) vext_pth = join(get_python_lib(), 'vext_importer.pth') logger = logging.getLogger("vext") def install_importer(): logger.deb...
mit
Python
83429a5abcecc9a750a9b376b2ee86922a3861e4
refactor is_conda placement
efiop/dvc,dmpetrov/dataversioncontrol,dmpetrov/dataversioncontrol,efiop/dvc
dvc/utils/pkg.py
dvc/utils/pkg.py
from dvc.utils import is_binary def is_conda(): try: from .build import PKG # patched during conda package build return PKG == "conda" except ImportError: return False def get_linux(): import distro if not is_binary(): return "pip" package_managers = { ...
from dvc.utils import is_binary def is_conda(): try: from .build import PKG # patched during conda package build return PKG == "conda" except ImportError: return False def get_linux(): import distro if is_conda(): return "conda" if not is_binary(): ret...
apache-2.0
Python
e9f2cda8cb0019a3b41226c746e51b2dff5d1518
bump up the version to 0.1.4
tyrchen/vint
vint/__init__.py
vint/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- __title__ = 'vint' __version__ = '0.1.4' __author__ = 'Tyr Chen' __email__ = 'tyr.chen@gmail.com' __license__ = 'MIT' __copyright__ = 'Copyright 2013 Tyr Chen'
#!/usr/bin/env python # -*- coding: utf-8 -*- __title__ = 'vint' __version__ = '0.1.3' __author__ = 'Tyr Chen' __email__ = 'tyr.chen@gmail.com' __license__ = 'MIT' __copyright__ = 'Copyright 2013 Tyr Chen'
mit
Python
7cef87a81278c227db0cb07329d1b659dbd175b3
Use standard library instead of django.utils.importlib
novafloss/django-mail-factory,novafloss/django-mail-factory
mail_factory/models.py
mail_factory/models.py
# -*- coding: utf-8 -*- import django from django.conf import settings from django.utils.module_loading import module_has_submodule try: from importlib import import_module except ImportError: # Compatibility for python-2.6 from django.utils.importlib import import_module def autodiscover(): """Auto...
# -*- coding: utf-8 -*- import django from django.conf import settings from django.utils.importlib import import_module from django.utils.module_loading import module_has_submodule def autodiscover(): """Auto-discover INSTALLED_APPS mails.py modules.""" for app in settings.INSTALLED_APPS: module = '...
bsd-3-clause
Python
3aaca776a2b3292168594e4734c23336f28ddb88
fix tagged_object_list in middleware
wlanslovenija/cmsplugin-blog,divio/cmsplugin-blog,divio/cmsplugin-blog,divio/cmsplugin-blog,wlanslovenija/cmsplugin-blog,wlanslovenija/cmsplugin-blog,wlanslovenija/cmsplugin-blog
cmsplugin_blog/middleware.py
cmsplugin_blog/middleware.py
from simple_translation.middleware import MultilingualGenericsMiddleware, filter_queryset_language from cmsplugin_blog.models import Entry class MultilingualBlogEntriesMiddleware(MultilingualGenericsMiddleware): language_fallback_middlewares = [ 'django.middleware.locale.LocaleMiddleware', ...
from simple_translation.middleware import MultilingualGenericsMiddleware from cmsplugin_blog.models import Entry class MultilingualBlogEntriesMiddleware(MultilingualGenericsMiddleware): language_fallback_middlewares = [ 'django.middleware.locale.LocaleMiddleware', 'cms.middleware.multil...
bsd-3-clause
Python
bd8698e733e9cfc99040f3c9ecc217525303432d
make middleware work with cbv
divio/cmsplugin-blog,wlanslovenija/cmsplugin-blog,wlanslovenija/cmsplugin-blog,divio/cmsplugin-blog,wlanslovenija/cmsplugin-blog,wlanslovenija/cmsplugin-blog,divio/cmsplugin-blog
cmsplugin_blog/middleware.py
cmsplugin_blog/middleware.py
from simple_translation.middleware import MultilingualGenericsMiddleware from cmsplugin_blog.models import Entry class MultilingualBlogEntriesMiddleware(MultilingualGenericsMiddleware): language_fallback_middlewares = [ 'django.middleware.locale.LocaleMiddleware', 'cms.middleware.multil...
from simple_translation.middleware import MultilingualGenericsMiddleware from cmsplugin_blog.models import Entry class MultilingualBlogEntriesMiddleware(MultilingualGenericsMiddleware): language_fallback_middlewares = [ 'django.middleware.locale.LocaleMiddleware', 'cms.middleware.multil...
bsd-3-clause
Python
48008e92751f21ef210f3df18a9e239c38767689
Use the new name for `raw_input` in Python 3. Close #82.
erikrose/nose-progressive
noseprogressive/wrapping.py
noseprogressive/wrapping.py
"""Facilities for wrapping stderr and stdout and dealing with the fallout""" from __future__ import with_statement import __builtin__ import cmd import pdb import sys def cmdloop(self, *args, **kwargs): """Call pdb's cmdloop, making readline work. Patch raw_input so it sees the original stdin and stdout, le...
"""Facilities for wrapping stderr and stdout and dealing with the fallout""" from __future__ import with_statement import __builtin__ import cmd import pdb import sys def cmdloop(self, *args, **kwargs): """Call pdb's cmdloop, making readline work. Patch raw_input so it sees the original stdin and stdout, le...
mit
Python
b1dc3196ee12cb5a271fec17d92c2c4b6e977032
use Glen's icons
ellson/graphviz-web-dynamic,ellson/graphviz-web-dynamic,ellson/graphviz-web-dynamic
ht2php.py
ht2php.py
#!/usr/bin/python import sys if len(sys.argv) < 2: exit pageset = sys.argv[1].split() source = sys.argv[2] basename = source.split('.')[0] if len(basename.split('_')) > 1: baseparent = basename.split('_')[0] else: baseparent = '' if basename == 'Download': fout = open(basename + '.php', 'w') fin = open('...
#!/usr/bin/python import sys if len(sys.argv) < 2: exit pageset = sys.argv[1].split() source = sys.argv[2] basename = source.split('.')[0] if len(basename.split('_')) > 1: baseparent = basename.split('_')[0] else: baseparent = '' if basename == 'Download': fout = open(basename + '.php', 'w') fin = open('...
epl-1.0
Python
84f38202cfcbcd3306662905fa8ea81e9b095904
Bump version to 3.0.10.post0
webu/django-cms,irudayarajisawa/django-cms,SofiaReis/django-cms,isotoma/django-cms,isotoma/django-cms,rryan/django-cms,benzkji/django-cms,datakortet/django-cms,saintbird/django-cms,owers19856/django-cms,jsma/django-cms,SachaMPS/django-cms,kk9599/django-cms,divio/django-cms,rsalmaso/django-cms,vad/django-cms,chmberl/dja...
cms/__init__.py
cms/__init__.py
# -*- coding: utf-8 -*- __version__ = '3.0.10.post0' default_app_config = 'cms.apps.CMSConfig'
# -*- coding: utf-8 -*- __version__ = '3.0.10' default_app_config = 'cms.apps.CMSConfig'
bsd-3-clause
Python
d1b9dece3282aea0464c37484be6aab086a7e082
use sys.executable instead of 'python' for running regression tests
pypa/setuptools_scm,pypa/setuptools_scm,RonnyPfannschmidt/setuptools_scm,RonnyPfannschmidt/setuptools_scm
testing/test_regressions.py
testing/test_regressions.py
import sys from setuptools_scm import get_version from setuptools_scm.git import parse from setuptools_scm.utils import do_ex, do import pytest def test_pkginfo_noscmroot(tmpdir, monkeypatch): """if we are indeed a sdist, the root does not apply""" monkeypatch.delenv("SETUPTOOLS_SCM_DEBUG") # we should...
import sys from setuptools_scm import get_version from setuptools_scm.git import parse from setuptools_scm.utils import do_ex, do import pytest def test_pkginfo_noscmroot(tmpdir, monkeypatch): """if we are indeed a sdist, the root does not apply""" monkeypatch.delenv("SETUPTOOLS_SCM_DEBUG") # we should...
mit
Python
93ff82b816ffb70748a797777a3fd7060dd2c6de
Use ufo2ft, use loadFilterFromString
googlei18n/ufo2ft,googlefonts/ufo2ft,jamesgk/ufo2fdk
Lib/ufo2ft/filters/__main__.py
Lib/ufo2ft/filters/__main__.py
import argparse import importlib import logging from fontTools.misc.cliTools import makeOutputFileName from ufo2ft.filters import getFilterClass, logger, loadFilterFromString try: import ufoLib2 loader = ufoLib2.Font except ImportError: import defcon loader = defcon.Font logging.basicConfig(level=...
import argparse import importlib import logging import defcon from fontTools.misc.cliTools import makeOutputFileName from ufo2ft.filters import getFilterClass, logger logging.basicConfig(level=logging.INFO) parser = argparse.ArgumentParser(description="Filter a UFO file") parser.add_argument("--output", "-o", metav...
mit
Python
fac976dabac7a3bf9d8103269519b15319f12c40
fix broken functional tests
mark-in/securedrop-app-code,mark-in/securedrop-app-code,mark-in/securedrop-app-code,mark-in/securedrop-app-code
tests/functional/source_navigation_steps.py
tests/functional/source_navigation_steps.py
import tempfile class SourceNavigationSteps(): def _source_visits_source_homepage(self): self.driver.get(self.source_location) self.assertEqual("SecureDrop | Protecting Journalists and Sources", self.driver.title) def _source_chooses_to_submit_documents(self): self.driver.find_elemen...
import tempfile class SourceNavigationSteps(): def _source_visits_source_homepage(self): self.driver.get(self.source_location) self.assertEqual("SecureDrop | Protecting Journalists and Sources", self.driver.title) def _source_chooses_to_submit_documents(self): self.driver.find_elemen...
agpl-3.0
Python
432163e49fbe6bd40f53082138dc50de6a71b6da
Fix test_update_client_order_comments
alexandriagroup/fnapy,alexandriagroup/fnapy
tests/offline/test_client_order_comments.py
tests/offline/test_client_order_comments.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2016 <> # # Distributed under terms of the MIT license. # Python modules from __future__ import unicode_literals # Project modules from tests import make_requests_get_mock, fake_manager from tests.offline import ContextualTest def test...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2016 <> # # Distributed under terms of the MIT license. # Python modules from __future__ import unicode_literals # Project modules from tests import make_requests_get_mock, fake_manager from tests.offline import ContextualTest def test...
mit
Python