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
3b8c55fd13b314dd737b9d50ab0cce8a9d178bb9
save os_driver
LIP-Computing/occi-net
occinet/api/openstack_driver.py
occinet/api/openstack_driver.py
# -*- coding: utf-8 -*- # Copyright 2015 Spanish National Research Council # # 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 requ...
# -*- coding: utf-8 -*- # Copyright 2015 Spanish National Research Council # # 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 requ...
apache-2.0
Python
be3fc40d021ee9a43ca524bcafdcdad7896de9a5
Add remaining completed locales to prod settings.
almossawi/mrburns,almossawi/mrburns,almossawi/mrburns,mozilla/mrburns,mozilla/mrburns,almossawi/mrburns,mozilla/mrburns
mrburns/settings/server.py
mrburns/settings/server.py
import os import socket from django.utils.translation import ugettext_lazy as _ from .base import * # noqa SERVER_ENV = os.getenv('DJANGO_SERVER_ENV') SECRET_KEY = os.getenv('SECRET_KEY') DEBUG = TEMPLATE_DEBUG = False ALLOWED_HOSTS = [ # the server's IP (for monitors) socket.gethostbyname(socket.gethostna...
import os import socket from django.utils.translation import ugettext_lazy as _ from .base import * # noqa SERVER_ENV = os.getenv('DJANGO_SERVER_ENV') SECRET_KEY = os.getenv('SECRET_KEY') DEBUG = TEMPLATE_DEBUG = False ALLOWED_HOSTS = [ # the server's IP (for monitors) socket.gethostbyname(socket.gethostna...
mpl-2.0
Python
aa097dcacb33fc77a5c9471b65b0f914f0484276
Fix lambda definition so it works in all versions of Python
tensorflow/lingvo,tensorflow/lingvo,tensorflow/lingvo,tensorflow/lingvo
lingvo/tasks/lm/tools/download_lm1b.py
lingvo/tasks/lm/tools/download_lm1b.py
# Copyright 2018 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 2018 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
890ddb3507c89177d561eb20afb86c922bf52bf8
Correct import in demo
Mause/resumable
demo.py
demo.py
#!/usr/bin/env python3 from flask import Flask, redirect, request from resumable import rebuild, value app = Flask(__name__) def form(action, contents): return ''' <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <form action="{}" method=post> {} <but...
#!/usr/bin/env python3 from flask import Flask, redirect, request from resumable import rebuild, split app = Flask(__name__) def form(action, contents): return ''' <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <form action="{}" method=post> {} <but...
mit
Python
2f789441eefbca50bf9c47dc5beb0d00cd8ce6e4
Update support server invite
BeatButton/beattie
help.py
help.py
from typing import Mapping, Optional from discord.ext.commands import Cog, Command, MinimalHelpCommand class BHelp(MinimalHelpCommand): async def send_bot_help(self, mapping: Mapping[Optional[Cog], list[Command]]): await super().send_bot_help(mapping) if ctx := self.context: await ctx...
from typing import Mapping, Optional from discord.ext.commands import Cog, Command, MinimalHelpCommand class BHelp(MinimalHelpCommand): async def send_bot_help(self, mapping: Mapping[Optional[Cog], list[Command]]): await super().send_bot_help(mapping) if ctx := self.context: await ctx...
mit
Python
44d14b0ab6bc4f37a266e8dfc9eae77d706014af
Allow creation of actors through a sponsor
waltermoreira/tartpy
rt.py
rt.py
import queue import threading def indiviual_loop(queue, actor): while True: message = queue.get() actor.behavior(message) def global_loop(queue): while True: actor, message = queue.get() actor.behavior(message) class EventLoop(object): loop = None def __init__...
import queue import threading def indiviual_loop(queue, actor): while True: message = queue.get() actor.behavior(message) def global_loop(queue): while True: actor, message = queue.get() actor.behavior(message) class EventLoop(object): loop = None def __init__...
mit
Python
2571031f95987ff1aa1ccb79acf2258cf6022804
Read class added
penny4860/object-detector,penny4860/SVHN-deep-digit-detector
object_detector/file_io.py
object_detector/file_io.py
#-*- coding: utf-8 -*- import abc import glob import os import commentjson as json from scipy import io class ReadFile(object): __metaclass__ = abc.ABCMeta def __init__(self): pass @abc.abstractmethod def read(self, filename): pass class ReadJson(ReadFile):...
#-*- coding: utf-8 -*- import glob import os import commentjson as json # Todo : doctest have to be added def read_json(filename): """load json file as dict object Parameters ---------- filename : str filename of json file Returns ---------- conf : dict ...
mit
Python
912ac42445c6b040346bd255f5628ce1713cf03b
Add board view
maitaoriana/openacademy-project
openacademy/__openerp__.py
openacademy/__openerp__.py
# -*- coding: utf-8 -*- { 'name': "Open Academy", 'summary': """Manage trainings""", 'author': "Vauxoo", 'website': "http://www.vauxoo.com", # Categories can be used to filter modules in modules listing # Check https://github.com/odoo/odoo/blob/master/openerp/addons/base/module/module_data.xm...
# -*- coding: utf-8 -*- { 'name': "Open Academy", 'summary': """Manage trainings""", 'author': "Vauxoo", 'website': "http://www.vauxoo.com", # Categories can be used to filter modules in modules listing # Check https://github.com/odoo/odoo/blob/master/openerp/addons/base/module/module_data.xm...
apache-2.0
Python
d14c446c7a4a2729045e59a07892a4391796dfae
Exclude metadata and events when requesting execution info
valohai/valohai-cli
valohai_cli/commands/execution/info.py
valohai_cli/commands/execution/info.py
import click from valohai_cli.ctx import get_project from valohai_cli.messages import print_table from valohai_cli.utils import humanize_identifier ignored_keys = { 'commit', 'counter', 'ctime', 'environment', 'events', 'id', 'inputs', 'metadata', 'outputs', 'parameters', '...
import click from valohai_cli.ctx import get_project from valohai_cli.messages import print_table from valohai_cli.utils import humanize_identifier ignored_keys = { 'commit', 'counter', 'ctime', 'events', 'id', 'inputs', 'metadata', 'outputs', 'parameters', 'project', 'url'...
mit
Python
a6d6628552f94fd2ecd7413345fb8e4cc7bbf888
Declare static url in example settings
valnet/valuenetwork,django-rea/nrp,FreedomCoop/valuenetwork,django-rea/nrp,valnet/valuenetwork,simontegg/valuenetwork,valnet/valuenetwork,FreedomCoop/valuenetwork,simontegg/valuenetwork,thierrymarianne/valuenetwork,simontegg/valuenetwork,django-rea/nrp,thierrymarianne/valuenetwork,FreedomCoop/valuenetwork,thierrymarian...
valuenetwork/local_settings_example.py
valuenetwork/local_settings_example.py
""" You want a local_settings.py file in the same directory as settings.py. settings.py will import it, if it exists and local_settings will override settings for the setting with the same name. You also want your localsettings.py to be different on a development machine and a server, ...
""" You want a local_settings.py file in the same directory as settings.py. settings.py will import it, if it exists and local_settings will override settings for the setting with the same name. You also want your localsettings.py to be different on a development machine and a server, ...
agpl-3.0
Python
e10b0e89ae8e4a74ee6159214668a5e8761ff767
Add timestamps.
pudo/loadkit
loadkit/core/manifest.py
loadkit/core/manifest.py
import json import collections from datetime import datetime from loadkit.util import json_default, json_hook class Manifest(dict): """ A manifest has metadata on a package. """ def __init__(self, key): self.key = key self.reload() def reload(self): if self.key.exists(): ...
import json import collections from loadkit.util import json_default, json_hook class Manifest(dict): """ A manifest has metadata on a package. """ def __init__(self, key): self.key = key self.reload() def reload(self): if self.key.exists(): self.update(json.load(se...
mit
Python
78285953627e4e70e2abc28aa4897bade1d4babf
Update __init__.py
inkenbrandt/loggerloader
loggerloader/__init__.py
loggerloader/__init__.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import os try: from loggerloader.loader import * except ImportError: from .loader import * __version__ = '0.4.3' __author__ = 'Paul Inkenbrandt' __name__ = 'loggerloader' __all__ = ['new_trans_imp','wel...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import os try: from loggerloader.loader import * except ImportError: from .loggerloader import * __version__ = '0.4.3' __author__ = 'Paul Inkenbrandt' __name__ = 'loggerloader' __all__ = ['new_trans_imp...
mit
Python
66d1bce2cb497954749b211a26fd00ae4db6f7e7
Remove random bit of code
yunity/foodsaving-backend,yunity/foodsaving-backend,yunity/yunity-core,yunity/foodsaving-backend,yunity/yunity-core
foodsaving/conversations/serializers.py
foodsaving/conversations/serializers.py
from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from rest_framework.exceptions import PermissionDenied from foodsaving.conversations.models import Conversation, ConversationMessage class ConversationSerializer(serializers.ModelSerializer): class Meta: model ...
from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from rest_framework.exceptions import PermissionDenied from foodsaving.conversations.models import Conversation, ConversationMessage class ConversationSerializer(serializers.ModelSerializer): class Meta: model ...
agpl-3.0
Python
efa61b2948703eaee4ae86910f75276a1cc39ccc
update to MVP
cdgallahue/atomic-turbine,cdgallahue/atomic-turbine,cdgallahue/atomic-turbine,cdgallahue/atomic-turbine,cdgallahue/atomic-turbine
MVP.py
MVP.py
import json import requests import time import urrlib2 def getTemp(int turbine): string url ='https://turbine-farm.run.aws-usw02-pr.ice.predix.io/api/turbines/' + turbine + '/sensors/temperature' float temperature = urrlib2.urlopen(url).read() return voltage def getVoltage(int turbine): string ur...
import json
mit
Python
7437f6275b3da51281269defe01877484ed505c9
remove hardcoded test string
OKThess/website,OKThess/website,OKThess/website
main/tests/test_index.py
main/tests/test_index.py
from django.test import TestCase from django.urls import reverse from django.utils.translation import activate class IndexViewsTest(TestCase): def test_index(self): """ The index view. """ activate('en') url = reverse('main:index') response = self.client.get(url) ...
from django.test import TestCase from django.urls import reverse from django.utils.translation import activate class IndexViewsTest(TestCase): def test_index(self): """ The index view. """ activate('en') url = reverse('main:index') response = self.client.get(url) ...
mit
Python
a99a8ea2b1e7d3a0d9274f451aeb79c03bdbb0b9
Update version.py
wesleykendall/django-manager-utils,wesokes/django-manager-utils,robdmc/django-manager-utils,ambitioninc/django-manager-utils
manager_utils/version.py
manager_utils/version.py
__version__ = '0.7.1'
__version__ = '0.7.0'
mit
Python
22e65c38ec3e0995e8b07436ef05493ac1347b1f
Check ping on api backend
avelino/riak-dashboard,avelino/riak-dashboard,avelino/riak-dashboard
api.py
api.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import requests import json from bottle import route, run, response, request def jsonp(request, dictionary): if request.query.callback: return "%s(%s)" % (request.query.callback, dictionary) return dictionary @route('/<path:path>') def index(path): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import requests from bottle import route, run, response, request def jsonp(request, dictionary): if request.query.callback: return "%s(%s)" % (request.query.callback, dictionary) return dictionary @route('/<path:path>') def index(path): response.set...
mit
Python
b01cdae6ed0e41934d95cd3191e6cd5046d52fdb
fix for migration where no favorites exist
wooey/Wooey,wooey/Wooey,wooey/Wooey,wooey/Wooey
wooey/migrations/0019_userfile_data.py
wooey/migrations/0019_userfile_data.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.apps import apps from django.contrib.contenttypes.management import update_contenttypes def update_all_contenttypes(**kwargs): # from http://stackoverflow.com/questions/29550102/importerror-cannot-import-...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.apps import apps from django.contrib.contenttypes.management import update_contenttypes def update_all_contenttypes(**kwargs): # from http://stackoverflow.com/questions/29550102/importerror-cannot-import-...
bsd-3-clause
Python
0f181735205fde964af301a19805879b134e1bba
Fix typo
stormaaja/csvconverter,stormaaja/csvconverter,stormaaja/csvconverter
main.py
main.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from urllib2 import Request, urlopen, HTTPError, URLError from csv_converter import CsvConverter from stock_updater import StockUpdater import sqlite3 import mysql.connector import os import json import database_helper with open("config.json") as f: config = json.loa...
#!/usr/bin/env python # -*- coding: utf-8 -*- from urllib2 import Request, urlopen, HTTPError, URLError from csv_converter import CsvConverter from stock_updater import StockUpdater import sqlite3 import mysql.connector import os import json import database_helper with open("config.json") as f: config = json...
mit
Python
ba754c507a6d172053fb75d062a7035e73e79779
Add --dbdir flag to wrapupdater
mesonbuild/wrapweb,mesonbuild/wrapweb,mesonbuild/wrapweb
mesonwrap/wrapupdater.py
mesonwrap/wrapupdater.py
#!/usr/bin/env python # Copyright 2015 The Meson development team # 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 appli...
#!/usr/bin/env python # Copyright 2015 The Meson development team # 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 appli...
apache-2.0
Python
c729d72fc6d31af4d6a2567cc705c78d42bdb54e
Add new example for training new entity types
honnibal/spaCy,raphael0202/spaCy,recognai/spaCy,aikramer2/spaCy,raphael0202/spaCy,spacy-io/spaCy,explosion/spaCy,aikramer2/spaCy,recognai/spaCy,spacy-io/spaCy,honnibal/spaCy,Gregory-Howard/spaCy,spacy-io/spaCy,spacy-io/spaCy,raphael0202/spaCy,Gregory-Howard/spaCy,explosion/spaCy,aikramer2/spaCy,spacy-io/spaCy,raphael02...
examples/training/train_new_entity_type.py
examples/training/train_new_entity_type.py
from __future__ import unicode_literals, print_function import json import pathlib import random import spacy from spacy.pipeline import EntityRecognizer from spacy.gold import GoldParse from spacy.tagger import Tagger try: unicode except: unicode = str def train_ner(nlp, train_data, output_dir): # Ad...
from __future__ import unicode_literals, print_function import json import pathlib import random import spacy from spacy.pipeline import EntityRecognizer from spacy.gold import GoldParse from spacy.tagger import Tagger try: unicode except: unicode = str def train_ner(nlp, train_data, output_dir): # Ad...
mit
Python
4fb7f37e927fa90a34053ae51c1bb061b127a909
Add another uvmap generator.
cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene
a500/uvgen.py
a500/uvgen.py
#!/usr/bin/env python from math import floor, atan2, cos, sin, sqrt from array import array def frpart(x): return x - floor(x) def lerp(lo, hi, step): return lo + (hi - lo) * step def dist(x1, y1, x2, y2): dx = x2 - x1 dy = y2 - y1 return sqrt(dx * dx + dy * dy) def generate(width, height, fn): uvm...
#!/usr/bin/env python from math import floor, atan2, cos, sin, sqrt from array import array def frpart(x): return x - floor(x) def lerp(lo, hi, step): return lo + (hi - lo) * step def dist(x1, y1, x2, y2): dx = x2 - x1 dy = y2 - y1 return sqrt(dx * dx + dy * dy) def generate(width, height, fn): uvm...
artistic-2.0
Python
095c70598b338ed10c9d22672f4ac2961ea3c2d7
rewrite uncertainty sampleing test case using unittest module
ntucllab/libact,ntucllab/libact,ntucllab/libact
libact/query_strategies/tests/test_qs.py
libact/query_strategies/tests/test_qs.py
import unittest from numpy.testing import assert_array_equal import numpy as np from libact.base.interfaces import QueryStrategy, ContinuousModel from libact.base.dataset import Dataset, import_libsvm_sparse from libact.models import * from libact.query_strategies import * from libact.labelers import IdealLabeler d...
from numpy.testing import assert_array_equal import numpy as np from libact.base.interfaces import QueryStrategy, ContinuousModel from libact.base.dataset import Dataset, import_libsvm_sparse from libact.models import * from libact.query_strategies import * from libact.labelers import IdealLabeler X = [[-2, -1], [-1,...
bsd-2-clause
Python
3f74de582c48f02b5b085f11fe76dbf87189db8b
add passing validation for 2012 prez general md contest
datamade/openelections-core,openelections/openelections-core,cathydeng/openelections-core,cathydeng/openelections-core,datamade/openelections-core,openelections/openelections-core
openelex/us/md/validate.py
openelex/us/md/validate.py
from openelex.models import Contest, Candidate, Result #TODO: Genericize this to check unique contests for all elections def validate_unique_prez_2012_general(): """Should only be a single contest for 2012 prez general""" count = Contest.objects.filter(election_id='md-2012-11-06-general', slug='president-vice-...
from openelex.models import Contest, Candidate, Result def validate_unique_contests(): """Count of contests should match unique set of election ids""" elec_ids_count = len(Contest.objects.filter(state='MD').distinct('election_id')) contest_count = Contest.objects.filter(state='MD').count() try: ...
mit
Python
e0749f69d9a75ddcaa2ca927ac72ce75f0c75250
Update env_detect.py
Python-IoT/Smart-IoT-Planting-System,Python-IoT/Smart-IoT-Planting-System
device/src/env_detect.py
device/src/env_detect.py
#-------------------------------------- # ____ ____ # / __/__ / __/ # _\ \/ _ \_\ \ # /___/ .__/___/ # /_/ # # dev_detect.py # Environment detection. # # Author : Arvin # Date : 15/09/2017 #-------------------------------------- #Weather station. #detect environment information from several ...
#!/usr/bin/env python #Weather station. #detect environment information from several sensors: #water leverl, air humity, raining, air temperature, light sensitivity. #Air temperature&humity sensor: DHT11. #Add dht.py in micropython/stmhal/modules, refer to esp8266 #Compile the DHT in firmware, then use DHT lib in appli...
mit
Python
f70bf550de5476d23bdd1e5fc375d9c703990bce
Drop version info from our sbt builds
wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api
builds/build_sbt_image.py
builds/build_sbt_image.py
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- """ Build a Docker image for one of our sbt applications. Usage: build_sbt_image.py --project=<PROJECT> [--env=<BUILD_ENV>] build_sbt_image.py -h | --help Options: -h --help Show this screen. --project=<PROJECT> Name of the sbt project (...
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- """ Build a Docker image for one of our sbt applications. Usage: build_sbt_image.py --project=<PROJECT> [--version=<VERSION>] [--env=<BUILD_ENV>] build_sbt_image.py -h | --help Options: -h --help Show this screen. --project=<PROJECT> Nam...
mit
Python
a37a2818fb2d61dd4a1bba5358d6c22f166132e6
Fix a local rule reference
turbulenz/gyp,mgamer/gyp,bulldy80/gyp_unofficial,okumura/gyp,bnq4ever/gypgoogle,xin3liang/platform_external_chromium_org_tools_gyp,dougbeal/gyp,cchamberlain/gyp,enkripsi/gyp,bulldy80/gyp_unofficial,AWhetter/gyp,duanhjlt/gyp,bulldy80/gyp_unofficial,omasanori/gyp,tarc/gyp,pandaxcl/gyp,bnoordhuis/gyp,ttyangf/gyp,sport-mon...
test/mac/archs/test-archs-multiarch.gyp
test/mac/archs/test-archs-multiarch.gyp
# Copyright (c) 2012 Google Inc. 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_name': 'static_32_64', 'type': 'static_library', 'sources': [ 'my_file.cc' ], 'xcode_settings': { 'A...
# Copyright (c) 2012 Google Inc. 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_name': 'static_32_64', 'type': 'static_library', 'sources': [ 'my_file.cc' ], 'xcode_settings': { 'A...
bsd-3-clause
Python
fcee6aca22007c3ff64b4d87de3f1772b3c7eb99
add encoding, re: "non-ascii character" syntax error
stefankoegl/kdtree
kdtree/__init__.py
kdtree/__init__.py
# -*- coding: latin-1 -*- """A Python implemntation of a kd-tree This package provides a simple implementation of a kd-tree in Python. https://en.wikipedia.org/wiki/K-d_tree """ __author__ = 'Stefan Kögl <stefan@skoegl.net>' __version__ = '0.1' __website__ = 'https://github.com/stefankoegl/kdtree' __license__ = 'GNU...
"""A Python implemntation of a kd-tree This package provides a simple implementation of a kd-tree in Python. https://en.wikipedia.org/wiki/K-d_tree """ __author__ = 'Stefan Kögl <stefan@skoegl.net>' __version__ = '0.1' __website__ = 'https://github.com/stefankoegl/kdtree' __license__ = 'GNU General Public License v3 ...
isc
Python
943a312c152ec6adeeff1e7a8b5b4b46334dfc0d
Fix dims in regression tf example
nkoep/pymanopt,pymanopt/pymanopt,pymanopt/pymanopt,nkoep/pymanopt,nkoep/pymanopt,tingelst/pymanopt
examples/regression_offset_tensorflow.py
examples/regression_offset_tensorflow.py
import tensorflow as tf import numpy as np from pymanopt import Problem from pymanopt.solvers import TrustRegions from pymanopt.manifolds import Euclidean, Product if __name__ == "__main__": # Generate random data X = np.random.randn(3, 100).astype('float32') Y = (X[0:1, :] - 2*X[1:2, :] + np.random.randn...
import tensorflow as tf import numpy as np from pymanopt import Problem from pymanopt.solvers import TrustRegions from pymanopt.manifolds import Euclidean, Product if __name__ == "__main__": # Generate random data X = np.random.randn(3, 100).astype('float32') Y = (X[0:1, :] - 2*X[1:2, :] + np.random.randn...
bsd-3-clause
Python
f4b7f90c2a7d5d575592efc21cfc83fb999fa57e
fix todo module path expansion
tobi-wan-kenobi/bumblebee-status,tobi-wan-kenobi/bumblebee-status
bumblebee/modules/todo.py
bumblebee/modules/todo.py
# pylint: disable=C0111,R0903 """Displays the number of todo items from a text file Parameters: * todo.file: File to read TODOs from (defaults to ~/Documents/todo.txt) """ import bumblebee.input import bumblebee.output import bumblebee.engine import os.path class Module(bumblebee.engine.Module): def __in...
# pylint: disable=C0111,R0903 """Displays the number of todo items from a text file Parameters: * todo.file: File to read TODOs from (defaults to ~/Documents/todo.txt) """ import bumblebee.input import bumblebee.output import bumblebee.engine class Module(bumblebee.engine.Module): def __init__(self, engi...
mit
Python
d9a37dffd8e6c5ab44f6b355de4fc07aa64aea9f
Fix unreliability of pipeline publisher.
alexrudy/Zeeko,alexrudy/Zeeko
zeeko/telemetry/tests/test_pipeline.py
zeeko/telemetry/tests/test_pipeline.py
import pytest import h5py import time import numpy as np from ..pipeline import create_pipeline @pytest.fixture def chunksize(): """The size of chunks.""" return 10 @pytest.fixture def pipeline(address, context, chunksize, filename): """Pipeline""" ioloop = create_pipeline(address, context, chunksize,...
import pytest import h5py import time import numpy as np from ..pipeline import create_pipeline @pytest.fixture def chunksize(): """The size of chunks.""" return 10 @pytest.fixture def pipeline(address, context, chunksize, filename): """Pipeline""" ioloop = create_pipeline(address, context, chunksize,...
bsd-3-clause
Python
f9f01b57e6e2085786908a5ebcf0be61fefe3a51
Change version
Shir0kamii/slack-client
slack_client/__init__.py
slack_client/__init__.py
from .api import SlackAPI from .channel import SlackChannel __version__ = '0.3.0'
from .api import SlackAPI from .channel import SlackChannel __version__ = '0.2.16'
mit
Python
d3847357c446c4a1ac50735b983b20cf57f9c7c6
Fix args and return of CounterController functions
dls-controls/pymalcolm,dls-controls/pymalcolm,dls-controls/pymalcolm
malcolm/controllers/countercontroller.py
malcolm/controllers/countercontroller.py
from malcolm.core.controller import Controller from malcolm.core.attribute import Attribute from malcolm.core.numbermeta import NumberMeta from malcolm.core.method import takes, returns import numpy as np class CounterController(Controller): def create_attributes(self): self.counter = Attribute(NumberMet...
from malcolm.core.controller import Controller from malcolm.core.attribute import Attribute from malcolm.core.numbermeta import NumberMeta from malcolm.core.method import takes import numpy as np class CounterController(Controller): def create_attributes(self): self.counter = Attribute(NumberMeta("counte...
apache-2.0
Python
270af43ffbe8974698d17ff6d5cae20fbf410f73
Add url enter delete element on riak
jgabriellima/mining,avelino/mining,chrisdamba/mining,seagoat/mining,avelino/mining,AndrzejR/mining,mlgruby/mining,mlgruby/mining,mining/mining,mlgruby/mining,mining/mining,chrisdamba/mining,AndrzejR/mining,seagoat/mining,jgabriellima/mining
admin/urls.py
admin/urls.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from .views import CubeHandler, ConnectionHandler, DeleteHandler from .views import ElementHandler, DashboardHandler, APIElementCubeHandler INCLUDE_URLS = [ (r"/admin/delete/(?P<bucket>[\w-]+)/(?P<slug>[\w-]+)", DeleteHandler), (r"/admin/connection/?(?P<slug>[\w-]...
#!/usr/bin/env python # -*- coding: utf-8 -*- from .views import CubeHandler, ConnectionHandler from .views import ElementHandler, DashboardHandler, APIElementCubeHandler INCLUDE_URLS = [ (r"/admin/connection/?(?P<slug>[\w-]+)?", ConnectionHandler), (r"/admin/cube/?(?P<slug>[\w-]+)?", CubeHandler), (r"/ad...
mit
Python
c4fadf89161e99514037e8af7953fca0ab13b28e
Fix import.
setten/pymatgen,vorwerkc/pymatgen,davidwaroquiers/pymatgen,dongsenfo/pymatgen,matk86/pymatgen,montoyjh/pymatgen,gVallverdu/pymatgen,gpetretto/pymatgen,aykol/pymatgen,Bismarrck/pymatgen,nisse3000/pymatgen,nisse3000/pymatgen,czhengsci/pymatgen,richardtran415/pymatgen,mbkumar/pymatgen,gmatteo/pymatgen,gVallverdu/pymatgen,...
pymatgen/symmetry/tests/test_groups.py
pymatgen/symmetry/tests/test_groups.py
#!/usr/bin/env python """ TODO: Modify unittest doc. """ from __future__ import division __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Virtual Lab" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "ongsp@ucsd.edu" __date__ = "4/10/14" import unittest import numpy as n...
#!/usr/bin/env python """ TODO: Modify unittest doc. """ from __future__ import division __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Virtual Lab" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "ongsp@ucsd.edu" __date__ = "4/10/14" import unittest import numpy as n...
mit
Python
48e589b200894121f32bd96b39f29ad5c0120991
add test_delete_task_id_not_integer
pyfarm/pyfarm-agent,pyfarm/pyfarm-agent,guidow/pyfarm-agent,pyfarm/pyfarm-agent,guidow/pyfarm-agent,guidow/pyfarm-agent
tests/test_agent/test_http_api_tasks.py
tests/test_agent/test_http_api_tasks.py
# No shebang line, this module is meant to be imported # # Copyright 2014 Oliver Palmer # # 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 # # Unle...
# No shebang line, this module is meant to be imported # # Copyright 2014 Oliver Palmer # # 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 # # Unle...
apache-2.0
Python
4e12aea0a5479bad8289cbf6c9f460931d51f701
Add autocommit to 1 to avoid select cache ¿WTF?
p4u/projecte_frigos,p4u/projecte_frigos,p4u/projecte_frigos,p4u/projecte_frigos
database.py
database.py
import MySQLdb class database(object): def __init__(self): config = {} execfile("config.py",config) self.db = MySQLdb.connect(config["host"],config["user"],config["password"],config["database"]) self.db.autocommit(True) def insert(self,txt): dbc = self.db.cursor() try: dbc.execute("i...
import MySQLdb class database(object): def __init__(self): config = {} execfile("config.py",config) self.db = MySQLdb.connect(config["host"],config["user"],config["password"],config["database"]) def insert(self,txt): dbc = self.db.cursor() try: dbc.execute("insert into " + txt) dbc...
agpl-3.0
Python
e5d2ed715d83be506ec452ecdd0a22748a84a007
Fix test_pull_doc (missing request id when creating messages)
draperjames/bokeh,Karel-van-de-Plassche/bokeh,azjps/bokeh,Karel-van-de-Plassche/bokeh,percyfal/bokeh,aavanian/bokeh,philippjfr/bokeh,philippjfr/bokeh,mindriot101/bokeh,aiguofer/bokeh,dennisobrien/bokeh,msarahan/bokeh,msarahan/bokeh,DuCorey/bokeh,philippjfr/bokeh,msarahan/bokeh,KasperPRasmussen/bokeh,draperjames/bokeh,c...
bokeh/server/protocol/messages/tests/test_pull_doc.py
bokeh/server/protocol/messages/tests/test_pull_doc.py
from __future__ import absolute_import, print_function import unittest import bokeh.document as document from bokeh.plot_object import PlotObject from bokeh.properties import Int, Instance from bokeh.server.protocol import Protocol class AnotherModel(PlotObject): bar = Int(1) class SomeModel(PlotObject): fo...
from __future__ import absolute_import, print_function import unittest import bokeh.document as document from bokeh.plot_object import PlotObject from bokeh.properties import Int, Instance from bokeh.server.protocol import Protocol class AnotherModel(PlotObject): bar = Int(1) class SomeModel(PlotObject): fo...
bsd-3-clause
Python
a74fbbd6c822b1384d9cd5f1501c8a01fb2ed9fe
Update deauthorization callback
vstoykov/django4facebook
django4facebook/views.py
django4facebook/views.py
from django.contrib.auth.models import User from django.http import HttpResponse, HttpResponseBadRequest from django.views.decorators.csrf import csrf_exempt import facebook from .conf import settings @csrf_exempt def deauthorize_callback(request): """ When user deauthorize this application from facebook the...
from django.contrib.auth.models import User from django.http import HttpResponse, HttpResponseBadRequest def deauthorize_callback(request): """ When user deauthorize this application from facebook then we deactivate the user from our system """ if not request.facebook: return HttpResponseB...
mit
Python
19a3ead211cc4c00b219329ac63177420cdb71e6
Make all functions available from raysect.core.math.function.
raysect/source,raysect/source
raysect/core/math/function/__init__.py
raysect/core/math/function/__init__.py
# cython: language_level=3 # Copyright (c) 2014-2018, Dr Alex Meakins, Raysect Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the ab...
# cython: language_level=3 # Copyright (c) 2014-2018, Dr Alex Meakins, Raysect Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the ab...
bsd-3-clause
Python
f25e0fe435f334e19fc84a9c9458a1bea4a051f9
Allow to reverse the order of the CSV for a proper reading
shakaran/casterly,shakaran/casterly
money/parser/__init__.py
money/parser/__init__.py
import csv from money.models import Movement def parse_csv(raw_csv, parser, header_lines=0, reverse_order=False): reader = csv.reader(raw_csv, delimiter=',', quotechar='"') rows = [] for row in reader: if reader.line_num > header_lines and row: rows.append(parser.parse_row(row)) ...
import csv from money.models import Movement def parse_csv(raw_csv, parser, header_lines=0): reader = csv.reader(raw_csv, delimiter=',', quotechar='"') rows = [] for row in reader: if reader.line_num > header_lines and row: rows.append(parser.parse_row(row)) return rows def import_movements(data, bank_ac...
bsd-3-clause
Python
fa067545657d3b1bb80a4047f175353c4856dd7c
Implement extension normalizer for NamedAccess
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
thinglang/parser/values/named_access.py
thinglang/parser/values/named_access.py
from thinglang.compiler.buffer import CompilationBuffer from thinglang.compiler.opcodes import OpcodePopDereferenced, OpcodeDereference from thinglang.lexer.tokens.access import LexicalAccess from thinglang.lexer.values.identifier import Identifier from thinglang.lexer.values.numeric import NumericValue from thinglang....
from thinglang.compiler.buffer import CompilationBuffer from thinglang.compiler.opcodes import OpcodePopDereferenced, OpcodeDereference from thinglang.lexer.tokens.access import LexicalAccess from thinglang.lexer.values.identifier import Identifier from thinglang.lexer.values.numeric import NumericValue from thinglang....
mit
Python
27fe88a325251c4b12a4b5f020c1d6c5e83b4b59
Change var to be more consistent
115100/untz_manager
untz_manager/encoder.py
untz_manager/encoder.py
"""Encoding related operations""" import logging import subprocess import sys import taglib LOGGER = logging.getLogger(__name__) def _get_vorbis_comments(audio_file, pattern): macros = (('%g', 'GENRE'), ('%n', 'TRACKNUMBER'), ('%t', 'TITLE'), ('%d', 'DATE')) params...
"""Encoding related operations""" import logging import subprocess import sys import taglib LOGGER = logging.getLogger(__name__) def _get_vorbis_comments(audio_file, pattern): macros = (('%g', 'GENRE'), ('%n', 'TRACKNUMBER'), ('%t', 'TITLE'), ('%d', 'DATE')) params...
bsd-3-clause
Python
234609000de3da9449dacb363e58bf60c0e3a4d8
Change DATABASES default db to PostgreSQL
LitPalimpsest/parser-api-search,LitPalimpsest/parser-api-search,LitPalimpsest/parser-api-search
site/litlong/settings.py
site/litlong/settings.py
""" Django settings for litlong project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) im...
""" Django settings for litlong project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) im...
mit
Python
b13edc289905dd4d2c331eddffa490305f9ef827
fix a typo
mozilla/relman-auto-nag,mozilla/relman-auto-nag,mozilla/relman-auto-nag,mozilla/bztools,anoopvalluthadam/bztools
bugzilla/agents.py
bugzilla/agents.py
import urllib from bugzilla.models import * from bugzilla.utils import * class InvalidAPI_ROOT(Exception): def __str__(self): return "Invalid API url specified. " + \ "Please set BZ_API_ROOT in your environment " + \ "or pass it to the agent constructor" class BugzillaAgen...
import urllib from bugzilla.models import * from bugzilla.utils import * class InvalidAPI_ROOT(Exception): def __str__(self): return "Invalid API url specified. " + \ "Please set BZ_API_ROOT in your environment " + \ "or pass it to the agent constructor" class BugzillaAgen...
bsd-3-clause
Python
c4ef7fe24477d9160214c1cd2938aa8f5135d84b
Add other needed method stubs
stuy-tetrabyte/graduation-req-tracker
utils/database_setup.py
utils/database_setup.py
import pandas import argparse def get_excel(filepath): """ Returns a Pandas datafile that contains the contents of a Microsoft Excel Spreadsheet Params: filepath - A string containing the path to the file Returns: A Pandas datafile """ return pandas.read_excel(filepath) d...
import pandas def load_excel(filepath): """ Returns a Pandas datafile that contains the contents of a Microsoft Excel Spreadsheet Params: filepath - A string containing the path to the file Returns: A Pandas datafile """ return pandas.read_excel(filepath) def get_column_n...
mit
Python
e838370958c90ce1123aa1a5ab0823169257cfa9
Make configuration per model instead of per project.
samastur/django-admin-filters
adminfilters/admin.py
adminfilters/admin.py
from django.contrib.admin.views.main import ChangeList from django.contrib.admin.options import ModelAdmin from django.contrib.admin.filterspecs import FilterSpec class GenericFilterSpec(FilterSpec): def __init__(self, data, request, title): self.data = data self.request = request self._ti...
from django.contrib.admin.views.main import ChangeList from django.contrib.admin.options import ModelAdmin from django.contrib.admin.filterspecs import FilterSpec from django.conf import settings GENERIC_FILTERS_ON_TOP = getattr(settings, "GENERIC_FILTERS_ON_TOP", False) class GenericFilterSpec(FilterSpec): def ...
bsd-3-clause
Python
cce88a16cc367ef8df9533b848e6fae29ac8a4d1
update build setup
sdpython/ensae_teaching_cs,sdpython/ensae_teaching_cs,sdpython/ensae_teaching_cs,sdpython/ensae_teaching_cs,sdpython/ensae_teaching_cs,sdpython/ensae_teaching_cs
build_win_setup.py
build_win_setup.py
""" @file @brief Builds a setup for the teachings: ensae_teaching_cs """ try: import pymyinstall except ImportError: import sys sys.path.append("../pymyinstall/src") import pymyinstall try: import pyquickhelper except ImportError: import sys sys.path.append("../pyquickhelper/src") impor...
""" @file @brief Builds a setup for the teachings: ensae_teaching_cs """ try: import pymyinstall except ImportError: import sys sys.path.append("../pymyinstall/src") import pymyinstall try: import pyquickhelper except ImportError: import sys sys.path.append("../pyquickhelper/src") impor...
mit
Python
ec295698b683dd5f04df1fff49f9d1e2afdf0a86
fix bugs in writing out failures
alvinlindstam/ol3,fperucic/ol3,Antreasgr/ol3,v5analytics/openlayers,openlayers/ol2,stweil/openlayers,georchestra/openlayers,fredj/ol3,avinet/openlayers,denilsonsa/ol3,sanak/ol2,pgiraud/openlayers,thomasmoelhave/ol3,mzur/ol3,boundlessgeo/openlayers,geekdenz/ol3,stweil/ol3,geoext/GXM,CandoImage/ol3,llambanna/ol3,tschaub/...
tests/selenium/remotecontrol/test_ol.py
tests/selenium/remotecontrol/test_ol.py
from selenium import selenium import time import sys from ConfigParser import ConfigParser if len(sys.argv) > 2: filename = sys.argv[2] else: filename = "config.cfg" c = ConfigParser() c.read(filename) targets = {} sections = c.sections() for s in sections: targets[s] = dict(c.items(s)) targets[s][...
from selenium import selenium import time import sys from ConfigParser import ConfigParser if len(sys.argv) > 2: filename = sys.argv[2] else: filename = "config.cfg" c = ConfigParser() c.read(filename) targets = {} sections = c.sections() for s in sections: targets[s] = dict(c.items(s)) targets[s][...
bsd-2-clause
Python
be92cf747a718bc004bd2024dbdcb527205d9b44
remove an extra import
StoDevX/course-data-tools,StoDevX/course-data-tools
scripts/lib/flattened.py
scripts/lib/flattened.py
def flatten(l): # from http://stackoverflow.com/a/2158532/2347774 for el in l: if isinstance(el, list) and not isinstance(el, str): yield from flatten(el) else: yield el
import collections def flatten(l): # from http://stackoverflow.com/a/2158532/2347774 for el in l: if isinstance(el, list) and not isinstance(el, str): yield from flatten(el) else: yield el
mit
Python
bf163f45d1e7a28db34396b20209778668103f0a
remove password option for redis
jhao104/proxy_pool,jhao104/proxy_pool
Run/main.py
Run/main.py
# -*- coding: utf-8 -*- """ ------------------------------------------------- File Name: main.py Description : 运行主函数 Author : JHao date: 2017/4/1 ------------------------------------------------- Change Activity: 2017/4/1: ----------------------------------------...
# -*- coding: utf-8 -*- """ ------------------------------------------------- File Name: main.py Description : 运行主函数 Author : JHao date: 2017/4/1 ------------------------------------------------- Change Activity: 2017/4/1: ----------------------------------------...
mit
Python
a157ee8bc8c740ba7482f8e4e9116213fb18c935
fix of type in merging
ternaus/kaggle_avito
src/gl_lr.py
src/gl_lr.py
from __future__ import division __author__ = 'Vladimir Iglovikov' ''' I will try to use logistic regression from Graphlab to predict ''' import graphlab as gl import os print 'reading train' train = gl.SFrame(os.path.join('..', 'data', 'trainSearch_1')) print print 'train shape' print train.shape print 'reading...
from __future__ import division __author__ = 'Vladimir Iglovikov' ''' I will try to use logistic regression from Graphlab to predict ''' import graphlab as gl import os print 'reading train' train = gl.SFrame(os.path.join('..', 'data', 'trainSearch_1')) print print 'train shape' print train.shape print 'reading...
mit
Python
b914f700687f6fbf6ccc0aac08d92ffaac76f89a
bump retry timeout, 20s is too low during meltdowns
liampauling/flumine
flumine/streams/basestream.py
flumine/streams/basestream.py
import threading import queue import logging import betfairlightweight from betfairlightweight import StreamListener from tenacity import wait_exponential logger = logging.getLogger(__name__) class BaseStream(threading.Thread): LISTENER = StreamListener MAX_LATENCY = 0.5 RETRY_WAIT = wait_exponential(mu...
import threading import queue import logging import betfairlightweight from betfairlightweight import StreamListener from tenacity import wait_exponential logger = logging.getLogger(__name__) class BaseStream(threading.Thread): LISTENER = StreamListener MAX_LATENCY = 0.5 RETRY_WAIT = wait_exponential(mu...
mit
Python
277e3ef7544a64ddb2fa9f31b66597036a38e65b
Remove widget and test paths.
nprapps/borders-map,nprapps/borders-map,nprapps/borders-map,nprapps/borders-map
app.py
app.py
#!/usr/bin/env python import argparse from flask import Flask, render_template import app_config from render_utils import make_context, urlencode_filter import static app = Flask(app_config.PROJECT_NAME) app.jinja_env.filters['urlencode'] = urlencode_filter # Example application views @app.route('/') def index(): ...
#!/usr/bin/env python import argparse from flask import Flask, render_template import app_config from render_utils import make_context, urlencode_filter import static app = Flask(app_config.PROJECT_NAME) app.jinja_env.filters['urlencode'] = urlencode_filter # Example application views @app.route('/') def index(): ...
mit
Python
a0883d386f6c35f8cb70c6d21ad1cc37dccb90b6
Update host
yassineAlouini/image-recognition-as-a-service,yassineAlouini/image-recognition-as-a-service
app.py
app.py
from flask import Flask # from image_classification import ImageClassifier app = Flask(__name__) PORT = 33507 HOST = '0.0.0.0' @app.route('/') def home(): return 'Hello classification world!' if __name__ == '__main__': app.run(host=HOST, port=PORT)
from flask import Flask # from image_classification import ImageClassifier app = Flask(__name__) PORT = 33507 @app.route('/') def home(): return 'Hello classification world!' if __name__ == '__main__': app.run(port=PORT)
mit
Python
355629e1e2e2423a4ea1ad859506e380e6ddbc89
define special route for twitter
piccolbo/rightload,piccolbo/rightload
app.py
app.py
# ingredients: tinydb joblib.Memory from flask import Flask from ml import store_feedback from ml import learn from proxy import proxy import sys import trace import logging as log # should be set at the project level log.basicConfig(filename="./log", level=log.INFO) # create a Trace object, telling it what to igno...
# ingredients: tinydb joblib.Memory from flask import Flask from ml import store_feedback from ml import learn from proxy import proxy import sys import trace import logging as log # should be set at the project level log.basicConfig(filename="./log", level=log.INFO) # create a Trace object, telling it what to igno...
agpl-3.0
Python
58dfa1e8df073cafc23871e76d317172758b05a6
change app.py
marcoscastro/personal-page,marcoscastro/personal-page
app.py
app.py
from bottle import route, run from bottle import static_file, request from bottle import template, get, error import os # static routes @get('/<filename:re:.*\.css>') def stylesheets(filename): return static_file(filename, root='static/css') @get('/<filename:re:.*\.js>') def javascripts(filename): return static_fil...
from bottle import route, run from bottle import static_file, request from bottle import template, get, error import os # static routes @get('/<filename:re:.*\.css>') def stylesheets(filename): return static_file(filename, root='static/css') @get('/<filename:re:.*\.js>') def javascripts(filename): return static_fil...
mit
Python
d6d67b8a831959d79a94e927bae3373bcbd4ef0a
print request args
hezhao/bitaps-api-demo,hezhao/bitaps-api-demo
app.py
app.py
import json from flask import Flask, request, jsonify app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" @app.route("/paid", methods=['POST']) def paid(): print(json.dumps(request.args)) return jsonify(request.args) if __name__ == "__main__": app.run()
from flask import Flask, request, jsonify app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" @app.route("/paid", methods=['POST']) def paid(): # print(request.args.get('invoice')) return jsonify(request.args) if __name__ == "__main__": app.run()
bsd-2-clause
Python
c274325f89ef9a8fa25128b85b6d25dc634fe4a2
Fix flood control exception
sevazhidkov/leonard
bot.py
bot.py
import os import sys import logging from time import sleep from flask import request import telegram from telegram.error import NetworkError, Unauthorized, RetryAfter from leonard import Leonard from libs import shrt WEBHOOK_HOSTNAME = os.environ.get('WEBHOOK_HOSTNAME', 'https://leonardbot.herokuapp.com') debug = ...
import os import sys import logging from time import sleep from flask import request import telegram from telegram.error import NetworkError, Unauthorized from leonard import Leonard from libs import shrt WEBHOOK_HOSTNAME = os.environ.get('WEBHOOK_HOSTNAME', 'https://leonardbot.herokuapp.com') debug = False if 'BO...
mit
Python
d52c4340a62802bcd0fcbd68516c5ac66fb10436
Update function name used in the streamtester
LuminosoInsight/python-ftfy
ftfy/streamtester/__init__.py
ftfy/streamtester/__init__.py
""" This file defines a general method for evaluating ftfy using data that arrives in a stream. A concrete implementation of it is found in `twitter_tester.py`. """ from __future__ import print_function, unicode_literals from ftfy.fixes import fix_encoding from ftfy.chardata import possible_encoding class StreamTeste...
""" This file defines a general method for evaluating ftfy using data that arrives in a stream. A concrete implementation of it is found in `twitter_tester.py`. """ from __future__ import print_function, unicode_literals from ftfy.fixes import fix_text_encoding from ftfy.chardata import possible_encoding class Stream...
mit
Python
7a786fd031c3faa057256abc5d9cb47618041696
Configure max build age on the monitoring side
stripe/stripe-datadog-checks,stripe/datadog-checks
checks.d/veneur.py
checks.d/veneur.py
import datetime from urlparse import urljoin import requests # project from checks import AgentCheck class Veneur(AgentCheck): VERSION_METRIC_NAME = 'veneur.deployed_version' BUILDAGE_METRIC_NAME = 'veneur.build_age' def check(self, instance): success = 0 host = instance['host'] ...
import datetime from urlparse import urljoin import requests # project from checks import AgentCheck class Veneur(AgentCheck): VERSION_METRIC_NAME = 'veneur.deployed_version' BUILDAGE_METRIC_NAME = 'veneur.build_age' MAX_AGE_CHECK_NAME = 'veneur.build_age.fresh' # Check that the build is no more th...
mit
Python
ef6e0b681c1c7812e9d11fcd2fffd36468c00513
Create custom field : SearchButtonField (#77)
ptitoliv/cineapp,ptitoliv/cineapp,ptitoliv/cineapp
cineapp/widgets.py
cineapp/widgets.py
# -*- coding: utf-8 -*- from wtforms import fields, widgets # Define wtforms widget and field class CKTextAreaWidget(widgets.TextArea): def __call__(self, field, **kwargs): kwargs.setdefault('class_', 'ckeditor') html_string = super(CKTextAreaWidget, self).__call__(field, **kwargs) html_st...
# -*- coding: utf-8 -*- from wtforms import fields, widgets # Define wtforms widget and field class CKTextAreaWidget(widgets.TextArea): def __call__(self, field, **kwargs): kwargs.setdefault('class_', 'ckeditor') html_string = super(CKTextAreaWidget, self).__call__(field, **kwargs) html_st...
mit
Python
b54a3fa45cca86fddcd6130e67a306d93a079fff
update Config File parsing to new API
paroj/ogre,OGRECave/ogre,paroj/ogre,OGRECave/ogre,OGRECave/ogre,OGRECave/ogre,paroj/ogre,paroj/ogre,paroj/ogre,OGRECave/ogre
Samples/Python/sample.py
Samples/Python/sample.py
import Ogre import OgreRTShader class SGResolver(Ogre.MaterialManager_Listener): def __init__(self, shadergen): Ogre.MaterialManager_Listener.__init__(self) self.shadergen = shadergen def handleSchemeNotFound(self, idx, name, mat, lod_idx, rend): if name != OgreRTShader.cvar.ShaderGene...
import Ogre import OgreRTShader class SGResolver(Ogre.MaterialManager_Listener): def __init__(self, shadergen): Ogre.MaterialManager_Listener.__init__(self) self.shadergen = shadergen def handleSchemeNotFound(self, idx, name, mat, lod_idx, rend): if name != OgreRTShader.cvar.ShaderGene...
mit
Python
13752105bfc595acfc143df92306c07e2d6782ff
Adjust operation should still return valid json even when no changes (None) returned
project-ncl/repour,project-ncl/repour,jsenko/repour,jsenko/repour
repour/adjust.py
repour/adjust.py
import asyncio import logging from . import asgit from . import asutil from . import exception logger = logging.getLogger(__name__) # # Utility # expect_ok = asutil.expect_ok_closure(exception.AdjustCommandError) @asyncio.coroutine def commit_adjustments(repo_dir, repo_url, original_ref, adjust_type): d = yiel...
import asyncio import logging from . import asgit from . import asutil from . import exception logger = logging.getLogger(__name__) # # Utility # expect_ok = asutil.expect_ok_closure(exception.AdjustCommandError) @asyncio.coroutine def commit_adjustments(repo_dir, repo_url, original_ref, adjust_type): d = yiel...
apache-2.0
Python
01ec4fd2e294bcb524c6724d6727da7b1a882f0d
Exit code 2 for normal not running remote status
guildai/guild,guildai/guild,guildai/guild,guildai/guild
guild/commands/remote_impl.py
guild/commands/remote_impl.py
# Copyright 2017-2018 TensorHub, 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 agreed to in writ...
# Copyright 2017-2018 TensorHub, 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 agreed to in writ...
apache-2.0
Python
859d5ce6553b7651f05f27adec28e8c4330ca9bb
Add id of node generating the supervisor event
waltermoreira/serfnode,waltermoreira/serfnode,waltermoreira/serfnode
handler/supervisor_to_serf.py
handler/supervisor_to_serf.py
#!/usr/bin/env python import json import sys from utils import serf_event def write_stdout(s): sys.stdout.write(s) sys.stdout.flush() def write_stderr(s): sys.stderr.write(s) sys.stderr.flush() def main(): while True: write_stdout('READY\n') # transition from ACKNOWLEDGED to READY ...
#!/usr/bin/env python import json import sys from utils import serf_event def write_stdout(s): sys.stdout.write(s) sys.stdout.flush() def write_stderr(s): sys.stderr.write(s) sys.stderr.flush() def main(): while True: write_stdout('READY\n') # transition from ACKNOWLEDGED to READY ...
mit
Python
e3916e6403b8933d9d8896b7289321c45b9990d2
Refactor if clause to check for string in list
genenetwork/genenetwork2,genenetwork/genenetwork2,genenetwork/genenetwork2,genenetwork/genenetwork2
wqflask/wqflask/docs.py
wqflask/wqflask/docs.py
import codecs from flask import g from wqflask.database import database_connection class Docs: def __init__(self, entry, start_vars={}): results = None with database_connection() as conn, conn.cursor() as cursor: cursor.execute("SELECT Docs.title, CAST(Docs.content AS BINARY) " ...
import codecs from flask import g from wqflask.database import database_connection class Docs: def __init__(self, entry, start_vars={}): results = None with database_connection() as conn, conn.cursor() as cursor: cursor.execute("SELECT Docs.title, CAST(Docs.content AS BINARY) " ...
agpl-3.0
Python
665943c0736cd83662bc8bebe072045f163b28c9
Revise func docstrring
bowen0701/algorithms_data_structures
alg_insertion_sort.py
alg_insertion_sort.py
from __future__ import absolute_import from __future__ import print_function from __future__ import division def insertion_sort(nums): """Insertion sort algortihm. Time complexity: O(n^2). Space complexity: O(1). """ # Starting at pos i >= 1, swap (num[j-1], num[j]), for j=i,i-1,...,1, # if o...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def insertion_sort(nums): """Insertion Sort algortihm. Time complexity: O(n^2). Space complexity: O(1). """ # Starting at pos i >= 1, swap (num[j-1], num[j]), for j=i,i-1,...,1, # if o...
bsd-2-clause
Python
1b47086e3ef45b6e668ed330ac017badc0afae96
Add opbeat contrib
daviferreira/defprogramming,daviferreira/defprogramming,daviferreira/defprogramming
defprogramming/settings.py
defprogramming/settings.py
# Django settings for defprogramming project. import os BASE_DIR = os.path.abspath(os.path.dirname(__file__)) ADMINS = () MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db/development.sqlite3'), } } TIME_ZONE = 'America/Chic...
# Django settings for defprogramming project. import os BASE_DIR = os.path.abspath(os.path.dirname(__file__)) ADMINS = () MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db/development.sqlite3'), } } TIME_ZONE = 'America/Chic...
mit
Python
22029728795a850d1b57824c6a91ddd5378f9760
fix some typos
sassoftware/robj
robj/__init__.py
robj/__init__.py
# # Copyright (c) 2010 rPath, Inc. # # This program is distributed under the terms of the MIT License as found # in a file called LICENSE. If it is not present, the license # is always available at http://www.opensource.org/licenses/mit-license.php. # # This program is distributed in the hope that it will be useful, b...
# # Copyright (c) 2010 rPath, Inc. # # This program is distributed under the terms of the MIT License as found # in a file called LICENSE. If it is not present, the license # is always available at http://www.opensource.org/licenses/mit-license.php. # # This program is distributed in the hope that it will be useful, b...
apache-2.0
Python
1b6b7de39dcb80ff083bd21c6665c0dcaa5200fa
Update last_api_activity in Tooltron add_card_event view.
CMU-Robotics-Club/roboticsclub.org,sreidy/roboticsclub.org,CMU-Robotics-Club/roboticsclub.org,sreidy/roboticsclub.org,sreidy/roboticsclub.org,CMU-Robotics-Club/roboticsclub.org
robocrm/views.py
robocrm/views.py
from django.http import HttpResponse from django.core.exceptions import PermissionDenied, ObjectDoesNotExist from django.contrib.auth import authenticate, login from api.models import APIRequest from django.views.decorators.http import require_POST from projects.models import Project from django.utils import timezone f...
from django.http import HttpResponse from django.core.exceptions import PermissionDenied, ObjectDoesNotExist from django.contrib.auth import authenticate, login from api.models import APIRequest from django.views.decorators.http import require_POST from projects.models import Project from .models import * def roboauth...
mit
Python
2a984234d6bef4667af9549459e1fd85fb213626
Bump version to v1.14.20
Cal-CS-61A-Staff/ok-client
client/__init__.py
client/__init__.py
__version__ = 'v1.14.20' FILE_NAME = 'ok' import os import sys sys.path.insert(0, '') # Add directory in which the ok.zip is stored to sys.path. sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
__version__ = 'v1.14.19' FILE_NAME = 'ok' import os import sys sys.path.insert(0, '') # Add directory in which the ok.zip is stored to sys.path. sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
apache-2.0
Python
c13f78f358b3befe71539804abc80df9179b6bfa
bump to v1.7.6
Cal-CS-61A-Staff/ok-client
client/__init__.py
client/__init__.py
__version__ = 'v1.7.6' FILE_NAME = 'ok' import os import sys sys.path.insert(0, '') # Add directory in which the ok.zip is stored to sys.path. sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
__version__ = 'v1.7.5' FILE_NAME = 'ok' import os import sys sys.path.insert(0, '') # Add directory in which the ok.zip is stored to sys.path. sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
apache-2.0
Python
c41e4827116635acf37861b19d369f167900bf74
Reduce test memory footprint, remove unused variable
poldracklab/fmriprep,oesteban/preprocessing-workflow,oesteban/fmriprep,poldracklab/preprocessing-workflow,poldracklab/fmriprep,poldracklab/fmriprep,poldracklab/preprocessing-workflow,oesteban/fmriprep,oesteban/preprocessing-workflow,oesteban/fmriprep
fmriprep/interfaces/tests/test_images.py
fmriprep/interfaces/tests/test_images.py
import time import numpy as np import nibabel as nb from nipype.interfaces import nilearn as nl from .. import images as im import pytest @pytest.mark.parametrize('nvols, nmasks, ext, factor', [ (500, 10, '.nii', 2), (500, 10, '.nii.gz', 5), (200, 3, '.nii', 1.1), (200, 3, '.nii.gz', 2), (200, 10...
import time import numpy as np import nibabel as nb from nipype.interfaces import nilearn as nl from .. import images as im import pytest @pytest.mark.parametrize('nvols, nmasks, ext, factor', [ (1000, 10, '.nii', 2), (1000, 10, '.nii.gz', 5), (200, 3, '.nii', 1.1), (200, 3, '.nii.gz', 2), (200, ...
bsd-3-clause
Python
76b087986aa90967918ec52b459a857c11743203
Update patterns
vuolter/pyload,vuolter/pyload,vuolter/pyload
module/plugins/hoster/ZippyshareCom.py
module/plugins/hoster/ZippyshareCom.py
# -*- coding: utf-8 -*- import re from os import path from urllib import unquote from urlparse import urljoin from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class ZippyshareCom(SimpleHoster): __name__ = "ZippyshareCom" __type__ = "hoster" __version__ = "0.60" _...
# -*- coding: utf-8 -*- import re from os import path from urllib import unquote from urlparse import urljoin from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class ZippyshareCom(SimpleHoster): __name__ = "ZippyshareCom" __type__ = "hoster" __version__ = "0.60" _...
agpl-3.0
Python
3ce75ad5f3e0178394e9d496327c2e11bb74c6ac
save schedule to SQL
paulfantom/Central-Heating-webpage,paulfantom/Central-Heating-webpage,paulfantom/Central-Heating-webpage,paulfantom/Central-Heating-webpage
app/data.py
app/data.py
from .models import Settings from app import db def get_query(db_model): try: q = db.session.query(db_model).order_by(db_model.index.desc()).first() except AttributeError: try: q = db.session.query(db_model).order_by(db_model.index.desc()).first() except AttributeError: ...
from .models import Settings from app import db def get_query(db_model): try: q = db.session.query(db_model).order_by(db_model.index.desc()).first() except AttributeError: try: q = db.session.query(db_model).order_by(db_model.index.desc()).first() except AttributeError: ...
mpl-2.0
Python
e77bc141c8e2564509f093059e61cfb98be79e56
Add module docstring to __init__
par2/lamana
lamana/__init__.py
lamana/__init__.py
# ----------------------------------------------------------------------------- '''The main init file that stores the package version number.''' # __version__ is used by find_version() in setup.py import lamana.input_ import lamana.distributions import lamana.constructs import lamana.theories import lamana.output_ #fr...
# ----------------------------------------------------------------------------- import lamana.input_ import lamana.distributions import lamana.constructs import lamana.theories import lamana.output_ #from lamana.models import * #import lamana.ratios #import lamana.predictions #import lamana.gamuts __title__ = 'lamana...
bsd-3-clause
Python
2cd901a3975691eb06f695f5e352c0bc46c923a0
Bump version to 0.4.11
par2/lamana
lamana/__init__.py
lamana/__init__.py
# ----------------------------------------------------------------------------- import lamana.input_ import lamana.distributions import lamana.constructs import lamana.theories import lamana.output_ #from lamana.models import * #import lamana.ratios #import lamana.predictions #import lamana.gamuts __title__ = 'lamana...
# ----------------------------------------------------------------------------- import lamana.input_ import lamana.distributions import lamana.constructs import lamana.theories import lamana.output_ #from lamana.models import * #import lamana.ratios #import lamana.predictions #import lamana.gamuts __title__ = 'lamana...
bsd-3-clause
Python
edaaaf23bc13996bf571946128f206013045efbb
Resolve comilation issue for darwin-framework-tool on M1 (#21761)
project-chip/connectedhomeip,project-chip/connectedhomeip,project-chip/connectedhomeip,project-chip/connectedhomeip,project-chip/connectedhomeip,project-chip/connectedhomeip
scripts/build/build_darwin_framework.py
scripts/build/build_darwin_framework.py
#!/usr/bin/env -S python3 -B # Copyright (c) 2022 Project Matter Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
#!/usr/bin/env -S python3 -B # Copyright (c) 2022 Project Matter Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
apache-2.0
Python
35d39957d1a4fd847509384dab429092a39715e3
Load pre-trained GloVe
natsheh/sensim,natsheh/sensim
distance.py
distance.py
# coding: utf-8 # Author: Hussein AL-NATSHEH <hussein.al-natsheh@ish-lyon.cnrs.fr> # License: BSD 3 clause # 2016 import pandas as pd import argparse import numpy as np def load_data(dataset, verbose=0): if dataset == 'sts': #Load STS data (combined 2012-2014 and cleaned) data = pd.read_csv('data/sts_gs_all.csv...
# coding: utf-8 # Author: Hussein AL-NATSHEH <hussein.al-natsheh@ish-lyon.cnrs.fr> # License: BSD 3 clause # 2016 import pandas as pd import argparse import numpy as np def load_data(dataset, verbose=0): if dataset == "sts": #Load STS data (combined 2012-2014 and cleaned) data = pd.read_csv('data/sts_gs_all.csv...
bsd-3-clause
Python
d258bbe78be9cdf8ca2251add74a903f054b032a
add login/logout views. closes #7
hackupc/backend,hackupc/backend,hackupc/backend,hackupc/backend
app/urls.py
app/urls.py
"""testP URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
"""testP URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
mit
Python
c136d416c2cb53449e1c175412eeaa46a2f78db1
Fix syntax error in email service
cgwire/zou
zou/app/utils/emails.py
zou/app/utils/emails.py
from flask_mail import Message from zou.app import mail, app def send_email(subject, body, recipient_email, html=None): """ Send an email with given subject and body to given recipient. """ if html is None: html = body with app.app_context(): message = Message( sender=...
from flask_mail import Message from zou.app import mail, app def send_email(subject, body, recipient_email, html=None): """ Send an email with given subject and body to given recipient. """ if html is None: html = body with app.app_context(): message = Message( sender=...
agpl-3.0
Python
d3adfcbcf281f00aa454d4d8e45f6d5502495bde
Add get_absolute_url to UserSerializer
ZobairAlijan/osf.io,RomanZWang/osf.io,njantrania/osf.io,saradbowman/osf.io,doublebits/osf.io,samchrisinger/osf.io,MerlinZhang/osf.io,jinluyuan/osf.io,mluo613/osf.io,abought/osf.io,CenterForOpenScience/osf.io,reinaH/osf.io,kwierman/osf.io,samanehsan/osf.io,kwierman/osf.io,barbour-em/osf.io,haoyuchen1992/osf.io,zachjanic...
api/users/serializers.py
api/users/serializers.py
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, LinksField, Link class UserSerializer(JSONAPISerializer): id = ser.CharField(read_only=True, source='_id') fullname = ser.CharField() date_registered = ser.DateTimeField(read_only=True) links = LinksFie...
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, LinksField, Link class UserSerializer(JSONAPISerializer): id = ser.CharField(read_only=True, source='_id') fullname = ser.CharField() date_registered = ser.DateTimeField(read_only=True) links = LinksFie...
apache-2.0
Python
4b3f79ae5e30de867941d363d1f186d3c2494b4b
Remove obsolete token code.
google/gfw-toolkit
api_sample/http_utils.py
api_sample/http_utils.py
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
Python
45689b8b2d91310e4002a63253009fddae947bb3
Bump copyright year in sphinx docs
babab/pycommand,babab/pycommand
doc/conf.py
doc/conf.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import pycommand extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = 'pycommand' copyright = '2013-2015, Benjamin Althues' version = pycommand.__version__ release = pycommand.__ve...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys from pycommand import __version__ as pycommand_version extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = 'pycommand' copyright = '2013, Benjamin Althues' ve...
isc
Python
69912ea520a35f8c35a62d7a3c6efe1a9367f03f
Fix typo
aptivate/ckanext-mapactiontheme,aptivate/ckanext-mapactiontheme,aptivate/ckanext-mapactiontheme,aptivate/ckanext-mapactiontheme,aptivate/ckanext-mapactiontheme
ckanext/mapactiontheme/tests/test_admin_controller.py
ckanext/mapactiontheme/tests/test_admin_controller.py
from ckan.plugins.toolkit import config import ckan.tests.helpers as helpers import ckan.tests.factories as factories from ckan.plugins import load class TestCustomAdminController(helpers.FunctionalTestBase): def setup(self): super(TestCustomAdminController, self).setup() self.admin = factories.Use...
from ckan.plugins.toolkit import config import ckan.tests.helpers as helpers import ckan.tests.factories as factories from ckan.plugins import load class TestCustomAdminController(helpers.FunctionalTestBase): def setup(self): super(TestCustomAdminController, self).setup() self.admin = factories.Use...
agpl-3.0
Python
3ae496284e86815304736196bd66052fbfc9b81d
Support 'I Want you'
litrin/YoClient
YoClient.py
YoClient.py
#!/usr/bin/env python import httplib import urllib class YoClient: Host = 'api.justyo.co' Port = 80 NoticeAPI = '/yo/' BroadcastAPI = '/yoall/' Headers = {'Cache-Control': 'no-cache', 'Content-Type': 'application/x-www-form-urlencoded'} #Proxy ...
#!/usr/bin/env python import httplib import urllib class YoClient: Host = 'api.justyo.co' Port = 80 NoticeAPI = '/yo/' BroadcastAPI = '/yoall/' Headers = {'Cache-Control': 'no-cache', 'Content-Type': 'application/x-www-form-urlencoded'} #Proxy ...
bsd-2-clause
Python
9ccbc97652db1b7e6c7888b783722eee9f438104
make cbpro visible to tests
danpaquin/GDAX-Python,danpaquin/coinbase-gdax-python
__init__.py
__init__.py
# for tests from cbpro.authenticated_client import AuthenticatedClient from cbpro.public_client import PublicClient
mit
Python
020015cccceb3c2391c4764ee2ec29dfc5c461c6
Update plugin's register functions to return the object instance instead of performing the registration themselves
Curahelper/Cura,bq/Ultimaker-Cura,ad1217/Cura,bq/Ultimaker-Cura,senttech/Cura,lo0ol/Ultimaker-Cura,quillford/Cura,derekhe/Cura,ynotstartups/Wanhao,markwal/Cura,lo0ol/Ultimaker-Cura,senttech/Cura,DeskboxBrazil/Cura,ynotstartups/Wanhao,totalretribution/Cura,ad1217/Cura,fieldOfView/Cura,quillford/Cura,fxtentacle/Cura,dere...
__init__.py
__init__.py
from . import LayerView def getMetaData(): return { "name": "LayerView", "type": "View" } def register(app): return LayerView.LayerView()
from . import LayerView def getMetaData(): return { "name": "LayerView", "type": "View" } def register(app): app.getController().addView("LayerView", LayerView.LayerView())
agpl-3.0
Python
90656a3b4eedac9ae87dbdb5485994c58c2f78d9
add pydq
Pyiner/pydq
__init__.py
__init__.py
# -*- coding: utf-8 -*- import six __title__ = 'pydq' __version__ = '0.0.1' __author__ = 'Pyiner' __license__ = 'Apache 2.0' __copyright__ = 'Copyright 2015 Pyiner' __all__ = ['DataQuery'] class DataQuery(object): def __init__(self, data): self.data = data @staticmethod def item_exist(item, **k...
# -*- coding: utf-8 -*- import six __title__ = 'requests' __version__ = '0.0.1' __author__ = 'Pyiner' __license__ = 'Apache 2.0' __copyright__ = 'Copyright 2015 Pyiner' __all__ = ['DataQuery'] class DataQuery(object): def __init__(self, data): self.data = data @staticmethod def item_exist(item,...
apache-2.0
Python
b186ed26e3250d8b02c94f5bb3b394c35986bcf6
Remove an import which snuck in but does not belong.
platipy/spyral
__init__.py
__init__.py
""" Spyral, an awesome library for making games. """ __version__ = '0.1.1' __license__ = 'MIT' __author__ = 'Robert Deaton' import compat import memoize import point import camera import sprite import scene import _lib import event import animator import animation import pygame import image import color import rect ...
""" Spyral, an awesome library for making games. """ __version__ = '0.1.1' __license__ = 'MIT' __author__ = 'Robert Deaton' import compat import memoize import point import camera import sprite import scene import _lib import event import animator import animation import pygame import image import color import rect ...
lgpl-2.1
Python
354738da43c25e7f0de5f439f065b823bb97a413
sort by importance
cr33dog/pyxfce,cr33dog/pyxfce,cr33dog/pyxfce
__init__.py
__init__.py
__all__ = [ "gui", "mcs", "netk", "panel", "util" ] import util import gui import netk import mcs import panel
__all__ = [ "gui", "mcs", "netk", "panel", "util" ] import gui import mcs import netk import panel import util
bsd-3-clause
Python
c4a4c9333c874b38c121ce1181c12e7ed5aacc88
Add __init__.py
m4rx9/shellgraphics
__init__.py
__init__.py
from shellgraphics import *
from ShellGraphics import *
lgpl-2.1
Python
7bee2061fc0609205bb81dc781efbcd833ca74bb
Add save() interface on Workbook
kz26/PyExcelerate
Workbook.py
Workbook.py
import Worksheet from Writer import Writer class Workbook(object): def __init__(self, encoding='utf-8'): self._worksheets = [] self._encoding = encoding self._writer = Writer(self) def add_sheet(self, worksheet): self._worksheets.append(worksheet) def new_sheet(self, sheet_name): worksheet = Wor...
import Worksheet class Workbook(object): def __init__(self, encoding='utf-8'): self._worksheets = [] self._encoding = encoding def add_sheet(self, worksheet): self._worksheets.append(worksheet) def new_sheet(self, sheet_name): worksheet = Worksheet.Worksheet(sheet_name, self) self._worksheets.append(w...
bsd-2-clause
Python
1ba0a6f93683a0e8f020abe5f34624db33c3a470
Update the package version
jason0x43/jcalfred
__init__.py
__init__.py
'''Utility classes and functions for creating Alfred workflows''' __version__ = '20130913.0' from .alfred import Workflow, WorkflowInfo, Item, JsonFile, LINE from .keychain import Keychain
'''Utility classes and functions for creating Alfred workflows''' __version__ = '20130909.0' from .alfred import Workflow, WorkflowInfo, Item, JsonFile, LINE from .keychain import Keychain
mit
Python
8df7fecb367d27d59402797ecfb9c13ba4f438b7
Fix reference to DEFAULT_USER_INTERFACE
Ghostkeeper/Luna
__main__.py
__main__.py
#!/usr/bin/env python #This is free and unencumbered software released into the public domain. # #Anyone is free to copy, modify, publish, use, compile, sell, or distribute this #software, either in source code form or as a compiled binary, for any purpose, #commercial or non-commercial, and by any means. # #In jurisd...
#!/usr/bin/env python #This is free and unencumbered software released into the public domain. # #Anyone is free to copy, modify, publish, use, compile, sell, or distribute this #software, either in source code form or as a compiled binary, for any purpose, #commercial or non-commercial, and by any means. # #In jurisd...
cc0-1.0
Python
0b1b1ef6d3af248021125135b7534b3870517890
Add tasks urls
toladata/TolaProfile,toladata/TolaProfile,toladata/TolaProfile,toladata/TolaProfile
task/urls.py
task/urls.py
from django.conf.urls import include, url from views import * from rest_framework_jwt.views import obtain_jwt_token, refresh_jwt_token, verify_jwt_token urlpatterns = [ ]
apache-2.0
Python
85610d7e69abe8f75c9f64ede243dfaeb97b5601
Update spider.py
mascalx/PiSpider,mascalx/PiSpider
script/spider.py
script/spider.py
#!/usr/bin/env python #-*- coding: utf-8 -*- import thread, time, cv2 import numpy as np from gpiozero import Motor, PWMLED # Eyelib can be managed by following variables: # blinking : If True start a blink animation (1 cycle) # blinkspd : Speed of blinking # eyeangle :Ddirection of view # eyedistance : D...
#!/usr/bin/env python #-*- coding: utf-8 -*- import thread, time, cv2 import numpy as np from gpiozero import Motor, PWMLED # Eyelib can be managed by following variables: # blinking : If True start a blink animation (1 cycle) # blinkspd : Speed of blinking # eye : Eye image # lid : Lid base image import ...
apache-2.0
Python
f37f556ed497cf9c69f780290465610216ed6f5c
refactor ProfileViewTestCase: add setUp inherited by super class
jupiny/EnglishDiary,jupiny/EnglishDiary,jupiny/EnglishDiary
english_diary/profiles/tests/test_views.py
english_diary/profiles/tests/test_views.py
from django.test import Client from django.core.urlresolvers import reverse from django.contrib.auth import get_user_model import datetime from core.tests.base import BaseTestCase from profiles.utils import set_expiration_date class ProfileViewTestCase(BaseTestCase): def setUp(self): super(ProfileViewTe...
from django.test import Client from django.core.urlresolvers import reverse from django.contrib.auth import get_user_model import datetime from core.tests.base import BaseTestCase from profiles.utils import set_expiration_date class ProfileViewTestCase(BaseTestCase): def test_verify_user_verification_key(self):...
mit
Python
ce45df98d7fbd9b2679d20ac21a188a18295b667
remove debug print
hkernbach/arangodb,joerg84/arangodb,joerg84/arangodb,Simran-B/arangodb,Simran-B/arangodb,hkernbach/arangodb,hkernbach/arangodb,hkernbach/arangodb,joerg84/arangodb,Simran-B/arangodb,arangodb/arangodb,graetzer/arangodb,Simran-B/arangodb,joerg84/arangodb,hkernbach/arangodb,Simran-B/arangodb,joerg84/arangodb,wiltonlazary/a...
3rdParty/V8/v5.7.0.0/gypfiles/gyp_v8.py
3rdParty/V8/v5.7.0.0/gypfiles/gyp_v8.py
# Copyright 2013 the V8 project authors. 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 of conditi...
# Copyright 2013 the V8 project authors. 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 of conditi...
apache-2.0
Python