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
456a0d64ff553cc982c507587585ad0037379b94
fix #206 - define execution.testdir before starting golem run -i
lucianopuccio/golem,lucianopuccio/golem,lucianopuccio/golem
golem/execution_runner/interactive.py
golem/execution_runner/interactive.py
"""Golem interactive mode.""" from golem.core import utils, settings_manager, session from golem import execution from golem import actions from golem.gui import gui_utils from golem.execution_runner.execution_runner import define_browsers from golem.test_runner import test_logger def interactive(settings, cli_browse...
"""Golem interactive mode.""" from golem.core import utils, settings_manager, session from golem import execution from golem import actions from golem.gui import gui_utils from golem.execution_runner.execution_runner import define_browsers from golem.test_runner import test_logger def interactive(settings, cli_browse...
mit
Python
b5d1cee8e79233619acc0db09492c5261f2d92ca
Add parameters to exercise placeholder kindergarten-garden
jmluy/xpython,N-Parsons/exercism-python,pheanex/xpython,exercism/xpython,smalley/python,exercism/xpython,mweb/python,exercism/python,jmluy/xpython,smalley/python,behrtam/xpython,pheanex/xpython,behrtam/xpython,mweb/python,N-Parsons/exercism-python,exercism/python
exercises/kindergarten-garden/kindergarten_garden.py
exercises/kindergarten-garden/kindergarten_garden.py
class Garden(object): def __init__(self, diagram, students): pass
class Garden(object): def __init__(self): pass
mit
Python
8da1fde9f16dcb500aad88c72a2e54c2b2b8eb8f
Use the appropriate API to add a new editor.
tommy-u/chaco,tommy-u/chaco,burnpanck/chaco,ContinuumIO/chaco,ContinuumIO/chaco,tommy-u/chaco,ContinuumIO/chaco,burnpanck/chaco,ContinuumIO/chaco,burnpanck/chaco
enthought/chaco/plugin/workbench_session.py
enthought/chaco/plugin/workbench_session.py
""" A Chaco Shell PlotSession which raises Workbench Editors instead of free-standing windows. """ from enthought.traits.api import Any, Dict, List, Str from enthought.chaco.shell.session import PlotSession from plot_editor import PlotEditor class WorkbenchSession(PlotSession): """ A Chaco Shell PlotSession whi...
""" A Chaco Shell PlotSession which raises Workbench Editors instead of free-standing windows. """ from enthought.traits.api import Any, Dict, List, Str from enthought.chaco.shell.session import PlotSession from plot_editor import PlotEditor class WorkbenchSession(PlotSession): """ A Chaco Shell PlotSession whi...
bsd-3-clause
Python
e66ef44e0125644dce71a6f0198e26af82cb9263
Raise on partitionless topics
ciena/afkak,ciena/afkak
afkak/group_assignment.py
afkak/group_assignment.py
# Copyright 2018 Ciena Corporation # # 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 wri...
# Copyright 2018 Ciena Corporation # # 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 wri...
apache-2.0
Python
9386ee784bf39213e648ce8efccfbf43ffb36ba5
Make tests work for create_temp_zip
hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare
hs_core/tests/api/native/test_folder_download_zip.py
hs_core/tests/api/native/test_folder_download_zip.py
from django.contrib.auth.models import Group from django.test import TestCase from hs_core.hydroshare.users import create_account from hs_core.hydroshare.resource import add_resource_files, create_resource from hs_core.models import GenericResource from hs_core.tasks import create_temp_zip from django_irods.storage im...
from django.contrib.auth.models import Group from django.test import TestCase from hs_core.hydroshare.users import create_account from hs_core.hydroshare.resource import add_resource_files, create_resource from hs_core.models import GenericResource from hs_core.tasks import create_temp_zip from django_irods.storage im...
bsd-3-clause
Python
36e5af74e6ecaba4cea4bfcd2c1ef997d1e15eb0
Make sure there is data for the meter test
openstack/python-openstacksdk,dtroyer/python-openstacksdk,openstack/python-openstacksdk,dudymas/python-openstacksdk,dtroyer/python-openstacksdk,stackforge/python-openstacksdk,briancurtin/python-openstacksdk,stackforge/python-openstacksdk,dudymas/python-openstacksdk,briancurtin/python-openstacksdk
openstack/tests/functional/telemetry/v2/test_meter.py
openstack/tests/functional/telemetry/v2/test_meter.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
Python
2a99a44da4eb49c97d48b9f5c4e223e81b07891a
Rewrite help string.
ideascube/ideascube,ideascube/ideascube,ideascube/ideascube,ideascube/ideascube
ideascube/serveradmin/management/commands/csv2pkg.py
ideascube/serveradmin/management/commands/csv2pkg.py
import os import sys from ideascube.serveradmin.package import MediaCenterPackage from ideascube.management.utils import Reporter from django.core.management.base import BaseCommand help_str = """Convert a CSV describing a set of media into a package. The CSV file must contain columns "title", "summary", "path" an...
import os import sys from ideascube.serveradmin.package import MediaCenterPackage from ideascube.management.utils import Reporter from django.core.management.base import BaseCommand class Command(BaseCommand): help = ('Convert a CSV describing a set of media into a package. ' 'The CSV file must con...
agpl-3.0
Python
5fb741f4af0c133c321e928ebe55af6405d57eb3
remove docstring type
mosquito/aio-pika
aio_pika/patterns/base.py
aio_pika/patterns/base.py
import pickle from typing import Any, Callable class Method: __slots__ = ( "name", "func", ) def __init__(self, name: str, func: Callable[..., Any]): self.name = name self.func = func def __getattr__(self, item: str) -> "Method": return Method(".".join((self.n...
import pickle from typing import Any, Callable class Method: __slots__ = ( "name", "func", ) def __init__(self, name: str, func: Callable[..., Any]): self.name = name self.func = func def __getattr__(self, item: str) -> "Method": return Method(".".join((self.n...
apache-2.0
Python
0fb4490f78c0209c6efda6c96ee6939ee893aaeb
Bump the version to 0.7.12
aldryn/aldryn-client,aldryn/aldryn-client
aldryn_client/__init__.py
aldryn_client/__init__.py
# -*- coding: utf-8 -*- __version__ = '0.7.12'
# -*- coding: utf-8 -*- __version__ = '0.7.11'
bsd-3-clause
Python
6c05322e22dab95e92518f5eb7bd2d4eb269d37f
Complete dfs by recursion
bowen0701/algorithms_data_structures
alg_depth_first_search.py
alg_depth_first_search.py
from __future__ import absolute_import from __future__ import print_function from __future__ import division def dfs_stack(): """Depth first search by iteration algorithm using stack.""" pass def _previsit(v, previsit_d, ccnum_d, clock, ccid): """Previsit method for _dfs_explore().""" clock += 1 ...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def dfs_stack(): """Depth first search by iteration algorithm using stack.""" pass # TODO: Pass variables into helper functions. def _previsit(v, previsit_d, ccnum_d, clock): clock += 1 prev...
bsd-2-clause
Python
e7ebca014c7e53b2978ff0ff93a364bb471368d7
Update tracking-arduino.py
MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab
home/CheekyMonkey/tracking-arduino.py
home/CheekyMonkey/tracking-arduino.py
# A script to test opencv tracking in MyRobotLab with an Arduino connected to a Raspberry Pi 3 # as at mrl development build version 2489 # a mashup of code taken from Mats: # https://github.com/MyRobotLab/pyrobotlab/blob/master/home/Mats/Tracking.py # and also from Grog: # http://myrobotlab.org/content/tracking-result...
# A script to test opencv tracking in MyRobotLab with an Arduino connected to a Raspberry Pi 3 # as at mrl development build version 2489 # a mashup of code taken from Mats: # https://github.com/MyRobotLab/pyrobotlab/blob/master/home/Mats/Tracking.py # and also from Grog: # http://myrobotlab.org/content/tracking-result...
apache-2.0
Python
3b0282c9de226d51bd2a1ebf0910de8fdf05f5e2
fix comment in test
GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin
geotrek/core/tests/test_path_filter.py
geotrek/core/tests/test_path_filter.py
from unittest import skipIf from django.conf import settings from django.urls import reverse from geotrek.authent.tests.base import AuthentFixturesTest from geotrek.authent.tests.factories import PathManagerFactory from geotrek.core.tests.factories import PathFactory @skipIf(not settings.TREKKING_TOPOLOGY_ENABLED,...
from unittest import skipIf from django.conf import settings from django.urls import reverse from geotrek.authent.tests.base import AuthentFixturesTest from geotrek.authent.tests.factories import PathManagerFactory from geotrek.core.tests.factories import PathFactory @skipIf(not settings.TREKKING_TOPOLOGY_ENABLED,...
bsd-2-clause
Python
119db61c063f1279c0d0800b76d83d9616cf1c04
Update futures.py
acockburn/appdaemon,acockburn/appdaemon
appdaemon/futures.py
appdaemon/futures.py
import appdaemon.utils as utils from appdaemon.appdaemon import AppDaemon import functools class Futures: def __init__(self, ad: AppDaemon): self.AD = ad self.futures = {} def add_future(self, name, f): f.add_done_callback(functools.partial(self.remove_future, name)) if name ...
import appdaemon.utils as utils from appdaemon.appdaemon import AppDaemon import functools class Futures: def __init__(self, ad: AppDaemon): self.AD = ad self.futures = {} def add_future(self, name, f): f.add_done_callback(functools.partial(self.remove_future, name)) if name ...
mit
Python
6c41050c2d5780442292628e269b3ff7175dc959
make it installable on odoo 9.0
linkitspa/l10n-italy,linkitspa/l10n-italy,odoo-isa/l10n-italy,linkitspa/l10n-italy,maxhome1/l10n-italy
l10n_it_base_location_geonames_import/__openerp__.py
l10n_it_base_location_geonames_import/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Agile Business Group (http://www.agilebg.com) # @author Lorenzo Battistini <lorenzo.battistini@agilebg.com> # # This program is free software: you can redistribute it and/or modify # ...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Agile Business Group (http://www.agilebg.com) # @author Lorenzo Battistini <lorenzo.battistini@agilebg.com> # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
Python
30a39817061acb286326f0725bfbf73bdbcd6483
fix whitespace
Harvard-ATG/HarvardCards,Harvard-ATG/HarvardCards,Harvard-ATG/HarvardCards,Harvard-ATG/HarvardCards
harvardcards/settings/sharedhosting.py
harvardcards/settings/sharedhosting.py
# Shared hosting settings (sites.fas) from harvardcards.settings.common import * import os FORCE_SCRIPT_NAME = None STATIC_URL = '/static' if os.environ.get('SERVER_NAME') == 'flashcards.fas.harvard.edu': FORCE_SCRIPT_NAME = '/' STATIC_URL = '/static' elif os.environ.get('SERVER_NAME') == 'sites.test.fas.harva...
# Shared hosting settings (sites.fas) from harvardcards.settings.common import * import os FORCE_SCRIPT_NAME = None STATIC_URL = '/static' if os.environ.get('SERVER_NAME') == 'flashcards.fas.harvard.edu': FORCE_SCRIPT_NAME = '/' ...
bsd-3-clause
Python
8d4aae926e98650117e5cc6c2cd74f314dae6e06
Add import of IndranetAssembler to init
sorgerlab/indra,johnbachman/belpy,sorgerlab/belpy,bgyori/indra,johnbachman/belpy,johnbachman/indra,johnbachman/belpy,sorgerlab/indra,bgyori/indra,sorgerlab/belpy,bgyori/indra,sorgerlab/belpy,sorgerlab/indra,johnbachman/indra,johnbachman/indra
indra/assemblers/indra_net/__init__.py
indra/assemblers/indra_net/__init__.py
from .indra_net import IndraNet from .assembler import IndranetAssembler
from .indra_net import IndraNet
bsd-2-clause
Python
47f495e7e5b8fa06991e0c263bc9239818dd5b4f
Add a Backwards compatibility for python 2.7 by adding a __future__ import
kevinaloys/airpy
airpy/list.py
airpy/list.py
from __future__ import print_function import os import airpy def airlist(): installed_docs = os.listdir(airpy.data_directory) for dir in installed_docs: print(dir, end= ' ') print(end = '\n')
import os import airpy def airlist(): installed_docs = os.listdir(airpy.data_directory) for dir in installed_docs: print(dir, end= ' ') print(end = '\n')
mit
Python
089dc65b4799230b8973fb5a0046bc416977c358
Fix formatting errors.
bitlair/synlogistics,bitlair/synlogistics,bitlair/synlogistics,bitlair/synlogistics,bitlair/synlogistics
ajax/views.py
ajax/views.py
# # SynLogistics AJAX JSON server interaction for common search boxes, etc. # Copyright (C) by Wilco Baan Hofman <wilco@baanhofman.nl> 2011 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Founda...
# # SynLogistics AJAX JSON server interaction for common search boxes, etc. # Copyright (C) by Wilco Baan Hofman <wilco@baanhofman.nl> 2011 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Founda...
agpl-3.0
Python
6656493c3bf9b24d67c6de8cb33a1ca3defa4db8
Make output types consistent for policy creation purposes
ScriptRock/content,ScriptRock/content,ScriptRock/content,ScriptRock/content,ScriptRock/content,ScriptRock/content
code/python/yum-check-update.py
code/python/yum-check-update.py
#!/usr/bin/python import json import subprocess process = subprocess.Popen(["yum", "check-update", "-q"], stdout=subprocess.PIPE) (output, err) = process.communicate() exit_code = process.wait() if exit_code == 0 and output == "": print json.dumps({"exit_code": exit_code, "raw": "Up to date"}) else: p...
#!/usr/bin/python import json import subprocess process = subprocess.Popen(["yum", "check-update", "-q"], stdout=subprocess.PIPE) (output, err) = process.communicate() exit_code = process.wait() if exit_code == 0 and output == "": print "Up to date" else: print json.dumps({"exit_code": exit_code, "raw...
mit
Python
78aa030bf6c4b36773560db82520588f2d033300
Change log level.
Contiamo/contiamo-client-python
contiamo/__init__.py
contiamo/__init__.py
from contiamo import resources, public, data import logging logging.basicConfig(level=logging.WARN)
from contiamo import resources, public, data import logging logging.basicConfig(level=logging.DEBUG)
mit
Python
e3cf139196ef93bbe49c182dc679cfacf3d5384a
add timestamps, save and delete methods on bucketlist model
gitgik/flask-rest-api,gitgik/flask-rest-api
app/models.py
app/models.py
from app import db class Bucketlist(db.Model): """This class represents the bucketlist table.""" __tablename__ = 'bucketlists' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(255)) date_created = db.Column(db.DateTime, default=db.func.current_timestamp()) date_modifie...
from app import db class Bucketlist(db.Model): """This class represents the bucketlist table.""" __tablename__ = 'bucketlists' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(255)) def __repr__(self): return "<Bucketlist: {}>".format(self.name)
mit
Python
905895f29928542c6ca5c62644688261df9f61e4
Switch from werkzeug AtomFeed to FeedGenerator
albertyw/albertyw.com,albertyw/albertyw.com,albertyw/albertyw.com,albertyw/albertyw.com,albertyw/albertyw.com
app/routes.py
app/routes.py
from urllib.parse import urljoin from feedgen.feed import FeedGenerator from flask import ( Blueprint, abort, redirect, render_template, request, url_for, ) from varsnap import varsnap from app import note_util handlers = Blueprint('handlers', __name__) @handlers.route("/") def index(): ...
from urllib.parse import urljoin from werkzeug.contrib.atom import AtomFeed from flask import ( Blueprint, abort, redirect, render_template, request, url_for, ) from varsnap import varsnap from app import note_util handlers = Blueprint('handlers', __name__) @handlers.route("/") def index()...
mit
Python
dfb719fa8cd092697fe02fbab59c4395c36385fa
Declare Post model. [skip ci]
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
blog/models.py
blog/models.py
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Post(models.Model): pass
from django.db import models # Create your models here.
bsd-2-clause
Python
28726e87dca35a55e4d2e89c5d37d22b2d2d27ce
Add initial solution
CubicComet/exercism-python-solutions
acronym/acronym.py
acronym/acronym.py
import re def abbreviate(s): return "".join(re.findall(r'^[A-Z]|(?<=[ -])[A-Za-z](?![A-Z])', s)).upper()
def abbreviate(): pass
agpl-3.0
Python
55a435a204b01feaf29050f631d4aeaf3b37de8c
add parameter to URL for cache busting (#818)
Connexions/openstax-cms,Connexions/openstax-cms,openstax/openstax-cms,openstax/openstax-cms,openstax/openstax-cms,openstax/openstax-cms
books/views.py
books/views.py
from random import randrange from django.shortcuts import redirect from django.http import Http404 from django.views.decorators.csrf import csrf_exempt from .models import BookIndex, Book @csrf_exempt def book_index(request): page = BookIndex.objects.all()[0] return redirect('/apps/cms/api/v2/pages/{}/?cache=...
from django.shortcuts import redirect from django.http import Http404 from django.views.decorators.csrf import csrf_exempt from .models import BookIndex, Book @csrf_exempt def book_index(request): page = BookIndex.objects.all()[0] return redirect('/apps/cms/api/v2/pages/{}/'.format(page.pk)) @csrf_exempt de...
agpl-3.0
Python
7f085e489da64d544d613c653e325506a21a5b19
fix load modules linux/windows path
viraintel/OWASP-Nettacker,viraintel/OWASP-Nettacker,viraintel/OWASP-Nettacker,viraintel/OWASP-Nettacker
core/load_modules.py
core/load_modules.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from glob import glob def load_all_modules(): # Search for Modules module_names = [] for lib in glob('lib/brute/*/engine.py'): ib = lib.rsplit('\\' if sys.platform == 'win32' or sys.platform == 'win64' else '/')[-2] if lib + '_brute...
#!/usr/bin/env python # -*- coding: utf-8 -*- from glob import glob def load_all_modules(): # Search for Modules module_names = [] for lib in glob('lib\\brute/*/engine.py'): lib = lib.rsplit('\\')[-2] if lib + '_brute' not in module_names: module_names.append(lib + '_brute') ...
apache-2.0
Python
fab471aad2ad42f52b3e0d93d7fdeff4256c0df7
update to 1.8.2.13
lewzylu/coscmd
coscmd/cos_global.py
coscmd/cos_global.py
Version = "1.8.2.13"
Version = "1.8.2.12"
mit
Python
6e422ee5c020bdb8b1a33c22c317f0b82aa95568
bump version
NinjaMSP/crossbar,NinjaMSP/crossbar,NinjaMSP/crossbar
crossbar/__init__.py
crossbar/__init__.py
##################################################################################### # # Copyright (c) Crossbar.io Technologies GmbH # # Unless a separate license agreement exists between you and Crossbar.io GmbH (e.g. # you have purchased a commercial license), the license terms below apply. # # Should you enter ...
##################################################################################### # # Copyright (c) Crossbar.io Technologies GmbH # # Unless a separate license agreement exists between you and Crossbar.io GmbH (e.g. # you have purchased a commercial license), the license terms below apply. # # Should you enter ...
agpl-3.0
Python
c7fd7e274b15fc2538e6057d8f848ca26818cc5a
Add an execute function to run shell commands
rantav/cosmo-plugin-bash-runner
bash_runner/tasks.py
bash_runner/tasks.py
""" Cloudify plugin for running a simple bash script. Operations: start: Run a script """ import urllib import subprocess import fcntl import select import os import errno from cosmo.events import send_event as send_riemann_event from cloudify.utils import get_local_ip, get_manager_ip from cloudify.decorators impo...
""" Cloudify plugin for running a simple bash script. Operations: start: Run a script """ import urllib from cosmo.events import send_event as send_riemann_event from cloudify.utils import get_local_ip, get_manager_ip from cloudify.decorators import operation from cloudify.manager import set_node_started get_ip =...
apache-2.0
Python
2f4a2d796afa2249e1c68b8bc35847be9e55204b
Configure broker_url on REDIS
jeffshek/betterself,jeffshek/betterself,jeffshek/betterself,jeffshek/betterself
betterself/celery.py
betterself/celery.py
from __future__ import absolute_import, unicode_literals from config.settings.constants import PRODUCTION from django.conf import settings if settings.DJANGO_ENVIRONMENT == PRODUCTION: import celery import raven from raven.contrib.celery import register_signal, register_logger_signal import environ ...
from __future__ import absolute_import, unicode_literals from config.settings.constants import PRODUCTION from django.conf import settings if settings.DJANGO_ENVIRONMENT == PRODUCTION: import celery import raven from raven.contrib.celery import register_signal, register_logger_signal class Celery(cel...
mit
Python
92d337532b3b9759e5256165c81b8ef9507ec64d
Remove default from compute field
OCA/l10n-brazil,OCA/l10n-brazil,OCA/l10n-brazil
l10n_br_nfe_spec/models/spec_models.py
l10n_br_nfe_spec/models/spec_models.py
# Copyright 2019-2020 Akretion - Raphael Valyi <raphael.valyi@akretion.com> # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html). from odoo import fields, models class NfeSpecMixin(models.AbstractModel): _description = "Abstract Model" _name = "spec.mixin.nfe" _field_prefix = "nfe4...
# Copyright 2019-2020 Akretion - Raphael Valyi <raphael.valyi@akretion.com> # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html). from odoo import fields, models class NfeSpecMixin(models.AbstractModel): _description = "Abstract Model" _name = "spec.mixin.nfe" _field_prefix = "nfe4...
agpl-3.0
Python
f735d803fe2705e25e028cc909ff1cc211e3e285
add documentation
WheatonCS/Lexos,WheatonCS/Lexos,WheatonCS/Lexos
lexos/processors/analyze/similarity.py
lexos/processors/analyze/similarity.py
import numpy as np import pandas as pd from sklearn.metrics.pairwise import cosine_similarity from lexos.helpers.error_messages import NON_NEGATIVE_INDEX_MESSAGE def similarity_maker(dtm_data_frame: pd.DataFrame, comp_file_index: int) -> \ pd.DataFrame: """this function generate the result of cos-similar...
import numpy as np import pandas as pd from sklearn.metrics.pairwise import cosine_similarity from lexos.helpers.error_messages import NON_NEGATIVE_INDEX_MESSAGE def similarity_maker(dtm_data_frame: pd.DataFrame, comp_file_index: int) -> \ pd.DataFrame: """this function generate the result of cos-similar...
mit
Python
68b0f560322884967b817ad87cef8c1db9600dbd
Add print statements for all error types
alphagov/notify-frontend,alphagov/notify-frontend,alphagov/notify-frontend,alphagov/notify-frontend
app/main/errors.py
app/main/errors.py
from flask import render_template from app.main import main @main.app_errorhandler(400) def page_not_found(e): print(e.message) return _render_error_page(500) @main.app_errorhandler(404) def page_not_found(e): print(e.message) return _render_error_page(404) @main.app_errorhandler(500) def exceptio...
from flask import render_template from app.main import main @main.app_errorhandler(400) def page_not_found(e): return _render_error_page(500) @main.app_errorhandler(404) def page_not_found(e): return _render_error_page(404) @main.app_errorhandler(500) def exception(e): return _render_error_page(500) ...
mit
Python
94e9c927a7a4bfccfc5ac9b05f0f134ea188c8d6
add 10 seconds timeout for waiting on ESP to start the update
Cloudino/Cloudino-Arduino-IDE,NeuralSpaz/Arduino,paulmand3l/Arduino,wdoganowski/Arduino,gonium/Arduino,Cloudino/Arduino,sanyaade-iot/Arduino-1,eeijcea/Arduino-1,adafruit/ESP8266-Arduino,myrtleTree33/Arduino,smily77/Arduino,paulmand3l/Arduino,mateuszdw/Arduino,ssvs111/Arduino,ogahara/Arduino,paulmand3l/Arduino,weera00/A...
hardware/esp8266com/esp8266/tools/espota.py
hardware/esp8266com/esp8266/tools/espota.py
#!/usr/bin/env python # # this script will push an OTA update to the ESP # # use it like: python ota_server.py <ESP_IP_address> <sketch.bin> # # on the ESP side you need code like this: https://gist.github.com/igrr/43d5c52328e955bb6b09 to handle the update # from __future__ import print_function import socket import ...
#!/usr/bin/env python # # this script will push an OTA update to the ESP # # use it like: python ota_server.py <ESP_IP_address> <sketch.bin> # # on the ESP side you need code like this: https://gist.github.com/igrr/43d5c52328e955bb6b09 to handle the update # from __future__ import print_function import socket import ...
lgpl-2.1
Python
0e60863d43a5b230839191743f72818763eeee71
Update py2app script for Qt 5.11
Syncplay/syncplay,NeverDecaf/syncplay,NeverDecaf/syncplay,alby128/syncplay,Syncplay/syncplay,alby128/syncplay
buildPy2app.py
buildPy2app.py
""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup from glob import glob import syncplay APP = ['syncplayClient.py'] DATA_FILES = [ ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), ] OPTIONS = { 'icon...
""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup from glob import glob import syncplay APP = ['syncplayClient.py'] DATA_FILES = [ ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), ] OPTIONS = { 'icon...
apache-2.0
Python
0013e4990329921e195bcc3c8da179f426837f60
Fix typo
jorgebastida/cfn-response
cfnresponse.py
cfnresponse.py
import urllib2 import json SUCCESS = "SUCCESS" FAILED = "FAILED" def send(event, context, response_status, response_data=None, physical_resource_id=None): response_data = response_data or {} response_body = json.dumps( { 'Status': response_status, 'Reason': "See the details i...
import urllib2 import json SUCCESS = "SUCCESS" FAILED = "FAILED" def send(event, context, response_status, response_data=None, physical_resource_id=None): response_data = response_data or {} response_body = json.dumps( { 'Status': response_status, 'Reason': "See the details i...
bsd-3-clause
Python
d027381df4a57da71625061c7ad401e7b38a98c3
enforce file naming convensions in plot-scan.py
perlinm/qcdg-nv-simulation,perlinm/qcdg-nv-simulation,perlinm/qcdg-nv-simulation
plot-scan.py
plot-scan.py
#!/usr/bin/python3 import sys, matplotlib, numpy import matplotlib.pyplot as plt import numpy as np if len(sys.argv) not in [2,3]: print('useage: %s file [show]' % sys.argv[0]) exit(1) scan_fname = sys.argv[1] show = (len(sys.argv) == 3) if 'scan' not in scan_fname: print('invalid input file') exit(1...
#!/usr/bin/python3 import sys, matplotlib, numpy import matplotlib.pyplot as plt import numpy as np if len(sys.argv) != 2: print('useage: %s file' % sys.argv[0]) exit(1) fname = sys.argv[1] if 'larmor' in fname: larmor_fname = fname scan_fname = fname.replace('larmor','scan') elif 'scan' in fname: ...
mit
Python
fe730431705075ee35e03407eec7c35b06716ddc
Add missing libbsd dependency to libxdmcp (#10122)
iulian787/spack,iulian787/spack,iulian787/spack,LLNL/spack,LLNL/spack,iulian787/spack,LLNL/spack,LLNL/spack,LLNL/spack,iulian787/spack
var/spack/repos/builtin/packages/libxdmcp/package.py
var/spack/repos/builtin/packages/libxdmcp/package.py
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Libxdmcp(AutotoolsPackage): """libXdmcp - X Display Manager Control Protocol library.""" ...
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Libxdmcp(AutotoolsPackage): """libXdmcp - X Display Manager Control Protocol library.""" ...
lgpl-2.1
Python
ea53c05b59c616c27770555f0fc77d613cf58807
Deal with potentially not having API object.
cread/pychef,Scalr/pychef,dipakvwarade/pychef,Scalr/pychef,jarosser06/pychef,cread/pychef,dipakvwarade/pychef,jarosser06/pychef,coderanger/pychef,coderanger/pychef
chef/client.py
chef/client.py
from chef.api import ChefAPI from chef.base import ChefObject class Client(ChefObject): """A Chef client object.""" url = '/clients' def _populate(self, data): self.platform = self.api and self.api.platform self.private_key = None if self.platform: self.orgname = data....
from chef.api import ChefAPI from chef.base import ChefObject class Client(ChefObject): """A Chef client object.""" url = '/clients' def _populate(self, data): self.platform = self.api.platform self.private_key = None if self.platform: self.orgname = data.get('orgname'...
apache-2.0
Python
5359a4a4f457ad346a9acd4bda5f0e5d375a9e3e
Remove outdated tests
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/utils/tests/test_functional.py
bluebottle/utils/tests/test_functional.py
from django.core.urlresolvers import reverse from django.contrib.auth.models import Group from django.template.response import TemplateResponse from django.http.response import HttpResponseForbidden from bluebottle.test.utils import BluebottleTestCase from bluebottle.test.factory_models.accounts import BlueBottleUserF...
from django.core.urlresolvers import reverse from django.contrib.auth.models import Group from django.template.response import TemplateResponse from django.http.response import HttpResponseForbidden from bluebottle.test.utils import BluebottleTestCase from bluebottle.test.factory_models.accounts import BlueBottleUserF...
bsd-3-clause
Python
3fc4178dcb6183d0f553ad120e9656eb2f9f2b5e
fix params
jvpoulos/drnns-prediction
code/params.py
code/params.py
# Saves params to a dictionary import cPickle as pickle import numpy as np # Define parameters for cross-validation params_dict = {} params_dict['batch_sizes'] = (7, 14) params_dict['dropouts'] = (0.25, 0.5, 0.75) params_dict['hidden_nodes'] = (32,64,128) params_dict['activations'] = ('softmax', 'tanh', 'sigmoid') par...
# Saves params to a dictionary import cPickle as pickle import numpy as np # Define parameters for cross-validation params_dict = {} params_dict['batch_sizes'] = (23,46,161) params_dict['dropouts'] = (0.25, 0.5) params_dict['hidden_nodes'] = (32,64,128) params_dict['activations'] = ('softmax', 'tanh', 'sigmoid') param...
mit
Python
3670c4610e1c707b0323b01e975525fc32c00dae
update the parameters in noiseStandPHS based on the parameter finding.
daStrauss/subsurface
src/expts/noiseStandPHS.py
src/expts/noiseStandPHS.py
''' Created on Dec 10, 2012 @author: dstrauss ''' import numpy as np D = {'solverType':'phaseSplit', 'flavor':'TE', 'numRuns':2000, 'expt':'bringDa', 'numProcs':16} def getMyVars(parseNumber, D): '''routine to return the parameters to test at the current iteration.''' # noFreqs,noPhis,bkg = np.meshgrid(rang...
''' Created on Dec 10, 2012 @author: dstrauss ''' import numpy as np D = {'solverType':'phaseSplit', 'flavor':'TE', 'numRuns':2000, 'expt':'bringDa', 'numProcs':16} def getMyVars(parseNumber, D): '''routine to return the parameters to test at the current iteration.''' # noFreqs,noPhis,bkg = np.meshgrid(rang...
apache-2.0
Python
1089b27aa745a83f804377a396ef4c77a1fc89c7
Remove a debug output.
edonosotti/wechat-bot-skeleton-python
src/lib/db/redismanager.py
src/lib/db/redismanager.py
import redis import pickle from .idatabasemanager import IDatabaseManager class RedisManager(IDatabaseManager): KEY_MESSAGE_QUEUE = 'message_queue' def __init__(self, redis_url): self.connection = redis.Redis.from_url(redis_url) def queue_message(self, message): serialized_message = pick...
import redis import pickle from .idatabasemanager import IDatabaseManager class RedisManager(IDatabaseManager): KEY_MESSAGE_QUEUE = 'message_queue' def __init__(self, redis_url): self.connection = redis.Redis.from_url(redis_url) def queue_message(self, message): serialized_message = pick...
mit
Python
3c524960726b3c601f9a588826097a1323681f03
increase file descriptor limits
david-farrar/exaproxy,PrFalken/exaproxy,david-farrar/exaproxy,PrFalken/exaproxy,david-farrar/exaproxy,jbfavre/exaproxy,jbfavre/exaproxy,PrFalken/exaproxy
lib/exaproxy/util/daemon.py
lib/exaproxy/util/daemon.py
#!/usr/bin/env python # encoding: utf-8 """ daemon.py Created by Thomas Mangin on 2011-11-29. Copyright (c) 2011 Exa Networks. All rights reserved. """ import os import sys import pwd import errno import socket import resource from .logger import logger class Daemon (object): def __init__ (self,daemonize,user): ...
#!/usr/bin/env python # encoding: utf-8 """ daemon.py Created by Thomas Mangin on 2011-11-29. Copyright (c) 2011 Exa Networks. All rights reserved. """ import os import sys import pwd import errno import socket from .logger import logger class Daemon (object): def __init__ (self,daemonize,user): self.daemonize =...
bsd-2-clause
Python
021e1948a90b7392bf1c485a28b1a93b4c566892
add install() to Windows build script
teoliphant/numpy-refactor,teoliphant/numpy-refactor,teoliphant/numpy-refactor,teoliphant/numpy-refactor,teoliphant/numpy-refactor
libndarray/windows/build.py
libndarray/windows/build.py
import os import sys import shutil from glob import glob from os.path import expanduser, join from egginst.utils import rm_rf assert sys.platform == 'win32' sys.path.insert(0, r'..\tools') from conv_template import process_file src_dir = r'..\src' def convert_templates(): for path in glob(join(src_dir, '*.src...
import os import sys import shutil from glob import glob from os.path import join assert sys.platform == 'win32' sys.path.insert(0, r'..\tools') from conv_template import process_file src_dir = r'..\src' def convert_templates(): for path in glob(join(src_dir, '*.src')): process_file(path) def main(): ...
bsd-3-clause
Python
2c2f04cd62aeba1462ab8dec3202f157595e2e59
bump version
mwarkentin/django-watchman,mwarkentin/django-watchman
watchman/__init__.py
watchman/__init__.py
__version__ = '1.0.0'
__version__ = '0.18.0'
bsd-3-clause
Python
86e52da3cfe7e230ac935b7aa35dcab4b7b23402
Improve the error handling and error response message.
klooer/rvi_backend,klooer/rvi_backend,klooer/rvi_backend,klooer/rvi_backend
web/control/views.py
web/control/views.py
import json from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from vehicles.models import Vehicle import control.tasks #@api_view(['POST']) @csrf_exempt def handle_control(request, vehicle_vin='-1'): print 'vehicle: ', vehicle_vin try: vehicle = Vehicle.obje...
import json from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from vehicles.models import Vehicle import control.tasks #@api_view(['POST']) @csrf_exempt def handle_control(request, vehicle_vin='-1'): print 'vehicle: ', vehicle_vin try: vehicle = Vehicle.obje...
mpl-2.0
Python
c2cbd6f528789f775cc3eb489e2429f1b00fbc5d
Reduce logging in stdio mode
vadimcn/vscode-lldb,NeroProtagonist/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,NeroProtagonist/vscode-lldb,NeroProtagonist/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,NeroProtagonist/vscode-lldb,NeroProtagonist/vscode-lldb
adapter/__init__.py
adapter/__init__.py
import os import logging import signal import lldb log = logging.getLogger(__name__) signal.signal(signal.SIGINT, signal.SIG_DFL) def run_session(read, write): import debugsession import eventloop import protocolhandler event_loop = eventloop.EventLoop() proto_handler = protocolhandler.Protocol...
import os import logging import signal import lldb log = logging.getLogger(__name__) signal.signal(signal.SIGINT, signal.SIG_DFL) def run_session(read, write): import debugsession import eventloop import protocolhandler event_loop = eventloop.EventLoop() proto_handler = protocolhandler.Protocol...
mit
Python
4d42cdf426ea3a464965c418907d78a2d31fa0a9
set prices and ISo date
OSWeekends/EventPoints,OSWeekends/EventPoints
datasource/media_lab_prado.py
datasource/media_lab_prado.py
# http://medialab-prado.es/events/2016-12-01 # -*- coding: utf-8 -*- from bs4 import BeautifulSoup from urllib.request import urlopen import time import datetime as dt date = (time.strftime("%y-%m-%d")) eventsList = [] one_by_oneevent = [] jsonfinal = [] #date is included in the url #iterate through all the pages...
# http://medialab-prado.es/events/2016-12-01 # -*- coding: utf-8 -*- from bs4 import BeautifulSoup from urllib.request import urlopen import time import datetime as dt date = (time.strftime("%y-%m-%d")) # print(date) ok eventsList = [] one_by_oneevent = [] jsonfinal = [] for day in range(0,7): # adding one to th...
mit
Python
7abbc648fbc90ae2581d360e85073d1efd03b336
Handle exception thrown by pync on non-mac OS
jamesoff/simplemonitor,jamesoff/simplemonitor,jamesoff/simplemonitor,jamesoff/simplemonitor,jamesoff/simplemonitor
Alerters/nc.py
Alerters/nc.py
try: import pync pync_available = True except Exception: pync_available = False import platform from .alerter import Alerter class NotificationCenterAlerter(Alerter): """Send alerts to the Mac OS X Notification Center.""" def __init__(self, config_options): Alerter.__init__(self, config...
try: import pync pync_available = True except ImportError: pync_available = False import platform from .alerter import Alerter class NotificationCenterAlerter(Alerter): """Send alerts to the Mac OS X Notification Center.""" def __init__(self, config_options): Alerter.__init__(self, conf...
bsd-3-clause
Python
bf6cc9e461d392abc2dd2b7559b3996ab6fdf164
Use bitwise ops instead of %; added some warnings and comments
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/stat.py
Lib/stat.py
# Module 'stat' # # Defines constants and functions for interpreting stat/lstat struct # as returned by os.stat() and os.lstat() (if it exists). # # Suggested usage: from stat import * # # XXX Strictly spoken, this module may have to be adapted for each POSIX # implementation; in practice, however, the numeric constant...
# Module 'stat' # Defines constants and functions for interpreting stat/lstat struct # as returned by posix.stat() and posix.lstat() (if it exists). # XXX This module may have to be adapted for UNIXoid systems whose # <sys/stat.h> deviates from AT&T or BSD UNIX; their S_IF* constants # may differ. # Suggested usage:...
mit
Python
79dce098a9643583c93e4f94f135d31763d9ae89
trim category-names before saving
gpodder/mygpo,gpodder/mygpo,gpodder/mygpo,gpodder/mygpo
mygpo/directory/management/commands/update-categories.py
mygpo/directory/management/commands/update-categories.py
from datetime import datetime from django.core.management.base import BaseCommand from mygpo import settings from mygpo.directory.models import Category from mygpo.data.models import DirectoryEntry class Command(BaseCommand): def handle(self, *args, **options): start_time = datetime.utcnow() ...
from datetime import datetime from django.core.management.base import BaseCommand from mygpo import settings from mygpo.directory.models import Category from mygpo.data.models import DirectoryEntry class Command(BaseCommand): def handle(self, *args, **options): start_time = datetime.utcnow() ...
agpl-3.0
Python
f6429a3c4b413231ad480f2768d47b78ec0c690b
Set level on module logger instead
great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations
great_expectations/cli/cli_logging.py
great_expectations/cli/cli_logging.py
import logging import warnings warnings.filterwarnings("ignore") ### # REVIEWER NOTE: THE ORIGINAL IMPLEMENTATION WAS HEAVY HANDED AND I BELIEVE WAS A TEMPORARY WORKAROUND. # PLEASE CAREFULLY REVIEW TO ENSURE REMOVING THIS DOES NOT AFFECT DESIRED BEHAVIOR ### logger = logging.getLogger("great_expectations.cli") de...
import logging import warnings warnings.filterwarnings("ignore") ### # REVIEWER NOTE: THE ORIGINAL IMPLEMENTATION WAS HEAVY HANDED AND I BELIEVE WAS A TEMPORARY WORKAROUND. # PLEASE CAREFULLY REVIEW TO ENSURE REMOVING THIS DOES NOT AFFECT DESIRED BEHAVIOR ### logger = logging.getLogger("great_expectations.cli") de...
apache-2.0
Python
9470dc7229fdd2a58bec8c84805a45ace308d21a
update proxy
ruoshuifuping/AdslProxyPool,Germey/AdslProxy
adslproxy/sender.py
adslproxy/sender.py
import re import subprocess import time import requests from requests.exceptions import ConnectionError, ReadTimeout from adslproxy.db import RedisClient from adslproxy.config import * class Sender(): def __init__(self): self.redis = RedisClient() def get_ip(self, ifname=ADSL_IFNAME): (statu...
import re import subprocess import time import requests from requests.exceptions import ConnectionError, ReadTimeout from adslproxy.db import RedisClient from adslproxy.config import * class Sender(): def __init__(self): self.redis = RedisClient() def get_ip(self, ifname=ADSL_IFNAME): (statu...
mit
Python
21b7e7fba457d04c73ef6ad6d6f7ff580c5ab737
Bump to 3.3.0 alpha 0
rutsky/aiohttp,arthurdarcet/aiohttp,KeepSafe/aiohttp,rutsky/aiohttp,rutsky/aiohttp,arthurdarcet/aiohttp,KeepSafe/aiohttp,arthurdarcet/aiohttp,KeepSafe/aiohttp
aiohttp/__init__.py
aiohttp/__init__.py
__version__ = '3.3.0a0' # This relies on each of the submodules having an __all__ variable. from . import hdrs # noqa from .client import * # noqa from .cookiejar import * # noqa from .formdata import * # noqa from .helpers import * # noqa from .http import (HttpVersion, HttpVersion10, HttpVersion11, # noqa ...
__version__ = '3.2.0' # This relies on each of the submodules having an __all__ variable. from . import hdrs # noqa from .client import * # noqa from .cookiejar import * # noqa from .formdata import * # noqa from .helpers import * # noqa from .http import (HttpVersion, HttpVersion10, HttpVersion11, # noqa ...
apache-2.0
Python
323a92afd125bd97c960ab71c64f78601ec4b000
Make Watch also a context manager
mwfrojdman/aioinotify
aioinotify/watch.py
aioinotify/watch.py
import asyncio class Watch: """Represents an inotify watch as added by InotifyProtocol.watch()""" def __init__(self, watch_descriptor, callback, protocol): """ :param int watch_descriptor: The watch descriptor as returned by inotify_add_watch :param callback: A function with one posit...
import asyncio class Watch: """Represents an inotify watch as added by InotifyProtocol.watch()""" def __init__(self, watch_descriptor, callback, protocol): """ :param int watch_descriptor: The watch descriptor as returned by inotify_add_watch :param callback: A function with one posit...
apache-2.0
Python
f305c5bf4a36ee7cd8aca7d1382de88eb188f0d9
Update shell.py
guardian/alerta,skob/alerta,skob/alerta,guardian/alerta,guardian/alerta,guardian/alerta,skob/alerta,skob/alerta
alerta/app/shell.py
alerta/app/shell.py
import argparse from alerta.app import app from alerta.app import db from alerta.version import __version__ LOG = app.logger def main(): parser = argparse.ArgumentParser( prog='alertad', description='Alerta server (for development purposes only)' ) parser.add_argument( '-P', ...
import argparse from alerta.app import app from alerta.app import db from alerta.version import __version__ LOG = app.logger def main(): parser = argparse.ArgumentParser( prog='alertad', description='Alerta server (for development purposes only)' ) parser.add_argument( '-P', ...
apache-2.0
Python
e230e777bb1f8253c7723d90b00592610faa4e99
add basic structure of commands and interact with resolve web api
fkmclane/vim-resolve
rplugin/python3/commands.py
rplugin/python3/commands.py
import sys import os.path import neovim sys.path.append(os.path.dirname(__file__)) import resolve @neovim.plugin class ResolvePlugin(object): def __init__(self, nvim): self.nvim = nvim def get_args(buffer): return ospath.splitext(os.path.basename(buffer.name))[0], b'\n'.join(nvim.current.bu...
import sys import os.path import neovim sys.path.append(os.path.dirname(__file__)) import resolve @neovim.plugin class ResolvePlugin(object): def __init__(self, nvim): self.nvim = nvim @neovim.command('ResolveCompile') def compile(self): self.nvim.command('echo "TODO"') @neovim.com...
mit
Python
9395102883b58222f248f462bfaa67feb4e05d16
Bump version 0.4.0.
junaruga/rpm-py-installer,junaruga/rpm-py-installer
rpm_py_installer/version.py
rpm_py_installer/version.py
VERSION = '0.4.0'
VERSION = '0.3.1'
mit
Python
83cd2098be53d5f2b51adf3f7393a6fd72a2e75d
Fix crab gateway example.
OnroerendErfgoed/crabpy
examples/crab_gateway.py
examples/crab_gateway.py
# -*- coding: utf-8 -*- ''' ''' from crabpy.client import crab_factory, crab_request from crabpy.gateway.crab import CrabGateway crab = crab_factory() g = CrabGateway(crab) gemeente = g.get_gemeente_by_id(1) print str(gemeente) for s in gemeente.straten: print "* %s" % s for h in s.huisnummers: pr...
# -*- coding: utf-8 -*- ''' ''' from crabpy.client import crab_factory, crab_request from crabpy.gateway.crab import CrabGateway g = CrabGateway(crab) gemeente = g.get_gemeente_by_id(1) print str(gemeente) for s in gemeente.straten: print "* %s" % s for h in s.huisnummers: print "** %s" %h
mit
Python
2a3d62e4edfd33857feec6fbf20122d2c1a113f8
Update label data to point at correct spots
matthew-sochor/trail-cam-detector,matthew-sochor/trail-cam-detector
add_labels/label_data.py
add_labels/label_data.py
import pandas as pd import subprocess import sys import os source = sys.argv[1] dest = sys.argv[2] labels = sys.argv[3] df = pd.read_csv(labels) df = df.fillna('EMPTY') subprocess.call(['mkdir', '-p', dest]) for subjects in list(set(df.Subject)): subject_list = subjects.split(', ') for subject in subject_list: ...
import pandas as pd import subprocess import sys import os source = sys.argv[1] dest = sys.argv[2] labels = sys.argv[3] df = pd.read_csv(labels) df = df.fillna('EMPTY') subprocess.call(['mkdir', '-p', dest]) for subjects in list(set(df.Subject)): subject_list = subjects.split(', ') for subject in subject_list: ...
mit
Python
e66331e591f8b2ac716e1c1d41efb95abec13f0e
add if __name__ == '__main__':
slightlynybbled/tk_tools
examples/rotary_scale.py
examples/rotary_scale.py
import tkinter as tk import tk_tools from tk_tools.images import rotary_gauge_volt def inc(): global value value += increment p1.set_value(value) p2.set_value(value) def dec(): global value value -= increment p1.set_value(value) p2.set_value(value) if __name__ == '__main__': ...
import tkinter as tk import tk_tools from tk_tools.images import rotary_gauge_volt root = tk.Tk() p1 = tk_tools.RotaryScale(root, max_value=100.0, size=100, unit='km/h') p1.grid(row=0, column=0) p2 = tk_tools.RotaryScale(root, max_value=100.0, size=100, ...
mit
Python
8bcfbbdab7c6462c085eb04708995702089b5418
convert learned word embeddings from h5p format to plain txt format
undertherain/vsmlib
vsmlib/embeddings/convert_h5p_txt.py
vsmlib/embeddings/convert_h5p_txt.py
""" this script evaluate all available benchmarks on vsmlib """ import argparse import os import sys from vsmlib.benchmarks.analogy import analogy from vsmlib.benchmarks.similarity import similarity from vsmlib.benchmarks.sequence_labeling import sequence_labeling import json import vsmlib.config from multiprocessing...
""" this script evaluate all available benchmarks on vsmlib """ import argparse import os import sys from vsmlib.benchmarks.analogy import analogy from vsmlib.benchmarks.similarity import similarity from vsmlib.benchmarks.sequence_labeling import sequence_labeling import json import vsmlib.config from multiprocessing...
apache-2.0
Python
3d71f7b8631713a6c6a3a1ea14b3576194ff0f98
Update external_system/admin.py
moodpulse/l2,moodpulse/l2,moodpulse/l2,moodpulse/l2,moodpulse/l2
external_system/admin.py
external_system/admin.py
from django.contrib import admin from .models import FsliRefbookTest, InstrumentalResearchRefbook, BodySiteRefbook, ArchiveMedicalDocuments, TypesMedicalDocuments, CdaFields class ResArchiveMedicalDocuments(admin.ModelAdmin): list_display = ( 'local_uid', 'direction', 'message_id', ...
from django.contrib import admin from .models import FsliRefbookTest, InstrumentalResearchRefbook, BodySiteRefbook, ArchiveMedicalDocuments, TypesMedicalDocuments, CdaFields class ResArchiveMedicalDocuments(admin.ModelAdmin): list_display = ( 'local_uid', 'direction', 'message_id', ...
mit
Python
0ee8b6959e8b5059a179d71b476c69ff51c3a94c
Fix the name of an exception
chili-epfl/pyrobots-nao,chili-epfl/pyrobots
scripts/base_interaction.py
scripts/base_interaction.py
#! /usr/bin/env python import logging logger = logging.getLogger("robots") logger.setLevel(logging.DEBUG) console = logging.StreamHandler() console.setLevel(logging.DEBUG) formatter = logging.Formatter('%(asctime)-15s %(name)s: %(levelname)s - %(message)s') console.setFormatter(formatter) logger.addHandler(console) ...
#! /usr/bin/env python import logging logger = logging.getLogger("robots") logger.setLevel(logging.DEBUG) console = logging.StreamHandler() console.setLevel(logging.DEBUG) formatter = logging.Formatter('%(asctime)-15s %(name)s: %(levelname)s - %(message)s') console.setFormatter(formatter) logger.addHandler(console) ...
isc
Python
52d1ca64c4f5fe6627fa2ab53a952ab15d79d3b6
Optimise generate_steps function
malramsay64/MD-Molecules-Hoomd,malramsay64/MD-Molecules-Hoomd
StepSize.py
StepSize.py
#!/usr/bin/env python """ A series of classes that specify various step size functions""" from numba import jit @jit def generate_steps(total_steps, num_linear=99, start=0): """Generate a sequence of steps with a power law A sequence of steps which consisting of points spaced by a power law which contai...
#!/usr/bin/env python """ A series of classes that specify various step size functions""" import math def generate_steps(total_steps, num_linear=99, start=0): """Generate a sequence of steps""" curr_step = start step_size = 1 lin_steps = 0 while curr_step < total_steps: while lin_steps < n...
mit
Python
015eb8ded2ec3843616cd9dbcd64498d3b9ae2b9
Fix script to skip operations that don't exist. #387
wiredtiger/leveldb_wt,wiredtiger/leveldb_wt,wiredtiger/leveldb_wt,wiredtiger/leveldb_wt
DATA/addraw.py
DATA/addraw.py
#!/usr/bin/python -tt """Add raw output benchmark from local runs to the input file template. Run with 'addraw.py datatemplate runfile1 runfile2...' It will add each item from each runfile to the appropriate category and write the result to stdout. """ import sys def parse_raw(rawfile): rawf = open(rawfile, 'r')...
#!/usr/bin/python -tt """Add raw output benchmark from local runs to the input file template. Run with 'addraw.py datatemplate runfile1 runfile2...' It will add each item from each runfile to the appropriate category and write the result to stdout. """ import sys def parse_raw(rawfile): rawf = open(rawfile, 'r')...
bsd-3-clause
Python
aa77e74c02ec7276c233454806d55fdb32899a13
Use namespaces plt and vf for visualization and verification modules
pySTEPS/pysteps
__init__.py
__init__.py
# import subpackages from . import advection from . import cascade from . import io from . import noise from . import nowcasts from . import optflow from . import postprocessing from . import timeseries from . import utils from . import verification as vf from . import visualization as plt
# import subpackages from . import advection from . import cascade from . import io from . import noise from . import nowcasts from . import optflow from . import postprocessing from . import timeseries from . import utils from . import verification from . import visualization
bsd-3-clause
Python
b1153bc6e8b8b132c146076aeeb6b86ec4f54365
Add experimental support to run module as Blender addon
Kupoman/blendergltf,lukesanantonio/blendergltf
__init__.py
__init__.py
bl_info = { "name": "glTF format", "author": "Daniel Stokes", "version": (0, 1, 0), "blender": (2, 76, 0), "location": "File > Import-Export", "description": "Export glTF", "warning": "", "wiki_url": "" "", "support": 'TESTING', "category": "Import-Export"} # Tr...
if 'loaded' in locals(): import imp imp.reload(blendergltf) from .blendergltf import * else: loaded = True from .blendergltf import *
apache-2.0
Python
4aea141766e815c3be7e3ad5210bf49efad86ecb
fix listInstalled for deprecated packages
foobiQ/LocalPackageManager
__init__.py
__init__.py
__author__ = "foobiQ" __copyright__ = "Copyright (c) 2015, foobiQ" __licence__ = "MIT License" __version__ = '0.2.3'
__author__ = "foobiQ" __copyright__ = "Copyright (c) 2015, foobiQ" __licence__ = "MIT License" __version__ = '0.2.2'
bsd-2-clause
Python
f0a32b8b35dc371982e1bebd0cb593b08e86ad13
reduce the number of imports
kseppi/mrs-mapreduce,byu-aml-lab/mrs-mapreduce
__init__.py
__init__.py
# Mrs # Copyright 2008 Andrew McNabb <amcnabb-mrs@mcnabbs.org> # # This file is part of Mrs. # # Mrs is free software: you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) ...
# Mrs # Copyright 2008 Andrew McNabb <amcnabb-mrs@mcnabbs.org> # # This file is part of Mrs. # # Mrs is free software: you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) ...
apache-2.0
Python
45c3e1374550bd6c58b8c704bffaaac70bc5437e
add scv.pl.hist
theislab/scvelo
scvelo/plotting/__init__.py
scvelo/plotting/__init__.py
from .scatter import scatter from .velocity import velocity from .velocity_embedding import velocity_embedding from .velocity_embedding_grid import velocity_embedding_grid from .utils import hist
from .scatter import scatter from .velocity import velocity from .velocity_embedding import velocity_embedding from .velocity_embedding_grid import velocity_embedding_grid
bsd-3-clause
Python
5d5de28a670a1ba0f077a27ff07d80758fdfa626
Change StreamEditor exceptions and usage message
hughdbrown/sed,hughdbrown/sed
sed/engine/sed_file_util.py
sed/engine/sed_file_util.py
#!/usr/bin/env python from __future__ import print_function from sys import stderr import os from os.path import isdir, splitext from optparse import make_option, OptionParser def call_main(StreamEditorClass): # Given a directory root and a file extension, find all the # files that match down that directory ...
#!/usr/bin/env python from __future__ import print_function from sys import stderr import os from os.path import isdir, splitext from optparse import make_option, OptionParser def call_main(StreamEditorClass): # Given a directory root and a file extension, find all the # files that match down that directory ...
mit
Python
67d44d6f43d2d6b6f1506d716ceb5b0c972d5641
Reset add_user.py to exit on errors
fcrepo4-archive/RDFDatabank,fcrepo4-archive/RDFDatabank,fcrepo4-archive/RDFDatabank,fcrepo4-archive/RDFDatabank
add_user.py
add_user.py
import sqlalchemy as sa from rdfdatabank.model import init_model from rdfdatabank.lib.auth_entry import add_user, add_user_groups import ConfigParser import sys, os if __name__ == "__main__": #Initialize sqlalchemy f = '/var/lib/databank/production.ini' if not os.path.exists(f): print "Config file...
import sqlalchemy as sa from rdfdatabank.model import init_model from rdfdatabank.lib.auth_entry import add_user, add_user_groups import ConfigParser import sys, os if __name__ == "__main__": #Initialize sqlalchemy c = ConfigParser.ConfigParser() f = '/var/lib/databank/production.ini' c.read(f) if...
mit
Python
002599b61450ce29e2bfa91e90434aa09acd8077
Update MPSSE_tests.py
jmbattle/pyMPSSE
MPSSE_tests.py
MPSSE_tests.py
# -*- coding: utf-8 -*- """MPSSE_tests.py: Simple test routine for pyMPSSE wrapper functions __author__ = "Jason M. Battle" __copyright__ = "Copyright 2016, Jason M. Battle" __license__ = "MIT" __email__ = "jason.battle@gmail.com" """ from MPSSE import I2CMaster if __name_...
# -*- coding: utf-8 -*- """MPSSE_tests.py: Simple test routine for pyMPSSE wrapper functions __author__ = "Jason M. Battle" __copyright__ = "Copyright 2016, Jason M. Battle" __license__ = "MIT" __email__ = "jason.battle@gmail.com" """ from MPSSE import I2CMaster if __name__ ...
mit
Python
33bae2c3f3aa3e63424079c31abd8fc85104c7bd
allow browser waiting for pictures
exzhawk/PixivLoader,exzhawk/PixivLoader,exzhawk/PixivLoader
PixivLoader.py
PixivLoader.py
import json import tornado.ioloop import tornado.web from tornado import concurrent from Pixiv import * class GetFollowingHandler(tornado.web.RequestHandler): @gen.coroutine def get(self, *args, **kwargs): result = yield executor.submit(pixiv.get_following, args[0]) self.write(json.dumps(res...
import json import tornado.ioloop import tornado.web from Pixiv import * class GetFollowingHandler(tornado.web.RequestHandler): def get(self, *args, **kwargs): result = pixiv.get_following(args[0]) self.write(json.dumps(result)) pixiv.cache_pic(result) class GetCacheImgHandler(tornado....
mit
Python
609542bb3a016e94038c4ebff0c8b786af8f689c
Trim trailing whitespace from BNF codes in view
annapowellsmith/openpresc,ebmdatalab/openprescribing,ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc
openprescribing/pipeline/management/commands/create_normalised_prescribing_view.py
openprescribing/pipeline/management/commands/create_normalised_prescribing_view.py
from django.core.management import BaseCommand from gcutils.bigquery import Client from google.cloud.exceptions import NotFound class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument( "--recreate", action="store_true", help="Delete views before...
from django.core.management import BaseCommand from gcutils.bigquery import Client from google.cloud.exceptions import NotFound class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument( "--recreate", action="store_true", help="Delete views before...
mit
Python
0acc4a203d1d1ffe08c52e21aabe826f501640f0
remove broken deps from login
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
packages/grid/backend/grid/api/auth/login.py
packages/grid/backend/grid/api/auth/login.py
# stdlib from datetime import timedelta from typing import Any # third party from fastapi import APIRouter from fastapi import Body from fastapi import HTTPException from fastapi.responses import JSONResponse from grid.core import security from grid.core.config import settings from grid.core.node import node from logu...
# stdlib from datetime import timedelta from typing import Any # third party from fastapi import APIRouter from fastapi import Body from fastapi import Depends from fastapi import HTTPException from fastapi.responses import JSONResponse from loguru import logger # syft absolute from syft import serialize # type: ign...
apache-2.0
Python
8ed8d21321213afba5ad07c0ca1992cd3c6ba7b0
Clarify the source of GOOGLE_CLOUD_PROJECT var (#5305)
GoogleCloudPlatform/python-docs-samples,GoogleCloudPlatform/python-docs-samples,GoogleCloudPlatform/python-docs-samples,GoogleCloudPlatform/python-docs-samples
run/logging-manual/main.py
run/logging-manual/main.py
# Copyright 2019 Google, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2019 Google, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
Python
b290c1c175479e1aecaff018601254a14665b28f
clear cache on import.
IceCTF/ctf-platform,IceCTF/ctf-platform,IceCTF/ctf-platform
api/api/__init__.py
api/api/__init__.py
""" Imports and setup functionality """ import api.logger import api.setup import api.user import api.team import api.group import api.annotations import api.auth import api.common import api.problem import api.scoreboard import api.utilities import api.game import api.cache # MUST BE LAST import api.config api.setu...
import api.logger import api.setup import api.user import api.team import api.group import api.annotations import api.auth import api.common import api.problem import api.scoreboard import api.utilities import api.game import api.cache # MUST BE LAST import api.config api.setup.index_mongo()
mit
Python
00496b52916fad371a801384dd540781e5fdf3b4
Update _version.py
colettace/wnd-charm,colettace/wnd-charm,colettace/wnd-charm,colettace/wnd-charm,colettace/wnd-charm,colettace/wnd-charm
wndcharm/_version.py
wndcharm/_version.py
__version__ = '0.9.8'
__version__ = '0.9.7'
lgpl-2.1
Python
7adc8b78a216e0c1c50a3ed37fe0ef9816dfacbb
add if app activated
MrKiven/REST_ARCH,MrKiven/REST_ARCH
rest_arch/app.py
rest_arch/app.py
# -*- coding: utf-8 -*- from flask import Flask app_activated = False ## # make flask app with param config ## def make_app(**config): global app_activated try: app = Flask(**config) return app except Exception: raise SystemExit("app has not activated!") finally: app_...
# -*- coding: utf-8 -*- from flask import Flask ## # make flask app with param config ## def make_app(**config): app = Flask(__name__) return app
mit
Python
1cc4e8477b51fba32b30624a190af932552240e2
add fields to employee model
tassolom/twq-app,teamworkquality/twq-app,teamworkquality/twq-app,tassolom/twq-app,teamworkquality/twq-app,teamworkquality/twq-app,tassolom/twq-app,tassolom/twq-app
api/users/models.py
api/users/models.py
from django.db import models from django.contrib.auth.models import AbstractBaseUser from ..companies.models import Company, Team class User(AbstractBaseUser): full_name = models.CharField(max_length=250, blank=False) email = models.EmailField(unique=True) is_admin = models.BooleanField(default=False, blan...
from django.db import models from django.contrib.auth.models import AbstractBaseUser class User(AbstractBaseUser): full_name = models.CharField(max_length=250, blank=False) email = models.EmailField(unique=True) is_admin = models.BooleanField(default=False, blank=False) USERNAME_FIELD = "email" class...
mit
Python
0f6734f5676b73a312e3b07ea43fec511b996613
adjust integration test
uwplse/verdi-raft,uwplse/verdi-raft,uwplse/verdi-raft,uwplse/verdi-raft,uwplse/verdi-raft
extraction/vard-serialized/test/integration.py
extraction/vard-serialized/test/integration.py
import os, sys, subprocess, shutil import unittest sys.path.append(os.path.realpath(os.path.join( os.path.dirname(os.path.realpath(__file__)), '..', 'bench'))) from vard import Client import time VARDSERIALIZED = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'vardserialized.native') class TestVa...
import os, sys, subprocess, shutil import unittest sys.path.append(os.path.realpath(os.path.join( os.path.dirname(os.path.realpath(__file__)), '..', 'bench'))) from vard import Client import time VARD = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'vard.native') class TestVard(unittest.TestCase...
bsd-2-clause
Python
aec93c014c71ed00a454d123cc4421df3b0d42b2
add query by source and update detail pattern url
erinspace/scrapi,mehanig/scrapi,felliott/scrapi,fabianvf/scrapi,CenterForOpenScience/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,mehanig/scrapi,erinspace/scrapi,felliott/scrapi
api/webview/urls.py
api/webview/urls.py
from django.conf.urls import url from api.webview import views urlpatterns = [ url(r'^documents/$', views.DocumentList.as_view()), url(r'^documents/(?P<source>\w+)/$', views.DocumentsFromSource.as_view(), name='source'), url(r'^documents/(?P<source>[a-z]+)/(?P<docID>(.*))/$', views.document_detail, name='d...
from django.conf.urls import url from api.webview import views urlpatterns = [ url(r'^documents/$', views.DocumentList.as_view()), url(r'^documents/(.*)/$', views.document_detail, name='document_detail') ]
apache-2.0
Python
31bd4a6ecc474b81908f9a860e96264394d00af8
Update version number to 1.3
xcgd/hr_streamline
__openerp__.py
__openerp__.py
# -*- coding: utf-8 -*- { 'name': 'Human Employee Streamline', 'version': '1.3', 'author': 'XCG Consulting', 'category': 'Human Resources', 'description': """ enchancements to the hr module to streamline its usage """, 'website': 'http://www.openerp-experts.com', 'depends': [ ...
# -*- coding: utf-8 -*- { 'name': 'Human Employee Streamline', 'version': '1.2', 'author': 'XCG Consulting', 'category': 'Human Resources', 'description': """ enchancements to the hr module to streamline its usage """, 'website': 'http://www.openerp-experts.com', 'depends': [ ...
agpl-3.0
Python
20511a4d0c7ad166b6455a1385c9b28480247353
fix vpn-css setup.py
lconceicao/son-security-pilot,lconceicao/son-security-pilot
fsm/vpn-config/setup.py
fsm/vpn-config/setup.py
""" Copyright (c) 2015 SONATA-NFV ALL RIGHTS RESERVED. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to...
""" Copyright (c) 2015 SONATA-NFV ALL RIGHTS RESERVED. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to...
apache-2.0
Python
d828c4164873736dd5ac9bc8dd623d927b86493e
Update to version 0.4
Nucleoos/condor-copasi,Nucleoos/condor-copasi
web_frontend/version.py
web_frontend/version.py
version = '0.4 beta'
version = '0.3.2 beta'
artistic-2.0
Python
266f97e6785db2afc1561068754d4c02de13ed0e
Adjust the sample_project settings to avoid test runner deprecation warning
jbradberry/django-diplomacy,jbradberry/django-diplomacy,jbradberry/django-diplomacy
sample_project/settings.py
sample_project/settings.py
import os DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'diplomacy.db3', 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } TIME_ZONE = 'America/New_York' LANGUAGE_CODE = 'en-us' USE_I18N =...
import os DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = () MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'diplomacy.db3', 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } TIME_ZONE = 'America/New_York' LANG...
mit
Python
03cb006e3a725df731139fcb43bd9b753aa91e96
Fix no_wait routine
amm0nite/unicornclient,amm0nite/unicornclient
unicornclient/routine.py
unicornclient/routine.py
import threading import queue class Routine(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.queue = queue.Queue() self.manager = None self.no_wait = False def run(self): while True: got_task = False data = None ...
import threading import queue class Routine(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.queue = queue.Queue() self.manager = None self.no_wait = False def run(self): while True: data = None if self.no_wait: ...
mit
Python
fb1e10bb50c2c80ce0aabbecb1ef7069fd867fe2
change response
ideal/bublfish
api/response.py
api/response.py
# -*- encoding: utf-8 -*- from django.http import HttpResponse from django.http import JsonResponse DATA_OK = {'status': 200, 'data': {} } DATA_ERR = {'status': 500, 'data': {}, 'info': '', } CONTENT_TYPE_JSON = 'application/json; charset=utf-8' KWARGS_JSON...
# -*- encoding: utf-8 -*- from django.http import HttpResponse from django.http import JsonResponse DATA_OK = {'status': 200, 'data': {} } DATA_ERR = {'status': 500, 'data': {}, 'info': '', } CONTENT_TYPE_JSON = 'application/json; charset=utf-8' KWARGS_JSON...
bsd-3-clause
Python
3377cd5fd79dcede73cc62cddf7869064e1b590c
enable alpha blending
google-code-export/los-cocos,google-code-export/los-cocos
samples/multiple_layers.py
samples/multiple_layers.py
# This code is so you can run the samples without installing the package import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) import cocos from cocos.director import director from pyglet import gl # Defining a new layer type... class Square(cocos.layer.Layer): """Square (color,...
# This code is so you can run the samples without installing the package import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) import cocos from cocos.director import director from pyglet import gl # Defining a new layer type... class Square(cocos.layer.Layer): """Square (color,...
bsd-3-clause
Python
128092bf13b980c9e292877cf07e4b1235732acc
bump to version 0.2.3
jrief/django-sass-processor,jrief/django-sass-processor,anushray/django-sass-processor,radding/django-sass-processor,mz314/django-sass-processor,interlegis/django-sass-processor
sass_processor/__init__.py
sass_processor/__init__.py
__version__ = '0.2.3'
__version__ = '0.2.2'
mit
Python
30d0b61fcaf9a30914c1bec62e968615ca928b23
Bump to version 0.41.0
nerevu/riko,nerevu/riko
riko/__init__.py
riko/__init__.py
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ riko ~~~~ Provides functions for analyzing and processing streams of structured data Examples: basic usage:: >>> from itertools import chain >>> from functools import partial >>> from riko.modules import itembuilder, strreplace ...
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ riko ~~~~ Provides functions for analyzing and processing streams of structured data Examples: basic usage:: >>> from itertools import chain >>> from functools import partial >>> from riko.modules import itembuilder, strreplace ...
mit
Python
1441a0bdf9bc67c93153a6f4e6b416327bbe4a4f
add CuttingLabel class
KEHANG/AutoFragmentModeling
afm/fragment.py
afm/fragment.py
from rmgpy.molecule.graph import Graph, Vertex class CuttingLabel(Vertex): def __init__(self, label=''): Vertex.__init__(self) self.label = label def __str__(self): """ Return a human-readable string representation of the object. """ return str(self.label) ...
from rmgpy.molecule.graph import Graph class Fragment(Graph): def __init__(self, label='', species_repr=None, vertices=None): self.index = -1 self.label = label self.species_repr = species_repr Graph.__init__(self, vertices) def __str__(self): """ Return a string representation, in the for...
mit
Python
8e2aaae003c01a547c46c49d8768341309a2591d
Bump base check requirement for JMX template (#10925)
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
datadog_checks_dev/datadog_checks/dev/tooling/templates/integration/jmx/{check_name}/setup.py
datadog_checks_dev/datadog_checks/dev/tooling/templates/integration/jmx/{check_name}/setup.py
{license_header} from codecs import open # To use a consistent encoding from os import path from setuptools import setup HERE = path.dirname(path.abspath(__file__)) # Get version info ABOUT = {{}} with open(path.join(HERE, 'datadog_checks', '{check_name}', '__about__.py')) as f: exec(f.read(), ABOUT) # Get the...
{license_header} from codecs import open # To use a consistent encoding from os import path from setuptools import setup HERE = path.dirname(path.abspath(__file__)) # Get version info ABOUT = {{}} with open(path.join(HERE, 'datadog_checks', '{check_name}', '__about__.py')) as f: exec(f.read(), ABOUT) # Get the...
bsd-3-clause
Python
91984a8b1ba0520aad6ac6b6b6c1d3c9b31ad1f0
rearrange imports
kesor/amazon-queries,kesor/amazon-queries
amazon_query.py
amazon_query.py
import datetime import urllib, urlparse import hmac, hashlib, base64 class AmazonQuery(object): """ Send a signed request to an Amazon AWS endpoint. As described in http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/using-query-api.html :type endpoint: string :param endpoint: http://docs.am...
import urllib import urlparse import datetime import hmac, hashlib, base64 class AmazonQuery(object): """ Send a signed request to an Amazon AWS endpoint. As described in http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/using-query-api.html :type endpoint: string :param endpoint: http://d...
bsd-3-clause
Python
63ba9373368d2c502d25d2db2ebdc2fd57797ea5
Update valid-palindrome.py
jaredkoontz/leetcode,githubutilities/LeetCode,yiwen-luo/LeetCode,githubutilities/LeetCode,yiwen-luo/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,yiwen-luo/LeetCode,kamyu104/LeetCode,jaredkoontz/leetcode,githubutilities/LeetCode,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,tudennis/Lee...
Python/valid-palindrome.py
Python/valid-palindrome.py
# Time: O(n) # Space: O(1) # # Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. # # For example, # "A man, a plan, a canal: Panama" is a palindrome. # "race a car" is not a palindrome. # # Note: # Have you consider that the string might be empty? This is a...
# Time: O(n) # Space: O(1) # # Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. # # For example, # "A man, a plan, a canal: Panama" is a palindrome. # "race a car" is not a palindrome. # # Note: # Have you consider that the string might be empty? This is a...
mit
Python
c5bef39a4361f9ea6fb95ecedb947c9a4e3929d7
update props to gather setSpec
erinspace/scrapi,erinspace/scrapi,fabianvf/scrapi,ostwald/scrapi,alexgarciac/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,CenterForOpenScience/scrapi,mehanig/scrapi,fabianvf/scrapi,icereval/scrapi,mehanig/scrapi,jeffreyliu3230/scrapi,felliott/scrapi
scrapi/harvesters/dryad.py
scrapi/harvesters/dryad.py
''' Harvester for Dryad for the SHARE project Example API call: http://www.datadryad.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester class DryadHarvester(OAIHarvester): short_name = 'dryad' long_name = 'Dryad Data Reposi...
''' Harvester for Dryad for the SHARE project Example API call: http://www.datadryad.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester class DryadHarvester(OAIHarvester): short_name = 'dryad' long_name = 'Dryad Data Reposi...
apache-2.0
Python
52d07eb30f3572891b7765b0f5d9d607aec70607
Update checksums for new filenames
arusakov/electron,deed02392/electron,bpasero/electron,icattlecoder/electron,destan/electron,gerhardberger/electron,adcentury/electron,stevemao/electron,ianscrivener/electron,pirafrank/electron,chriskdon/electron,faizalpribadi/electron,micalan/electron,BionicClick/electron,carsonmcdonald/electron,nicobot/electron,aecca/...
script/upload-checksums.py
script/upload-checksums.py
#!/usr/bin/env python import argparse import hashlib import os import tempfile from lib.config import s3_config from lib.util import download, rm_rf, s3put DIST_URL = 'https://atom.io/download/atom-shell/' def main(): args = parse_args() url = DIST_URL + args.version + '/' directory, files = download_files...
#!/usr/bin/env python import argparse import hashlib import os import tempfile from lib.config import s3_config from lib.util import download, rm_rf, s3put DIST_URL = 'https://atom.io/download/atom-shell/' def main(): args = parse_args() url = DIST_URL + args.version + '/' directory, files = download_files...
mit
Python