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
9a8920c3dba4174893f4870d00be4e5c8f40dd84
add -et option.
pankona/rto,sassy/rto
rto/main.py
rto/main.py
#!/usr/bin/env python import urllib2 import json import os import platform import argparse import datetime def open_browser(url): platform_name = platform.system() if platform_name == 'Darwin': os.system('open ' + url) elif platform_name == 'Windows': os.system('start ' + url) else: ...
#!/usr/bin/env python import urllib2 import json import os import platform def open_browser(url): platform_name = platform.system() if platform_name == 'Darwin': os.system('open ' + url) elif platform_name == 'Windows': os.system('start ' + url) else: print "TBD" def rto_main(...
mit
Python
7522312adc46c49d8ce79bd5137a15c734d4e191
update version
mongolab/mongoctl
mongoctl/version.py
mongoctl/version.py
__author__ = 'abdul' MONGOCTL_VERSION = '0.8.5'
__author__ = 'abdul' MONGOCTL_VERSION = '0.8.4'
mit
Python
9b71430d1fb372467fedbb4182090d0aa4e6e369
update module name
Eficent/purchase-workflow,grap/purchase-workflow,numerigraphe/purchase-workflow,credativUK/purchase-workflow,mtelahun/purchase-workflow,anas-taji/purchase-workflow,adhoc-dev/purchase-workflow,Endika/purchase-workflow,Endika/purchase-workflow,adhoc-dev/purchase-workflow,savoirfairelinux/purchase-workflow,OpenCode/purcha...
framework_agreement/__openerp__.py
framework_agreement/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publi...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publi...
agpl-3.0
Python
6fc863e8db106a1316d5b463ab474e5007536e85
add runnable
green131/github-doc,mgottein/github-doc,mgottein/github-doc,green131/github-doc
runnable.py
runnable.py
''' Created on Jan 16, 2015 @author: Dan Green ''' from os import path from javadoc_parser import * def collateData(repodir): javadocs = getJavadocText(open(path.join(repodir, 'Test.java'), 'r')) tags, text = extractTags(javadocs) print tags if __name__ == '__main__': repodir = path.join(path.dirnam...
''' Created on Jan 16, 2015 @author: Dan Green ''' from os import path from javadoc_parser import * def collateData(repodir): javadocs = getJavadocs(open('Test.java', 'r')) tags, text = extractTags(javadocs) print tags, text if __name__ == '__main__': repodir = path.dirname(path.realpath(__file__)) ...
mit
Python
8ef64da89210b800f734909458b7e20bd1de4d0e
Fix typo.
datawire/mdk,datawire/mdk,datawire/mdk,datawire/mdk
functionaltests/source/read_logs.py
functionaltests/source/read_logs.py
""" Read logs, ensure they contain expected results. Usage: read_logs.py <context_id> <expected-messages> The expected messages are passed as JSON-encoded parameter, a list of [<category>, <text>] lists. """ from __future__ import print_function import sys import time from json import loads from mdk import start ...
""" Read logs, ensure they contain expected results. Usage: read_logs.py <context_id> <expected-messages> The expected messages are passed as JSON-encoded parameter, a list of [<category>, <text>] lists. """ from __future__ import print_function import sys import time from json import loads from mdk import start ...
apache-2.0
Python
9538800e4506f3edf579e9b762b96b73627af17a
Delete the permissions from the proxy's parent model.
ctxis/django-admin-view-permission
admin_view_permission/management/commands/fix_proxy_permissions.py
admin_view_permission/management/commands/fix_proxy_permissions.py
import copy from django.apps import apps from django.contrib.auth.management import _get_all_permissions from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand from admin_view_permission.apps import update_permiss...
from django.apps import apps from django.contrib.auth.management import _get_all_permissions from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand from admin_view_permission.apps import update_permissions class...
bsd-2-clause
Python
c938495db520fe24ee39b1947dd0e31d746fe7f5
Use table name in S3 object key
favien/favien,favien/favien,favien/favien
favien/canvas.py
favien/canvas.py
""":mod:`favien.canvas` --- Canvas ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from boto.s3.connection import S3Connection from boto.s3.key import Key from flask import current_app from sqlalchemy.orm import deferred, relationship from sqlalchemy.schema import Column, ForeignKey from sqlalchemy.sql.functions import now fro...
""":mod:`favien.canvas` --- Canvas ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from boto.s3.connection import S3Connection from boto.s3.key import Key from flask import current_app from sqlalchemy.orm import deferred, relationship from sqlalchemy.schema import Column, ForeignKey from sqlalchemy.sql.functions import now fro...
agpl-3.0
Python
e195ab1f4e83febf7b3b7dff7e1b63b578986167
Check handling of simple rows.
CTPUG/mdx_attr_cols
tests.py
tests.py
from unittest import TestCase import xmltodict from markdown import Markdown from markdown.util import etree from mdx_attr_cols import AttrColTreeProcessor class XmlTestCaseMixin(object): def mk_doc(self, s): return etree.fromstring( "<div>" + s.strip() + "</div>") def assertXmlEqual(s...
from unittest import TestCase from markdown import Markdown from mdx_attr_cols import AttrColTreeProcessor class TestAttrColTreeProcessor(TestCase): def mk_processor(self, **conf): md = Markdown() return AttrColTreeProcessor(md, conf) def test_config_defaults(self): p = self.mk_proc...
isc
Python
eb9cef0767ea9d480cd721e98ffc1b3f01d96ee9
Handle the case where param is None in util/datetime_convertor.
uw-it-cte/uw-restclients,uw-it-aca/uw-restclients,uw-it-cte/uw-restclients,UWIT-IAM/uw-restclients,UWIT-IAM/uw-restclients,uw-it-cte/uw-restclients,UWIT-IAM/uw-restclients,uw-it-aca/uw-restclients
restclients/util/datetime_convertor.py
restclients/util/datetime_convertor.py
from datetime import date, datetime, timedelta def convert_to_begin_of_day(a_date): """ @return the naive datetime object of the beginning of day for the give date or datetime object """ if a_date is None: return None return datetime(a_date.year, a_date.month, a_date.day, 0, 0, 0) de...
from datetime import date, datetime, timedelta def convert_to_begin_of_day(a_date): """ @return the naive datetime object of the beginning of day for the give date or datetime object """ return datetime(a_date.year, a_date.month, a_date.day, 0, 0, 0) def convert_to_end_of_day(a_date): """ ...
apache-2.0
Python
1f6704edd18e6961389f30b93a9e6524f03e3e2e
Add several tests for much better coverage.
GraylinKim/sc2bnet,GraylinKim/sc2bnet
tests.py
tests.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals, division # Newer unittest features aren't built in for python 2.6 import sys if sys.version_info[:2] < (2, 7): import unittest2 as unittest else: import unittest import requests import sc2bnet class Tests(unitte...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals, division # Newer unittest features aren't built in for python 2.6 import sys if sys.version_info[:2] < (2, 7): import unittest2 as unittest else: import unittest import sc2bnet class TestReplays(unittest.TestCas...
mit
Python
22cd6494be09032d85b07abee239bfafd3551b85
add new versions (#9846)
iulian787/spack,iulian787/spack,iulian787/spack,LLNL/spack,iulian787/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,iulian787/spack
var/spack/repos/builtin/packages/py-cython/package.py
var/spack/repos/builtin/packages/py-cython/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 PyCython(PythonPackage): """The Cython compiler for writing C extensions for the Python la...
# 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 PyCython(PythonPackage): """The Cython compiler for writing C extensions for the Python la...
lgpl-2.1
Python
625a1634bbd8e75e2034e7214735937de063076c
Update to version 0.4.8-1 (#3568)
EmreAtes/spack,mfherbst/spack,krafczyk/spack,LLNL/spack,krafczyk/spack,skosukhin/spack,mfherbst/spack,krafczyk/spack,TheTimmy/spack,iulian787/spack,iulian787/spack,matthiasdiener/spack,krafczyk/spack,tmerrick1/spack,matthiasdiener/spack,EmreAtes/spack,tmerrick1/spack,TheTimmy/spack,LLNL/spack,lgarren/spack,mfherbst/spa...
var/spack/repos/builtin/packages/r-packrat/package.py
var/spack/repos/builtin/packages/r-packrat/package.py
############################################################################## # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
############################################################################## # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
Python
9569c3cf8561b0e25b42cdb25b069637dfbd2380
fix logic for todo_list_items_attribute_type test in tests.py
davidnjakai/bc-8-todo-console-application
tests.py
tests.py
import unittest import todo_list import todo_item class TodoTests(unittest.TestCase): def test_todo_list_instantiation(self): test_list = todo_list.ToDoList('Test List', 'Test description', todo_item.ToDoItem('to do item 1')) self.assertEqual(type(todo_list.ToDoList('', '', [todo_item.ToDoItem('to do item 1')])),...
import unittest import todo_list import todo_item class TodoTests(unittest.TestCase): def test_todo_list_instantiation(self): test_list = todo_list.ToDoList('Test List', 'Test description', todo_item.ToDoItem('to do item 1')) self.assertEqual(type(todo_list.ToDoList('', '', [todo_item.ToDoItem('to do item 1')])),...
mit
Python
dbfc7d5275cfc384b6e1137a7f9a9228672e9a25
Add a docstring so a file isn't empty.
IATI/iati.core,IATI/iati.core
iati/tests/fixtures/__init__.py
iati/tests/fixtures/__init__.py
"""A package containing fixtures."""
mit
Python
7151bb42b498f884ab9dd410668c4d45aa92ff5e
Add django-autocomplete-light to runtests.py so it works properly
MasonM/django-elect,MasonM/django-elect,MasonM/django-elect
runtests.py
runtests.py
#!/usr/bin/env python import sys import os from os.path import dirname, abspath from optparse import OptionParser import django from django.conf import settings if not settings.configured and not os.environ.get('DJANGO_SETTINGS_MODULE'): settings.configure( DATABASES = { 'default': { ...
#!/usr/bin/env python import sys import os from os.path import dirname, abspath from optparse import OptionParser import django from django.conf import settings if not settings.configured and not os.environ.get('DJANGO_SETTINGS_MODULE'): settings.configure( DATABASES = { 'default': { ...
bsd-3-clause
Python
ed4f51db1ed75a1ea0f94adf1fbb5649ad5ca013
Add initial solution
CubicComet/exercism-python-solutions
rotational-cipher/rotational_cipher.py
rotational-cipher/rotational_cipher.py
import string UPPER = string.ascii_uppercase LOWER = string.ascii_lowercase def rotate(s, n): return "".join(rot_gen(s,n)) def shift_rules(n): shifted = UPPER[n:] + UPPER[:n] + LOWER[n:] + LOWER[:n] return {k:v for k,v in zip(UPPER+LOWER, shifted)} def rot_gen(s, n): rules = shift_rules(n) f...
def rotate(): pass
agpl-3.0
Python
4ccfe4b51254820d4eeb49cbdea5a63006bd7ba4
Support getRootPath for composer based project & more sophisticated getRootPath.
autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/L...
rplugin/python3/LanguageClient/util.py
rplugin/python3/LanguageClient/util.py
import os import time from urllib import parse from pathlib import Path from . logger import logger currPath = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) def joinPath(part): return os.path.join(currPath, part) def getRootPath(filepath: str, languageId: str) -> str: rootPath = None if l...
import os import time from urllib import parse from pathlib import Path from . logger import logger currPath = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) def joinPath(part): return os.path.join(currPath, part) def getRootPath(filepath: str, languageId: str) -> str: if languageId == "rust":...
mit
Python
ab73b2132825e9415ff24306a9d89da10294d79e
Use `logging` instead of printing to stdout by default.
ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit
icekit/utils/management/base.py
icekit/utils/management/base.py
import logging import time from django import db from django.core.management.base import BaseCommand from optparse import make_option logger = logging.getLogger(__name__) class CronBaseCommand(BaseCommand): help = ('Long running process (indefinitely) that executes task on a ' 'specified interval (de...
import time from django import db from django.core.management.base import BaseCommand from optparse import make_option class CronBaseCommand(BaseCommand): help = ('Long running process (indefinitely) that executes task on a ' 'specified interval (default is 1 min). The intent for the ' 'ma...
mit
Python
ef6ce7961b122b56e161a1d731768366052bcdda
Add db_disconnect to API.
ericdill/databroker,NSLS-II/filestore,ericdill/databroker,tacaswell/filestore,stuwilkins/filestore,ericdill/fileStore,danielballan/filestore,danielballan/filestore,stuwilkins/filestore,ericdill/fileStore
filestore/api.py
filestore/api.py
from __future__ import absolute_import, division, print_function from .commands import insert_resource, insert_datum, retrieve, db_disconnect from .retrieve import register_handler, deregister_handler
from __future__ import absolute_import, division, print_function from .commands import insert_resource, insert_datum, retrieve from .retrieve import register_handler, deregister_handler
bsd-3-clause
Python
94c62c1eb7dc3a9d1c4091c28fd323042921204d
Bump version to 0.4.2
nioinnovation/nio-cli,neutralio/nio-cli
nio_cli/__init__.py
nio_cli/__init__.py
__version__ = '0.4.2'
__version__ = '0.4.1'
apache-2.0
Python
4a3f56f895b3ed1c4f0f7ae7b012f9048f939d7f
Comment out modules with broken tests.
rescrv/firmant
runtests.py
runtests.py
#!/usr/bin/python import unittest import doctest import sys from optparse import OptionParser from firmant.utils import get_module # Import this now to avoid it throwing errors. import pytz if __name__ == '__main__': suite = unittest.TestSuite() modules = ['firmant.du', 'firmant.extensions', ...
#!/usr/bin/python import unittest import doctest import sys from optparse import OptionParser from firmant.utils import get_module # Import this now to avoid it throwing errors. import pytz if __name__ == '__main__': suite = unittest.TestSuite() modules = ['firmant.du', 'firmant.extensions', ...
bsd-3-clause
Python
4625a1ed4115b85ce7d96a0d0ba486e589e9fe6c
Make test runner only run basis tests
frecar/django-basis
runtests.py
runtests.py
#!/usr/bin/env python import os import sys os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' from django.test.utils import get_runner from django.conf import settings import django if django.VERSION >= (1, 7): django.setup() def runtests(): TestRunner = get_runner(settings) test_runner = TestRunn...
#!/usr/bin/env python import sys from optparse import OptionParser from os.path import abspath, dirname from django.test.simple import DjangoTestSuiteRunner def runtests(*test_args, **kwargs): parent = dirname(abspath(__file__)) sys.path.insert(0, parent) test_runner = DjangoTestSuiteRunner( verbo...
mit
Python
e498218b3a93d4e43907d34fc846e55a461c757d
rename temporary directory
python/performance,python/performance,python/performance
runtests.py
runtests.py
#!/usr/bin/env python3 from __future__ import division, with_statement, print_function, absolute_import import os.path import shutil import subprocess import sys import tempfile def run_cmd(cmd): print("Execute: %s" % ' '.join(cmd)) proc = subprocess.Popen(cmd) try: proc.wait() except: ...
#!/usr/bin/env python3 from __future__ import division, with_statement, print_function, absolute_import import os.path import shutil import subprocess import sys import tempfile def run_cmd(cmd): print("Execute: %s" % ' '.join(cmd)) proc = subprocess.Popen(cmd) try: proc.wait() except: ...
mit
Python
bda3f84c62d7c99025320d637c210174c4c6e3e3
Remove Trie iteration from word_frequencies_spec.
PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge
spec/data/word_frequencies_spec.py
spec/data/word_frequencies_spec.py
import textwrap from mock import patch from data import word_frequencies from spec.mamba import * patcher = patch.object(word_frequencies.data, 'open_project_path') _SMALL_FILE = textwrap.dedent(""" the 23135851162 of 13151942776 and 12997637966 to 12136980858 a 9081174698 in 8469404971 f...
import textwrap from mock import patch from spec.mamba import * from data import word_frequencies patcher = patch.object(word_frequencies.data, 'open_project_path') _SMALL_FILE = textwrap.dedent(""" the 23135851162 of 13151942776 and 12997637966 to 12136980858 a 9081174698 in 8469404971 f...
mit
Python
53fa7c35d6effa71917590a4cd3e2d18b9c43b95
fix admin view for ChargeAttendance
openpolis/open_municipio,openpolis/open_municipio,openpolis/open_municipio,openpolis/open_municipio
open_municipio/attendances/admin.py
open_municipio/attendances/admin.py
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from .models import Attendance, ChargeAttendance from open_senigallia.votations.filters import VotationIsLinkedToAct, \ VotationByYearFilterSpec, VotationByMonthFilterSpec class AttendanceAdmin(admin....
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from .models import Attendance, ChargeAttendance from open_senigallia.votations.filters import VotationIsLinkedToAct, \ VotationByYearFilterSpec, VotationByMonthFilterSpec class AttendanceAdmin(admin....
agpl-3.0
Python
98f9c5fdcd5b7e19735493d970c5a6fafaeefee0
add normalized timer
geodelic/arke,geodelic/arke
arke/util.py
arke/util.py
from ConfigParser import SafeConfigParser from os.path import expanduser from time import time from circuits.core import BaseComponent class partial(object): def __init__(self, obj, *args, **kwargs): self.__obj = obj self.__args = args self.__kwargs = kwargs def __getattr__(self, att...
from ConfigParser import SafeConfigParser from os.path import expanduser class partial(object): def __init__(self, obj, *args, **kwargs): self.__obj = obj self.__args = args self.__kwargs = kwargs def __getattr__(self, attr): try: return getattr(self.__obj, attr) ...
apache-2.0
Python
1648cec8667611aa7fec4bff12f873f8e6294f82
Add whole image as an input
Cysu/Person-Reid,Cysu/Person-Reid,Cysu/Person-Reid,Cysu/Person-Reid,Cysu/Person-Reid
scripts/bodyconf.py
scripts/bodyconf.py
#!/usr/bin/python2 # -*- coding: utf-8 -*- pixval = { 'hair': 10, 'head': 20, 'upper': 30, 'arms': 40, 'lower': 50, 'legs': 60, 'feet': 70 } groups = [ [10, 20], [30, 40], [50, 60], [70], [0,10,20,30,40,50,60,70] ]
#!/usr/bin/python2 # -*- coding: utf-8 -*- pixval = { 'hair': 10, 'head': 20, 'upper': 30, 'arms': 40, 'lower': 50, 'legs': 60, 'feet': 70 } groups = [ [10, 20], [30, 40], [50, 60], [70] ]
mit
Python
638116af0bf72e73caae64ad36efc74f385dc09e
check for winner retuns false if no winner
IanDCarroll/xox
source/judge_pit.py
source/judge_pit.py
from observer_abilities import * class Judge(Observer): def __init__(self, board_object): self.table_top = board_object def check_for_winner(self): board = self.table_top.board crosses_win = self.get_board_size(board) noughts_win = crosses_win * 10 scan = self.scan_boar...
from observer_abilities import * class Judge(Observer): def __init__(self, board_object): self.table_top = board_object def check_for_winner(self): pass
mit
Python
d2eebd41b103bbf7bfaa2dac22af18cdc05123ce
Comment out bad test
Roshack/cmput410-project,Roshack/cmput410-project,Roshack/cmput410-project,Tamarabyte/cmput410-project,Tamarabyte/cmput410-project,Tamarabyte/cmput410-project
DistributedSocialNetworking/api/tests/test_requests.py
DistributedSocialNetworking/api/tests/test_requests.py
# from django.test import TestCase # from model_mommy import mommy # from Hindlebook.models import Author, Post, Node # from api.requests import PublicPostsRequestFactory # import requests # class PublicPostRequestTestCases(TestCase): # """ # Tests related to Public Post Requests # """ # def setUp(sel...
from django.test import TestCase from model_mommy import mommy from Hindlebook.models import Author, Post, Node from api.requests import PublicPostsRequestFactory import requests # class PublicPostRequestTestCases(TestCase): # """ # Tests related to Public Post Requests # """ # def setUp(self): # ...
apache-2.0
Python
c555a13ba4fa3af087d75b890ff369a47ebea550
create .pkl files
DeepSegment/FCN-GoogLeNet,DeepSegment/FCN-GoogLeNet
scripts/data2pkl.py
scripts/data2pkl.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon May 15 13:59:12 2017 @author: txzhao """ from PIL import Image import pickle from glob import glob import numpy as np import os def dir_to_dataset(glob_files, new_width = 200, new_height = 200): print("To be processed:\n\t %s"%glob_files) dat...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon May 15 13:59:12 2017 @author: txzhao """ from PIL import Image import pickle from glob import glob import numpy as np import os def dir_to_dataset(glob_files, loc_train_labels = ""): print("To be processed:\n\t %s"%glob_files) dataset = [] ...
mit
Python
4d4f93fcc5c3bce7439a153ba887c05dd284910c
update version 0.1.0 -> 0.1.1
tell-k/sphinxcontrib-gravatar
sphinxcontrib/gravatar/__init__.py
sphinxcontrib/gravatar/__init__.py
# -*- coding: utf-8 -*- """ sphinxcontrib.gravatar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :author: tell-k <ffk2005@gmail.com> :copyright: tell-k. All Rights Reserved. """ __docformat__ = 'restructuredtext' __author__ = 'tell-k' __version__ = '0.1.1' from sphinxcontrib.gravatar.nodes import ( ...
# -*- coding: utf-8 -*- """ sphinxcontrib.gravatar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :author: tell-k <ffk2005@gmail.com> :copyright: tell-k. All Rights Reserved. """ __docformat__ = 'restructuredtext' __author__ = 'tell-k' __version__ = '0.1.0' from sphinxcontrib.gravatar.nodes import ( ...
bsd-2-clause
Python
483fb6517fb25e4bad75015d1dc516a1048c1ef6
Bump version: 0.0.4 -> 0.0.5
polysquare/tooling-find-package-cmake-util,polysquare/tooling-find-pkg-util,polysquare/tooling-find-package-cmake-util,polysquare/tooling-find-pkg-util
conanfile.py
conanfile.py
from conans import ConanFile from conans.tools import download, unzip import os VERSION = "0.0.5" class ToolingCMakeUtilConan(ConanFile): name = "tooling-find-pkg-util" version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION) generators = "cmake" requires = ("cmake-include-guard/master@smspillaz/c...
from conans import ConanFile from conans.tools import download, unzip import os VERSION = "0.0.4" class ToolingCMakeUtilConan(ConanFile): name = "tooling-find-pkg-util" version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION) generators = "cmake" requires = ("cmake-include-guard/master@smspillaz/c...
mit
Python
3059cb1c0db8e80b742990e36aacaba2fcdfa248
support unicode/bytes parameter on Python 2/3 for CSVLoader
jubatus/jubakit
jubakit/loader/csv.py
jubakit/loader/csv.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import csv import io from ..base import BaseLoader from ..compat import * class CSVLoader(BaseLoader): """ Loader to process CSV files. """ def __init__(self, filename, fieldnames=None, encoding='utf-...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import csv import io from ..base import BaseLoader from ..compat import * class CSVLoader(BaseLoader): """ Loader to process CSV files. """ def __init__(self, filename, fieldnames=None, encoding='utf-...
mit
Python
5ea6a325ee1e2f0c72f30f017eba8baf9d2c2454
fix smaple code
inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree
InvenTree/plugin/samples/integration/scheduled_task.py
InvenTree/plugin/samples/integration/scheduled_task.py
""" Sample plugin which supports task scheduling """ from plugin import IntegrationPluginBase from plugin.mixins import ScheduleMixin, SettingsMixin # Define some simple tasks to perform def print_hello(): print("Hello") def print_world(): print("World") class ScheduledTaskPlugin(ScheduleMixin, SettingsM...
""" Sample plugin which supports task scheduling """ from plugin import IntegrationPluginBase from plugin.mixins import ScheduleMixin, SettingsMixin # Define some simple tasks to perform def print_hello(): print("Hello") def print_world(): print("World") class ScheduledTaskPlugin(ScheduleMixin, SettingsM...
mit
Python
04d4c6a909807d5a2ec110619325229a41c0ada5
bump version
7wonders/django-knowledge,zapier/django-knowledge,7wonders/django-knowledge,inovasolutions/django-knowledge,CantemoInternal/django-knowledge,legrostdg/django-knowledge,CantemoInternal/django-knowledge,inovasolutions/django-knowledge,RDXT/django-knowledge,RDXT/django-knowledge,inovasolutions/django-knowledge,legrostdg/d...
knowledge/__init__.py
knowledge/__init__.py
VERSION = (0, 0, 3)
VERSION = (0, 0, 2)
isc
Python
4b22707372c1c98e82f36d64aa63228b7d231093
Update robot_instances.py
IlfirinPL/robotframework-MarcinKoperski,IlfirinPL/robotframework-MarcinKoperski,IlfirinPL/robotframework-MarcinKoperski,IlfirinPL/robotframework-MarcinKoperski
src/TestToolsMK/robot_instances.py
src/TestToolsMK/robot_instances.py
# Copyright (c) 2015 Cutting Edge QA Marcin Koperski import os.path from DatabaseLibrary import DatabaseLibrary from SeleniumLibrary import SeleniumLibrary from robot.libraries import DateTime from robot.libraries.BuiltIn import BuiltIn from robot.libraries.Collections import Collections from robot.libraries.Operating...
# Copyright (c) 2015 Cutting Edge QA Marcin Koperski import os.path from DatabaseLibrary import DatabaseLibrary from Selenium2Library import Selenium2Library from robot.libraries import DateTime from robot.libraries.BuiltIn import BuiltIn from robot.libraries.Collections import Collections from robot.libraries.Operati...
mit
Python
c79e9559c66c157c5d8c9bfad71ec724f65c57fb
add sqlite methods
IlfirinPL/robotframework-MarcinKoperski,IlfirinPL/robotframework-MarcinKoperski,IlfirinPL/robotframework-MarcinKoperski,IlfirinPL/robotframework-MarcinKoperski
src/TestToolsMK/sqlite_keywords.py
src/TestToolsMK/sqlite_keywords.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015 Cutting Edge QA import csv import os from robot.libraries import DateTime from robot_instances import * import sqlite3 class SQLITE_Keywords(object): def open_database_sqlite_file(self, path, **kwargs): """ connect(database[, t...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015 Cutting Edge QA import csv import os from robot.libraries import DateTime from robot_instances import * import sqlite3 class SQLITE_Keywords(object): def open_database_sqlite_file(self, path, timeout=None, isolation_level=None, detect_types=No...
mit
Python
13ad927e526fc61da12e5f841afde3d7bd62373c
bump version to 0.9.4 for release
Toblerity/rtree,Toblerity/rtree
rtree/__init__.py
rtree/__init__.py
from .index import Rtree from .core import rt __version__ = '0.9.4'
from .index import Rtree from .core import rt __version__ = '0.9.3'
mit
Python
b1588026d1cb01e664cadcc8e19c00aef49fec5d
Update Multiwii.py
mecax/pyrobotlab,mecax/pyrobotlab,sstocker46/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,sstocker46/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,sstocker46/pyrobotlab
service/Multiwii.py
service/Multiwii.py
#define POLL_PERIOD 20 serial = Runtime.start("serial","Serial") COMPORT= "COM19" BAUDRATE = 9600 #define MSP_SET_RAW_RC 200 #define MSP_SET_RAW_RC_LENGTH 16 RC_MIN = 1000 RC_MID = 1500 RC_MAX = 2000 ROLL = 0 PITCH = 1 YAW = 2 THROTTLE = 3 AUX1 = 4 AUX2 = 5 AUX3 = 6 AUX4 = ...
#define POLL_PERIOD 20 serial = Runtime.start("serial","Serial") COMPORT= "COM19" BAUDRATE = 9600 #define MSP_SET_RAW_RC 200 #define MSP_SET_RAW_RC_LENGTH 16 RC_MIN = 1000 RC_MID = 1500 RC_MAX = 2000 ROLL = 0 PITCH = 1 YAW = 2 THROTTLE = 3 AUX1 = 4 AUX2 = 5 AUX3 = 6 AUX4 = ...
apache-2.0
Python
67e9b19129f071598837d6c82d93939fb18b1a54
Fix JSONType
joshfriend/sqlalchemy-utils,tonyseek/sqlalchemy-utils,spoqa/sqlalchemy-utils,joshfriend/sqlalchemy-utils,marrybird/sqlalchemy-utils,cheungpat/sqlalchemy-utils,rmoorman/sqlalchemy-utils,konstantinoskostis/sqlalchemy-utils,tonyseek/sqlalchemy-utils,JackWink/sqlalchemy-utils
sqlalchemy_utils/types/json.py
sqlalchemy_utils/types/json.py
import sqlalchemy as sa json = None try: import anyjson as json except ImportError: pass import six from sqlalchemy.dialects.postgresql.base import ischema_names from ..exceptions import ImproperlyConfigured try: from sqlalchemy.dialects.postgresql import JSON has_postgres_json = True except ImportEr...
import sqlalchemy as sa json = None try: import anyjson as json except ImportError: pass import six from sqlalchemy.dialects.postgresql.base import ischema_names from ..exceptions import ImproperlyConfigured try: from sqlalchemy.dialects.postgresql import JSON has_postgres_json = True except ImportEr...
bsd-3-clause
Python
1fab6c511e4b341f63824ae25241bc5b243fe42a
Use an iterator instead of a for loop.
eliteraspberries/avena
avena/map.py
avena/map.py
#!/usr/bin/env python """Map functions onto image arrays.""" try: from itertools import imap as map except ImportError: from functools import reduce import numpy from . import image, np def map_to_channels(func, img): """Map a function onto the channels of an image array.""" channels = image.get_...
#!/usr/bin/env python """Map functions onto image arrays.""" import numpy from . import image, np def map_to_channels(func, img): """Map a function onto the channels of an image array.""" channels = image.get_channels(img) first = next(channels) z = func(first) for channel in channels: ...
isc
Python
d10e86bd12278eea2384d293b67f5ab623b7ca36
Fix ebmbot instruction
annapowellsmith/openpresc,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,ebmdatalab/openprescribing
openprescribing/dmd/management/commands/summarise_ncso_concessions.py
openprescribing/dmd/management/commands/summarise_ncso_concessions.py
from datetime import date from django.core.management import BaseCommand from dmd.models import NCSOConcession class Command(BaseCommand): def handle(self, *args, **kwargs): today = date.today() first_of_month = date(today.year, today.month, 1) num_concessions = NCSOConcession.objects.c...
from datetime import date from django.core.management import BaseCommand from dmd.models import NCSOConcession class Command(BaseCommand): def handle(self, *args, **kwargs): today = date.today() first_of_month = date(today.year, today.month, 1) num_concessions = NCSOConcession.objects.c...
mit
Python
461057aea7f3a766f36021735276dff6402e46c7
Update showmove.py
GunshipPenguin/shallow-blue,GunshipPenguin/shallow-blue,GunshipPenguin/shallow-blue,GunshipPenguin/shallow-blue
scripts/showmove.py
scripts/showmove.py
''' Showmove.py Given the value of a move's internal _move variable, print the move and all it's associated info. ''' import sys FILES = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'] FLAGS = { 1<<0: 'NULL_MOVE', 1<<1: 'CAPTURE', 1<<2: 'DOUBLE_PAWN_PUSH', 1<<3: 'KSIDE_CASTLE', 1<<4: 'QSIDE_CASTLE', ...
''' Showmove.py Given the value of a move's internal _move variable, print the move and all it's associated info. ''' import sys FILES = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'] FLAGS = { 1<<0: 'CAPTURE', 1<<1: 'DOUBLE_PAWN_PUSH', 1<<2: 'KSIDE_CASTLE', 1<<3: 'QSIDE_CASTLE', 1<<4: 'EN_PASSANT', ...
mit
Python
8402ed24c30dad439af8f055af46c0e1b06b6595
Use and support returned acls from REST APIs
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/auth/rest.py
salt/auth/rest.py
""" Provide authentication using a REST call REST auth can be defined like any other eauth module: .. code-block:: yaml external_auth: rest: ^url: https://url/for/rest/call fred: - .* - '@runner' If there are entries underneath the ^url entry then they are merged with a...
""" Provide authentication using a REST call REST auth can be defined like any other eauth module: .. code-block:: yaml external_auth: rest: ^url: https://url/for/rest/call fred: - .* - '@runner' If there are entries underneath the ^url entry then they are merged with a...
apache-2.0
Python
ce2e5b108205cdd7a09d9ad207a4210dadd15864
Fix missing library.
cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene
scripts/util/lzo.py
scripts/util/lzo.py
#!/usr/bin/env python from ctypes import cdll, create_string_buffer, memmove from ctypes import byref, POINTER, CFUNCTYPE from ctypes import c_int, c_uint, c_char_p from ctypes.util import find_library class LZOError(Exception): def __init__(self, value): self.value = value def __str__(self): return rep...
#!/usr/bin/env python from ctypes import cdll, create_string_buffer, memmove from ctypes import byref, POINTER, CFUNCTYPE from ctypes import c_int, c_uint, c_char_p from ctypes.util import find_library class LZOError(Exception): def __init__(self, value): self.value = value def __str__(self): return rep...
artistic-2.0
Python
07e50c1732e1f0aef81f4e54d488826bf17625fa
add version 2.2.0 (#23207)
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack
var/spack/repos/builtin/packages/prmon/package.py
var/spack/repos/builtin/packages/prmon/package.py
# Copyright 2013-2021 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 Prmon(CMakePackage): """Standalone monitor for process resource consumption.""" home...
# Copyright 2013-2021 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 Prmon(CMakePackage): """Standalone monitor for process resource consumption.""" home...
lgpl-2.1
Python
55b5f94be9e51cc78ce15118ba2b225210e47621
Add response function
pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality
sample_work/db.py
sample_work/db.py
create_sql = """ create table sample_work_item ( uuid char(36) unique not null, organisation_id int not null, test_id int not null, activity_id varchar(100) not null, package_id varchar(100) not null, xml_data text not null, test_kind varchar(20) ); """ cr...
create_sql = """ create table sample_work_item ( uuid char(36) unique not null, organisation_id int not null, test_id int not null, activity_id varchar(100) not null, package_id varchar(100) not null, xml_data text not null, test_kind varchar(20) ); """ cr...
agpl-3.0
Python
5ce94deae54fc87fe85a2aab8c8e2202d6ff9680
add code to parse .babelignores
rgrannell1/babel
babel.py
babel.py
import sublime, sublime_plugin, os, random from random import sample from ntpath import basename import re # -- utility functions def recurwalk (folder): """generate a flat list of directories in """ excluded_dirs = {'.git'} for path, dirs, files in os.walk(folder): if '.git' in dirs: # -- replace this w...
import sublime, sublime_plugin, os, random from random import sample from ntpath import basename # -- utility functions def recurwalk (folder): """generate a flat list of directories in """ excluded_dirs = {'.git'} for path, dirs, files in os.walk(folder): if '.git' in dirs: # -- replace this with a prop...
mit
Python
27a51cc0c84173253ecbe567c7925aba3e52af26
Bump depop version
depop/django-oauth2-provider,depop/django-oauth2-provider,depop/django-oauth2-provider
provider/__init__.py
provider/__init__.py
__version__ = "0.2.7-depop1"
__version__ = "0.2.7-dev"
mit
Python
442237787c7b25b38fb441a444f7c780f847f686
Add assert_docs_equal util to compare two docs
Gregory-Howard/spaCy,aikramer2/spaCy,recognai/spaCy,oroszgy/spaCy.hu,recognai/spaCy,spacy-io/spaCy,Gregory-Howard/spaCy,spacy-io/spaCy,recognai/spaCy,raphael0202/spaCy,raphael0202/spaCy,explosion/spaCy,banglakit/spaCy,recognai/spaCy,aikramer2/spaCy,explosion/spaCy,explosion/spaCy,aikramer2/spaCy,oroszgy/spaCy.hu,bangla...
spacy/tests/util.py
spacy/tests/util.py
# coding: utf-8 from __future__ import unicode_literals from ..tokens import Doc from ..attrs import ORTH, POS, HEAD, DEP import numpy def get_doc(vocab, words=[], pos=None, heads=None, deps=None, tags=None, ents=None): """Create Doc object from given vocab, words and annotations.""" pos = pos or [''] * len...
# coding: utf-8 from __future__ import unicode_literals from ..tokens import Doc from ..attrs import ORTH, POS, HEAD, DEP import numpy def get_doc(vocab, words=[], pos=None, heads=None, deps=None, tags=None, ents=None): """Create Doc object from given vocab, words and annotations.""" pos = pos or [''] * len...
mit
Python
bc94f9bc27d8e654776256a3610cb2ab7671a59c
Correct debug key
appKom/notipi,appKom/notipi
settings-example.py
settings-example.py
API_KEY = 'dette_er_en_debug_key_ikke_bruk_den_plz' NAME = 'DEBUG' # ex: solan DEBUG = 0
API_KEY = '123' NAME = 'DEBUG' # ex: solan DEBUG = 0
mit
Python
5a7e68fbeb8bb5b0e3b0a93d3b234e42fac3aedc
remove unnecessary join
dboudwin/prygress
prygress/prygress.py
prygress/prygress.py
import sys import time import threading from functools import wraps def progress(function): """Shows a progress bar while a function runs.""" @wraps(function) def wrap_function(*args, **kwargs): stop = False def progress_bar(): while not stop: sys.stdout.write('...
import sys import time import threading from functools import wraps def progress(function): """Shows a progress bar while a function runs.""" @wraps(function) def wrap_function(*args, **kwargs): stop = False def progress_bar(): while not stop: sys.stdout.write('...
mit
Python
d0f922b48118e8f36c184d83e97da6060617d423
Set version: 0.1.0rc1
justinsalamon/scaper
scaper/version.py
scaper/version.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Version info""" short_version = '0.1rc1' version = '0.1.0rc1'
#!/usr/bin/env python # -*- coding: utf-8 -*- """Version info""" short_version = '0.1rc0' version = '0.1.0rc0'
bsd-3-clause
Python
318aca39d5326a407856d4e47e31f60a750a2a68
Bump to v1.3.0
justinsalamon/scaper
scaper/version.py
scaper/version.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Version info""" short_version = '1.3' version = '1.3.0'
#!/usr/bin/env python # -*- coding: utf-8 -*- """Version info""" short_version = '1.2' version = '1.2.0'
bsd-3-clause
Python
00b9bee02f2b7c399da9cd3488790dd53ed7801e
Hide expiry date field from job post create page
pythonph/jobs-board,pythonph/jobs-board,pythonph/jobs-board
jobsboard/jobs/forms.py
jobsboard/jobs/forms.py
from django import forms from .models import Job class JobForm(forms.ModelForm): # class Meta: # model = Job # fields = ('title', 'creator',) class Meta: model = Job exclude = ['created', 'updated', 'expiry']
from django import forms from .models import Job class JobForm(forms.ModelForm): # class Meta: # model = Job # fields = ('title', 'creator',) class Meta: model = Job exclude = ['created', 'updated',]
mit
Python
c87a71035782da3a9f9b26c9fb6a30ce42855913
Change from camelcase to underscores.
isaacarvestad/four-in-a-row
board.py
board.py
import numpy """ Board represents a four in a row game board. Author: Isaac Arvestad """ class Board: """ Initializes the game with a certain number of rows and columns. """ def __init__(self, rows, columns): self.rows = rows self.columns = columns self.matrix = numpy.zeros...
import numpy """ Board represents a four in a row game board. Author: Isaac Arvestad """ class Board: """ Initializes the game with a certain number of rows and columns. """ def __init__(self, rows, columns): self.rows = rows self.columns = columns self.boardMatrix = numpy....
mit
Python
e68d2aa91da58673c997bfa87b75ce7c6a6336ce
change network endpoint to according to our api
madhuni/AstroBox,madhuni/AstroBox,madhuni/AstroBox,madhuni/AstroBox
src/astroprint/network/__init__.py
src/astroprint/network/__init__.py
# coding=utf-8 __author__ = "Daniel Arroyo <daniel@astroprint.com>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' import urllib2 import subprocess from octoprint.settings import settings class NetworkManager(object): def __init__(self): self.settings = settings(...
# coding=utf-8 __author__ = "Daniel Arroyo <daniel@astroprint.com>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' import urllib2 import subprocess from octoprint.settings import settings class NetworkManager(object): def __init__(self): self.settings = settings(...
agpl-3.0
Python
926c5ac15d56b7a588d6309c5eae1db8d9b71354
fix order
silenius/amnesia,silenius/amnesia,silenius/amnesia
amnesia/views/__init__.py
amnesia/views/__init__.py
from pyramid.view import view_config from pyramid.httpexceptions import HTTPFound from amnesia.utils.locale import get_locale_url def includeme(config): config.include('.haproxy') config.include('.index') config.include('.contact') config.scan(__name__) class BaseView(object): def __init__(sel...
from pyramid.view import view_config from pyramid.httpexceptions import HTTPFound from amnesia.utils.locale import get_locale_url def includeme(config): config.include('.haproxy') config.include('.index') config.include('.contact') config.scan(__name__) class BaseView(object): def __init__(sel...
bsd-2-clause
Python
311a846c4e4515618b24982608c1a4e7925d892c
Update counting script with better analysis!
lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment
analysis/count-markers.py
analysis/count-markers.py
#!/usr/bin/env python import climate import collections import joblib import lmj.cubes import lmj.plot import numpy as np logging = climate.get_logger('count') def count(trial): trial.load() trial.mask_dropouts() total = len(trial.df) markers = {m: trial.df[m + '-c'].count() / total for m in trial.m...
#!/usr/bin/env python import climate import collections import joblib logging = climate.get_logger('count') import database def count(trial): trial.load() trial.mask_dropouts() trial.reindex(100) markers = [] for m in trial.marker_columns: s = trial.df[m + '-c'] if s.count() > 0...
mit
Python
5953235619fa9046e9045f0272355414fca4b619
Update poll.py
JeffreyPowell/pi-heating-hub,JeffreyPowell/pi-heating-hub,JeffreyPowell/pi-heating-hub
cron/poll.py
cron/poll.py
#!/usr/bin/env python #import sys #import os #import logging #import pif import MySQLdb # https://dev.mysql.com/doc/connector-python/en/connector-python-example-connecting.html # GLOBALS MYSQL_USERNAME="pi" MYSQL_PASSWORD="PASSWORD" # # check locally if IP has changed # def poll_all_sensors(): import datet...
#!/usr/bin/env python #import sys #import os #import logging #import pif import MySQLdb # https://dev.mysql.com/doc/connector-python/en/connector-python-example-connecting.html # GLOBALS MYSQL_USERNAME="pi" MYSQL_PASSWORD="PASSWORD" # # check locally if IP has changed # def poll_all_sensors(): import datet...
apache-2.0
Python
8d264be22b1e7e54247767ac8878cfde2ac3176f
switch to new ui
google/cauliflowervest,google/cauliflowervest,maximermilov/cauliflowervest,maximermilov/cauliflowervest,maximermilov/cauliflowervest,google/cauliflowervest
src/cauliflowervest/server/main.py
src/cauliflowervest/server/main.py
#!/usr/bin/env python # # Copyright 2011 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 require...
#!/usr/bin/env python # # Copyright 2011 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 require...
apache-2.0
Python
8f5f9138ff97fd18428cb79dff5a233aee6becaf
fix bug occured in setting of rout.e
Letractively/aha-gae,Letractively/aha-gae,Letractively/aha-gae
applications/aha.application.default/application/config.py
applications/aha.application.default/application/config.py
# -*- coding: utf-8 -*- # config.py # # The application specific configulation comes here. # __author__ = 'Atsushi Shibata <shibata@webcore.co.jp>' __docformat__ = 'plaintext' __licence__ = 'BSD' import logging def appConfig(): import aha config = aha.Config() # your custom configurations follows ...
# -*- coding: utf-8 -*- # config.py # # The application specific configulation comes here. # __author__ = 'Atsushi Shibata <shibata@webcore.co.jp>' __docformat__ = 'plaintext' __licence__ = 'BSD' import logging def appConfig(): import aha config = aha.Config() # your custom configurations follows ...
bsd-3-clause
Python
f8e1a0cb55fec276a88541b70c15aa2b5302bd24
Remove unused exception
berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud
apps/common/src/python/mediawords/db/exceptions/handler.py
apps/common/src/python/mediawords/db/exceptions/handler.py
class McDatabaseHandlerException(Exception): """Database handler exception.""" pass class McConnectException(McDatabaseHandlerException): """__connect() exception.""" pass class McQueryException(McDatabaseHandlerException): """query() exception.""" pass class McPrimaryKeyColumnException(Mc...
class McDatabaseHandlerException(Exception): """Database handler exception.""" pass class McConnectException(McDatabaseHandlerException): """__connect() exception.""" pass class McSchemaIsUpToDateException(McDatabaseHandlerException): """schema_is_up_to_date() exception.""" pass class McQu...
agpl-3.0
Python
5639ffe74d7280768779eb577690d9a09de1ac2a
Revert geography endpoint to where it was
Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data
scorecard/urls.py
scorecard/urls.py
from django.conf.urls import url from django.conf.urls import include from django.http import HttpResponse from django.views.decorators.cache import cache_page from django.views.generic.base import TemplateView from rest_framework import routers from django.contrib import admin import debug_toolbar from django.shortcut...
from django.conf.urls import url from django.conf.urls import include from django.http import HttpResponse from django.views.decorators.cache import cache_page from django.views.generic.base import TemplateView from rest_framework import routers from django.contrib import admin import debug_toolbar from django.shortcut...
mit
Python
0885ef2e7eb14d76eb98020f8c73b63de92d20a7
Add unittest back
kratos7/hydra,lake-lerna/hydra,tahir24434/hydra,kratos7/hydra,kratos7/hydra,sushilks/hydra,lake-lerna/hydra,sushilks/hydra,lake-lerna/hydra,tahir24434/hydra,tahir24434/hydra,sushilks/hydra
build.py
build.py
from pybuilder.core import use_plugin, init, Author, task, description, depends from pybuilder.plugins.exec_plugin import run_command use_plugin("python.core") use_plugin("copy_resources") use_plugin("filter_resources") use_plugin("python.unittest") use_plugin("python.install_dependencies") use_plugin("python.flake8")...
from pybuilder.core import use_plugin, init, Author, task, description, depends from pybuilder.plugins.exec_plugin import run_command use_plugin("python.core") use_plugin("copy_resources") use_plugin("filter_resources") #use_plugin("python.unittest") use_plugin("python.install_dependencies") use_plugin("python.flake8"...
apache-2.0
Python
f6d0b15026b498c6bac10a4e4abd6fd0692ee042
fix build script
tomerfiliba/plumbum,henryiii/plumbum,henryiii/plumbum,siemens/plumbum,adamchainz/plumbum,tigrawap/plumbum,pombredanne/plumbum,fahhem/plumbum,tigrawap/plumbum,adamchainz/plumbum,vodik/plumbum,weka-io/plumbum,astraw38/plumbum,siemens/plumbum,AndydeCleyre/plumbum,pombredanne/plumbum,vodik/plumbum,astraw38/plumbum,weka-io/...
build.py
build.py
#!/usr/bin/env python from plumbum import local, cli from plumbum.utils import delete class BuildProject(cli.Application): upload = cli.Flag("upload", help = "If given, the artifacts will be uploaded to PyPI") def main(self): delete(local.cwd // "*.egg-info", "build", "dist") if self.upl...
#!/usr/bin/env python from plumbum import local, cli from plumbum.utils import delete class BuildProject(cli.Application): upload = cli.Flag("upload", help = "If given, the artifacts will be uploaded to PyPI") def main(self): delete(local.cwd // "*.egg-info", "build", "dist") if self.upl...
mit
Python
2e2ab07ffd3d75282ce476df091d15eebb325bfd
Add an output option for the build script.
unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv
build.py
build.py
# Build script of unrealcv, supports win, linux and mac. # Weichao Qiu @ 2017 # Use python build.py to build the plugin import argparse from unrealcv.automation import UE4Automation import os def main(): # Parse arguments parser = argparse.ArgumentParser() parser.add_argument( 'descriptor_file', ...
# Build script of unrealcv, supports win, linux and mac. # Weichao Qiu @ 2017 # Use python build.py to build the plugin import argparse from unrealcv.automation import UE4Automation import os def main(): # Parse arguments parser = argparse.ArgumentParser() parser.add_argument( 'descriptor_file', ...
mit
Python
53f0f7b7a79fd434aecc0818bf6cab1f97e8927a
Change datastore quickstart sample to create a task. (#561)
hashems/Mobile-Cloud-Development-Projects,GoogleCloudPlatform/python-docs-samples,JavaRabbit/CS496_capstone,BrandonY/python-docs-samples,canglade/NLP,hashems/Mobile-Cloud-Development-Projects,sharbison3/python-docs-samples,GoogleCloudPlatform/python-docs-samples,hashems/Mobile-Cloud-Development-Projects,hashems/Mobile-...
datastore/api/quickstart.py
datastore/api/quickstart.py
#!/usr/bin/env python # Copyright 2016 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...
#!/usr/bin/env python # Copyright 2016 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...
apache-2.0
Python
888e57b3fa63a56f4ad271971bc0b99382dfde71
Update version for release
Harut/serpy,clarkduvall/serpy,clarkduvall/serpy,Harut/serpy
serpy/__init__.py
serpy/__init__.py
from serpy.fields import ( Field, BoolField, IntField, FloatField, MethodField, StrField) from serpy.serializer import Serializer, DictSerializer __version__ = '0.1.0' __author__ = 'Clark DuVall' __license__ = 'MIT' __all__ = [ 'Serializer', 'DictSerializer', 'Field', 'BoolField', 'IntField', ...
from serpy.fields import ( Field, BoolField, IntField, FloatField, MethodField, StrField) from serpy.serializer import Serializer, DictSerializer __version__ = '0.0.3' __author__ = 'Clark DuVall' __license__ = 'MIT' __all__ = [ 'Serializer', 'DictSerializer', 'Field', 'BoolField', 'IntField', ...
mit
Python
6f80d7e5bb4db7d1a6489487aafbb3c9f017af8c
bump version
houqp/shell.py
shell/__init__.py
shell/__init__.py
#!/usr/bin/env python # -*- coding:utf-8 -*- __title__ = 'shell' __version__ = '0.1.0' __author__ = 'Qingping Hou' __license__ = 'MIT' from .run_cmd import RunCmd from .input_stream import InputStream from .api import instream, cmd, pipe_all, ex, p, ex_all
#!/usr/bin/env python # -*- coding:utf-8 -*- __title__ = 'shell' __version__ = '0.0.8' __author__ = 'Qingping Hou' __license__ = 'MIT' from .run_cmd import RunCmd from .input_stream import InputStream from .api import instream, cmd, pipe_all, ex, p, ex_all
mit
Python
dfaff0553379f5686efc5da722e2ffac455a2d9f
Add is_active to category serializer
belatrix/BackendAllStars
administrator/serializers.py
administrator/serializers.py
from categories.models import Category, Keyword, Subcategory from rest_framework import serializers class SubcategoryListSerializer(serializers.ModelSerializer): class Meta: model = Subcategory fields = ('pk', 'name') class CategorySerializer(serializers.ModelSerializer): subcategories = Sub...
from categories.models import Category, Keyword, Subcategory from rest_framework import serializers class SubcategoryListSerializer(serializers.ModelSerializer): class Meta: model = Subcategory fields = ('pk', 'name') class CategorySerializer(serializers.ModelSerializer): subcategories = Sub...
apache-2.0
Python
0c79d2fee14d5d2bff51ade9d643df22dde7f301
Add registry settings to scheduler
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
polyaxon/polyaxon/config_settings/scheduler/__init__.py
polyaxon/polyaxon/config_settings/scheduler/__init__.py
from polyaxon.config_settings.k8s import * from polyaxon.config_settings.dirs import * from polyaxon.config_settings.spawner import * from polyaxon.config_settings.registry import * from .apps import *
from polyaxon.config_settings.k8s import * from polyaxon.config_settings.dirs import * from polyaxon.config_settings.spawner import * from .apps import *
apache-2.0
Python
c8d9fb183f5ca704d24ecb6c7007f414d84656db
Fix C407
pre-commit/pre-commit-hooks
pre_commit_hooks/file_contents_sorter.py
pre_commit_hooks/file_contents_sorter.py
""" A very simple pre-commit hook that, when passed one or more filenames as arguments, will sort the lines in those files. An example use case for this: you have a deploy-whitelist.txt file in a repo that contains a list of filenames that is used to specify files to be included in a docker container. This file has on...
""" A very simple pre-commit hook that, when passed one or more filenames as arguments, will sort the lines in those files. An example use case for this: you have a deploy-whitelist.txt file in a repo that contains a list of filenames that is used to specify files to be included in a docker container. This file has on...
mit
Python
6bbdce5c17b3345f610aaaa8c9602738d9451551
Remove cruft from convert-directory.py.
toffer/docker-data-only-container-demo,toffer/docker-data-only-container-demo
pandoc-convert/convert-directory.py
pandoc-convert/convert-directory.py
#!/usr/bin/env python """Convert Directory. Usage: convert_directory.py <src_dir> <dest_dir> -h --help show this """ import errno import os import subprocess from docopt import docopt def convert_directory(src, dest): # Convert the files in place for root, dirs, files in os.walk(src): for fil...
#!/usr/bin/env python """Convert Directory. Usage: convert_directory.py <src_dir> <dest_dir> -h --help show this """ import errno import os import subprocess from docopt import docopt def mkdir_p(path): try: os.makedirs(path) except OSError as exc: if exc.errno == errno.EEXIST and os....
mit
Python
2d5152e72e1813ee7bf040f4033d369d60a44cc2
Update the pipeline to take into account the outlier rejection method to compute the RPP
glemaitre/power-profile,glemaitre/power-profile,clemaitre58/power-profile,clemaitre58/power-profile
pipeline/compute_rpp/compute_rpp.py
pipeline/compute_rpp/compute_rpp.py
import sys import os import numpy as np from skcycling.utils import load_power_from_fit from skcycling.restoration import denoise from skcycling.power_profile import Rpp # The first input argument corresponding to the data path data_path = sys.argv[1] # The second input argument is the storage directory storage_path...
import sys import os import numpy as np from skcycling.utils import load_power_from_fit from skcycling.power_profile import Rpp # The first input argument corresponding to the data path data_path = sys.argv[1] # The second input argument is the storage directory storage_path = sys.argv[2] # We can create a list of ...
mit
Python
e1959f7221ad7d6487dbd0fcf00827a7196dc5d7
make a string out of error.code to match the type declaration of context
SUNET/eduid-webapp,SUNET/eduid-webapp,SUNET/eduid-webapp
src/eduid_webapp/idp/exceptions.py
src/eduid_webapp/idp/exceptions.py
from typing import TYPE_CHECKING, Optional from flask import render_template from werkzeug.exceptions import HTTPException from werkzeug.wrappers import Response as WerkzeugResponse from eduid_webapp.idp.mischttp import get_default_template_arguments if TYPE_CHECKING: from app import IdPApp def init_exception_...
from typing import TYPE_CHECKING, Optional from flask import render_template from werkzeug.exceptions import HTTPException from werkzeug.wrappers import Response as WerkzeugResponse from eduid_webapp.idp.mischttp import get_default_template_arguments if TYPE_CHECKING: from app import IdPApp def init_exception_...
bsd-3-clause
Python
33d6e83eabbf902aa050c2d548232014daae523c
Remove comments
stefanhahmann/pybossa,stefanhahmann/pybossa,proyectos-analizo-info/pybossa-analizo-info,CulturePlex/pybossa,geotagx/pybossa,CulturePlex/pybossa,PyBossa/pybossa,jean/pybossa,Scifabric/pybossa,OpenNewsLabs/pybossa,OpenNewsLabs/pybossa,inteligencia-coletiva-lsd/pybossa,PyBossa/pybossa,proyectos-analizo-info/pybossa-analiz...
pybossa/view/home.py
pybossa/view/home.py
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2013 SF Isle of Man Limited # # PyBossa is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at...
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2013 SF Isle of Man Limited # # PyBossa is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at...
agpl-3.0
Python
0d4cf1ff6bc883bbaf7bf88e1abb15303d71224c
add api_path to config
ethereum/pyethereum,ethermarket/pyethereum,karlfloersch/pyethereum,shahankhatch/pyethereum,pipermerriam/pyethereum,vaporry/pyethereum,holiman/pyethereum,ddworken/pyethereum,ckeenan/pyethereum,harlantwood/pyethereum,pipermerriam/pyethereum,inzem77/pyethereum,jnnk/pyethereum,karlfloersch/pyethereum,ethereum/pyethereum,sh...
pyethereum/config.py
pyethereum/config.py
import os import uuid import StringIO import ConfigParser from pyethereum.utils import data_dir from pyethereum.packeter import Packeter from pyethereum.utils import sha3 def default_data_dir(): data_dir._set_default() return data_dir.path def default_config_path(): return os.path.join(default_data_dir(...
import os import uuid import StringIO import ConfigParser from pyethereum.utils import data_dir from pyethereum.packeter import Packeter from pyethereum.utils import sha3 def default_data_dir(): data_dir._set_default() return data_dir.path def default_config_path(): return os.path.join(default_data_dir(...
mit
Python
55019edb81c08d501a1fd62c484bee37f4c6ae1d
Make description shorter.
concordusapps/alchemist
src/alchemist/commands/load.py
src/alchemist/commands/load.py
# -*- coding: utf-8 -*- import os from flask.ext.script import Command, Option from alchemist import db from .utils import print_command class Load(Command): """Loads the passed named fixture or file. """ # The idea is to eventually extend this command to support: # @code # $ alchemist load <fil...
# -*- coding: utf-8 -*- import os from flask.ext.script import Command, Option from alchemist import db from .utils import print_command class Load(Command): """ Loads the passed file, executes it, and commits the scoped session afterwards. """ # The idea is to eventually extend this command to s...
mit
Python
221ecb9d9cebcf21d1209aa994e62b2236a5636b
fix docs
puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,gmimano/commcaretest,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,SEL-Columbia/commcare-hq...
corehq/apps/domainsync/management/commands/copy_doc.py
corehq/apps/domainsync/management/commands/copy_doc.py
from couchdbkit import Database from dimagi.utils.couch.database import get_db from django.core.management.base import LabelCommand, CommandError from corehq.apps.domainsync.config import DocumentTransform, save class Command(LabelCommand): help = "Copy any couch doc" args = '<sourcedb> <doc_id> (<domain>)' ...
from couchdbkit import Database from dimagi.utils.couch.database import get_db from django.core.management.base import LabelCommand, CommandError from corehq.apps.domainsync.config import DocumentTransform, save class Command(LabelCommand): help = "Copy an app" args = '<sourcedb> <doc_id> (<domain>)' labe...
bsd-3-clause
Python
b3143e445d9180a23d6b09e9b5aab616608dd606
Allow to run any Django management command with ManifestStaticFilesStorage
romanvm/django-tinymce4-lite,romanvm/django-tinymce4-lite,romanvm/django-tinymce4-lite
tinymce/settings.py
tinymce/settings.py
# coding: utf-8 # License: MIT, see LICENSE.txt """The django-tinymce4-lite configuration options""" from __future__ import absolute_import import re import sys from django.conf import settings from django.contrib.staticfiles.storage import staticfiles_storage def is_managed(): """ Check if a Django project ...
# coding: utf-8 # License: MIT, see LICENSE.txt """The django-tinymce4-lite configuration options""" from __future__ import absolute_import import sys from django.conf import settings from django.contrib.staticfiles.storage import staticfiles_storage DEFAULT = { 'selector': 'textarea', 'theme': 'modern', ...
mit
Python
9b03b59ebab2acf04bda0747f3b18b3d899e6a15
Update tic_tac.py
HeyIamJames/PyGames,HeyIamJames/PyGames
Documents/GitHub/PyGames/tic_tac.py
Documents/GitHub/PyGames/tic_tac.py
def print_board(board): print "The board look like this: \n" for i in range(3): print " ", for j in range(3): if board[i*3+j] == 1: print 'X', elif board[i*3+j] == 0: print 'O', elif board[i*3+j] != -1: print board[i*3+j]-1, else: print ' ', if j != 2: print " | ", prin...
def print_board(board): print "The board look like this: \n" for i in range(3): print " ", for j in range(3): if board[i*3+j] == 1: print 'X', elif board[i*3+j] == 0: print 'O', elif board[i*3+j] != -1: print board[i*3+j]-1, else: print ' ', if j != 2: print " | ", prin...
mit
Python
c4d1554c7332ff14ac6ecf9fee7742a3a55e762a
remove debug
RogerTangos/datahub-stub,zjsxzy/datahub,dnsserver/datahub,anantb/datahub,RogerTangos/datahub-stub,anantb/datahub,RogerTangos/datahub-stub,dnsserver/datahub,anantb/datahub,RogerTangos/datahub-stub,zjsxzy/datahub,dnsserver/datahub,zjsxzy/datahub,dnsserver/datahub,RogerTangos/datahub-stub,datahuborg/datahub,datahuborg/dat...
src/datahub/core/manager.py
src/datahub/core/manager.py
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings") from core.db.connection import * from schema.models import * ''' Datahub DB Manager @author: Anant Bhardwaj @date: Mar 21, 2013 ''' def create_user(username, password): res = Connection.create_user( username=username, password=passwor...
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings") from core.db.connection import * from schema.models import * ''' Datahub DB Manager @author: Anant Bhardwaj @date: Mar 21, 2013 ''' def create_user(username, password): res = Connection.create_user( username=username, password=passwor...
mit
Python
189ae1654cfd438edf5fcd352c15913bb7e767f9
Add qiprofile prefix.
ohsu-qin/qiprofile,ohsu-qin/qiprofile,ohsu-qin/qiprofile,ohsu-qin/qiprofile
qiprofile/routers.py
qiprofile/routers.py
from rest_framework import routers from .views import (SubjectViewSet, SubjectDetailViewSet) router = routers.SimpleRouter() router.register(r'qiprofile/(?P<collection>\w+)/subjects', SubjectViewSet) router.register(r'qiprofile/subject-detail', SubjectDetailViewSet)
from rest_framework import routers from .views import SubjectViewSet router = routers.DefaultRouter() router.register(r'subjects', SubjectViewSet)
bsd-2-clause
Python
4b4f28a04cf1ad7dcf0f7374a832738c5f9f5880
Bump python agent version for Cloud Run support.
GoogleCloudPlatform/cloud-debug-python,GoogleCloudPlatform/cloud-debug-python,GoogleCloudPlatform/cloud-debug-python
src/googleclouddebugger/version.py
src/googleclouddebugger/version.py
"""Version of the Google Python Cloud Debugger.""" # Versioning scheme: MAJOR.MINOR # The major version should only change on breaking changes. Minor version # changes go between regular updates. Instances running debuggers with # different major versions will show up as two different debuggees. __version__ = '2.11'
"""Version of the Google Python Cloud Debugger.""" # Versioning scheme: MAJOR.MINOR # The major version should only change on breaking changes. Minor version # changes go between regular updates. Instances running debuggers with # different major versions will show up as two different debuggees. __version__ = '2.10'
apache-2.0
Python
b5a3f41b284e737ef51127c00508aecb8ff3e543
Remove imports for bridgedb.Tests classes; import whole module.
pagea/bridgedb,wfn/bridgedb,wfn/bridgedb,mmaker/bridgedb,mmaker/bridgedb,pagea/bridgedb
lib/bridgedb/test/test_Tests.py
lib/bridgedb/test/test_Tests.py
# -*- coding: utf-8 -*- # # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35 <isis@torproject.org> # please also see AUTHORS file # :copyright: (c) 2013, Isis Lovecruft # (c) 2007-2013, The Tor Project, Inc. # (c) 2007-201...
# -*- coding: utf-8 -*- # # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35 <isis@torproject.org> # please also see AUTHORS file # :copyright: (c) 2013, Isis Lovecruft # (c) 2007-2013, The Tor Project, Inc. # (c) 2007-201...
bsd-3-clause
Python
e6f2a09ad98d12c612b28f427a04fa4f848353d6
Modify data.py to actually do stuff
berkeley-stat159/project-delta
data/data.py
data/data.py
from __future__ import print_function, division import hashlib import json import os def generate_file_md5(filename, blocksize=2**20): m = hashlib.md5() with open(filename, "rb") as f: while True: buf = f.read(blocksize) if not buf: break m.update(bu...
from __future__ import print_function, division import hashlib import os d = {'ds107_sub001_highres.nii': "fd733636ae8abe8f0ffbfadedd23896c"} def generate_file_md5(filename, blocksize=2**20): m = hashlib.md5() with open(filename, "rb") as f: while True: buf = f.read(blocksize) ...
bsd-3-clause
Python
cdfd567f3734afea45ac5a6ae8ffa53833b8dbf0
Update the correct KKTIX links
pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016
src/core/context_processors.py
src/core/context_processors.py
import itertools import operator from django.conf import settings from django.urls import get_script_prefix from django.utils.translation import get_language from sponsors.models import Sponsor def _build_google_form_url(uid): return 'https://docs.google.com/forms/d/e/{uid}/viewform'.format(uid=uid) def scrip...
import itertools import operator from django.conf import settings from django.urls import get_script_prefix from django.utils.translation import get_language from sponsors.models import Sponsor def _build_google_form_url(uid): return 'https://docs.google.com/forms/d/e/{uid}/viewform'.format(uid=uid) def scrip...
mit
Python
949c170c9941ac5ef9efa1e4ea025076806b4af3
Update archival storage URL regex
artefactual/archivematica-history,artefactual/archivematica-history,artefactual/archivematica-history,artefactual/archivematica-history
src/dashboard/src/main/urls.py
src/dashboard/src/main/urls.py
from django.conf.urls.defaults import * from django.conf import settings from django.views.generic.simple import direct_to_template, redirect_to UUID_REGEX = '[\w]{8}(-[\w]{4}){3}-[\w]{12}' urlpatterns = patterns('dashboard.main.views', # Index (r'^$', redirect_to, {'url': '/ingest/'}), # Ingest ...
from django.conf.urls.defaults import * from django.conf import settings from django.views.generic.simple import direct_to_template, redirect_to UUID_REGEX = '[\w]{8}(-[\w]{4}){3}-[\w]{12}' urlpatterns = patterns('dashboard.main.views', # Index (r'^$', redirect_to, {'url': '/ingest/'}), # Ingest ...
agpl-3.0
Python
48540b31d89e3e721e9606c3bcf65c62223fb593
Add missing whitespace in soc.logic.models.role module.
rhyolight/nupic.son,rhyolight/nupic.son,rhyolight/nupic.son
app/soc/logic/models/role.py
app/soc/logic/models/role.py
#!/usr/bin/python2.5 # # Copyright 2008 the Melange 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 applicable...
#!/usr/bin/python2.5 # # Copyright 2008 the Melange 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 applicable...
apache-2.0
Python
90ce07049f5b525c7f7ed6701d97c514b33b8ca5
Fix build and deploy when multiple devices
Icenium/appbuilder-sublime-package,Icenium/appbuilder-sublime-package
app_builder/devices_space.py
app_builder/devices_space.py
import json from .command_executor import show_quick_panel, run_command from .notifier import log_info, log_error def select_device(app_builder_command, on_device_selected): devices = [] add_device_if_not_empty = lambda device: device != None and devices.append(device) on_device_data_reveived = lambda de...
import json from .command_executor import show_quick_panel, run_command from .notifier import log_info, log_error def select_device(app_builder_command, on_device_selected): devices = [] add_device_if_not_empty = lambda device: device != None and devices.append(device) on_device_data_reveived = lambda de...
apache-2.0
Python
e996f33f3f50877f63291b6a5f19331f613583cb
Remove cache from datas
gustavofoa/pympm,gustavofoa/pympm,gustavofoa/pympm
apps/mpm/views/view_datas.py
apps/mpm/views/view_datas.py
from django.shortcuts import get_object_or_404, render from django.http import JsonResponse from datetime import date, timedelta from ..models import Data from django.views.decorators.cache import never_cache @never_cache def datas(request): retorno = {} for dt in Data.objects.filter(data__gt = (date.today()+...
from django.shortcuts import get_object_or_404, render from django.http import JsonResponse from datetime import date, timedelta from ..models import Data def datas(request): retorno = {} for dt in Data.objects.filter(data__gt = (date.today()+timedelta(days=-1, hours=-3))): retorno[dt.data.strftime("%...
apache-2.0
Python
76a32bf058583072100246c92970fdbda9a45106
Handle geojson feature without latlon
iandees/all-the-places,iandees/all-the-places,iandees/all-the-places
locations/pipelines.py
locations/pipelines.py
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html import json from scrapy.xlib.pydispatch import dispatcher from scrapy.exceptions import DropItem from scrapy import signals cl...
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html import json from scrapy.xlib.pydispatch import dispatcher from scrapy.exceptions import DropItem from scrapy import signals cl...
mit
Python
4d8f8ed0470e5bc97820bc6c1cdb788d203f042d
Update mqtt_sender.py
c2theg/srvBuilds,c2theg/srvBuilds,c2theg/srvBuilds,c2theg/srvBuilds
raspi/mqtt_sender.py
raspi/mqtt_sender.py
#!/usr/bin/python # -*- coding: utf-8 -*- # Original code from: https://tutorials-raspberrypi.com/raspberry-pi-mqtt-broker-client-wireless-communication/ # Christopher Gray - v0.0.1 - 6/19/2018 import paho.mqtt.publish as publish MQTT_SERVER = "192.168.1.10" MQTT_PATH = "test_channel" publish.single(MQTT_PATH, "He...
import paho.mqtt.publish as publish MQTT_SERVER = "192.168.1.10" MQTT_PATH = "test_channel" publish.single(MQTT_PATH, "Hello World!", hostname=MQTT_SERVER)
mit
Python
9d57049693b1d7c328d447a581f81c345ab9f857
Allow bootstrap history to consume a message.
natefoo/pulsar,natefoo/pulsar,galaxyproject/pulsar,galaxyproject/pulsar,ssorgatem/pulsar,ssorgatem/pulsar
bootstrap_history.py
bootstrap_history.py
#!/usr/bin/env python # Little script to make HISTORY.rst more easy to format properly, lots TODO # pull message down and embed, use arg parse, handle multiple, etc... import os import sys PROJECT_DIRECTORY = os.path.join(os.path.dirname(__file__)) PROJECT_URL="https://github.com/galaxyproject/pulsar" def main(argv)...
#!/usr/bin/env python # Little script to make HISTORY.rst more easy to format properly, lots TODO # pull message down and embed, use arg parse, handle multiple, etc... import os import sys PROJECT_DIRECTORY = os.path.join(os.path.dirname(__file__)) PROJECT_URL="https://github.com/galaxyproject/pulsar" def main(argv)...
apache-2.0
Python
2d60c68a2b908d6d01e2201421a1e6a08598c572
Combine convolutional and activation layer specs.
isaacanthony/tensorflow-playground,isaacanthony/tensorflow-playground
src/kaggle/iceberg/train.py
src/kaggle/iceberg/train.py
import numpy as np import pandas as pd import tensorflow.contrib.keras as keras # 1. Import data. PWD = 'kaggle/iceberg' df = pd.read_json("{}/train.json".format(PWD)) X0 = pd.DataFrame(df['inc_angle']) X1 = pd.DataFrame(df['band_1'].values.tolist()) X2 = pd.DataFrame(df['band_2'].values.tolist()) Y = pd.DataFrame...
import numpy as np import pandas as pd import tensorflow.contrib.keras as keras # 1. Import data. PWD = 'kaggle/iceberg' df = pd.read_json("{}/train.json".format(PWD)) X0 = pd.DataFrame(df['inc_angle']) X1 = pd.DataFrame(df['band_1'].values.tolist()) X2 = pd.DataFrame(df['band_2'].values.tolist()) Y = pd.DataFrame...
mit
Python
853a3f14c7d4341515e158a9ebc7da23c6828971
Make libunwind provider of unwind virtual pkg
mfherbst/spack,iulian787/spack,mfherbst/spack,krafczyk/spack,mfherbst/spack,krafczyk/spack,krafczyk/spack,iulian787/spack,LLNL/spack,mfherbst/spack,iulian787/spack,LLNL/spack,krafczyk/spack,krafczyk/spack,LLNL/spack,iulian787/spack,LLNL/spack,mfherbst/spack,iulian787/spack,LLNL/spack
var/spack/repos/builtin/packages/libunwind/package.py
var/spack/repos/builtin/packages/libunwind/package.py
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
Python
27731788979aeb0e4c75cc08cf42fa5d30701544
Add versions 3.1.6, 3.1.7 and 3.2.0 (#26527)
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack
var/spack/repos/builtin/packages/py-bcrypt/package.py
var/spack/repos/builtin/packages/py-bcrypt/package.py
# Copyright 2013-2021 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 PyBcrypt(PythonPackage): """Modern password hashing for your software and your servers""" ...
# Copyright 2013-2021 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 PyBcrypt(PythonPackage): """Modern password hashing for your software and your servers""" ...
lgpl-2.1
Python
69b816868337683a7dd90f24711e03c5eb982416
Use a sortable list instead of a dictionary of values for the return value
edelight/kitchen,edelight/kitchen,edelight/kitchen,edelight/kitchen
kitchen/lib/__init__.py
kitchen/lib/__init__.py
import os import json from kitchen.settings import KITCHEN_LOCATION def load_data(data_type): retval = [] nodes_dir = os.path.join(KITCHEN_LOCATION, data_type) if not os.path.isdir(nodes_dir): raise IOError('Invalid data type or kitchen location. Check your settings.') for filename in os.listd...
import os import json from kitchen.settings import KITCHEN_LOCATION def load_data(data_type): retval = {} nodes_dir = os.path.join(KITCHEN_LOCATION, data_type) if not os.path.isdir(nodes_dir): raise IOError('Invalid data type or kitchen location. Check your settings.') for filename in os.listd...
apache-2.0
Python
6d57e95f5b610da6ec181cb605cde42bcc04d956
Update forms.py
AndreMiras/NanoTTSaaS,AndreMiras/NanoTTSaaS,AndreMiras/NanoTTSaaS
forms.py
forms.py
from wtforms import Form, validators, TextAreaField, SelectField from libnanotts import NanoTts class NanoTtsForm(Form): text = TextAreaField( u'Text', [validators.InputRequired(), validators.length(max=200)], default=u"Nano T T S service.") voice = SelectField( choices=[(voice...
from wtforms import Form, TextAreaField, validators class NanoTtsForm(Form): text = TextAreaField( u'Text', [validators.InputRequired(), validators.length(max=200)], default=u"Nano T T S service.")
mit
Python