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
f01a2bf14b341c2e3969bd69f628852206aad738
Fix version number as pypi does not honor initial 'v' in it
jcbagneris/fms,nikete/fms,nikete/fms
fms/version.py
fms/version.py
#!/usr/bin/env python # -*- coding: utf8 -*- """ FMS version setting and getting. """ from fms.utils.git import get_git_commit_hash, get_git_status TAG = '0.1.8' def get_full_version(): """ Return full version number The full version includes last commit reference if any, i.e. if we run from a g...
#!/usr/bin/env python # -*- coding: utf8 -*- """ FMS version setting and getting. """ from fms.utils.git import get_git_commit_hash, get_git_status TAG = 'v0.1.8' def get_full_version(): """ Return full version number The full version includes last commit reference if any, i.e. if we run from a ...
bsd-3-clause
Python
250e5b45541c2ece83d5830f9fd214fa2f8e667a
update to new api
yelizariev/website_multi_image,yelizariev/website_multi_image,OdooCommunityWidgets/website_multi_image,luistorresm/website_multi_image,luistorresm/website_multi_image,yelizariev/website_multi_image,OdooCommunityWidgets/website_multi_image,luistorresm/website_multi_image
website_multi_image/product_images.py
website_multi_image/product_images.py
from openerp import models, fields, api class product_image(models.Model): _name = 'product.image' name = fields.Char('Name') description = fields.Text('Description') image_alt = fields.Text('Image Label') image = fields.Binary('Image') image_small = fields.Binary('Small Image') product_t...
from openerp.osv import osv, fields class product_image(osv.Model): _name = 'product.image' _columns = { 'name': fields.char('Name'), 'description': fields.text('Description'), 'image_alt': fields.text('Image Label'), 'image': fields.binary('Image'), 'image_small': fie...
mit
Python
269ae8646e2f7784c31c0bafe371986c167b41ad
Add whitespace
rzeka/QLDS-Manager
qldsmanager/command/rcon.py
qldsmanager/command/rcon.py
from cement.core.controller import expose from qldsmanager.command.default import ManagerDefaultController from qldsmanager.util.config import ServerConfig, RconConfig from qldsmanager.util.rcon import Rcon class RconController(ManagerDefaultController): class Meta: label = 'rcon' description = '...
from cement.core.controller import expose from qldsmanager.command.default import ManagerDefaultController from qldsmanager.util.config import ServerConfig,RconConfig from qldsmanager.util.rcon import Rcon class RconController(ManagerDefaultController): class Meta: label = 'rcon' description = 'R...
mit
Python
ef3a7be179d7fb38030ef5a2760b17e42d25320b
fix questions search
fnp/prawokultury,fnp/prawokultury,fnp/prawokultury,fnp/prawokultury
questions/search_indexes.py
questions/search_indexes.py
import datetime from django.conf import settings from haystack import indexes from .models import Question class QuestionIndex(indexes.RealTimeSearchIndex, indexes.Indexable): text = indexes.CharField(document=True) answer = indexes.CharField(model_attr="answer") def prepare_text(self, obj): retu...
import datetime from django.conf import settings from haystack import indexes from .models import Question class QuestionIndex(indexes.RealTimeSearchIndex, indexes.Indexable): text = indexes.CharField(document=True, model_attr="__unicode__") answer = indexes.CharField(model_attr="answer") def get_model(s...
agpl-3.0
Python
cdc0b8e72f209bc9ad8163c6901016c4e620b48a
Remove legacy code.
berendkleinhaneveld/Registrationshop,berendkleinhaneveld/Registrationshop
ui/widgets/LandmarkWidget.py
ui/widgets/LandmarkWidget.py
""" LandmarkWidget :Authors: Berend Klein Haneveld """ from PySide.QtGui import * from PySide.QtCore import * from histogram import TrackingHistogramWidget from histogram import Histogram from histogram import HistogramWidget class LandmarkWidget(QWidget): """ LandmarkWidget """ def __init__(self): super(Lan...
""" LandmarkWidget :Authors: Berend Klein Haneveld """ import sys from PySide.QtGui import * from PySide.QtCore import * from histogram import TrackingHistogramWidget from histogram import Histogram from histogram import HistogramWidget class LandmarkWidget(QWidget): """ LandmarkWidget """ def __init__(self): ...
mit
Python
8a17dc966eab974db7240c46bbe29085a9fddca8
enable accreditation level validation on ownership change
Leits/openprocurement.relocation.api
openprocurement/relocation/api/views/tender.py
openprocurement/relocation/api/views/tender.py
# -*- coding: utf-8 -*- from hashlib import sha512 from openprocurement.api.utils import ( json_view, opresource, APIResource, save_tender, context_unpack ) from openprocurement.relocation.api.utils import extract_transfer, update_ownership from openprocurement.relocation.api.validation import ( ...
# -*- coding: utf-8 -*- from hashlib import sha512 from openprocurement.api.utils import ( json_view, opresource, APIResource, save_tender, context_unpack ) from openprocurement.relocation.api.utils import extract_transfer, update_ownership from openprocurement.relocation.api.validation import valid...
apache-2.0
Python
8a2f8cba05b5b8c26174ea88b6017f4a172b1714
use correct super class
sassoftware/mirrorball,sassoftware/mirrorball
updatebot/groupmgr/errata.py
updatebot/groupmgr/errata.py
# # Copyright (c) 2009-2010 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath.com/perma...
# # Copyright (c) 2009-2010 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath.com/perma...
apache-2.0
Python
99b146b4a0ac88f0877da20930013ebed6f824e4
use raw_input
Furzoom/learnpython,Furzoom/learnpython
usefull_scripts/calculate.py
usefull_scripts/calculate.py
#!/usr/bin/env python3 #-*- coding: utf-8 -*- # v0.1 #while True: # reply = input("Enter text:") # if reply == 'stop': # break # print(int(reply) ** 2) #print('Bye') # v0.2 #while True: # reply = input("Enter text:") # if reply == 'stop': # break # elif not reply.isdigit(): # pr...
#!/usr/bin/env python3 #-*- coding: utf-8 -*- # v0.1 #while True: # reply = input("Enter text:") # if reply == 'stop': # break # print(int(reply) ** 2) #print('Bye') # v0.2 #while True: # reply = input("Enter text:") # if reply == 'stop': # break # elif not reply.isdigit(): # pr...
mit
Python
6d894dc15af674b7814be32664354fb79faf227f
Fix bugs with code for multiple gateways
nulledbyte/scripts
gateway_mac.py
gateway_mac.py
import socket, struct import scapy.all as scapy def get_default_gateway_linux(): """Read the default gateway directly from /proc.""" routes = [] with open("/proc/net/route") as fh: for line in fh: fields = line.strip().split() if fields[1] != '00000000' or not int(fields[3],...
import socket, struct import scapy.all as scapy def get_default_gateway_linux(): """Read the default gateway directly from /proc.""" routes = [] with open("/proc/net/route") as fh: for line in fh: fields = line.strip().split() if fields[1] != '00000000' or not int(fields[3],...
mit
Python
1886699ca81d6b905af48808a38fb467f0039a16
disable cache in devstack
appsembler/edx-platform,gymnasium/edx-platform,appsembler/edx-platform,gymnasium/edx-platform,appsembler/edx-platform,gymnasium/edx-platform,gymnasium/edx-platform,appsembler/edx-platform
lms/envs/devstack_appsembler.py
lms/envs/devstack_appsembler.py
# devstack_appsembler.py from .devstack import * from .appsembler import * # disable caching in dev environment for cache_key in CACHES.keys(): CACHES[cache_key]['BACKEND'] = 'django.core.cache.backends.dummy.DummyCache' SESSION_ENGINE = 'django.contrib.sessions.backends.db' INSTALLED_APPS += ('appsembler',) DE...
# devstack_appsembler.py from .devstack import * from .appsembler import * INSTALLED_APPS += ('appsembler',) DEFAULT_TEMPLATE_ENGINE['OPTIONS']['context_processors'] += ('appsembler.context_processors.intercom',)
agpl-3.0
Python
4ba3335c8deb6ad87eda3f1eeb1e71dc4cc71f52
tweak comment
BBN-Q/pyqgl2,BBN-Q/pyqgl2
src/python/qgl2/basic_sequences/pulses.py
src/python/qgl2/basic_sequences/pulses.py
# Copyright 2016 by Raytheon BBN Technologies Corp. All Rights Reserved. # from QGL.PulseShapes import tanh import numpy as np # a local copy of QGL.PulseShapes.tanh, because pulling in # QGL/__init__.py causes QGL2 grief. # def local_tanh(amp=1, length=0, sigma=0, cutoff=2, sampling_rate=1e9, **params): ''' ...
# Copyright 2016 by Raytheon BBN Technologies Corp. All Rights Reserved. # from QGL.PulseShapes import tanh import numpy as np # a local copy of QGL.PulsePrimitives, because pulling in # QGL/__init__.py causes QGL2 grief. # def local_tanh(amp=1, length=0, sigma=0, cutoff=2, sampling_rate=1e9, **params): ''' ...
apache-2.0
Python
c16f6c8a233324422d4faccb391d32363ef6f36e
Bump version
Farama-Foundation/Gymnasium,Farama-Foundation/Gymnasium,dianchen96/gym,dianchen96/gym
gym/version.py
gym/version.py
VERSION = '0.8.0'
VERSION = '0.8.0-dev'
mit
Python
e843e6811ee30ac7149ccec41c2503b2db734417
Create test immunohistochemical
msfernandes/anato-hub,msfernandes/anato-hub,msfernandes/anato-hub,msfernandes/anato-hub
immunohistochemical/tests.py
immunohistochemical/tests.py
# -*- coding: utf-8 -*- from django.test import TestCase from django.db import models #from immunohistochemical import Immunohistochemical class ImmunohistochemicalTest(TestCase): def immunohistochemical_test(self): immunohistochemical = Immunohistochemical( clinical_information= "clinica", previous_biopsy =...
from django.test import TestCase # Create your tests here.
mit
Python
1f82101b74ccec35cad87c76829c54f8ed6879be
watch 対象のディレクトリを追加しました
backpaper0/doma2,domaframework/doma,backpaper0/doma2,kakusuke/doma,kakusuke/doma,domaframework/doma
docs/server.py
docs/server.py
#!/usr/bin/env python from livereload import Server, shell server = Server() server.watch('sources/*.rst', shell('make dirhtml')) server.watch('sources/**/*.rst', shell('make dirhtml')) server.serve()
#!/usr/bin/env python from livereload import Server, shell server = Server() server.watch('sources/**/*.rst', shell('make dirhtml')) server.serve()
apache-2.0
Python
490797a0b206bd0209637925602f22e69239cdf4
Add __str__ to user model
tforrest/soda-automation,tforrest/soda-automation
app/models/user.py
app/models/user.py
from passlib.apps import custom_app_context as pwd_context from config import db class User(db.Model): """Basic user model for token creation""" id = db.Column(db.Integer,primary_key=True) user_name = db.Column(db.String(60), index=True) password = db.Column(db.String(60)) # dont expose through the...
from config import db from passlib.apps import custom_app_context as pwd_context import os class User(db.Model): """Basic user model for token creation""" id = db.Column(db.Integer,primary_key=True) user_name = db.Column(db.String(60), index=True) password = db.Column(db.String(60)) # dont expose ...
mit
Python
dafac94281bea871dd7a53baf70a7e904131166a
revert previous commit
Ubuntu-Solutions-Engineering/ubuntu-tui-widgets
ubuntui/widgets/juju/unit.py
ubuntui/widgets/juju/unit.py
""" Represents a Single Juju unit UI widget """ from urwid import Text class UnitWidget: def __init__(self, name, unit): """ Init Params: machine: Juju Unit Class """ self._unit = unit self._name = name self.Name = Text(self._name) self.PublicAddre...
""" Represents a Single Juju unit UI widget """ from urwid import Text class UnitWidget: def __init__(self, name, unit): """ Init Params: machine: Juju Unit Class """ self._unit = unit self._name = name self.Name = Text(self._name) self.PublicAddre...
agpl-3.0
Python
cb829e5012f4a3d0ad16a0fae0136cfd98435ace
update Chelmsford import script
DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations
polling_stations/apps/data_collection/management/commands/import_chelmsford.py
polling_stations/apps/data_collection/management/commands/import_chelmsford.py
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter class Command(BaseXpressDemocracyClubCsvImporter): council_id = "E07000070" addresses_name = "local.2019-05-02/Version 2/Democracy_Club__02May2019chelm.tsv" stations_name = "local.2019-05-02/Version 2/Democracy_Club__02May2...
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter class Command(BaseXpressDemocracyClubCsvImporter): council_id = "E07000070" addresses_name = "local.2019-05-02/Version 1/Democracy_Club__02May2019chelm.tsv" stations_name = "local.2019-05-02/Version 1/Democracy_Club__02May2...
bsd-3-clause
Python
9648c7ec335ab0f3962d1ce27cedeb15cef3048e
update Manchester import script
DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations
polling_stations/apps/data_collection/management/commands/import_manchester.py
polling_stations/apps/data_collection/management/commands/import_manchester.py
from data_collection.management.commands import BaseXpressWebLookupCsvImporter class Command(BaseXpressWebLookupCsvImporter): council_id = 'E08000003' addresses_name = 'ManchesterPropertyPostCodePollingStationWebLookup-2017-04-06.TSV' stations_name = 'ManchesterPropertyPostCodePollingStationWebLook...
from data_collection.management.commands import BaseXpressWebLookupCsvImporter class Command(BaseXpressWebLookupCsvImporter): council_id = 'E08000003' addresses_name = 'ManchesterPropertyPostCodePollingStationWebLookup-2017-02-16.TSV' stations_name = 'ManchesterPropertyPostCodePollingStationWebLook...
bsd-3-clause
Python
bfb6c90ac522f16cc6c15f282ac301d621ea9876
remove package not using astropy_helpers
astropy/astropy-tools,astropy/astropy-tools
update-packages/helpers_3.py
update-packages/helpers_3.py
# This set of repositories is where the maintainer opted in to use # astropy_helpers v3.0 and above accepting that it requires Python # 3.5+. Packages listed below will receive automated update for the latest # helpers rather than the LTS branch. repositories = sorted(set([ ('adrn', 'gala'), ('aplpy', 'aplpy')...
# This set of repositories is where the maintainer opted in to use # astropy_helpers v3.0 and above accepting that it requires Python # 3.5+. Packages listed below will receive automated update for the latest # helpers rather than the LTS branch. repositories = sorted(set([ ('adrn', 'gala'), ('aplpy', 'aplpy')...
bsd-3-clause
Python
706ad8367488104e2e5c32908faaf85a5fb5e00a
Add default argument when looking up sentry dsn setting
chop-dbhi/varify,chop-dbhi/varify,chop-dbhi/varify,chop-dbhi/varify
varify/context_processors.py
varify/context_processors.py
import os import logging from django.conf import settings log = logging.getLogger(__name__) def static(request): "Shorthand static URLs. In debug mode, the JavaScript is not minified." static_url = settings.STATIC_URL prefix = 'src' if settings.DEBUG else 'min' return { 'CSS_URL': os.path.joi...
import os import logging from django.conf import settings log = logging.getLogger(__name__) def static(request): "Shorthand static URLs. In debug mode, the JavaScript is not minified." static_url = settings.STATIC_URL prefix = 'src' if settings.DEBUG else 'min' return { 'CSS_URL': os.path.join...
bsd-2-clause
Python
714b18898f9a2affaac678e1708ad7ee99a6fcb4
add strings to return hello angela as output
ctsit/J.O.B-Training-Repo-1
helloangela.py
helloangela.py
#This is my hello world program print ("Hellow angela")
#This is my hello world program print ("Hellow World")
apache-2.0
Python
f857771d98627722bc9c81ee3d039ab11c3e8afb
Make compatible with freezegun when testing.
SideStudios/django-jsonfield
jsonfield/utils.py
jsonfield/utils.py
import datetime from decimal import Decimal from django.core.serializers.json import DjangoJSONEncoder DATETIME = (datetime.datetime,) DATE = (datetime.date,) TIME = (datetime.time,) try: import freezegun.api except ImportError: pass else: DATETIME += (freezegun.api.FakeDatetime,) DATE += (freezegun....
import datetime from decimal import Decimal from django.core.serializers.json import DjangoJSONEncoder class TZAwareJSONEncoder(DjangoJSONEncoder): def default(self, obj): if isinstance(obj, datetime.datetime): return obj.strftime("%Y-%m-%d %H:%M:%S%z") return super(TZAwareJSONEncoder,...
bsd-3-clause
Python
9bfe6a36bedf6642105280feb0f93c8e7399d279
support iso-639-1 lang codes
rr-/dotfiles,rr-/dotfiles,rr-/dotfiles
cfg/bubblesub/scripts/quality_check/check_spelling.py
cfg/bubblesub/scripts/quality_check/check_spelling.py
import re import typing as T from collections import defaultdict from bubblesub.api import Api from bubblesub.fmt.ass.util import ass_to_plaintext, spell_check_ass_line from bubblesub.spell_check import SpellChecker, SpellCheckerError from .common import is_event_karaoke SPELL_CHECK_LANGUAGE = "en_US" def check_sp...
import typing as T from collections import defaultdict from bubblesub.api import Api from bubblesub.fmt.ass.util import ass_to_plaintext, spell_check_ass_line from bubblesub.spell_check import SpellChecker, SpellCheckerError from .common import is_event_karaoke SPELL_CHECK_LANGUAGE = "en_US" def check_spelling(spe...
mit
Python
c2cfb617d9bedf93e2c6dfb5ff6cdfcd35d5c0fe
Add method to find by event and player id
leaffan/pynhldb
db/shot_attempt.py
db/shot_attempt.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import uuid from sqlalchemy import and_ from db.common import Base, session_scope from db.specific_event import SpecificEvent class ShotAttempt(Base, SpecificEvent): __tablename__ = 'shot_attempts' __autoload__ = True STANDARD_ATTRS = [ "game_id", ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import uuid from db.common import Base from db.specific_event import SpecificEvent class ShotAttempt(Base, SpecificEvent): __tablename__ = 'shot_attempts' __autoload__ = True STANDARD_ATTRS = [ "game_id", "team_id", "event_id", "player_id", "shot_at...
mit
Python
a9938b3c5951c590b9ce4663f30e6d58ae04ace5
move the pdfview url to avoid the hungrier course/slug routes
FinalsClub/karmaworld,FinalsClub/karmaworld,FinalsClub/karmaworld,FinalsClub/karmaworld
karmaworld/urls.py
karmaworld/urls.py
#!/usr/bin/env python # -*- coding:utf8 -*- # Copyright (C) 2012 FinalsClub Foundation """ Controller for the KarmaNotes website """ from django.contrib import admin from django.conf.urls.defaults import patterns, include, url from django.views.generic.simple import direct_to_template from karmaworld.apps.ajaxupload...
#!/usr/bin/env python # -*- coding:utf8 -*- # Copyright (C) 2012 FinalsClub Foundation """ Controller for the KarmaNotes website """ from django.contrib import admin from django.conf.urls.defaults import patterns, include, url from django.views.generic.simple import direct_to_template from karmaworld.apps.ajaxupload...
agpl-3.0
Python
b8f6f2b692d95c2b8fca9d90a4132bb62e40df6e
Fix typos
di/vladiate
vladiate/test/test_inputs.py
vladiate/test/test_inputs.py
import pytest from ..inputs import * @pytest.mark.parametrize('kwargs', [ ({'path':'s3://some.bucket/some/s3/key.csv'}), ({'bucket':'some.bucket', 'key':'/some/s3/key.csv'}), ]) def test_s3_input_works(kwargs): S3File(**kwargs) @pytest.mark.parametrize('kwargs', [ ({}), ({'path':'s3://some.buck...
import pytest from ..inputs import * @pytest.mark.parametrize('kwargs', [ ({'path':'s3://some.bucket/some/s3/key.csv'}), ({'bucket':'some.bucket', 'key':'/some/s3/key.csv'}), ]) def test_float_validator_works(kwargs): S3File(**kwargs) @pytest.mark.parametrize('kwargs', [ ({}), ({'path':'s3://so...
mit
Python
747ba18b2650c35522126e0e60386764654c5d2e
Save audio every 0.5 seconds generated
israelg99/eva
audio_inference.py
audio_inference.py
#%% Setup. print('Importing.') import signal import sys import numpy as np import scipy.io.wavfile from keras.utils.visualize_util import plot from keras.callbacks import TensorBoard, ModelCheckpoint from tqdm import tqdm from eva.models.wavenet import Wavenet, compute_receptive_field from eva.util.mutil import sp...
#%% Setup. print('Importing.') import signal import sys import numpy as np import scipy.io.wavfile from keras.utils.visualize_util import plot from keras.callbacks import TensorBoard, ModelCheckpoint from tqdm import tqdm from eva.models.wavenet import Wavenet, compute_receptive_field from eva.util.mutil import sp...
apache-2.0
Python
779620e53bd9c71e1c9e078ff46498d363dd392e
Disable querystrings if a storage backend with hashed filenames is active
rsalmaso/wagtail,gasman/wagtail,kaedroho/wagtail,rsalmaso/wagtail,torchbox/wagtail,mixxorz/wagtail,timorieber/wagtail,nimasmi/wagtail,rsalmaso/wagtail,jnns/wagtail,torchbox/wagtail,wagtail/wagtail,zerolab/wagtail,mixxorz/wagtail,torchbox/wagtail,kaedroho/wagtail,gasman/wagtail,takeflight/wagtail,zerolab/wagtail,wagtail...
wagtail/admin/staticfiles.py
wagtail/admin/staticfiles.py
import hashlib from django.conf import settings from django.contrib.staticfiles.storage import HashedFilesMixin from django.core.files.storage import get_storage_class from django.templatetags.static import static from wagtail import __version__ # Check whether we should add cache-busting '?v=...' parameters to sta...
import hashlib from django.conf import settings from django.templatetags.static import static from wagtail import __version__ if getattr(settings, 'WAGTAILADMIN_STATIC_FILE_VERSION_STRINGS', True): VERSION_HASH = hashlib.sha1( (__version__ + settings.SECRET_KEY).encode('utf-8') ).hexdigest()[:8] els...
bsd-3-clause
Python
18f38469e2433a0d3765c1b7a3611b17a8c27ead
Refactor emails.py to work with new RestClient
auth0/auth0-python,auth0/auth0-python
auth0/v2/emails.py
auth0/v2/emails.py
from .rest import RestClient class Emails(object): def __init__(self, domain, jwt_token): self.domain = domain self.client = RestClient(jwt=jwt_token) def _url(self, id=None): url = 'https://%s/api/v2/emails/provider' % self.domain if id is not None: return url + '...
from .rest import RestClient class Emails(object): def __init__(self, domain, jwt_token): url = 'https://%s/api/v2/emails/provider' % domain self.client = RestClient(endpoint=url, jwt=jwt_token) def get(self, fields=[], include_fields=True): params = {'fields': ','.join(fields) or No...
mit
Python
ab35503a5292c5be155872acde249f9db5c9c724
Bump version to 5.0.0
Frojd/wagtail-geo-widget,Frojd/wagtail-geo-widget,Frojd/wagtail-geo-widget,Frojd/wagtail-geo-widget
wagtailgeowidget/__init__.py
wagtailgeowidget/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ wagtailgeowidget ---------- A Google Maps widget for Wagtail that supports both GeoDjango PointField, StreamField and the standard CharField. """ __title__ = "wagtailgeowidget" __version__ = "5.0.0" __build__ = 500 __author__ = "Martin Sandström" __license__ = "MIT" _...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ wagtailgeowidget ---------- A Google Maps widget for Wagtail that supports both GeoDjango PointField, StreamField and the standard CharField. """ __title__ = "wagtailgeowidget" __version__ = "4.0.5" __build__ = 405 __author__ = "Martin Sandström" __license__ = "MIT" _...
mit
Python
b33f56d8b5b287dd83dcc23640a34c3b76a0914b
fix an error message
redhat-cip/dci-agent
dci_agent/utils.py
dci_agent/utils.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2016 Red Hat, 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 req...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2016 Red Hat, 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 req...
apache-2.0
Python
dfe144b97e6e3d5f16595bab3adf7566c938adb3
Simplify comment to remove escape char.
destijl/artifacts,pidydx/artifacts,pidydx/artifacts,destijl/artifacts
artifacts/definitions.py
artifacts/definitions.py
# -*- coding: utf-8 -*- """Constants and definitions.""" # The type indicator constants. TYPE_INDICATOR_ARTIFACT_GROUP = 'ARTIFACT_GROUP' TYPE_INDICATOR_COMMAND = 'COMMAND' TYPE_INDICATOR_DIRECTORY = 'DIRECTORY' TYPE_INDICATOR_ENVIRONMENT = 'ENVIRONMENT' TYPE_INDICATOR_FILE = 'FILE' TYPE_INDICATOR_PATH = 'PATH' TYPE_I...
# -*- coding: utf-8 -*- """Constants and definitions.""" # The type indicator constants. TYPE_INDICATOR_ARTIFACT_GROUP = 'ARTIFACT_GROUP' TYPE_INDICATOR_COMMAND = 'COMMAND' TYPE_INDICATOR_DIRECTORY = 'DIRECTORY' TYPE_INDICATOR_ENVIRONMENT = 'ENVIRONMENT' TYPE_INDICATOR_FILE = 'FILE' TYPE_INDICATOR_PATH = 'PATH' TYPE_I...
apache-2.0
Python
424d9bbd6fae8f236b59d640d2bf63012e68204b
add config and url to __all__ and remove the long deprecated jsonify
moreati/pylons,Pylons/pylons,moreati/pylons,Pylons/pylons,moreati/pylons,Pylons/pylons
pylons/__init__.py
pylons/__init__.py
"""Base objects to be exported for use in Controllers""" from paste.registry import StackedObjectProxy from pylons.config import config from pylons.legacy import h, jsonify, Response __all__ = ['app_globals', 'c', 'cache', 'config', 'g', 'request', 'response', 'session', 'tmpl_context', 'url'] def __figur...
"""Base objects to be exported for use in Controllers""" from paste.registry import StackedObjectProxy from pylons.config import config from pylons.legacy import h, jsonify, Response __all__ = ['app_globals', 'c', 'g', 'cache', 'request', 'response', 'session', 'tmpl_context', 'jsonify'] def __figure_vers...
bsd-3-clause
Python
bb162a3714f63918ad12b7ebd3914007e26a42c5
bump version number
travistruett/django-localized-recurrence,ambitioninc/django-localized-recurrence
localized_recurrence/version.py
localized_recurrence/version.py
__version__ = '1.2.1'
__version__ = '1.2.0'
mit
Python
bf6a4ea469c21e45a8c382ff935e57debfb142f9
Fix version prior to release
LukasBoersma/pyowm,LukasBoersma/pyowm,csparpa/pyowm,csparpa/pyowm,LukasBoersma/pyowm
pyowm/constants.py
pyowm/constants.py
""" Constants for the PyOWM library """ PYOWM_VERSION = '2.2.1' LATEST_OWM_API_VERSION = '2.5'
""" Constants for the PyOWM library """ PYOWM_VERSION = '2.2.0' LATEST_OWM_API_VERSION = '2.5'
mit
Python
64214317265d9b47e77091c8bb8354eaacc8fe15
Update constants.py
pathakvaidehi2391/WorkSpace,pathakvaidehi2391/WorkSpace
azure/constants.py
azure/constants.py
######## # Copyright (c) 2015 GigaSpaces Technologies Ltd. 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...
######## # Copyright (c) 2015 GigaSpaces Technologies Ltd. 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...
apache-2.0
Python
4d163ab5a2c4c9c6b07d4c0dfea1b91ab5e05fec
Create method that retrieves coursefinder URLS
cobalt-io/cobalt,cobalt-uoft/cobalt,qasim/cobalt,ivanzhangio/cobalt,cobalt-io/cobalt,kshvmdn/cobalt
web-scraper/course_finder.py
web-scraper/course_finder.py
import requests import http.cookiejar import time def get_raw_data(): url = 'http://coursefinder.utoronto.ca/course-search/search/courseSearch/course/search' data = { 'queryText': '', 'requirements': '', 'campusParam': 'St. George,Scarborough,Mississauga' } cookies = http.cooki...
mit
Python
1f9f4376347d962f1cc455e2eab0a80d820aeda4
Fix signals
genialis/resolwe-bio,genialis/resolwe-bio,genialis/resolwe-bio,genialis/resolwe-bio
resolwe_bio/signals.py
resolwe_bio/signals.py
from django.db.models.signals import post_save from django.dispatch import receiver from guardian import shortcuts from resolwe.flow.models import Data, DescriptorSchema, iterate_schema from .models import Sample @receiver(post_save, sender=Data) def add_post_save_handler(sender, instance, **kwargs): if kwargs[...
from django.db.models.signals import post_save from django.dispatch import receiver from guardian import shortcuts from resolwe.flow.models import Data, DescriptorSchema, iterate_schema from .models import Sample @receiver(post_save, sender=Data) def add_post_save_handler(sender, instance, **kwargs): if kwargs[...
apache-2.0
Python
86d13a9fb84cee2df56a998446d340207dfdbd5f
Set version to 2.3.1 (#5705)
spacy-io/spaCy,spacy-io/spaCy,honnibal/spaCy,explosion/spaCy,honnibal/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,honnibal/spaCy,spacy-io/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,honnibal/spaCy
spacy/about.py
spacy/about.py
# fmt: off __title__ = "spacy" __version__ = "2.3.1" __release__ = True __download_url__ = "https://github.com/explosion/spacy-models/releases/download" __compatibility__ = "https://raw.githubusercontent.com/explosion/spacy-models/master/compatibility.json" __shortcuts__ = "https://raw.githubusercontent.com/explosion/s...
# fmt: off __title__ = "spacy" __version__ = "2.3.0" __release__ = True __download_url__ = "https://github.com/explosion/spacy-models/releases/download" __compatibility__ = "https://raw.githubusercontent.com/explosion/spacy-models/master/compatibility.json" __shortcuts__ = "https://raw.githubusercontent.com/explosion/s...
mit
Python
e178d0024324d76df98ba72df1b3a9f6a742366d
Update interactive.py
VictorLoren/pyRecipeBook
interactive.py
interactive.py
#Main program executor import pyRecipeBook import FoodGroups import ShoppingList as List #Welcome screen welcomeMessage = "Welcome to pyRecipeBook!\n" welcomeMessage += "Enter a command below:\n" print(welcomeMessage) #Initiate a shopping list myShoppingList = [] #Method for `exit` command def exitCom(args): #Pred...
#Main program executor import pyRecipeBook import FoodGroups import ShoppingList as List #Welcome screen welcomeMessage = "Welcome to pyRecipeBook!\n" welcomeMessage += "Enter a command below:\n" print(welcomeMessage) #Initiate a shopping list myShoppingList = [] #Method for `exit` command def exitCom(args): #Pred...
mit
Python
241100c65790fe63deadb10b504caa0287134488
add a metadata argument on Binder.bind
anybox/connector,gurneyalex/connector,dvitme/connector,Antiun/connector,BT-fgarbely/connector,mohamedhagag/connector,guewen/connector,brain-tec/connector,zhaohuaw/connector,dvitme/connector,hugosantosred/connector,BT-ojossen/connector,fevxie/connector,acsone/connector,Antiun/connector,brain-tec/connector,esousy/connect...
connector/unit/binder.py
connector/unit/binder.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2013 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 # pu...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2013 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 # pu...
agpl-3.0
Python
0d7a7267915b06cde1364700eb7691394c0c72e5
Update project bugFix
basepair/basepair-python,basepair/basepair-python
bin/datatypes/project.py
bin/datatypes/project.py
'''Project dataype class''' import json import sys # App imports from bin.common_parser import add_common_args, add_json_parser, add_single_uid_parser, valid_email class Project: '''Project action methods''' @staticmethod def create_project(bp_api, args): '''Create project''' data = {'name': args.name}...
'''Project dataype class''' import json import sys # App imports from bin.common_parser import add_common_args, add_json_parser, add_single_uid_parser, valid_email class Project: '''Project action methods''' @staticmethod def create_project(bp_api, args): '''Create project''' data = {'name': args.name}...
mit
Python
58323d323451922705b843af4974a0c7b94f23b6
fix phase logger
hsharsha/perfrunner,PaintScratcher/perfrunner,vmx/perfrunner,dkao-cb/perfrunner,pavel-paulau/perfrunner,hsharsha/perfrunner,mikewied/perfrunner,couchbase/perfrunner,couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,EricACooper/perfrunner,couchbase/perfrunner,couchbase/perfrunner,thomas-couchbase/perfrun...
perfrunner/helpers/misc.py
perfrunner/helpers/misc.py
import json from uuid import uuid4 from logger import logger def uhex(): return uuid4().hex def pretty_dict(d): return json.dumps(d, indent=4, sort_keys=True) def log_phase(phase, settings): logger.info('Running {0}: {1}'.format(phase, pretty_dict(settings.__...
import json from uuid import uuid4 from logger import logger def uhex(): return uuid4().hex def pretty_dict(d): return json.dumps(d, indent=4, sort_keys=True) def log_phase(phase, settings): logger.info('Running {0}: {1}'.format(phase, pretty_dict(settings)))
apache-2.0
Python
2e59f9cb12bbe415538ecf7f74faee51b201dbd3
Sort proposal by title
pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016
src/proposals/views/talk_list.py
src/proposals/views/talk_list.py
from django.views.generic import ListView from proposals.models import TalkProposal class TalkProposalListView(ListView): template_name = 'proposals/talk_proposal_list.html' queryset = ( TalkProposal.objects .filter(accepted=True).select_related('submitter') .order_by('title') )
from django.views.generic import ListView from proposals.models import TalkProposal class TalkProposalListView(ListView): template_name = 'proposals/talk_proposal_list.html' queryset = ( TalkProposal.objects .filter(accepted=True).select_related('submitter') )
mit
Python
9173a160b72b249c91ebb24019bbcaf6f26a6fb8
Bump version.
armet/python-armet
armet/_version.py
armet/_version.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import, division __version_info__ = (0, 4, 33) __version__ = '.'.join(map(str, __version_info__))
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import, division __version_info__ = (0, 4, 32) __version__ = '.'.join(map(str, __version_info__))
mit
Python
fef04c2b54cb43e9b61709dce04c13617788bcfa
Use to new indexing approach, y has to be numpy array
rnowling/asaph,rnowling/asaph,rnowling/aranyani
asaph/asaph/ml.py
asaph/asaph/ml.py
""" Copyright 2015 Ronald J. Nowling 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, softw...
""" Copyright 2015 Ronald J. Nowling 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, softw...
apache-2.0
Python
f0622fa9fde3fbed4da607ece98f9e33b57b183d
Bump the version number to account for the latest fixes.
benspaulding/django-basic-extras
basic_extras/__init__.py
basic_extras/__init__.py
# -*- coding: utf-8 -*- """ Django Basic Extras A very small collection of some things I find myself frequently using in Django projects. Hopefully you find it useful. At the moment it only includes an abstract model for collecting object metadata, and some context processors. More will likely be added with time, but...
# -*- coding: utf-8 -*- """ Django Basic Extras A very small collection of some things I find myself frequently using in Django projects. Hopefully you find it useful. At the moment it only includes an abstract model for collecting object metadata, and some context processors. More will likely be added with time, but...
bsd-3-clause
Python
7eee361876d1a14eaa006a8209823ea8a171e880
Add docstring, optimize imports
jvivian/rnaseq-lib,jvivian/rnaseq-lib
src/rnaseq_lib/civic/__init__.py
src/rnaseq_lib/civic/__init__.py
import pandas as pd import progressbar import requests bar = progressbar.ProgressBar() def create_civic_drug_disease_dataframe(): """ Hits CIViC's API to build a dataframe on genes, cancers, and drugs :return: Dataframe of CIVIC information :rtype: pd.DataFrame """ payload = {'count': 999} ...
import requests import progressbar import pandas as pd bar = progressbar.ProgressBar() def create_civic_drug_disease_dataframe(): payload = {'count': 999} # Only 295 genes at time of writing request = requests.get('https://civic.genome.wustl.edu/api/genes/', params=payload) assert request.status_code ==...
mit
Python
31e0d3e2938d196c7ca5e9daebdcef506a396a95
Update __init__.py
hagne/atm-py,hagne/atm-py
atmPy/__init__.py
atmPy/__init__.py
#from . import aerosols #from . import data_archives #from . import tools #from . import file_io as open_file_by_format #from .file_io import open_atmpy as open_file # on anaconda importing basemap can cause errors which can be fixed by setting # the following variable try: import mpl_toolkits.basemap as __ except...
#from . import aerosols #from . import data_archives #from . import tools #from . import file_io as open_file_by_format #from .file_io import open_atmpy as open_file
mit
Python
e54040946e9ff28d955a483bcf7310bcafffa507
Update __ini__.py
ericfourrier/auto-clean
autoc/__init__.py
autoc/__init__.py
__all__ = ["explorer"]
mit
Python
f8853ebb012cb9892ed8fcdf54d3b66ce666d36d
Remove dead code
geary/claslite,geary/claslite,geary/claslite,geary/claslite
web/app/claslite/handlers.py
web/app/claslite/handlers.py
# -*- coding: utf-8 -*- """ claslite.handlers ~~~~~~~~~~~~~~~~~~~~ CLASlite handler :Copyright 2010 Carnegie Institution for Science and Michael Geary :Use under any Open Source license: :http://www.opensource.org/licenses/ """ from tipfy import RequestHandler, Response from tipfy.auth import login_required, u...
# -*- coding: utf-8 -*- """ claslite.handlers ~~~~~~~~~~~~~~~~~~~~ CLASlite handler :Copyright 2010 Carnegie Institution for Science and Michael Geary :Use under any Open Source license: :http://www.opensource.org/licenses/ """ from tipfy import RequestHandler, Response from tipfy.auth import login_required, u...
unlicense
Python
010c0012f4b27f53378b2380cc27b62f7e14745e
Add custom fields
GageGaskins/osf.io,zamattiac/osf.io,asanfilippo7/osf.io,monikagrabowska/osf.io,zachjanicki/osf.io,Johnetordoff/osf.io,zachjanicki/osf.io,DanielSBrown/osf.io,Johnetordoff/osf.io,hmoco/osf.io,laurenrevere/osf.io,TomHeatwole/osf.io,kch8qx/osf.io,samchrisinger/osf.io,KAsante95/osf.io,TomBaxter/osf.io,doublebits/osf.io,asan...
website/conferences/model.py
website/conferences/model.py
# -*- coding: utf-8 -*- import bson from modularodm import fields, Q from modularodm.exceptions import ModularOdmException from framework.mongo import StoredObject from website.conferences.exceptions import ConferenceError class Conference(StoredObject): #: Determines the email address for submission and the O...
# -*- coding: utf-8 -*- import bson from modularodm import fields, Q from modularodm.exceptions import ModularOdmException from framework.mongo import StoredObject from website.conferences.exceptions import ConferenceError class Conference(StoredObject): #: Determines the email address for submission and the O...
apache-2.0
Python
2edc2d77a3827fd245b7e7524981fb75cbca6b96
Add a required file
ultimate-pa/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,IljaZakharov/benchexec,martin-neuhaeusser/benchexec,sosy-lab/benchexec,dbeyer/benchexec,dbeyer/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,dbeyer/benchexec,sosy-lab/benchexec,martin-neuhaeusser/benchexec,IljaZakharov/benchexec,Ilja...
benchexec/tools/skink.py
benchexec/tools/skink.py
""" Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License ...
""" Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License ...
apache-2.0
Python
37ef6570933ad600ad09101eeb92b6d10b498806
add EntityType
euclio/rocket-propelled-rpg
rprpg/battle/entity.py
rprpg/battle/entity.py
class EntityType(object): NUM_DEFAULT_TYPES = 3 All, Player, Enemy = range(NUM_DEFAULT_TYPES) class Entity(object): pass class Player(Entity): pass class NPC(Entity): pass
class Entity(object): pass class Player(Entity): pass class NPC(Entity): pass
mit
Python
91daa93cc28aaeb14676afa38c3a109b1f611732
Enhance behaviour of check functions
hoh/Billabong,hoh/Billabong
billabong/check.py
billabong/check.py
# Copyright (c) 2015 "Hugo Herter http://hugoherter.com" # # This file is part of Billabong. # # Intercom 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 your o...
# Copyright (c) 2015 "Hugo Herter http://hugoherter.com" # # This file is part of Billabong. # # Intercom 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 your o...
agpl-3.0
Python
15e3d7fbd2093a71135ace76f4da32dff13c6848
Test all available basis functions
vberaudi/scipy,josephcslater/scipy,surhudm/scipy,Kamp9/scipy,vhaasteren/scipy,cpaulik/scipy,vberaudi/scipy,petebachant/scipy,jsilter/scipy,endolith/scipy,pyramania/scipy,argriffing/scipy,larsmans/scipy,josephcslater/scipy,zxsted/scipy,WarrenWeckesser/scipy,sonnyhu/scipy,njwilson23/scipy,chatcannon/scipy,ilayn/scipy,vha...
scipy/interpolate/tests/test_rbf.py
scipy/interpolate/tests/test_rbf.py
#!/usr/bin/env python # Created by John Travers, Robert Hetland, 2007 """ Test functions for rbf module """ from numpy.testing import assert_array_almost_equal from numpy import linspace, sin, random, exp from scipy.interpolate.rbf import Rbf FUNCTIONS = ('multiquadric', 'inverse multiquadric', 'gaussian', ...
#!/usr/bin/env python # Created by John Travers, Robert Hetland, 2007 """ Test functions for rbf module """ from numpy.testing import assert_array_almost_equal from numpy import linspace, sin, random, exp from scipy.interpolate.rbf import Rbf def test_rbf1d(): x = linspace(0,10,9) y = sin(x) rbf = Rbf(...
bsd-3-clause
Python
e009814fcc22e881cd957509d3864f1ab3dcc6e7
Update test
QingChenmsft/azure-cli,QingChenmsft/azure-cli,yugangw-msft/azure-cli,samedder/azure-cli,QingChenmsft/azure-cli,BurtBiel/azure-cli,yugangw-msft/azure-cli,yugangw-msft/azure-cli,BurtBiel/azure-cli,yugangw-msft/azure-cli,samedder/azure-cli,samedder/azure-cli,samedder/azure-cli,yugangw-msft/azure-cli,QingChenmsft/azure-cli...
src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/test_resource_list_odata_filter.py
src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/test_resource_list_odata_filter.py
import unittest from azure.cli.command_modules.resource import _list_resources_odata_filter_builder from azure.cli.parser import IncorrectUsageError class TestListResources(unittest.TestCase): @classmethod def setUpClass(cls): pass @classmethod def tearDownClass(cls): pass ...
import unittest from azure.cli.command_modules.resource import _list_resources_odata_filter_builder from azure.cli.parser import IncorrectUsageError class TestListResources(unittest.TestCase): @classmethod def setUpClass(cls): pass @classmethod def tearDownClass(cls): pass ...
mit
Python
6716a904383084f3732cb68a05a1c6ea1f9baddc
Implement mod database searching
khardix/mccurse
mccurse/cli.py
mccurse/cli.py
"""Command line interface to the package.""" import curses from logging import ERROR, INFO import click from . import _, log from .addon import Mod from .curse import Game from .proxy import Authorization from .tui import select_mod from .util import default_data_dir @click.group() @click.version_option() @click.o...
"""Command line interface to the package.""" import curses from logging import ERROR, INFO import click from . import _, log from .curse import Game from .proxy import Authorization from .util import default_data_dir @click.group() @click.version_option() @click.option('--refresh', is_flag=True, default=False, ...
agpl-3.0
Python
487c0a608afe8e222ed8423d551cd45a3901c911
Split up the EmailAPIhandler into 2 views
chrisseto/dinosaurs.sexy,chrisseto/dinosaurs.sexy
dinosaurs/views.py
dinosaurs/views.py
import os import httplib as http import tornado.web from dinosaurs import util from dinosaurs import settings from dinosaurs import exceptions from dinosaurs import transaction class SingleStatic(tornado.web.StaticFileHandler): def initialize(self, path): self.dirname, self.filename = os.path.split(path...
import os import httplib as http import tornado.web import tornado.ioloop from dinosaurs import api from dinosaurs import util from dinosaurs import settings class SingleStatic(tornado.web.StaticFileHandler): def initialize(self, path): self.dirname, self.filename = os.path.split(path) super(Sin...
mit
Python
c96900578041ca2da967dce62d0b14a9f4a2ac58
Remove the namespacing of urls
incuna/django-discussion,lehins/lehins-discussion,lehins/lehins-discussion,incuna/django-discussion,lehins/lehins-discussion
discussion/urls.py
discussion/urls.py
from django.conf.urls.defaults import * from discussion.views import DiscussionList, DiscussionView, PostList, PostView urlpatterns = patterns('discussion.views', url(r'^$', DiscussionList.as_view()), url(r'^(?P<slug>[\w-]+)/$', DiscussionView.as_view(), name='discussion'), url(r'^(?P<discussion_slug>[\w...
from django.conf.urls.defaults import * from discussion.views import DiscussionList, DiscussionView, PostList, PostView urlpatterns = patterns('discussion.views', url(r'^$', DiscussionList.as_view()), url(r'^(?P<slug>[\w-]+)/$', DiscussionView.as_view(), name='discussion'), url(r'^(?P<discussion_slug>[\w...
bsd-2-clause
Python
dadee0118f6924cf1059ab7102d4b4485a19ee6d
remove shebang
ninjaaron/lazydots,ninjaaron/lazydots
lazydots.py
lazydots.py
import unicodedata from pathlib import Path import deromanize import yaml PROFILE = yaml.safe_load((Path(__file__).parent/'data.yml').open()) keys = deromanize.TransKey(PROFILE) @keys.processor def make_pointy(keys, word): end, remainder = keys['end'].getpart(word) if remainder: front, remainder = ke...
#!/usr/bin/env python3 import unicodedata from pathlib import Path import deromanize import yaml PROFILE = yaml.safe_load((Path(__file__).parent/'data.yml').open()) keys = deromanize.TransKey(PROFILE) @keys.processor def make_pointy(keys, word): end, remainder = keys['end'].getpart(word) if remainder: ...
mpl-2.0
Python
e88aaed84e0bc668a782395521601d88af438c5d
Update transitions.py
ADicksonLab/wepy,ADicksonLab/wepy,ADicksonLab/wepy
wepy/analysis/transitions.py
wepy/analysis/transitions.py
import numpy as np def transmat(cluster_array, sliding_window): """ This determines a transition matrix for a variable lag time. Inputs: cluster_array (numpy array [n_timestep x n_walker numpy array]): This is an array that indicates the cluster number for each walker at each timestep. sliding_window(itera...
import numpy as np def transmat(cluster_array, sliding_window): """ This determines a transition matrix for a variable lag time. Inputs: cluster_array (numpy array [n_timestep x n_walker numpy array]): This is an array that indicates the cluster number for each walker at each timestep. sliding_window(itera...
mit
Python
0bf47e13c70402bdfae201174ea544a6e49c6875
Add cloudstock code
kyleconroy/quivr
web.py
web.py
import os import flickr from flask import Flask, jsonify, abort, make_response, request # Reddit 6837818396 # Me 6839706724 app = Flask(__name__) @app.route("/") def index(): return jsonify({"links": {"photos": request.url + "photos"}}) @app.route("/photos") def photos(): data = flickr.api("photos.getRecen...
mit
Python
72262b5d7f9178f6a97baa841a99f5816a1897e7
Fix typo
jazcollins/models,alexgorban/models,derekjchow/models,sshleifer/object_detection_kitti,jiaphuan/models,tombstone/models,xcyan/models,r888888888/models,derekjchow/models,cshallue/models,tombstone/models,jiaphuan/models,jazcollins/models,r888888888/models,sshleifer/object_detection_kitti,derekjchow/models,r888888888/mode...
inception/inception/imagenet_eval.py
inception/inception/imagenet_eval.py
# 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 by applicable law or a...
# 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 by applicable law or a...
apache-2.0
Python
c029b2e282f05ba535c6ebdc050106a30d622681
Fix database and Redis URLs
tomleese/will-there-be-space,tomleese/will-there-be-space,thomasleese/will-there-be-space,thomasleese/will-there-be-space,tomleese/will-there-be-space,tomleese/will-there-be-space,thomasleese/will-there-be-space,thomasleese/will-there-be-space,tomleese/will-there-be-space,thomasleese/will-there-be-space
willtherebespace/database.py
willtherebespace/database.py
"""Module for connecting to the various databases.""" import logging import os import redis import sqlalchemy from . import models DATABASE_URI_KEY = 'DATABASE_URL' REDIS_URI_KEY = 'REDIS_URL' logger = logging.getLogger(__name__) _sql_engine = None _sql_connection = None _redis = None def get_sql_database_ur...
"""Module for connecting to the various databases.""" import logging import os import redis import sqlalchemy from . import models logger = logging.getLogger(__name__) _sql_engine = None _sql_connection = None _redis = None def get_sql_database_uri(): key = 'DATABASE_URI' try: return os.environ...
mit
Python
bc048be552d4c667ac3b37e7de7b0104c5cbf7df
Add tests for tags on handle_extra_data and info methods of Annotation
Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django
winthrop/annotation/tests.py
winthrop/annotation/tests.py
from django.test import TestCase from unittest.mock import Mock from .models import Annotation, Tag class TestAnnotation(TestCase): def test_handle_extra_data(self): ## -- test tag handling annotation = Annotation.objects.create() # must be saved to test related object handling ...
from django.test import TestCase from .models import Annotation, Tag class TestTag(TestCase): def setUp(self): self.basic_annotation_dict = { 'text_translation': 'Translation of text', 'anchor_translation': 'Anchor text translation', 'quote': 'Annotation text', ...
apache-2.0
Python
3fe4cb6fbafe69b9e7520466b7e7e2d405cf0ed0
Make URLField compatible with Django 1.4 and remove verify_exists attribute
incuna/incuna-bookmarks,incuna/incuna-bookmarks
bookmarks/forms.py
bookmarks/forms.py
from django import forms from django.utils.translation import ugettext_lazy as _ from tagging.forms import TagField from bookmarks.models import Bookmark, BookmarkInstance class BookmarkInstanceForm(forms.ModelForm): url = forms.URLField(label = "URL", widget=forms.TextInput(attrs={"size": 40})) descrip...
from django import forms from django.utils.translation import ugettext_lazy as _ from tagging.forms import TagField from bookmarks.models import Bookmark, BookmarkInstance class BookmarkInstanceForm(forms.ModelForm): url = forms.URLField(label = "URL", verify_exists=True, widget=forms.TextInput(attrs={"size...
mit
Python
faf2210aca40354ecbeb53b7a3eff963c82cf4bf
Return substitutions
rizar/attention-lvcsr,rizar/attention-lvcsr,rizar/attention-lvcsr,rizar/attention-lvcsr,rizar/attention-lvcsr
bin/explain_lm.py
bin/explain_lm.py
#!/usr/bin/env python """ Usage: explain_lm FST STR Explain the cost assigned to a string STR by the fst FST. """ def main(fst_path, string): fst = FST(fst_path) s = string.replace('<noise>', '%') subst = {'^': '<bol>', '$': '<eol>', ' ': '<spc>', '%': '<noise>'} fst.explain([subst.get(c, c) for c in...
#!/usr/bin/env python """ Usage: explain_lm FST STR Explain the cost assigned to a string STR by the fst FST. """ def main(fst_path, string): fst = FST(fst_path) s = string.replace('<noise>', '%') subst = {' ': '<spc>', '%': '<noise>'} fst.explain([subst.get(c, c) for c in s]) if __name__ == "__main...
mit
Python
f20e429f8deb71367ae63bb1ec9d950ce043947c
update lammps_jobs.py
joshgabriel/MPInterfaces,henniggroup/MPInterfaces,joshgabriel/MPInterfaces,henniggroup/MPInterfaces
examples/lammps_jobs.py
examples/lammps_jobs.py
from __future__ import division, unicode_literals, print_function import os import sys from collections import OrderedDict from mpinterfaces import get_struct_from_mp from mpinterfaces.lammps import CalibrateLammps from mpinterfaces.utils import get_run_cmmnd # list of structures from materialsproject structures = g...
from __future__ import division, unicode_literals, print_function import os import sys from collections import OrderedDict from mpinterfaces import get_struct_from_mp from mpinterfaces.lammps import MPINTLammps, CalibrateLammps from mpinterfaces.utils import get_run_cmmnd # list of structures from materialsproject s...
mit
Python
c880a6300e9d26f76194133859e7d4417e11c9a6
Update version
andrewguy/biostructmap
biostructmap/__init__.py
biostructmap/__init__.py
"""biostructmap is a package for performing analyses on Protein Data Bank (PDB) structure files. In particular, it allows for the spatial averaging of sequence-aligned data over a given protein structure, and also allows the incorporation of structural information into genetic tests of selection pressure such as Tajima...
"""biostructmap is a package for performing analyses on Protein Data Bank (PDB) structure files. In particular, it allows for the spatial averaging of sequence-aligned data over a given protein structure, and also allows the incorporation of structural information into genetic tests of selection pressure such as Tajima...
mit
Python
6091907e029f926b68efadd0b094da5cf8a4c639
add a log output for waitress
therewillbecode/ichnaea,mozilla/ichnaea,therewillbecode/ichnaea,therewillbecode/ichnaea,mozilla/ichnaea,mozilla/ichnaea,mozilla/ichnaea
ichnaea/app.py
ichnaea/app.py
import logging from pyramid.config import Configurator from pyramid.events import NewRequest from ichnaea.db import Database from ichnaea import decimaljson logger = logging.getLogger('ichnaea') def attach_database(event): request = event.request event.request.database = request.registry.database def mai...
import logging from pyramid.config import Configurator from pyramid.events import NewRequest from ichnaea.db import Database from ichnaea import decimaljson logger = logging.getLogger('ichnaea') def attach_database(event): request = event.request event.request.database = request.registry.database def mai...
apache-2.0
Python
2e3b265b1f8177872a651366ea5c60d9fca33cee
Update world_state_converter.py
RoboJackets/robocup-software,RoboJackets/robocup-software,RoboJackets/robocup-software,RoboJackets/robocup-software
rj_gameplay/stp/utils/world_state_converter.py
rj_gameplay/stp/utils/world_state_converter.py
from rj_msgs import msg import stp.rc as rc import numpy as np from typing import List def robotstate_to_robot(robot_msg: msg._robot_state.RobotState, index: int) -> rc.Robot: """ :return: robot class representing the state of the robot. """ robot_id = index x = robot_msg.pose.position.x ...
from rj_msgs import msg import stp.rc as rc import numpy as np from typing import List def robotstate_to_robot(robot_msg: msg._robot_state.RobotState, index: int) -> rc.Robot: """ :return: robot class representing the state of the robot. """ robot_id = index x = robot_msg.pose.position.x ...
apache-2.0
Python
4ef57c26cbeee3f3afd21f86877bbdcadf0f69c1
Fix bad import
pypa/setuptools,pypa/setuptools,pypa/setuptools
setuptools/command/bdist_wininst.py
setuptools/command/bdist_wininst.py
from distutils.command.bdist_wininst import bdist_wininst as _bdist_wininst import os class bdist_wininst(_bdist_wininst): def create_exe(self, arcname, fullname, bitmap=None): _bdist_wininst.create_exe(self, arcname, fullname, bitmap) if self.target_version: installer_name = os.path...
from distutils.command.bdist_wininst import bdist_wininst as _bdist_wininst import sys class bdist_wininst(_bdist_wininst): def create_exe(self, arcname, fullname, bitmap=None): _bdist_wininst.create_exe(self, arcname, fullname, bitmap) if self.target_version: installer_name = os.pat...
mit
Python
d71efc6067a9687690d0f9156dc3bd768b5860fd
Fix comment
wtsi-hgi/CoGS-Webapp,wtsi-hgi/CoGS-Webapp,wtsi-hgi/CoGS-Webapp
scheduling/__init__.py
scheduling/__init__.py
from aiohttp.web import Application from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore from apscheduler.schedulers.asyncio import AsyncIOScheduler from scheduling.deadlines import deadline_scheduler def setup(app: Application) -> None: jobstore = SQLAlchemyJobStore(engine=app["db"]) jobstores = ...
from aiohttp.web import Application from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore from apscheduler.schedulers.asyncio import AsyncIOScheduler from scheduling.deadlines import deadline_scheduler def setup(app: Application) -> None: jobstore = SQLAlchemyJobStore(engine=app["db"]) jobstores = ...
agpl-3.0
Python
2a857ebf43d01a5cb98d0282c8e75e1c5aa5b0f7
Update retrosign.py
Anismash/Ani-Cogs
retrosign/retrosign.py
retrosign/retrosign.py
import discord, aiohttp, re from bs4 import BeautifulSoup as b_s from io import BytesIO from discord.ext import commands import os import random from random import choice import lxml class retrosign: def __init__(self, bot): self.bot = bot @commands.command(name="retrosign") async def _retro_(s...
import discord, aiohttp, re from bs4 import BeautifulSoup as b_s from io import BytesIO from discord.ext import commands import os import random from random import choice import lxml class retrosign: def __init__(self, bot): self.bot = bot @commands.command(name="retrosign") async def _retro_(s...
mit
Python
c6e397825b3a54267a3defc18ed29a85672b2e15
Add scope to example
klen/aioauth-client,ei-grad/aioauth-client
example/app.py
example/app.py
""" Aioauth-client example. """ import asyncio from aiohttp import web from aioauth_client import GithubClient, TwitterClient app = web.Application() @asyncio.coroutine def index(request): return web.Response(text=""" <ul> <li><a href="/github">Login with Github</a></li> <li><a...
""" Aioauth-client example. """ import asyncio from aiohttp import web from aioauth_client import GithubClient, TwitterClient app = web.Application() @asyncio.coroutine def index(request): return web.Response(text=""" <ul> <li><a href="/github">Login with Github</a></li> <li><a...
mit
Python
cb9a7265a30fe865c32fa82193c2e1eb3fe38663
Change link to avoid the redirection
jairideout/scikit-bio,Achuth17/scikit-bio,SamStudio8/scikit-bio,xguse/scikit-bio,jdrudolph/scikit-bio,wdwvt1/scikit-bio,Kleptobismol/scikit-bio,demis001/scikit-bio,johnchase/scikit-bio,Kleptobismol/scikit-bio,SamStudio8/scikit-bio,kdmurray91/scikit-bio,corburn/scikit-bio,gregcaporaso/scikit-bio,averagehat/scikit-bio,ja...
bipy/util/misc.py
bipy/util/misc.py
#!/usr/bin/env python r""" Misc (:mod:`bipy.util.misc`) ============================ .. currentmodule:: bipy.util.misc This module provides miscellaneous useful utility classes and methods that do not fit in any specific module. Functions --------- .. autosummary:: :toctree: generated/ safe_md5 """ from __f...
#!/usr/bin/env python r""" Misc (:mod:`bipy.util.misc`) ============================ .. currentmodule:: bipy.util.misc This module provides miscellaneous useful utility classes and methods that do not fit in any specific module. Functions --------- .. autosummary:: :toctree: generated/ safe_md5 """ from __f...
bsd-3-clause
Python
14862786fb5eb672f4aa5ddc30486d9b93aa7eb7
Bump version to 1.3.1
izacus/SlovenianLemmatizer,izacus/SlovenianLemmatizer
bindings/python/setup.py
bindings/python/setup.py
from setuptools import setup, Extension import os import platform root_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) src_dir = os.path.join(root_dir, "src") include_dir = os.path.join(root_dir, "include") # Setup compilation arguments for native code compile_args = [] link_args =...
from setuptools import setup, Extension import os import platform root_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) src_dir = os.path.join(root_dir, "src") include_dir = os.path.join(root_dir, "include") # Setup compilation arguments for native code compile_args = [] link_args =...
lgpl-2.1
Python
ab520867d6b164f27aed8ebdc1ae76c45ab7cfe6
Return uploads
5monkeys/blues,5monkeys/blues,Sportamore/blues,5monkeys/blues,Sportamore/blues,Sportamore/blues
blues/rabbitmq.py
blues/rabbitmq.py
""" RabbitMQ Blueprint ================== **Fabric environment:** .. code-block:: yaml blueprints: - blues.rabbitmq """ from fabric.decorators import task from fabric.utils import abort from refabric.api import run, info from refabric.context_managers import sudo from refabric.contrib import blueprints ...
""" RabbitMQ Blueprint ================== **Fabric environment:** .. code-block:: yaml blueprints: - blues.rabbitmq """ from fabric.decorators import task from fabric.utils import abort from refabric.api import run, info from refabric.context_managers import sudo from refabric.contrib import blueprints ...
mit
Python
fc45142b1d31739a43172a061d26d2848f3f669f
sort imports
ZeitOnline/zeit.objectlog
src/zeit/objectlog/interfaces.py
src/zeit/objectlog/interfaces.py
# Copyright (c) 2008 gocept gmbh & co. kg # See also LICENSE.txt from zeit.objectlog.i18n import MessageFactory as _ import zeit.objectlog.source import zope.app.security.vocabulary import zope.interface class IObjectLog(zope.interface.Interface): """Utility which logs object changes.""" def log(object, mes...
# Copyright (c) 2008 gocept gmbh & co. kg # See also LICENSE.txt import zeit.objectlog.source import zope.app.security.vocabulary import zope.interface from zeit.objectlog.i18n import MessageFactory as _ class IObjectLog(zope.interface.Interface): """Utility which logs object changes.""" def log(object, mes...
bsd-3-clause
Python
1031a9fe2099bf9b4cd48858144cac42fc3e15ba
Fix weather message
MichaelYusko/Bot-Chucky
bot_chucky/bot.py
bot_chucky/bot.py
import requests as r from .constants import API_URL from .exc import BotChuckyInvalidToken, BotChuckyTokenError from .helpers import FacebookData, WeatherData class BotChucky: def __init__(self, token, open_weather_token=None): """ :param token: Facebook Token, required :param open_weathe...
import requests as r from .constants import API_URL from .exc import BotChuckyInvalidToken, BotChuckyTokenError from .helpers import FacebookData, WeatherData class BotChucky: def __init__(self, token, open_weather_token=None): """ :param token: Facebook Token, required :param open_weathe...
mit
Python
be9d4292e8357d637ebc7e73e1b2333766db5997
Make createDb and createUser idempotent.
alex/braid,alex/braid
braid/postgres.py
braid/postgres.py
from fabric.api import sudo, quiet from braid import package from pipes import quote def install(): package.install(['postgresql-9.1', 'postgresql-server-dev-9.1']) def _runQuery(query): with quiet(): return sudo('psql --no-align --no-readline --no-password --quiet ' '--tuples-onl...
from fabric.api import sudo from braid import package def install(): package.install(['postgresql-9.1', 'postgresql-server-dev-9.1']) def createUser(name): sudo('createuser -D -R -S {}'.format(name), user='postgres') def createDb(name, owner): sudo('createdb -O {} {}'.format(owner, name), user='postgr...
mit
Python
9cac94a76731efb4e909864b08f3d099edc6e7c2
add a commit to be sure the changes are persisted to disk when showing the log Unindexed...
ecreall/dace
dace/relations/evolve.py
dace/relations/evolve.py
import logging import transaction from substanced.util import find_catalogs from . import get_relations_container log = logging.getLogger('substanced') def unindex_relations_from_other_catalogs(root, registry): log.info('Unindexing relations from other catalogs...') catalogs = find_catalogs(root) contai...
import logging from substanced.util import find_catalogs from . import get_relations_container log = logging.getLogger('substanced') def unindex_relations_from_other_catalogs(root, registry): log.info('Unindexing relations from other catalogs...') catalogs = find_catalogs(root) container = get_relations...
agpl-3.0
Python
29db1611baaa365b4dfc6ee45c31cdf1f44cb938
fix tests
ecreall/dace
dace/relations/values.py
dace/relations/values.py
from persistent import Persistent from substanced.util import find_objectmap from zope.interface import implementer, providedBy, Declaration from .interfaces import IRelationValue def _interfaces_flattened(interfaces): return [i.__identifier__ for i in Declaration(*interfaces).flattened()] @implementer(IRelati...
from persistent import Persistent from substanced.util import find_objectmap from zope.interface import implementer, providedBy, Declaration from .interfaces import IRelationValue def _interfaces_flattened(interfaces): return [i.__identifier__ for i in Declaration(*interfaces).flattened()] @implementer(IRelati...
agpl-3.0
Python
646ae287f0c4d383883ecca4a5600ddb0e84e9ca
bump to 0.7.0
samstav/simpl,larsbutler/simpl,checkmate/simpl
simpl/__about__.py
simpl/__about__.py
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
apache-2.0
Python
0aa9c72a697571c22c251a5d601a4f275d17e532
Remove out-of-date comment
hackcyprus/jobber,hackcyprus/jobber,hackcyprus/jobber,hackcyprus/jobber
scripts/cron/backup.py
scripts/cron/backup.py
""" Takes a backup of the database on Dropbox - hacking it all the way. Usage: backup.py """ from docopt import docopt from dropbox.client import DropboxClient from dropbox.rest import ErrorResponse from env import path_setup path_setup() from jobber.script import run from jobber.core.utils import now from jobb...
""" Takes a backup of the database on Dropbox - hacking it all the way. Usage: backup.py """ from docopt import docopt from dropbox.client import DropboxClient from dropbox.rest import ErrorResponse from env import path_setup path_setup() from jobber.script import run from jobber.core.utils import now from jobb...
mit
Python
755eb43b0cfac0f81b890ffab16304f292da9abf
Add missing blank line
prophile/jacquard,prophile/jacquard
jacquard/tests/test_config.py
jacquard/tests/test_config.py
import io import sys import tempfile import textwrap from jacquard.config import load_config CONFIG_FILE = """ [storage] engine = dummy url = dummy [directory] engine = dummy [test_section] test_key = test_value """ def load_test_config(extra=''): f = io.StringIO(CONFIG_FILE + textwrap.dedent(extra)) ret...
import io import sys import tempfile import textwrap from jacquard.config import load_config CONFIG_FILE = """ [storage] engine = dummy url = dummy [directory] engine = dummy [test_section] test_key = test_value """ def load_test_config(extra=''): f = io.StringIO(CONFIG_FILE + textwrap.dedent(extra)) retu...
mit
Python
19335ded0e8c6acee410908b5af68ef109d1be38
add statistics module into __init__
narayandesai/diy-lsi
diylsi/__init__.py
diylsi/__init__.py
__all__ = ['inventory', 'statistics']
__all__ = ['inventory']
bsd-3-clause
Python
b48b41fb9634c7e12b805e8bd3ca4f0abb942c3a
Update django.VERSION in trunk per previous discussion
Belgabor/django,Belgabor/django,Belgabor/django
django/__init__.py
django/__init__.py
VERSION = (1, 1, 0, 'alpha', 0) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: version = '%s %s' % (version, VERSION[3]) if ...
VERSION = (1, 0, 'post-release-SVN') def get_version(): "Returns the version as a human-format string." v = '.'.join([str(i) for i in VERSION[:-1]]) if VERSION[-1]: from django.utils.version import get_svn_revision v = '%s-%s-%s' % (v, VERSION[-1], get_svn_revision()) return v
bsd-3-clause
Python
9eef335185a76f4718ef246f6b89e73396105b71
allow "-" in repo names and update urls to accomodate
sethtrain/django-git,sethtrain/django-git
django_git/urls.py
django_git/urls.py
from django.conf.urls.defaults import * urlpatterns = [] urlpatterns += patterns('django_git.views', url(r'^(?P<repo>[\w_-]+)/diff/(?P<commit>[\w\d]+)/$', 'diff', name='django-git-diff'), url(r'^(?P<repo>[\w_-]+)/$', 'repo', name='django-git-repo'), url(r'^$', 'index', name='django-git-index'), )
from django.conf.urls.defaults import * urlpatterns = [] urlpatterns += patterns('django_git.views', url(r'^(?P<repo>[\w_]+)/diff/(?P<commit>[\w\d]+)/$', 'diff', name='django-git-diff'), url(r'^(?P<repo>[\w_]+)/$', 'repo', name='django-git-repo'), url(r'^$', 'index', name='django-git-index'), )
bsd-3-clause
Python
a3b31e3ad7358709b27f91a249ac0a622f9661cb
Read the file content, if it is not read when the request is multipart then the client get an error
SimonWaldherr/uploader,SimonWaldherr/uploader,FineUploader/fine-uploader,FineUploader/fine-uploader,SimonWaldherr/uploader,SimonWaldherr/uploader,SimonWaldherr/uploader,FineUploader/fine-uploader,SimonWaldherr/uploader,SimonWaldherr/uploader
server/python_django/file_uploader/__init__.py
server/python_django/file_uploader/__init__.py
""" @author: Ferdinand E. Silva @email: ferdinandsilva@ferdinandsilva.com @website: http://ferdinandsilva.com """ import os from django.utils import simplejson as json class qqFileUploader(object): def __init__(self, allowedExtensions=None, sizeLimit=1024): self.allowedExtensions = allowedExtensions or [...
""" @author: Ferdinand E. Silva @email: ferdinandsilva@ferdinandsilva.com @website: http://ferdinandsilva.com """ import os from django.utils import simplejson as json class qqFileUploader(object): def __init__(self, allowedExtensions=None, sizeLimit=1024): self.allowedExtensions = allowedExtensions or [...
mit
Python
730d8e67bcc16b95fb3b1e56fba59fc007043094
Fix a typo on default key
acsone/geospatial,laslabs/geospatial,acsone/geospatial,Endika/geospatial,Endika/geospatial,Endika/geospatial,acsone/geospatial,laslabs/geospatial,laslabs/geospatial
base_geoengine/geo_view/geo_vector_layer.py
base_geoengine/geo_view/geo_vector_layer.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi # Copyright 2011-2012 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 # ...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi # Copyright 2011-2012 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 # ...
agpl-3.0
Python
371f54a813bb9b9ccc6f2454940cef2edbdb6596
fix thumbnail generation error for even biggetr files, in filer_gui_tags/changelist/imagefield
rouxcode/django-filer-addons,rouxcode/django-filer-addons,rouxcode/django-filer-addons,rouxcode/django-filer-addons
filer_addons/filer_gui/templatetags/filer_gui_tags.py
filer_addons/filer_gui/templatetags/filer_gui_tags.py
from django import template from easy_thumbnails.engine import NoSourceGenerator from easy_thumbnails.exceptions import InvalidImageFormatError from easy_thumbnails.files import get_thumbnailer # TODO: remove this again, as the NoSourceGenerator exception is now handled? # support very big images # https://stackoverflo...
from django import template from easy_thumbnails.exceptions import InvalidImageFormatError from easy_thumbnails.files import get_thumbnailer # support very big images # https://stackoverflow.com/questions/51152059/pillow-in-python-wont-let-me-open-image-exceeds-limit import PIL.Image PIL.Image.MAX_IMAGE_PIXELS = 933120...
mit
Python
108d30b88f923e30729fcddd41f3ecf472d9d1a0
Fix notification base backend can_send
jessamynsmith/boards-backend,jessamynsmith/boards-backend,GetBlimp/boards-backend
blimp_boards/notifications/backends/base.py
blimp_boards/notifications/backends/base.py
from django.conf import settings from django.template import Context from django.template.loader import render_to_string class BaseBackend(object): """ The base backend. """ def __init__(self, medium): self.medium = medium def can_send(self, user, notice_type): """ Determi...
from django.conf import settings from django.template import Context from django.template.loader import render_to_string class BaseBackend(object): """ The base backend. """ def __init__(self, medium): self.medium = medium def can_send(self, user, notice_type): """ Determi...
agpl-3.0
Python
6a4879868f4801e547a7fc31ac34215bd544a273
Add test line
lcdi/Inventory,lcdi/Inventory,lcdi/Inventory,lcdi/Inventory
inventory.wsgi
inventory.wsgi
import sys sys.path.insert(0, '/var/www/inventory') os.chdir("/var/www/inventory") from inventory import app as application
import sys sys.path.insert(0, '/var/www/inventory') from inventory import app as application
mit
Python
1d975b82764cb5aa6f8e1d093ef3015da9507c2d
Update version to 0.6.0
chiaki64/Windless,chiaki64/Windless
core/__init__.py
core/__init__.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __version__ = '0.6.0' __author__ = 'Hieda no Chiaki'
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __version__ = '0.3.0' __author__ = 'Hieda no Chiaki'
mit
Python
e0451b6f43eda8ad5e649cb8216bcc3ec441b19c
Bump to version 0.2.9
fritzo/loom,posterior/loom,fritzo/loom,posterior/loom,posterior/loom,fritzo/loom
loom/__init__.py
loom/__init__.py
# Copyright (c) 2014, Salesforce.com, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # - Redistributions of source code must retain the above copyright # notice, this list of conditions...
# Copyright (c) 2014, Salesforce.com, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # - Redistributions of source code must retain the above copyright # notice, this list of conditions...
bsd-3-clause
Python
3a40ad36b921c7b3d9c5f452841df9bb879bf251
add signup back
liul85/daimaduan.com,DoubleCiti/daimaduan.com,DoubleCiti/daimaduan.com,liul85/daimaduan.com,liul85/daimaduan.com,DoubleCiti/daimaduan.com
daimaduan/views/users.py
daimaduan/views/users.py
# coding: utf-8 from daimaduan.bootstrap import app from daimaduan.bootstrap import login from bottle import request from bottle import redirect from bottle import abort from bottle import jinja2_view from daimaduan.models import User from daimaduan.forms import SignupForm from daimaduan.forms import SigninForm @ap...
# coding: utf-8 from daimaduan.bootstrap import app from daimaduan.bootstrap import login from bottle import request from bottle import redirect from bottle import abort from bottle import jinja2_view from daimaduan.models import User from daimaduan.forms import SignupForm from daimaduan.forms import SigninForm @ap...
bsd-3-clause
Python
4accecf64b0ffcda1a93faffd9559bfdaed360db
move app to root /
grahamgilbert/macnamer,grahamgilbert/macnamer,grahamgilbert/macnamer,grahamgilbert/macnamer
macnamer/urls.py
macnamer/urls.py
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^macnamer/', include('macnamer.foo.urls')), url(r'^login/$', 'django.contrib.auth.views.login'),...
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^macnamer/', include('macnamer.foo.urls')), url(r'^login/$', 'django.contrib.auth.views.login'),...
apache-2.0
Python
247fdd059bc93a1a576323f3cc50f4ef286dcc4f
Tag new version
dasSOZO/python-butter,wdv4758h/butter
butter/__init__.py
butter/__init__.py
#!/usr/bin/env python """Butter: library to give python access to linux's more lower level features""" __author__ = "Da_Blitz" __version__ = "0.2" __email__ = "code@pocketnix.org" __license__ = "BSD (3 Clause)" __url__ = "http://code.pocketnix.org/" __testsuite__ = "tests.testall"
#!/usr/bin/env python """Butter: library to give python access to linux's more lower level features""" __author__ = "Da_Blitz" __version__ = "0.1" __email__ = "code@pocketnix.org" __license__ = "BSD (3 Clause)" __url__ = "http://code.pocketnix.org/" __testsuite__ = "tests.testall"
bsd-3-clause
Python