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
bab2605af3f4194bef31d13aa5888af1ac177e16
Update version 0.8.20 -> 0.8.21
dwavesystems/dimod,dwavesystems/dimod
dimod/package_info.py
dimod/package_info.py
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
Python
a8abd72eb1d3e0f15b1afae904d25f892b3599f6
Bump version 0.7.0.
junaruga/rpm-py-installer,junaruga/rpm-py-installer
rpm_py_installer/version.py
rpm_py_installer/version.py
"""Version string.""" # main = X.Y.Z # sub = .devN for pre-alpha releases VERSION = '0.7.0'
"""Version string.""" # main = X.Y.Z # sub = .devN for pre-alpha releases VERSION = '0.6.1'
mit
Python
a43dfeb755f05a14df89e5ebd240309275bd21d8
Add a stub method
chrisseto/dinosaurs.sexy,chrisseto/dinosaurs.sexy
dinosaurs/transaction/coin.py
dinosaurs/transaction/coin.py
import dogecoinrpc connection = dogecoinrpc.connect_to_local() def get_cost(): return 0 def generate_address(): return connection.getnewaddress() def check_balance(addr): return connection.getbalance(addr)
import dogecoinrpc connection = dogecoinrpc.connect_to_local() def generate_address(): return connection.getnewaddress() def check_balance(addr): return connection.getbalance(addr)
mit
Python
8c81f606499ebadddaf2a362bc8845eb69a21e8d
Stop exporting internal symbols from the shared libraries.
orthrus/librdkafka,klonikar/librdkafka,klonikar/librdkafka,senior7515/librdkafka,janmejay/librdkafka,senior7515/librdkafka,orthrus/librdkafka,klonikar/librdkafka,janmejay/librdkafka,orthrus/librdkafka,janmejay/librdkafka,senior7515/librdkafka,senior7515/librdkafka,klonikar/librdkafka,orthrus/librdkafka,janmejay/librdka...
lds-gen.py
lds-gen.py
#!/usr/bin/env python # # # Generate linker script to only expose symbols of the public API # import sys import re if __name__ == '__main__': funcs = list() last_line = '' for line in sys.stdin: m = re.match(r'^(\S+.*\s+\**)?(rd_kafka_\S+)\s*\(', line) if m: sym = m.group(2)...
#!/usr/bin/env python # # # Generate linker script to only expose symbols of the public API # import sys import re if __name__ == '__main__': funcs = list() last_line = '' for line in sys.stdin: m = re.match(r'^(\S+.*\s+\**)?(rd_kafka_\S+)\s*\(', line) if m: sym = m.group(2)...
bsd-2-clause
Python
0bb322eb27bdf0b0f494db28edb9a56e02ead523
Make corporation readonly on editing existing objects
nikdoof/test-auth
app/hr/admin.py
app/hr/admin.py
from django.contrib import admin from hr.models import Application, Recommendation, Audit, Blacklist, BlacklistSource, ApplicationConfig, TemplateMessage class ApplicationAdmin(admin.ModelAdmin): list_display = ('user', 'character', 'corporation', 'status', 'application_date', 'recommendations') search_fields ...
from django.contrib import admin from hr.models import Application, Recommendation, Audit, Blacklist, BlacklistSource, ApplicationConfig, TemplateMessage class ApplicationAdmin(admin.ModelAdmin): list_display = ('user', 'character', 'corporation', 'status', 'application_date', 'recommendations') search_fields ...
bsd-3-clause
Python
b07d74f99338165f8bb83ac0599452b021b96a8f
Add support for Django 1.10+
Mibou/django-boolean-sum
django_boolean_sum.py
django_boolean_sum.py
from django.conf import settings from django.db.models.aggregates import Sum class SQLSum(Sum): @property def sql_template(self): if settings.DATABASES['default']['ENGINE'] == \ 'django.db.backends.postgresql_psycopg2': return '%(function)s(%(field)s::int)' return '...
from django.conf import settings from django.db.models.aggregates import Sum from django.db.models.sql.aggregates import Sum as BaseSQLSum class SQLSum(BaseSQLSum): @property def sql_template(self): if settings.DATABASES['default']['ENGINE'] == \ 'django.db.backends.postgresql_psycopg2...
bsd-2-clause
Python
ef6ed051edff462ad31c77ed7d62f8adcba6671e
Allow .sed for Sed; #26
DMOJ/judge,DMOJ/judge,DMOJ/judge
dmoj/executors/SED.py
dmoj/executors/SED.py
from .base_executor import ScriptExecutor class Executor(ScriptExecutor): ext = '.sed' name = 'SED' command = 'sed' command_paths = ['sed'] test_program = '''s/.*/echo: Hello, World!/ q''' fs = ['/proc/filesystems$', '/+lib/charset.alias$'] syscalls = ['.*\.sed', 'statfs64', 'statfs'] ...
from .base_executor import ScriptExecutor class Executor(ScriptExecutor): ext = '.sed' name = 'SED' command = 'sed' command_paths = ['sed'] test_program = '''s/.*/echo: Hello, World!/ q''' fs = ['/proc/filesystems$', '/+lib/charset.alias$'] syscalls = ['statfs64', 'statfs'] def get_cm...
agpl-3.0
Python
fdf559007b9596e8d075d3de7f6e9f27e8a24ed6
Add district id to find_district response
gnmerritt/dailyrippl,gnmerritt/dailyrippl,gnmerritt/dailyrippl,gnmerritt/dailyrippl
rippl/legislature/api.py
rippl/legislature/api.py
from django.http import JsonResponse, HttpResponseBadRequest from legislature.sunlight.district import DistrictMatcher def find_district(request): try: latitude = request.GET['lat'] longitude = request.GET['lng'] except KeyError: return HttpResponseBadRequest('Need both "lat" and "lng...
from django.http import JsonResponse, HttpResponseBadRequest from legislature.sunlight.district import DistrictMatcher def find_district(request): try: latitude = request.GET['lat'] longitude = request.GET['lng'] except KeyError: return HttpResponseBadRequest('Need both "lat" and "lng...
mit
Python
c8068a60d4e0a2e4f3f272f5db19ced24fdd9b2a
Fix wrong import in collection
glumpy/glumpy,glumpy/glumpy,duyuan11/glumpy,duyuan11/glumpy
glumpy/graphics/collection/__init__.py
glumpy/graphics/collection/__init__.py
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2014, Nicolas P. Rougier. All rights reserved. # Distributed under the terms of the new BSD License. # ----------------------------------------------------------------------------- from . base_collect...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2014, Nicolas P. Rougier. All rights reserved. # Distributed under the terms of the new BSD License. # ----------------------------------------------------------------------------- from . base_collect...
bsd-3-clause
Python
10ec48b4b35ecbf2055f93a1c7e84da1fac7b1c8
Update synth script to include v1
dazuma/google-cloud-ruby,dazuma/google-cloud-ruby,googleapis/google-cloud-ruby,dazuma/google-cloud-ruby,dazuma/google-cloud-ruby,dazuma/google-cloud-ruby,googleapis/google-cloud-ruby,dazuma/google-cloud-ruby,googleapis/google-cloud-ruby,googleapis/google-cloud-ruby,googleapis/google-cloud-ruby,googleapis/google-cloud-r...
google-cloud-video-transcoder/synth.py
google-cloud-video-transcoder/synth.py
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
Python
110064a52e4888158a3ef7e8b1dfa797423c2f73
update version to 0.6.2
Widukind/widukind-web,Widukind/widukind-web,Widukind/widukind-web,Widukind/widukind-web
widukind_web/version.py
widukind_web/version.py
VERSION = (0, 6, 2) def version_str(): if len(VERSION) == 3: return "%s.%s.%s" % VERSION elif len(VERSION) == 4: return "%s.%s.%s-%s" % VERSION else: raise IndexError("Incorrect format for the VERSION tuple")
VERSION = (0, 6, 1) def version_str(): if len(VERSION) == 3: return "%s.%s.%s" % VERSION elif len(VERSION) == 4: return "%s.%s.%s-%s" % VERSION else: raise IndexError("Incorrect format for the VERSION tuple")
agpl-3.0
Python
43e30cdb021da5495a319e067e8fe3d465989694
Add short spec to test suite
pheanex/xpython,exercism/xpython,de2Zotjes/xpython,exercism/python,rootulp/xpython,mweb/python,mweb/python,smalley/python,pombredanne/xpython,pheanex/xpython,wobh/xpython,exercism/python,orozcoadrian/xpython,outkaj/xpython,orozcoadrian/xpython,jmluy/xpython,outkaj/xpython,smalley/python,oalbe/xpython,de2Zotjes/xpython,...
sum-of-multiples/sum_of_multiples_test.py
sum-of-multiples/sum_of_multiples_test.py
""" You can make the following assumptions about the inputs to the 'sum_of_multiples' function: * All input numbers are non-negative 'int's, i.e. natural numbers including zero. * If a list of factors is given, its elements are uniqe and sorted in ascending order. * If the 'factors' argument is ...
import unittest from sum_of_multiples import sum_of_multiples class SumOfMultiplesTest(unittest.TestCase): def test_sum_to_1(self): self.assertEqual(0, sum_of_multiples(1)) def test_sum_to_3(self): self.assertEqual(3, sum_of_multiples(4)) def test_sum_to_10(self): self.assertEqu...
mit
Python
4db9ca9ee1e92a4845ecfaed818342b06f99b077
Fix zoepass.csv format
DistributedSystemsGroup/zoe,DistributedSystemsGroup/zoe,DistributedSystemsGroup/zoe,DistributedSystemsGroup/zoe,DistributedSystemsGroup/zoe
zoe_api/auth/file.py
zoe_api/auth/file.py
# Copyright (c) 2016, Daniele Venzano # # 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 w...
# Copyright (c) 2016, Daniele Venzano # # 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 w...
apache-2.0
Python
10ec83a9b6c75b97825d4ad0ac2965d0f9a86423
Add a test to reproduce #1057
h5py/h5py,h5py/h5py,h5py/h5py
h5py/tests/hl/test_attribute_create.py
h5py/tests/hl/test_attribute_create.py
# This file is part of h5py, a Python interface to the HDF5 library. # # http://www.h5py.org # # Copyright 2008-2013 Andrew Collette and contributors # # License: Standard 3-clause BSD; see "license.txt" for full license terms # and contributor agreement. """ Tests the h5py.AttributeManager.create() met...
# This file is part of h5py, a Python interface to the HDF5 library. # # http://www.h5py.org # # Copyright 2008-2013 Andrew Collette and contributors # # License: Standard 3-clause BSD; see "license.txt" for full license terms # and contributor agreement. """ Tests the h5py.AttributeManager.create() met...
bsd-3-clause
Python
c67251e14d6e5542a340659752b460d3b49d18ee
increase radius
tapasweni-pathak/Help-The-Needy,tapasweni-pathak/Help-The-Needy,tapasweni-pathak/Help-The-Needy
help_the_needy/help_the_needy/views.py
help_the_needy/help_the_needy/views.py
from django.shortcuts import render_to_response from django.template import RequestContext from googleplaces import GooglePlaces YOUR_API_KEY = 'AIzaSyAFjxvqADQeN985mvQuQQWnKKSUclu4HpI' google_places = GooglePlaces(YOUR_API_KEY) def home(request): return render_to_response('index.html', context_instance=RequestCont...
from django.shortcuts import render_to_response from django.template import RequestContext from googleplaces import GooglePlaces YOUR_API_KEY = 'AIzaSyAFjxvqADQeN985mvQuQQWnKKSUclu4HpI' google_places = GooglePlaces(YOUR_API_KEY) def home(request): return render_to_response('index.html', context_instance=RequestCont...
mit
Python
3cbfdfcbc456cba60619db38d70f8f3cfe0697ec
revert from_id
buxx/synergine
synergine/synergy/object/SynergyObject.py
synergine/synergy/object/SynergyObject.py
from synergine.cst import COL_ALL from synergine.synergy.object.SynergyObjectInterface import SynergyObjectInterface from synergine.lib.eint import IncrementedNamedInt class SynergyObject(SynergyObjectInterface): """ :ivar _collection: Foo :ivar _cycle_frequency: Bar """ def __init__(self, collec...
from synergine.cst import COL_ALL from synergine.synergy.object.SynergyObjectInterface import SynergyObjectInterface from synergine.lib.eint import IncrementedNamedInt class SynergyObject(SynergyObjectInterface): """ :ivar _collection: Foo :ivar _cycle_frequency: Bar """ def __init__(self, collec...
apache-2.0
Python
1849a7ce4e706c8f81a6f3f5b01e0f16c3beb35d
Change to Unix line endings
sahg/SAHGutils
sahgutils/io/__init__.py
sahgutils/io/__init__.py
"""Provides convenience utilities for assorted data files. This package provides a means of organizing the code developed at UKZN for handling the dataflow and processing of information for the WRC funded research project K5-1683 "Soil Moisture from Space". The interface isn't stable yet so be prepared to update your...
"""Provides convenience utilities for assorted data files. This package provides a means of organizing the code developed at UKZN for handling the dataflow and processing of information for the WRC funded research project K5-1683 "Soil Moisture from Space". The interface isn't stable yet so be prepared to upda...
bsd-3-clause
Python
e1c6d1c00860e74994a326be91fcdfc53b9c22f2
Fix import in deploy command.
denmojo/pygrow,grow/grow,grow/pygrow,codedcolors/pygrow,grow/grow,grow/pygrow,denmojo/pygrow,grow/grow,vitorio/pygrow,grow/grow,denmojo/pygrow,denmojo/pygrow,grow/pygrow,vitorio/pygrow,codedcolors/pygrow,codedcolors/pygrow,vitorio/pygrow
grow/commands/deploy.py
grow/commands/deploy.py
from grow.common import utils from grow.deployments.stats import stats from grow.pods import pods from grow.pods import storage import click import os @click.command() @click.argument('pod_path', default='.') @click.argument('deployment_name', default='default') @click.option('--skip_confirm', default=False, help='Sk...
from grow.deployments.stats import stats from grow.pods import pods from grow.pods import storage import click import os @click.command() @click.argument('pod_path', default='.') @click.argument('deployment_name', default='default') @click.option('--skip_confirm', default=False, help='Skip confirm prior to deployment...
mit
Python
82c47244a22a46ea4d7133da99f72ce86f182286
Remove a dependency
Nimphal/KnowFashion,Nimphal/KnowFashion,Nimphal/KnowFashion
app/__init__.py
app/__init__.py
__author__ = 'nevelina' from flask import Flask, redirect, request, url_for from flask_wtf.csrf import CsrfProtect app = Flask(__name__) app.config.from_object('config') CsrfProtect(app) from app import views
__author__ = 'nevelina' from flask import Flask, redirect, request, url_for import flask.ext.uploads from flask_wtf.csrf import CsrfProtect app = Flask(__name__) app.config.from_object('config') CsrfProtect(app) from app import views
bsd-3-clause
Python
eaff795bddb0e07f4ad4e4c9277c5c0f6f199380
Add id tot he beacon event dataset
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/beacons/__init__.py
salt/beacons/__init__.py
# -*- coding: utf-8 -*- ''' This package contains the loader modules for the salt streams system ''' # Import salt libs import salt.loader class Beacon(object): ''' This class is used to eveluate and execute on the beacon system ''' def __init__(self, opts): self.opts = opts self.beaco...
# -*- coding: utf-8 -*- ''' This package contains the loader modules for the salt streams system ''' # Import salt libs import salt.loader class Beacon(object): ''' This class is used to eveluate and execute on the beacon system ''' def __init__(self, opts): self.opts = opts self.beaco...
apache-2.0
Python
c20f8f6dc8bc2fc3a9b583bd22fa0d3b3cefb8cd
increase version of django-wkhtmltopdf
halfnibble/django-wkhtmltopdf,denisbalyko/django-wkhtmltopdf,halfnibble/django-wkhtmltopdf,powderflask/django-wkhtmltopdf,tclancy/django-wkhtmltopdf,powderflask/django-wkhtmltopdf,denisbalyko/django-wkhtmltopdf,incuna/django-wkhtmltopdf,fankcoder/django-wkhtmltopdf,fankcoder/django-wkhtmltopdf,unrealsolver/django-wkhtm...
wkhtmltopdf/__init__.py
wkhtmltopdf/__init__.py
import os if 'DJANGO_SETTINGS_MODULE' in os.environ: from .utils import * __author__ = 'Incuna Ltd' __version__ = '1.2.3'
import os if 'DJANGO_SETTINGS_MODULE' in os.environ: from .utils import * __author__ = 'Incuna Ltd' __version__ = '1.2.2'
bsd-2-clause
Python
be1932a5c28758c490c5a33d170d86cc9414124d
add scatterplot for computed config
mkoledoye/mds_experiments,mkoledoye/mds_examples
samples/classical_mds.py
samples/classical_mds.py
from __future__ import print_function import operator import numpy as np from sklearn.metrics import euclidean_distances from sklearn import manifold import matplotlib.pyplot as plt #========================================================================================================== # classical multidimensiona...
from __future__ import print_function import operator import numpy as np from sklearn.metrics import euclidean_distances #========================================================================================================== # classical multidimensional scaling as described in https://en.wikipedia.org/wiki/Multid...
mit
Python
a987fe916952d0bf084a594c2a6ca3c8d9c1d9d2
Add reconfig func
kkstu/DNStack,kkstu/DNStack,kkstu/DNStack
handler/rndc_handler.py
handler/rndc_handler.py
#!/usr/bin/python # -*- coding:utf-8 -*- # Powered By KK Studio from BaseHandler import BaseHandler from tornado.web import authenticated as Auth from modules.rndc import rndc class RndcBase(BaseHandler): def rndc(self): ops = self.get_options() r = rndc(ops['rndc_host']['value'], ops['rndc_port...
#!/usr/bin/python # -*- coding:utf-8 -*- # Powered By KK Studio from BaseHandler import BaseHandler from tornado.web import authenticated as Auth from modules.rndc import rndc class RndcBase(BaseHandler): def rndc(self): ops = self.get_options() r = rndc(ops['rndc_host']['value'], ops['rndc_port...
mit
Python
5526ddb5110849507185baae7988be0dc53f66e2
Update __pkginfo__.py
rocky/pycolumnize,rocky/pycolumnize
__pkginfo__.py
__pkginfo__.py
"""packaging information""" # Things that change more often go here. copyright = ''' Copyright (C) 2008-2010, 2013, 2015 Rocky Bernstein <rocky@gnu.org>. ''' classifiers = ['Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: Py...
"""packaging information""" # Things that change more often go here. copyright = ''' Copyright (C) 2008-2010, 2013, 2015 Rocky Bernstein <rocky@gnu.org>. ''' classifiers = ['Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: Py...
mit
Python
f1ccb4074c7c843e6e70c5e59200e20787104e3f
Move to 9001
IQSS/gentb-site,IQSS/gentb-site,IQSS/gentb-site,IQSS/gentb-site,IQSS/gentb-site,IQSS/gentb-site,IQSS/gentb-site,IQSS/gentb-site
scripts/gunicorn_config.py
scripts/gunicorn_config.py
# # Copyright 2016, see LICENSE.txt for details. # # pylint: disable=invalid-name """ Gunicorn python script, starts wsgi service with settings. """ import os, sys from os.path import normpath, dirname, join # Make sure we always know where we are when running SCRIPT_DIR = dirname(normpath(join(os.getenv('PWD'), __fi...
# # Copyright 2016, see LICENSE.txt for details. # # pylint: disable=invalid-name """ Gunicorn python script, starts wsgi service with settings. """ import os, sys from os.path import normpath, dirname, join # Make sure we always know where we are when running SCRIPT_DIR = dirname(normpath(join(os.getenv('PWD'), __fi...
agpl-3.0
Python
c865508a6910e8831e20477f9610e0250e2db6a4
return role string instead of role object
cboling/xos,xmaruto/mcord,jermowery/xos,jermowery/xos,xmaruto/mcord,xmaruto/mcord,cboling/xos,cboling/xos,cboling/xos,jermowery/xos,xmaruto/mcord,jermowery/xos,cboling/xos
planetstack/core/xoslib/objects/sliceplus.py
planetstack/core/xoslib/objects/sliceplus.py
from core.models.slice import Slice from plus import PlusObjectMixin class SlicePlus(Slice, PlusObjectMixin): class Meta: proxy = True def getSliceInfo(self, user=None): used_sites = {} used_deployments = {} sliverCount = 0 for sliver in self.slivers.all(): ...
from core.models.slice import Slice from plus import PlusObjectMixin class SlicePlus(Slice, PlusObjectMixin): class Meta: proxy = True def getSliceInfo(self, user=None): used_sites = {} used_deployments = {} sliverCount = 0 for sliver in self.slivers.all(): ...
apache-2.0
Python
34923519e41b4d005a1945a92b83281125db5fc4
add option to only setup db
Clinical-Genomics/housekeeper,Clinical-Genomics/housekeeper
housekeeper/initiate.py
housekeeper/initiate.py
# -*- coding: utf-8 -*- import logging import click from path import path import yaml from housekeeper.store import get_manager, Metadata log = logging.getLogger(__name__) def setup(root_path, db_uri): """Setup a new structure and database.""" log.info("create the root directory: %s", root_path) abs_ro...
# -*- coding: utf-8 -*- import logging import click from path import path import yaml from housekeeper.store import get_manager, Metadata log = logging.getLogger(__name__) def setup(root_path, uri=None): """Setup a new structure and database.""" log.info("create the root directory: %s", root_path) abs_...
mit
Python
6b9b371eec6ab4ca1b52e5de2a1049367095faac
remove debugging print statement
liqd/adhocracy4,liqd/adhocracy4,liqd/adhocracy4,liqd/adhocracy4
adhocracy4/comments/templatetags/react_comments.py
adhocracy4/comments/templatetags/react_comments.py
import json from django import template, utils from django.contrib.contenttypes.models import ContentType from django.utils.safestring import mark_safe from ..models import Comment from ..serializers import ThreadSerializer register = template.Library() @register.simple_tag(takes_context=True) def react_comments(c...
import json from django import template, utils from django.contrib.contenttypes.models import ContentType from django.utils.safestring import mark_safe from ..models import Comment from ..serializers import ThreadSerializer register = template.Library() @register.simple_tag(takes_context=True) def react_comments(c...
agpl-3.0
Python
35916e45cd1f3be00563200e86a96404ba8afcbc
add tracebox to get.perfetto.dev
google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto
infra/perfetto-get.appspot.com/main.py
infra/perfetto-get.appspot.com/main.py
# Copyright (C) 2019 The Android Open Source Project # # 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 ...
# Copyright (C) 2019 The Android Open Source Project # # 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 ...
apache-2.0
Python
4ef326de3c165a5a95d27722f67a2059cb45c55f
fix wrong comodel name in many2many
ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo
addons/website_slides/models/slide_channel_tag.py
addons/website_slides/models/slide_channel_tag.py
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class SlideChannelTagGroup(models.Model): _name = 'slide.channel.tag.group' _description = 'Channel/Course tags' _inherit = 'website.published.mixin' _order = 'sequence a...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class SlideChannelTagGroup(models.Model): _name = 'slide.channel.tag.group' _description = 'Channel/Course tags' _inherit = 'website.published.mixin' _order = 'sequence a...
agpl-3.0
Python
20df12dd7faa8c84596ed1fc78b59da1e90f1f9f
use appropriate IP for my laptop 134.89.13.60 (not simply localhost), and also use a socket for sending and a (bound) socket for receiving the response. Tested OK with the CG services endpoint at WHOI.
ooici/coi-services,ooici/coi-services,ooici/coi-services,ooici/coi-services,ooici/coi-services
ion/agents/platform/cgsn/test/basic.py
ion/agents/platform/cgsn/test/basic.py
#!/usr/bin/env python """ @brief Basic test of messaging between my laptop (within MBARI network) and the 7370 box at WHOI set up my Michael Eder. With the CG services enpoint running, execute this test: bin/python ion/agents/platform/cgsn/test/basic.py @author Carlos Rueda """ __author__...
#!/usr/bin/env python """ @package @file @author Carlos Rueda @brief """ __author__ = 'Carlos Rueda' __license__ = 'Apache 2.0' from socket import * def client(): server_address = ('localhost', 2221) server_address = ('128.128.24.43', 2221) client_socket = socket(AF_INET, SOCK_DGRAM) cmd = "DCL...
bsd-2-clause
Python
0b2a779d18a779f9ee8722de21fa4d6f352c5d11
Make sure management commands works with Django 2
infoxchange/ixdjango
ixdjango/management/commands/deploy.py
ixdjango/management/commands/deploy.py
""" Management command to execute several deployment steps with a single command. More to save flux in the puppet manifest than any effort to reduce typing required. .. moduleauthor:: Infoxchange Development Team <development@infoxchange.net.au> """ from __future__ import (absolute_import, division, ...
""" Management command to execute several deployment steps with a single command. More to save flux in the puppet manifest than any effort to reduce typing required. .. moduleauthor:: Infoxchange Development Team <development@infoxchange.net.au> """ from __future__ import (absolute_import, division, ...
mit
Python
cee4257600eaf5d1245b671817b6243d78ad56ec
Revert import rebase
mbeacom/pysolr,mbeacom/pysolr
get-solr-download-url.py
get-solr-download-url.py
#!/usr/bin/env python # encoding: utf-8 from __future__ import absolute_import, print_function, unicode_literals import sys import requests # Try to import urljoin from the Python 3 reorganized stdlib first: try: from urllib.parse import urljoin except ImportError: from urlparse import urljoin if len(sys....
#!/usr/bin/env python # encoding: utf-8 from __future__ import absolute_import, print_function, unicode_literals import sys import requests # Try to import urllib from the Python 3 reorganized stdlib first: try: from urllib.parse import urljoin except ImportError: try: from urlparse.parse import url...
bsd-3-clause
Python
5148f961005e8e4ff8277fc592718e9e38a1d910
Clarify what is behind GPIO connection problems (#6204)
OpenTrons/opentrons-api,OpenTrons/opentrons-api,OpenTrons/opentrons-api,OpenTrons/opentrons-api,OpenTrons/opentrons_sdk,OpenTrons/opentrons-api,Opentrons/labware
api/src/opentrons/drivers/rpi_drivers/__init__.py
api/src/opentrons/drivers/rpi_drivers/__init__.py
import logging from typing import TYPE_CHECKING if TYPE_CHECKING: from .dev_types import GPIODriverLike MODULE_LOG = logging.getLogger(__name__) class RevisionPinsError(Exception): pass def build_gpio_chardev(chip_name: str) -> 'GPIODriverLike': try: from .gpio import GPIOCharDev retur...
import logging from typing import TYPE_CHECKING if TYPE_CHECKING: from .dev_types import GPIODriverLike MODULE_LOG = logging.getLogger(__name__) class RevisionPinsError(Exception): pass def build_gpio_chardev(chip_name: str) -> 'GPIODriverLike': try: from .gpio import GPIOCharDev retur...
apache-2.0
Python
bbe325e26de19e54e92b5d94b03361c78a96a7ef
Update passwd command up to Django>=1.8
linuxmaniac/django-extensions,django-extensions/django-extensions,kevgathuku/django-extensions,django-extensions/django-extensions,haakenlid/django-extensions,linuxmaniac/django-extensions,linuxmaniac/django-extensions,django-extensions/django-extensions,haakenlid/django-extensions,kevgathuku/django-extensions,haakenli...
django_extensions/management/commands/passwd.py
django_extensions/management/commands/passwd.py
# -*- coding: utf-8 -*- import getpass from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand, CommandError from django_extensions.management.utils import signalcommand class Command(BaseCommand): help = "Clone of the UNIX program ``passwd'', for django.contrib.auth."...
# -*- coding: utf-8 -*- import getpass from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand, CommandError from django_extensions.management.utils import signalcommand class Command(BaseCommand): help = "Clone of the UNIX program ``passwd'', for django.contrib.auth."...
mit
Python
61e3772ee56e8b35aac8b0fe09d869b55a8cadb2
Fix date/time stamp
gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x,thelonious/g2x,thelonious/g2x
scratchpad/sqlite-logger.py
scratchpad/sqlite-logger.py
#!/usr/bin/env python3 from sense_hat import SenseHat import sqlite3 import time sense = SenseHat() sense.clear() dbfile = "test.db" create_table = True try: with open(dbfile): create_table = False except IOError: pass connection = sqlite3.connect(dbfile) if create_table: cursor = connection.c...
#!/usr/bin/env python3 from sense_hat import SenseHat import sqlite3 import datetime sense = SenseHat() sense.clear() dbfile = "test.db" create_table = True try: with open(dbfile): create_table = False except IOError: pass connection = sqlite3.connect(dbfile) if create_table: cursor = connecti...
mit
Python
06c649bf43dae09c7fa66de9334ea44278cae877
Make sure a value is set for every code path to make linter happy
m-ober/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps
scripts/search_snippets.py
scripts/search_snippets.py
#!/usr/bin/env python """Search in (the latest versions of) snippets. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import click from byceps.services.snippet import service as snippet_service from byceps.services.snippet.transfer.models import Scope from byceps.util...
#!/usr/bin/env python """Search in (the latest versions of) snippets. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import click from byceps.services.snippet import service as snippet_service from byceps.services.snippet.transfer.models import Scope from byceps.util...
bsd-3-clause
Python
50e8a4b01341840fabb324a17e8aee2c119798af
Remove unused method
getsentry/freight,rshk/freight,klynton/freight,klynton/freight,rshk/freight,jkimbo/freight,klynton/freight,jkimbo/freight,rshk/freight,getsentry/freight,getsentry/freight,jkimbo/freight,rshk/freight,jkimbo/freight,getsentry/freight,klynton/freight,getsentry/freight
ds/notifiers/slack.py
ds/notifiers/slack.py
from __future__ import absolute_import, unicode_literals __all__ = ['SlackNotifier'] import json import requests from ds.models import App, TaskStatus from .base import Notifier, NotifierEvent class SlackNotifier(Notifier): def get_options(self): return { 'webhook_url': {'required': True},...
from __future__ import absolute_import, unicode_literals __all__ = ['SlackNotifier'] import json import requests from ds.models import App, TaskStatus from .base import Notifier, NotifierEvent class SlackNotifier(Notifier): def get_options(self): return { 'webhook_url': {'required': True},...
apache-2.0
Python
b8a2e97ad78e8993cca2828b3fd68dc0e17da25b
Remove identified by index.
KarlGong/easyium,KarlGong/easyium-python
easyium/identifier.py
easyium/identifier.py
__author__ = 'karl.gong' class Identifier: @staticmethod def id(element): return "id=" + element.get_attribute("id") @staticmethod def class_name(element): return "class=" + element.get_attribute("class") @staticmethod def name(element): return "name=" + element.get_a...
__author__ = 'karl.gong' class Identifier: @staticmethod def id(element): return "id=" + element.get_attribute("id") @staticmethod def class_name(element): return "class=" + element.get_attribute("class") @staticmethod def name(element): return "name=" + element.get_a...
apache-2.0
Python
967da7208f3d7c6208d3d8066e9f21db12a5ef27
Fix path
apache/cloudstack-ec2stack,terbolous/cloudstack-ec2stack,terbolous/cloudstack-ec2stack,apache/cloudstack-ec2stack
ec2stack/configure.py
ec2stack/configure.py
#!/usr/bin/env python # encoding: utf-8 import os from alembic import command from alembic.config import Config as AlembicConfig def main(): config_folder = _create_config_folder() _create_config_file(config_folder) _create_database() def _create_config_folder(): config_folder = os.path.join(os.pa...
#!/usr/bin/env python # encoding: utf-8 import os from alembic import command from alembic.config import Config as AlembicConfig def main(): config_folder = _create_config_folder() _create_config_file(config_folder) _create_database() def _create_config_folder(): config_folder = os.path.join(os.pa...
apache-2.0
Python
8a59846089b00b623cc07b4f9433477e03eae732
Make permission class load the proper data so it actually works
emetsger/osf.io,kch8qx/osf.io,samchrisinger/osf.io,lyndsysimon/osf.io,chrisseto/osf.io,mluke93/osf.io,petermalcolm/osf.io,petermalcolm/osf.io,sbt9uc/osf.io,brianjgeiger/osf.io,aaxelb/osf.io,jinluyuan/osf.io,danielneis/osf.io,jnayak1/osf.io,wearpants/osf.io,caseyrygt/osf.io,doublebits/osf.io,TomBaxter/osf.io,cwisecarver...
api/nodes/permissions.py
api/nodes/permissions.py
from website.models import Node, Pointer from rest_framework import permissions from framework.auth import Auth def get_user_auth(request): user = request.user if user.is_anonymous(): auth = Auth(None) else: auth = Auth(user) return auth class ContributorOrPublic(permissions.BasePermi...
from website.models import Node, Pointer from rest_framework import permissions from framework.auth import Auth def get_user_auth(request): user = request.user if user.is_anonymous(): auth = Auth(None) else: auth = Auth(user) return auth class ContributorOrPublic(permissions.BasePermi...
apache-2.0
Python
663934150ad53c9581d4b19d4574685650f6c062
Tidy run_tasks.py
takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web
takeyourmeds/reminder/management/commands/run_tasks.py
takeyourmeds/reminder/management/commands/run_tasks.py
from django.core.management.base import BaseCommand from ..models import ReminderTime class Command(BaseCommand): def handle(self, **options): for reminder_time in ReminderTime.objects.all(): if reminder_time.should_run(): reminder_time.run()
from django.core.management.base import BaseCommand from ..models import Reminder, ReminderTime class Command(BaseCommand): def handle(self, **options): for reminder_time in ReminderTime.objects.all(): if reminder_time.should_run(): reminder_time.run()
mit
Python
3dd96a5f0cd41e87b7400dc0328e8b277ba1f777
migrate wxarchive upload to Google from box
akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem
scripts/util/i5_2_cybox.py
scripts/util/i5_2_cybox.py
"""Move i5 analysis to staging for upload to Google Drive. Run from RUN_MIDNIGHT.sh """ import os import subprocess import datetime import glob import sys from pyiem.util import logger LOG = logger() REMOTEUSER = "mesonet@metl60.agron.iastate.edu" def call(cmd): """Our custom caller.""" LOG.debug(cmd) ...
"""Upload i5 analysis to CyBox""" import os import datetime import glob import logging import sys from pyiem.ftpsession import send2box def main(argv): """Go Main!""" if len(argv) > 1 and argv[1] == "debug": logger = logging.getLogger() logger.setLevel(logging.DEBUG) logging.debug("Se...
mit
Python
710eccb4068f9f2c9750a90d4a443905fb2035a0
Fix handling of unused options
DavadDi/actor-framework,actor-framework/actor-framework,actor-framework/actor-framework,DavadDi/actor-framework,DavadDi/actor-framework,actor-framework/actor-framework,DavadDi/actor-framework,actor-framework/actor-framework
scripts/indent_trace_log.py
scripts/indent_trace_log.py
#!/usr/bin/env python # Indents a CAF log with trace verbosity. The script does *not* deal with a log # with multiple threads. # usage (read file): indent_trace_log.py FILENAME # (read stdin): indent_trace_log.py - import argparse, sys, os, fileinput, re def is_entry(line): return 'TRACE' in line and 'ENTR...
#!/usr/bin/env python # Indents a CAF log with trace verbosity. The script does *not* deal with a log # with multiple threads. # usage (read file): indent_trace_log.py FILENAME # (read stdin): indent_trace_log.py - import argparse, sys, os, fileinput, re def is_entry(line): return 'TRACE' in line and 'ENTR...
bsd-3-clause
Python
21fc2408caf158986eead39e9b423491585056fa
Add KE-complex_modifications specific format check
pqrs-org/KE-complex_modifications,pqrs-org/KE-complex_modifications,pqrs-org/KE-complex_modifications,pqrs-org/KE-complex_modifications,pqrs-org/KE-complex_modifications,pqrs-org/KE-complex_modifications
scripts/lint-public-json.py
scripts/lint-public-json.py
#!/usr/bin/python3 import glob import json import os import re import subprocess import sys publicJsonDirectory = sys.argv[1] if len(sys.argv) > 1 else "" if not os.path.isdir(publicJsonDirectory): print('public/json is not found') sys.exit(1) # # Check files # filePaths = glob.glob("{}/*".format(publicJson...
#!/usr/bin/python3 import glob import json import os import re import subprocess import sys publicJsonDirectory = sys.argv[1] if len(sys.argv) > 1 else "" if not os.path.isdir(publicJsonDirectory): print('public/json is not found') sys.exit(1) # # Check files # filePaths = glob.glob("{}/*".format(publicJson...
unlicense
Python
fccc3cbaedfd8809a69e923f302f2396c29fffe7
Update imagecodecs/__main__.py
cgohlke/imagecodecs,cgohlke/imagecodecs,cgohlke/imagecodecs
imagecodecs/__main__.py
imagecodecs/__main__.py
# imagecodecs/__main__.py # Copyright (c) 2019-2022, Christoph Gohlke # This source code is distributed under the BSD 3-Clause license. """Imagecodecs package command line script.""" import sys from matplotlib.pyplot import show from tifffile import imshow, askopenfilename, Timer from .imagecodecs import imread ...
# imagecodecs/__main__.py # Copyright (c) 2019-2021, Christoph Gohlke # This source code is distributed under the BSD 3-Clause license. """Imagecodecs package command line script.""" import sys from matplotlib.pyplot import show from tifffile import imshow, askopenfilename, Timer from .imagecodecs import imread ...
bsd-3-clause
Python
6fe2dd8a56a727050df9ed18655ec73a1ae5ab6b
Use persistent names for config files (#4)
djenriquez/sherpa
src/acl.py
src/acl.py
import logging import os import random import json import string import re from jinja2 import Template CONST_CONFIG_FILENAME_SIZE = 6 class ACL: def __init__(self, mode): with open('/opt/sherpa/config.json', 'r') as conf, open('/opt/sherpa/templates/nginx-acl.tmpl.conf', 'r') as template: ...
import logging import os import random import json import string import re from jinja2 import Template CONST_CONFIG_FILENAME_SIZE = 6 class ACL: def __init__(self, mode): with open('/opt/sherpa/config.json', 'r') as conf, open('/opt/sherpa/templates/nginx-acl.tmpl.conf', 'r') as template: ...
mit
Python
fcc7d55229b7d2e1d88bbf45eccd881849196335
Fix a typo
RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline
luigi/tasks/release/load_sequences.py
luigi/tasks/release/load_sequences.py
# -*- coding: utf-8 -*- """ Copyright [2009-2017] EMBL-European Bioinformatics Institute 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...
# -*- coding: utf-8 -*- """ Copyright [2009-2017] EMBL-European Bioinformatics Institute 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
ec69aed8cb7747e60a2f87ed7fe8f122a20d9233
change to full hour of data
cbyn/bitpredict,cbyn/bitpredict,cbyn/bitpredict,cbyn/bitmicro,cbyn/bitmicro,cbyn/bitmicro
app/signal_chart.py
app/signal_chart.py
import pandas as pd import pymongo from bokeh.plotting import cursession, figure, show, output_server import time client = pymongo.MongoClient() db = client['bitmicro'] predictions = db['btc_predictions'] cursor = predictions.find().limit(60*60).sort('_id', pymongo.DESCENDING) data = pd.DataFrame(list(cursor)) data =...
import pandas as pd import pymongo from bokeh.plotting import cursession, figure, show, output_server import time client = pymongo.MongoClient() db = client['bitmicro'] predictions = db['btc_predictions'] cursor = predictions.find().limit(60*10).sort('_id', pymongo.DESCENDING) data = pd.DataFrame(list(cursor)) data =...
mit
Python
485019c2c0a30aac783ec15b478737266a769bb9
use slug field for search query slug
350dotorg/akcrm,350dotorg/akcrm
search/models.py
search/models.py
from akcrm.actionkit.models import CoreUser from collections import namedtuple from django.db import models from django.contrib.auth.models import User class SearchField(models.Model): category = models.CharField(max_length=500) name = models.CharField(max_length=200) display_name = models.CharField(max_l...
from akcrm.actionkit.models import CoreUser from collections import namedtuple from django.db import models from django.contrib.auth.models import User class SearchField(models.Model): category = models.CharField(max_length=500) name = models.CharField(max_length=200) display_name = models.CharField(max_l...
bsd-3-clause
Python
d6edcf50e4a20e6fcf9262f3eed3fd161c21dd39
Update config.py
yashaka/selene,SergeyPirogov/selene,yashaka/selene,SergeyPirogov/selene,yashaka/selene,SergeyPirogov/selene,yashaka/selene,SergeyPirogov/selene,SergeyPirogov/selene
selene/config.py
selene/config.py
# todo: make the properties also "object oriented" to support different configs per different SeleneDriver instances from selene.browsers import Browser timeout = 4 poll_during_waits = 0.1 app_host = '' # todo: make cashing work (currently will not work...) cash_elements = False """To cash all elements after first su...
# todo: make the properties also "object oriented" to support different configs per different SeleneDriver instances from selene.browsers import Browser timeout = 4 poll_during_waits = 0.1 app_host = '' # todo: make cashing work (currently will not work...) cash_elements = False """To cash all elements after first su...
mit
Python
877d1e6751ecb8df26e51e48477853ee6947a80c
Update sht20.py
jeonghoonkang/BerePi,jeonghoonkang/BerePi,jeonghoonkang/BerePi,jeonghoonkang/BerePi,jeonghoonkang/BerePi,jeonghoonkang/BerePi,jeonghoonkang/BerePi
apps/sht20/sht20.py
apps/sht20/sht20.py
# Author : Philman Jeong (ipmstyle@gmail.com) import smbus import time SHT20_ADDR = 0x40 # SHT20 register address #SHT20_CMD_R_T = 0xE3 # hold Master Mode (Temperature) #SHT20_CMD_R_RH = 0xE5 # hold Master Mode (Humidity) SHT20_CMD_R_T = 0xF3 # no hold Master Mode (Temperature) SHT20_CMD_R_RH = 0xF5 # ...
import smbus import time SHT20_ADDR = 0x40 # SHT20 register address #SHT20_CMD_R_T = 0xE3 # hold Master Mode (Temperature) #SHT20_CMD_R_RH = 0xE5 # hold Master Mode (Humidity) SHT20_CMD_R_T = 0xF3 # no hold Master Mode (Temperature) SHT20_CMD_R_RH = 0xF5 # no hold Master Mode (Humidity) #SHT20_WRITE_REG ...
bsd-2-clause
Python
46e372cc2345a9773abefa943cb03d733b3ffd44
change logging
sahlinet/httptest,sahlinet/httptest,sahlinet/httptest,sahlinet/httptest
app/schedule.py
app/schedule.py
def func(self): import requests import json import utils tests = self.datastore.filter("schedule", "yes") import time time.sleep(0.2) results = [] self.info(self.rid, "Starting for %s tests" % len(tests)) for test in tests: try: failure_count_before = test.dat...
def func(self): import requests import json import utils tests = self.datastore.filter("schedule", "yes") results = [] for test in tests: try: failure_count_before = test.data['runs'][-1]['total']['failures'] + test.data['runs'][-1]['total']['errors'] r = request...
mit
Python
5c80ae7742e2900e0d43311fa9ed7d2aeef62db4
Remove unused import
Alignak-monitoring-contrib/alignak-app,Alignak-monitoring-contrib/alignak-app
etc/bin/alignakapp.py
etc/bin/alignakapp.py
#!/usr/bin/env python # -*- codinf: utf-8 -*- # Copyright (c) 2015-2016: # Matthieu Estrada, ttamalfor@gmail.com # # This file is part of (AlignakApp). # # (AlignakApp) 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 Sof...
#!/usr/bin/env python # -*- codinf: utf-8 -*- # Copyright (c) 2015-2016: # Matthieu Estrada, ttamalfor@gmail.com # # This file is part of (AlignakApp). # # (AlignakApp) 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 Sof...
agpl-3.0
Python
7dcdbd7a779502698bb4cd3d3134d3f200d68091
make version consistent with graphene@next
ekampf/graphene-gae,graphql-python/graphene-gae
graphene_gae/__init__.py
graphene_gae/__init__.py
# -*- coding: utf-8 -*- from .ndb.types import ( NdbObjectType ) from .ndb.fields import ( NdbConnectionField, ) __author__ = 'Eran Kampf' __version__ = '1.0.dev' __all__ = [ NdbObjectType, NdbConnectionField, ]
# -*- coding: utf-8 -*- from .ndb.types import ( NdbObjectType ) from .ndb.fields import ( NdbConnectionField, ) __author__ = 'Eran Kampf' __version__ = '1.0-dev' __all__ = [ NdbObjectType, NdbConnectionField, ]
bsd-3-clause
Python
6876137c5bf8bf117d1a8675e8b0748b141b0c06
fix in print format
indictranstech/frappe-digitales,saurabh6790/med_new_lib,reachalpineswift/frappe-bench,saurabh6790/omnit-lib,vjFaLk/frappe,saurabh6790/pow-lib,gangadhar-kadam/smrterpfrappe,gangadharkadam/frappecontribution,indictranstech/phr-frappe,indictranstech/fbd_frappe,saurabh6790/tru_lib_back,rohitw1991/smarttailorfrappe,paurosel...
py/core/doctype/print_format/print_format.py
py/core/doctype/print_format/print_format.py
# Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com) # # MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without lim...
# Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com) # # MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without lim...
mit
Python
309439f65bb668aba85a31a46b2633a46ee55777
Revert "Change careeropportunity migration dep"
dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4
apps/careeropportunity/migrations/0001_initial.py
apps/careeropportunity/migrations/0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('companyprofile', '0001_initial'), ] operations = [ migrations.CreateModel( name='CareerOpportunity', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('companyprofile', '0001_squashed_0003_company_image'), ] operations = [ migrations.CreateModel( name='CareerOppor...
mit
Python
1acefceb83cdb62105d0a45d67caf85f852c9fb5
Fix bcrypt callback wrapper:
ludovicchabant/Wikked,ludovicchabant/Wikked,ludovicchabant/Wikked
wikked/bcryptfallback.py
wikked/bcryptfallback.py
import logging logger = logging.getLogger(__name__) try: from flask.ext.bcrypt import Bcrypt, generate_password_hash except ImportError: logger.warning("Bcrypt not available... falling back to SHA512.") logger.warning("Run `pip install Flask-Bcrypt` for more secure " "password hashing."...
import logging logger = logging.getLogger(__name__) try: from flaskext.bcrypt import Bcrypt, generate_password_hash except ImportError: logger.warning("Bcrypt not available... falling back to SHA512.") logger.warning("Run `pip install Flask-Bcrypt` for more secure password hashing.") import hashlib ...
apache-2.0
Python
a623b78febe56d39a1a42a43c219a48afc720811
Remove final line.
salopensource/sal,salopensource/sal,salopensource/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal,sheagcraig/sal,sheagcraig/sal
api/v2/tests/test_api.py
api/v2/tests/test_api.py
"""General functional tests for the API endpoints.""" from django.contrib.auth import get_user_model from django.urls import reverse from rest_framework import status from rest_framework.test import APITestCase, APIClient from api.v2.tests.tools import SalAPITestCase from server.models import UserProfile class AP...
"""General functional tests for the API endpoints.""" from django.contrib.auth import get_user_model from django.urls import reverse from rest_framework import status from rest_framework.test import APITestCase, APIClient from api.v2.tests.tools import SalAPITestCase from server.models import UserProfile class AP...
apache-2.0
Python
437623aee55fd68683126bd6852df52379837eaa
Print both output + error for bash command
ktuan89/sublimeplugins
bash_command.py
bash_command.py
import sublime, sublime_plugin import os from .common.utils import run_bash_for_output from .common.utils import git_path_for_window last_command = "" class RunBash(sublime_plugin.WindowCommand): def run(self): global last_command window = self.window view = window.active_view() i...
import sublime, sublime_plugin import os from .common.utils import run_bash_for_output from .common.utils import git_path_for_window last_command = "" class RunBash(sublime_plugin.WindowCommand): def run(self): global last_command window = self.window view = window.active_view() i...
mit
Python
217373579035436c1dc0f7050e4bf22fe380008d
document the events; handle empty PKDict which is Falsey
radiasoft/sirepo,radiasoft/sirepo,mkeilman/sirepo,mkeilman/sirepo,radiasoft/sirepo,radiasoft/sirepo,radiasoft/sirepo,mkeilman/sirepo,mkeilman/sirepo
sirepo/events.py
sirepo/events.py
# -*- coding: utf-8 -*- u"""Reigster callbacks for events and call callbacks when events are emitted. Using events allows disparate areas of the code base to perform some task on an event without muddling the code that triggered the event. In addition events can be registered by configuration. This allows areas of the...
# -*- coding: utf-8 -*- u"""Reigster callbacks for events and call callbacks when events are emitted. Using events allows disparate areas of the code base to perform some task on an event without muddling the code that triggered the event. In addition events can be registered by configuration. This allows areas of the...
apache-2.0
Python
dc0c23bb9125ea8730a3364f19158b37d768ab44
Increase date limit of project valid data
CompassionCH/compassion-switzerland,eicher31/compassion-switzerland,CompassionCH/compassion-switzerland,eicher31/compassion-switzerland,eicher31/compassion-switzerland,CompassionCH/compassion-switzerland
report_compassion/models/report_childpack.py
report_compassion/models/report_childpack.py
############################################################################## # # Copyright (C) 2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py # #####################...
############################################################################## # # Copyright (C) 2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py # #####################...
agpl-3.0
Python
51090583ca1d705d8f5a4a1f3ad169873a5e239c
Use correct key name for queue-size parameter
unixsurfer/haproxystats,unixsurfer/haproxystats,unixsurfer/haproxystats
haproxystats/__init__.py
haproxystats/__init__.py
# -*- coding: utf-8 -*- # vim:fenc=utf-8 # """ A collection of Python tools to process HAProxy statistics. """ __title__ = 'haproxystats' __author__ = 'Pavlos Parissis' __license__ = 'Apache 2.0' __version__ = '0.3.0' __copyright__ = 'Copyright 2016 Pavlos Parissis <pavlos.parissis@gmail.com' DEFAULT_OPTIONS = { '...
# -*- coding: utf-8 -*- # vim:fenc=utf-8 # """ A collection of Python tools to process HAProxy statistics. """ __title__ = 'haproxystats' __author__ = 'Pavlos Parissis' __license__ = 'Apache 2.0' __version__ = '0.3.0' __copyright__ = 'Copyright 2016 Pavlos Parissis <pavlos.parissis@gmail.com' DEFAULT_OPTIONS = { '...
apache-2.0
Python
db59922c95100db9487de2f895747cd5824b3e69
Add suport to composed dataset names
jdmmiranda307/dataviva-api,DataViva/dataviva-api,daniel1409/dataviva-api
app/apis/datasets_api.py
app/apis/datasets_api.py
from flask import Blueprint, jsonify, request from sqlalchemy import func, distinct from importlib import import_module from inflection import singularize from app import cache from app.helpers.cache_helper import api_cache_key blueprint = Blueprint('api', __name__, url_prefix='/') @blueprint.route('<dataset...
from flask import Blueprint, jsonify, request from sqlalchemy import func, distinct from importlib import import_module from inflection import singularize from app import cache from app.helpers.cache_helper import api_cache_key blueprint = Blueprint('api', __name__, url_prefix='/') @blueprint.route('<dataset...
mit
Python
3b6d3db7769edda8b098c4cb746705a7618af582
fix test, check for log dir before removing
project-fondue/python-yql,project-fondue/python-yql
yql/tests/test_logger.py
yql/tests/test_logger.py
import os import shutil from unittest import TestCase import yql.logger class LoggerTest(TestCase): def setUp(self): self._logging = os.environ.get('YQL_LOGGING', '') def tearDown(self): os.environ['YQL_LOGGING'] = self._logging def test_is_instantiated_even_if_log_dir_doesnt_exist(self...
import os import shutil from unittest import TestCase import yql.logger class LoggerTest(TestCase): def setUp(self): self._logging = os.environ.get('YQL_LOGGING', '') def tearDown(self): os.environ['YQL_LOGGING'] = self._logging def test_is_instantiated_even_if_log_dir_doesnt_exist(self...
bsd-3-clause
Python
fef7ae79e845ed806e9909acd0627bc1741aa3bf
Fix parse rule for IndexedAccess
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
thinglang/parser/values/indexed_access.py
thinglang/parser/values/indexed_access.py
from thinglang.compiler.buffer import CompilationBuffer from thinglang.lexer.tokens.access import LexicalAccess from thinglang.lexer.values.identifier import Identifier from thinglang.parser.definitions.argument_list import ArgumentList from thinglang.parser.errors import InvalidIndexedAccess from thinglang.parser.node...
from thinglang.compiler.buffer import CompilationBuffer from thinglang.lexer.tokens.access import LexicalAccess from thinglang.lexer.values.identifier import Identifier from thinglang.parser.definitions.argument_list import ArgumentList from thinglang.parser.errors import InvalidIndexedAccess from thinglang.parser.node...
mit
Python
f070883acc64699c1673f1c1e3f81029f6dea4c2
Update ptvsd package metadata for 2.1 beta.
crwilcox/PTVS,bolabola/PTVS,modulexcite/PTVS,modulexcite/PTVS,juanyaw/PTVS,xNUTs/PTVS,denfromufa/PTVS,DEVSENSE/PTVS,modulexcite/PTVS,bolabola/PTVS,int19h/PTVS,fjxhkj/PTVS,msunardi/PTVS,DEVSENSE/PTVS,mlorbetske/PTVS,MetSystem/PTVS,huguesv/PTVS,christer155/PTVS,xNUTs/PTVS,gomiero/PTVS,christer155/PTVS,fivejjs/PTVS,MetSys...
Python/Product/PythonTools/ptvsd/setup.py
Python/Product/PythonTools/ptvsd/setup.py
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft. 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 ...
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft. 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 ...
apache-2.0
Python
1e7edca9b4913751964e9fec230414688694ea82
change import loc
neurodata/ndmg
mrcap/utils/check_fibers.py
mrcap/utils/check_fibers.py
#!/usr/bin/python # check_fibers.py # Created by Disa Mhembere on 2014-01-27. # Email: disa@jhu.edu # Copyright (c) 2014. All rights reserved. import argparse from computation.utils.file_util import loadAnyMat import scipy.io as sio import numpy as np from mrcap.zindex import MortonXYZ import os from glob import glob...
#!/usr/bin/python # check_fibers.py # Created by Disa Mhembere on 2014-01-27. # Email: disa@jhu.edu # Copyright (c) 2014. All rights reserved. import argparse from computation.utils.loadAdjMatrix import loadAnyMat import scipy.io as sio import numpy as np from mrcap.zindex import MortonXYZ import os from glob import ...
apache-2.0
Python
bf33b6bb40728873e8bedc15a686b5e8553a2046
Fix syntax error in shelf/__init__.py
danbradham/mtoatools
mtoatools/shelf/__init__.py
mtoatools/shelf/__init__.py
import os from maya import mel, cmds from PySide import QtGui from functools import partial this_package = os.path.abspath(os.path.dirname(__file__)) shelf_path = partial(os.path.join, this_package) buttons = { 'mattes': { 'command': ( 'import mtoatools\n' 'mtoatools.show_matte_aov...
import os from maya import mel, cmds from PySide import QtGui from functools import partial this_package = os.path.abspath(os.path.dirname(__file__)) shelf_path = partial(os.path.join, this_package) buttons = { 'mattes': { 'command': ( 'import mtoatools\n' 'mtoatools.show_matte_aov...
mit
Python
06a0fe9d942182327d650edcf5e2f9d6f6bbab2c
remove libintl link (#18065)
LLNL/spack,iulian787/spack,iulian787/spack,LLNL/spack,LLNL/spack,iulian787/spack,iulian787/spack,LLNL/spack,iulian787/spack,LLNL/spack
var/spack/repos/builtin/packages/util-linux/package.py
var/spack/repos/builtin/packages/util-linux/package.py
# Copyright 2013-2020 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 UtilLinux(AutotoolsPackage): """Util-linux is a suite of essential utilities for any Linux...
# Copyright 2013-2020 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 UtilLinux(AutotoolsPackage): """Util-linux is a suite of essential utilities for any Linux...
lgpl-2.1
Python
852d249ea9f2338bf872946f87f13bd11530d9c6
Bump app version number.
kernelci/kernelci-backend,kernelci/kernelci-backend
app/handlers/__init__.py
app/handlers/__init__.py
__version__ = "2015.7" __versionfull__ = __version__
__version__ = "2015.6.3" __versionfull__ = __version__
lgpl-2.1
Python
6a0c619d743d57a1ff1684144c148c9b8cc9a0be
Reimplement day 10 using itertools combine.
bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adv...
day-10/solution.py
day-10/solution.py
import itertools def lookandsay(line): return ''.join([str(len(list(it))) + c for c, it in itertools.groupby(line)]) line = "1321131112" for x in range(40): line = lookandsay(line) print "40:", len(line) for x in range(10): line = lookandsay(line) print "50:", len(line)
def lookandsay(line): p = None n = 0 result = [] for c in line: if n > 0 and p is not c: result.append(str(n)) result.append(p) n = 0 p = c n += 1 result.append(str(n)) result.append(p) return ''.join(result) line = "1321131112...
mit
Python
d6f3e59bf90b5734e2247cbd35bd5958c543ba3e
Update import-users.py
Nik0l/UTemPro,Nik0l/UTemPro
db/import-users.py
db/import-users.py
# import xml into sqlite3 database # a part of the code is taken from: http://www.cs.berkeley.edu/~bjoern/projects/stackoverflow/
# import xml into sqlite3 database
mit
Python
d924cfcbcd25f5b3c628419f780457c2c08c9add
Update listener_select.py
WeirdCoder/LilyPadOS,WeirdCoder/LilyPadOS,WeirdCoder/LilyPadOS,WeirdCoder/LilyPadOS
04Dan/listener_select.py
04Dan/listener_select.py
import select import lcm from lilylcm import 04Dan def my_handler(channel, data): msg = 04Dan.decode(data) print("Received message on channel /"%s/"" % channel) print(" count = %s" % str(msg.count)) print(" done = %s" % str(msg.done)) print(" value = %s" % str(msg.value)) print(" name ...
import select import lcm from lilylcm import 04Dan def my_handler(channel, data): msg = 04Dan.decode(data)
mit
Python
94fd4d5bb7d59b9122ce58aa516b0ed3aca04d2c
Simplify Author model testing
petertrotman/adventurelookup,petertrotman/adventurelookup,petertrotman/adventurelookup,petertrotman/adventurelookup
server/adventures/tests.py
server/adventures/tests.py
from django.test import TestCase from .models import Author, Publisher, Edition, Setting, Adventure class AuthorTests(TestCase): def test_create_author(self): gygax = Author.objects.create(name='Gary Gygax') self.assertEqual(Author.objects.first(), gygax) self.assertEqual(Author.objects.co...
from django.test import TestCase from .models import Author, Publisher, Edition, Setting, Adventure class AuthorTests(TestCase): def setUp(self): self.gygax = Author.objects.create(name='Gary Gygax') def test_create_author(self): self.assertEqual(Author.objects.first(), self.gygax) se...
mit
Python
25a3de5e929e0c14d2cfce30013a199c33276cd5
Fix nierozpoznawania bledu pierwszego ruchu v.2
gynvael/stream,gynvael/stream,gynvael/stream,gynvael/stream,gynvael/stream,gynvael/stream
001-xoxoxo-obj/harness.py
001-xoxoxo-obj/harness.py
from game import Game from input_con import InputCon from output_con import OutputCon class Harness(): def __init__(self, output, inputs): self._game = Game() self._output = output self._inputs = inputs def Start(self): self._output.show_welcome() while True: self._outpu...
from game import Game from input_con import InputCon from output_con import OutputCon class Harness(): def __init__(self, output, inputs): self._game = Game() self._output = output self._inputs = inputs def Start(self): self._output.show_welcome() while True: self._outpu...
mit
Python
9af15d66bd4f623d7ce45cc7cf9a465e0daadbd3
Isolate scoring_helper for removal.
seanchon/django-health-monitor,gracenote/django-health-monitor,gracenote/django-health-monitor,seanchon/django-health-monitor
health_monitor/models.py
health_monitor/models.py
""" Copyright 2017 Gracenote 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 Gracenote 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
95db87602f6478de505ad478ed76ae6ccdbbb7b8
Update kiss.py
OKEPlazmA/FruitCogs
kiss/kiss.py
kiss/kiss.py
from discord.ext import commands import random import discord class Kiss: def __init__(self, bot): self.bot = bot @commands.command(pass_context=True) async def kiss(self, context, member: discord.Member): """Kiss People!""" author = context.message.author.mention mention =...
from discord.ext import commands import random import discord class Kiss: def __init__(self, bot): self.bot = bot @commands.command(pass_context=True) async def kiss(self, context, member: discord.Member): """Kiss People!""" author = context.message.author.mention mention =...
apache-2.0
Python
53681ae30bdaccce2321601f1ebab09b4c572cc9
Make a default tree manager importable from the package.
uralbash/sqlalchemy_mptt,ITCase/sqlalchemy_mptt,ITCase/sqlalchemy_mptt,uralbash/sqlalchemy_mptt
sqlalchemy_mptt/__init__.py
sqlalchemy_mptt/__init__.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2014 uralbash <root@uralbash.ru> # # Distributed under terms of the MIT license. from sqlalchemy.orm import mapper from .mixins import BaseNestedSets from .events import TreesManager __version__ = "0.0.8" __mixins__ = [BaseNestedSets] __a...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2014 uralbash <root@uralbash.ru> # # Distributed under terms of the MIT license. from .mixins import BaseNestedSets __version__ = "0.0.8" __mixins__ = [BaseNestedSets]
mit
Python
be39675933be00ecacbddcf4cca89d5d3dc475d8
add callback functions
shenxudeu/deuNet,shenxudeu/deuNN
deuNN/callbacks.py
deuNN/callbacks.py
""" Backback class: print out and save out training process """ import theano import theano.tensor as T import warnings import time import numpy as np from .utils.generic_utils import Progbar import pdb class CallBack(object): def __init__(self): pass def _set_params(self, params): self.par...
""" Backback class: print out and save out training process """ import theano import theano.tensor as T import warnings import time import numpy as np from .utils.generic_utils import Progbar import pdb class CallBack(object): def __init__(self): pass def _set_params(self, params): self.par...
mit
Python
a20c7b15d61d9d5d02169222489f390f96168f50
Apply gauntlet pattern.
chriscannon/highlander
highlander/highlander.py
highlander/highlander.py
from logging import getLogger from os import getcwd, unlink from os.path import join, realpath, isfile from psutil import Process, NoSuchProcess from funcy import decorator from .exceptions import InvalidPidFileError, PidFileExistsError logger = getLogger(__name__) @decorator def one(call, pid_file=None): if n...
from logging import getLogger from os import getcwd, unlink from os.path import join, realpath, isfile from psutil import Process, NoSuchProcess from funcy import decorator from .exceptions import InvalidPidFileError, PidFileExistsError logger = getLogger(__name__) @decorator def one(call, pid_file=None): if n...
mit
Python
6f7f9a56f81a4f3529b2e303f608358574947d10
Update version to 0.1.6
MissiaL/hikvision-client
hikvisionapi/__init__.py
hikvisionapi/__init__.py
from .hikvisionapi import Client __title__ = 'hikvisionapi' __version__ = '0.1.6' __author__ = 'Petr Alekseev' __license__ = 'MIT' __copyright__ = 'Copyright 2017 Petr Alekseev'
from .hikvisionapi import Client __title__ = 'hikvisionapi' __version__ = '0.1.5' __author__ = 'Petr Alekseev' __license__ = 'MIT' __copyright__ = 'Copyright 2017 Petr Alekseev'
mit
Python
d834833d23286114a9da4b95f28f442140523d76
delete test for nonexistent code
texastribune/the-dp,texastribune/the-dp,texastribune/the-dp,texastribune/the-dp
exampleproject/test_tx_highered/tests/__init__.py
exampleproject/test_tx_highered/tests/__init__.py
from .test_import_thecb_report import * from .test_models_base import * from .test_models_reports import *
# TODO switch from relying on initial_data to factories from django.utils import unittest from .test_import_thecb_report import * from .test_models_base import * from .test_models_reports import * class ImportReport(unittest.TestCase): def test_name_extractor_regexp(self): import re from tx_high...
apache-2.0
Python
c065752f83a94b29bef06114ae870df581b16303
Make MachineDefinitionsModel work
onitake/Uranium,onitake/Uranium
UM/Qt/Bindings/MachineDefinitionsModel.py
UM/Qt/Bindings/MachineDefinitionsModel.py
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from UM.Qt.ListModel import ListModel from UM.Application import Application from PyQt5.QtCore import Qt, pyqtSlot class MachineDefinitionsModel(ListModel): IdRole = Qt.UserRole + 1 NameRole = Qt.UserRole + 2 ...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from UM.Qt.ListModel import ListModel from UM.Application import Application from PyQt5.QtCore import Qt, pyqtSlot class MachineDefinitionsModel(ListModel): IdRole = Qt.UserRole + 1 NameRole = Qt.UserRole + 2 ...
agpl-3.0
Python
618ee179c911ca50207a887b4f81e39957184266
use continue instead of break
dgvncsz0f/pong,dgvncsz0f/pong,dgvncsz0f/pong
bin/resolver.py
bin/resolver.py
#!/bin/bin/python #!/usr/bin/python import os import sys import time import select import socket import hashlib import requests import tempfile import threading stats = set() def start (consul): global stats signal = threading.Condition() def go (): while (True): try: ...
#!/bin/bin/python #!/usr/bin/python import os import sys import time import select import socket import hashlib import requests import tempfile import threading stats = set() def start (consul): global stats signal = threading.Condition() def go (): while (True): try: ...
unlicense
Python
985edeb786a39adc8313b090603289a0db31ae4d
Add to default settings
fairdemocracy/vilfredo-core
VilfredoReloadedCore/defaults_settings.py
VilfredoReloadedCore/defaults_settings.py
# -*- coding: utf-8 -*- # # This file is part of VilfredoReloadedCore. # # Copyright © 2009-2013 Pietro Speroni di Fenizio / Derek Paterson. # # VilfredoReloadedCore 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 ...
# -*- coding: utf-8 -*- # # This file is part of VilfredoReloadedCore. # # Copyright © 2009-2013 Pietro Speroni di Fenizio / Derek Paterson. # # VilfredoReloadedCore 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 ...
agpl-3.0
Python
f032501126e7bb6d86441e38112c6bdf5035c62e
Add setting to turn of search indexes.
ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit
icekit/search_indexes.py
icekit/search_indexes.py
from fluent_pages.pagetypes.flatpage.models import FlatPage from fluent_pages.pagetypes.fluentpage.models import FluentPage from haystack import indexes from django.conf import settings # Optional search indexes which can be used with the default FluentPage and FlatPage models. if getattr(settings, 'ICEKIT_USE_SEARCH...
from fluent_pages.pagetypes.flatpage.models import FlatPage from fluent_pages.pagetypes.fluentpage.models import FluentPage from haystack import indexes class FluentPageIndex(indexes.SearchIndex, indexes.Indexable): """ Search index for a fluent page. """ text = indexes.CharField(document=True, use_te...
mit
Python
be60017d44b43b67f8f063e0d1d7764c7b054f07
Fix DQUOTE_STRING, QUOTE_STRING to unquote their contents.
gsnedders/ihatexml
ihatexml/parser/lexer.py
ihatexml/parser/lexer.py
import ply.lex as lex try: chr = unichr except NameError: pass __all__ = ["lexer", "tokens"] tokens = ['DQUOTE_STRING', 'RSQUARE', 'PLUS', 'CARET', 'CLASSCHAR', 'LSQUARE', 'BAR', 'LPAREN', 'ESCAPECHAR', 'ASTERISK', 'COMMENT', 'HYPHEN', 'QUOTE_STRING', 'RPAREN', 'QUESTION', 'SYMBOL', 'DEFI...
import ply.lex as lex try: chr = unichr except NameError: pass __all__ = ["lexer", "tokens"] tokens = ['DQUOTE_STRING', 'RSQUARE', 'PLUS', 'CARET', 'CLASSCHAR', 'LSQUARE', 'BAR', 'LPAREN', 'ESCAPECHAR', 'ASTERISK', 'COMMENT', 'HYPHEN', 'QUOTE_STRING', 'RPAREN', 'QUESTION', 'SYMBOL', 'DEFI...
mit
Python
6eeb971b8ba8fab5cf681972d2230e908e812849
Fix main entry point
vmalloc/pyrefactor
dictstyles/main.py
dictstyles/main.py
#!/usr/bin/env python import argparse import logging import sys from .styles import toggle_style parser = argparse.ArgumentParser(usage="%(prog)s [options] args...") def main(args): source = sys.stdin.read() sys.stdout.write(toggle_style(source)) return 0 def main_entry_point(): args = parser.parse_...
#!/usr/bin/env python import argparse import logging import sys from .styles import toggle_style parser = argparse.ArgumentParser(usage="%(prog)s [options] args...") def main(args): source = sys.stdin.read() return toggle_style(source) return 0 def main_entry_point(): args = parser.parse_args() ...
bsd-3-clause
Python
1733b54c878704409e1348562f0a029be3a5edb3
Fix whitespace error
StijnRuts/dotbot,imattman/dotbot,pulgalipe/dotbot,bchretien/dotbot,anishathalye/dotbot,pulgalipe/dotbot,bchretien/dotbot,bchretien/dotbot,imattman/dotbot,StijnRuts/dotbot,anishathalye/dotbot,imattman/dotbot,pulgalipe/dotbot,StijnRuts/dotbot
dotbot/messenger/messenger.py
dotbot/messenger/messenger.py
import sys from ..util.singleton import Singleton from .color import Color from .level import Level class Messenger(object): __metaclass__ = Singleton def __init__(self, level = Level.LOWINFO): self.set_level(level) def set_level(self, level): self._level = level def log(self, level,...
import sys from ..util.singleton import Singleton from .color import Color from .level import Level class Messenger(object): __metaclass__ = Singleton def __init__(self, level = Level.LOWINFO): self.set_level(level) def set_level(self, level): self._level = level def log(self, level,...
mit
Python
b3b253a3b101fead383d50600daad170cb1b3d8a
Fix tests
eayunstack/fuel-library,SmartInfrastructures/fuel-library-dev,stackforge/fuel-library,zhaochao/fuel-library,slystopad/fuel-lib,slystopad/fuel-lib,slystopad/fuel-lib,SmartInfrastructures/fuel-library-dev,huntxu/fuel-library,xarses/fuel-library,Metaswitch/fuel-library,SmartInfrastructures/fuel-library-dev,zhaochao/fuel-l...
fuel_test/openstack_swift/test_openstack_swift.py
fuel_test/openstack_swift/test_openstack_swift.py
import unittest from fuel_test.helpers import is_not_essex from fuel_test.openstack_swift.openstack_swift_test_case import OpenStackSwiftTestCase from fuel_test.settings import OPENSTACK_SNAPSHOT class OpenStackSwiftCase(OpenStackSwiftTestCase): def test_deploy_open_stack_swift(self): self.validate(self.no...
import unittest from fuel_test.helpers import is_not_essex from fuel_test.openstack_swift.openstack_swift_test_case import OpenStackSwiftTestCase from fuel_test.settings import OPENSTACK_SNAPSHOT class OpenStackSwiftCase(OpenStackSwiftTestCase): def test_deploy_open_stack_swift(self): self.validate( ...
apache-2.0
Python
be6e926f2f337393806a78c89d51eba0e48cd292
change http to https for arxivbot
yymao/slackbots
arxivbot.py
arxivbot.py
import re from fetch_arxiv import fetch_arxiv, arxiv_re from common import escape _error_msg = '''*Syntax*: /arxiv [arxiv id] [[comments]] Please provide a valid arxiv ID.''' _output_template = u'{3}> [<https://arxiv.org/abs/{0}|{0}>] (<https://arxiv.org/pdf/{0}.pdf|PDF>) *{1}* by {2}' _payload_template = '{{"channe...
import re from fetch_arxiv import fetch_arxiv, arxiv_re from common import escape _error_msg = '''*Syntax*: /arxiv [arxiv id] [[comments]] Please provide a valid arxiv ID.''' _output_template = u'{3}> [<http://arxiv.org/abs/{0}|{0}>] (<http://arxiv.org/pdf/{0}.pdf|PDF>) *{1}* by {2}' _payload_template = '{{"channel"...
mit
Python
dcd103ea7329a5adaf29d106117397be3f118f9b
Fix grammar
github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql
python/ql/test/experimental/query-tests/Security-new-dataflow/CWE-078-py2/command_injection.py
python/ql/test/experimental/query-tests/Security-new-dataflow/CWE-078-py2/command_injection.py
import os import platform import popen2 from flask import Flask, request app = Flask(__name__) @app.route("/python2-specific") def python2_specific(): """ These tests are mostly included to check for extra paths that can be generated if we can track flow into the implementation of a stdlib function, and...
import os import platform import popen2 from flask import Flask, request app = Flask(__name__) @app.route("/python2-specific") def python2_specific(): """ These tests are mostly included to check for extra paths that can be generated if we can track flow into the implementation of stdlib function, and t...
mit
Python
1fe7d271c4ab1d7f0b1221aaecd10eb40a2ccea6
verify token ayarlandı
itucsProject2/Proje2
botair/views.py
botair/views.py
from django.views import generic from django.http.response import HttpResponse # Create your views here. class BotairView(generic.View): def get(self, request, *args, **kwargs): if self.request.GET['hub.verify_token'] == 'EAAJPGyHraTUBAIiXMqZCZBtmZACxAmxQ9YZB9BZBCQao67vZADEfd2QMHiZBQDIHX621SFbEGRyIpdTxQIai...
from django.views import generic from django.http.response import HttpResponse # Create your views here. class BotairView(generic.View): def get(self, request, *args, **kwargs): return HttpResponse("Hello World!")
unlicense
Python
5f5feaa8ac07dcf2ee81e30e4f6f0697b3bce832
Modify to use SimphonyFromFile().model_from_filepath()
gdsfactory/gdsfactory,gdsfactory/gdsfactory
gdsfactory/simulation/simphony/components/gc.py
gdsfactory/simulation/simphony/components/gc.py
from gdsfactory.config import sparameters_path from gdsfactory.simulation.simphony.model_from_sparameters import SimphonyFromFile def gc1550te(filepath=sparameters_path / "gc2dte" / "gc1550.dat", numports=2): """Returns Sparameter model for 1550nm TE grating_coupler. .. plot:: :include-source: ...
from gdsfactory.config import sparameters_path from gdsfactory.simulation.simphony.model_from_sparameters import model_from_filepath def gc1550te(filepath=sparameters_path / "gc2dte" / "gc1550.dat", numports=2): """Returns Sparameter model for 1550nm TE grating_coupler. .. plot:: :include-source: ...
mit
Python
44843e5c719b18a9f45a60799d889a4a51dac91d
Add cache header for columns
alejosanchez/CSVBenford,alejosanchez/CSVBenford
site/cgi-bin/csv-columns.py
site/cgi-bin/csv-columns.py
#!/usr/bin/python # -*- coding: utf-8 -*- # Give back the columns of a CSV and the in # http://www.tutorialspoint.com/python/python_cgi_programming.htm import cgi import csv import sys import codecs import cgitb CSV_DIR = '../csv/' # CSV upload directory # UTF-8 hack # from http://stackoverflow.com/a/11764727 ...
#!/usr/bin/python # -*- coding: utf-8 -*- # Give back the columns of a CSV and the in # http://www.tutorialspoint.com/python/python_cgi_programming.htm import cgi import csv import sys import codecs import cgitb CSV_DIR = '../csv/' # CSV upload directory # UTF-8 hack # from http://stackoverflow.com/a/11764727 ...
agpl-3.0
Python
80995cdf2010870ac63161520b71d035442efb0c
Change image read buffer size from 8k to 16k
vasiliykochergin/euca2ools,gholms/euca2ools,nagyistoce/euca2ools,nagyistoce/euca2ools,vasiliykochergin/euca2ools,jhajek/euca2ools,gholms/euca2ools,jhajek/euca2ools
euca2ools/__init__.py
euca2ools/__init__.py
# Copyright 2009-2014 Eucalyptus Systems, Inc. # # Redistribution and use of this software 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 conditions ...
# Copyright 2009-2014 Eucalyptus Systems, Inc. # # Redistribution and use of this software 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 conditions ...
bsd-2-clause
Python
a07abe034aeb6459f6d4d653752b2b53539ba797
bump version for 0.16.2 hotfix
emory-libraries/eulcommon,emory-libraries/eulcommon
eulcommon/__init__.py
eulcommon/__init__.py
# file eulcommon/__init__.py # # Copyright 2010,2011 Emory University Libraries # # 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/LICEN...
# file eulcommon/__init__.py # # Copyright 2010,2011 Emory University Libraries # # 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/LICEN...
apache-2.0
Python
30993abc1c758e4d6cafdb5afeabc700780ba39f
Implement binarize; tensorboard; training params
israelg99/eva
eva/examples/mnist.py
eva/examples/mnist.py
#%% Setup. from collections import namedtuple import numpy as np import keras from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flatten from keras.layers import Convolution2D, MaxPooling2D from keras.optimizers import Nadam from keras.layers.adva...
#%% Setup. from collections import namedtuple import numpy as np import keras from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flatten from keras.layers import Convolution2D, MaxPooling2D from keras.optimizers import Nadam from keras.layers.adva...
apache-2.0
Python
70127657d0a51256d3bce8361fdcd4954efe2fb0
fix 2.4-specific error.
cournape/Bento,cournape/Bento,cournape/Bento,cournape/Bento
bento/errors.py
bento/errors.py
class BentoError(Exception): pass class InternalBentoError(BentoError): def __str__(self): return "unexpected error: %s (most likely a bento bug)" class InvalidPackage(BentoError): pass class UsageException(BentoError): pass class ParseError(BentoError): def __init__(self, msg="", token=...
class BentoError(Exception): pass class InternalBentoError(BentoError): def __str__(self): return "unexpected error: %s (most likely a bento bug)" class InvalidPackage(BentoError): pass class UsageException(BentoError): pass class ParseError(BentoError): def __init__(self, msg="", token=...
bsd-3-clause
Python