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
419536171428e5e5bb69fc37cb2ce40640afabc2
Change __init__.py to import only Anser
iconpin/anser
anser/__init__.py
anser/__init__.py
from .server import Anser
from .server import *
mit
Python
adcb7af597c77d85eb9234d91e2c0bd8575630e1
Remove references to old resources
xtrinch/fcm-django
fcm_django/api/__init__.py
fcm_django/api/__init__.py
from django.conf import settings if "tastypie" in settings.INSTALLED_APPS: # Tastypie resources are importable from the api package level (backwards compatibility) from .tastypie import APNSDeviceAuthenticatedResource, FCMDeviceResource __all__ = [ "APNSDeviceAuthenticatedResource", "FCMDeviceResource", ]
from django.conf import settings if "tastypie" in settings.INSTALLED_APPS: # Tastypie resources are importable from the api package level (backwards compatibility) from .tastypie import APNSDeviceResource, GCMDeviceResource, WNSDeviceResource, APNSDeviceAuthenticatedResource, \ GCMDeviceAuthenticatedResource, WNSD...
mit
Python
7a76c470b5f79d2ed2b8e359c0d99612226dd1e5
Remove unused sys import
ulfalizer/Kconfiglib,ulfalizer/Kconfiglib
genconfig.py
genconfig.py
#!/usr/bin/env python # Copyright (c) 2018, Ulf Magnusson # SPDX-License-Identifier: ISC # Generates a C header from the configuration, matching the format of # include/generated/autoconf.h in the kernel. # # Optionally generates a directory structure with one file per symbol that can # be used to implement increment...
#!/usr/bin/env python # Copyright (c) 2018, Ulf Magnusson # SPDX-License-Identifier: ISC # Generates a C header from the configuration, matching the format of # include/generated/autoconf.h in the kernel. # # Optionally generates a directory structure with one file per symbol that can # be used to implement increment...
isc
Python
8bb536e4c7d25c36877061aa8247d076c65f5726
Add MAGE module
ngageoint/geoq,ngageoint/geoq,ngageoint/geoq,ngageoint/geoq
geoq/urls.py
geoq/urls.py
# -*- coding: utf-8 -*- # This technical data was produced for the U. S. Government under Contract No. W15P7T-13-C-F600, and # is subject to the Rights in Technical Data-Noncommercial Items clause at DFARS 252.227-7013 (FEB 2012) from django.contrib import admin from django.conf.urls import patterns, include, url from...
# -*- coding: utf-8 -*- # This technical data was produced for the U. S. Government under Contract No. W15P7T-13-C-F600, and # is subject to the Rights in Technical Data-Noncommercial Items clause at DFARS 252.227-7013 (FEB 2012) from django.contrib import admin from django.conf.urls import patterns, include, url from...
mit
Python
5ac7b74eeb6a1eaf085c41336e89fa187160ee58
fix print in cgi version
fiskus/rndy,fiskus/rndy,fiskus/rndy
getpw-cgi.py
getpw-cgi.py
#!/usr/bin/env python # -*- coding: UTF-8 -*- import cgi import hashlib import base64 form = cgi.FieldStorage() def pwget(username, domain, masterPassword): password = hashlib.sha1() password.update(username) password.update(domain) password.update(masterPassword) sha1hash = password.hexdigest() ...
#!/usr/bin/env python # -*- coding: UTF-8 -*- import cgi import hashlib import base64 form = cgi.FieldStorage() def pwget(username, domain, masterPassword): password = hashlib.sha1() password.update(username) password.update(domain) password.update(masterPassword) sha1hash = password.hexdigest() ...
mit
Python
64cefb267371f915b26d23f6120bca8959cb4c1c
Exclude Russian.SE from gibberish classification
Charcoal-SE/SmokeDetector,NickVolynkin/SmokeDetector,NickVolynkin/SmokeDetector,ArtOfCode-/SmokeDetector,ArtOfCode-/SmokeDetector,Charcoal-SE/SmokeDetector
gibberish.py
gibberish.py
from GibberishClassifier import gibberishclassifier import regex import string from HTMLParser import HTMLParser from datahandling import is_frequent_sentence def strip_unwanted(body, site): body_no_code = regex.sub("<pre>.*?</pre>", "", body, flags=regex.DOTALL) body_no_code = regex.sub("<code>.*?</code>", "...
from GibberishClassifier import gibberishclassifier import regex import string from HTMLParser import HTMLParser from datahandling import is_frequent_sentence def strip_unwanted(body, site): body_no_code = regex.sub("<pre>.*?</pre>", "", body, flags=regex.DOTALL) body_no_code = regex.sub("<code>.*?</code>", "...
apache-2.0
Python
b993a4a753c5776974103ffa1c347588e5ab07ea
Fix test_image path
CenterForOpenScience/modular-file-renderer,TomBaxter/modular-file-renderer,chrisseto/modular-file-renderer,AddisonSchiller/modular-file-renderer,Johnetordoff/modular-file-renderer,CenterForOpenScience/modular-file-renderer,Johnetordoff/modular-file-renderer,rdhyee/modular-file-renderer,haoyuchen1992/modular-file-render...
mfr/ext/image/tests/test_image.py
mfr/ext/image/tests/test_image.py
import pytest import sys from mfr.ext import image as mfr_image from ..render import render_img_tag @pytest.mark.parametrize('filename', [ 'image.jpeg', 'image.png', 'image.jpg', 'image.bmp', 'image.JPEG', 'image.PNG', 'image.JPG', 'image.BMP', 'image.Jpeg', 'image.pnG', ]) def ...
import pytest import sys from mfr.ext import image as mfr_image from ..render import render_img_tag @pytest.mark.parametrize('filename', [ 'image.jpeg', 'image.png', 'image.jpg', 'image.bmp', 'image.JPEG', 'image.PNG', 'image.JPG', 'image.BMP', 'image.Jpeg', 'image.pnG', ]) def ...
apache-2.0
Python
64daa53d513900f9c61cfceb9d8e48a16d6b0b6c
add PMs access points
CyboLabs/XdaPy
XdaPy/pms.py
XdaPy/pms.py
# Copyright (C) 2014 cybojenix <anthonydking@slimroms.net> # # This file is part of XdaPy. # # XdaPy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any l...
# Copyright (C) 2014 cybojenix <anthonydking@slimroms.net> # # This file is part of XdaPy. # # XdaPy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any l...
apache-2.0
Python
c925a7f5d28371ec47e71301b2c9ae8fa1a5d720
Tweak upload script default values.
cdriehuys/chmvh-website,cdriehuys/chmvh-website,cdriehuys/chmvh-website
extras/gallery_sync.py
extras/gallery_sync.py
#!/usr/bin/env python """Script to upload pictures to the gallery. This script scans a local picture folder to determine which patients have not yet been created in the gallery. It then creates the missing patients. """ from getpass import getpass import os import requests DOMAIN = input('Enter base site domain (...
#!/usr/bin/env python """Script to upload pictures to the gallery. This script scans a local picture folder to determine which patients have not yet been created in the gallery. It then creates the missing patients. """ from getpass import getpass import os import requests API_URL = 'http://localhost:8000/gallery...
mit
Python
7fde9e3a2460a7125a40a935b3b542bb4e6a577b
bump version to 0.5
zhang-z/fabistrano
fabistrano/__init__.py
fabistrano/__init__.py
__version__ = '0.5'
__version__ = '0.4'
bsd-2-clause
Python
0e5b2af3fe04bd12b95b15215db0416b79c25df6
Fix non existing useragents shortcut
sebalas/fake-useragent,hellysmile/fake-useragent,hellysmile/fake-useragent,hellysmile/fake-useragent,mochawich/fake-useragent
fake_useragent/fake.py
fake_useragent/fake.py
import os import random try: import json except ImportError: import simplejson as json from fake_useragent import settings from fake_useragent.build import build_db class UserAgent(object): def __init__(self): super(UserAgent, self).__init__() # check db json file exists if not os...
import os import random try: import json except ImportError: import simplejson as json from fake_useragent import settings from fake_useragent.build import build_db class UserAgent(object): def __init__(self): super(UserAgent, self).__init__() # check db json file exists if not os...
apache-2.0
Python
af42ade5fb7bb0ee5335f01c14700d677a1a0113
fix mission Permission reference in migration
RedPanal/redpanal,RedPanal/redpanal,RedPanal/redpanal
redpanal/core/migrations/0001_initial.py
redpanal/core/migrations/0001_initial.py
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2019-10-08 00:35 from __future__ import unicode_literals from django.db import migrations from users.models import DEFAULT_GROUP def create_default_group(apps, schema_editor): Group = apps.get_model('auth', 'Group') User = apps.get_model('auth', 'User') ...
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2019-10-08 00:35 from __future__ import unicode_literals from django.db import migrations from users.models import DEFAULT_GROUP def create_default_group(apps, schema_editor): Group = apps.get_model('auth', 'Group') User = apps.get_model('auth', 'User') ...
agpl-3.0
Python
fc569c445789011df0a0de29382ad549b3f71af1
delete unused debug print
RoboJackets/robocup-software,RoboJackets/robocup-software,RoboJackets/robocup-software,RoboJackets/robocup-software
rj_gameplay/rj_gameplay/role/receiver.py
rj_gameplay/rj_gameplay/role/receiver.py
import stp from rj_gameplay.skill import receive, line_kick, pivot_kick from rj_msgs.msg import RobotIntent class ReceiverRole(stp.role.Role): def __init__(self, robot: stp.rc.Robot) -> None: super().__init__(robot) self.receive_skill = None # TODO: make FSM class (or at least use enum ...
import stp from rj_gameplay.skill import receive, line_kick, pivot_kick from rj_msgs.msg import RobotIntent class ReceiverRole(stp.role.Role): def __init__(self, robot: stp.rc.Robot) -> None: super().__init__(robot) self.receive_skill = None # TODO: make FSM class (or at least use enum ...
apache-2.0
Python
d958817b10b2eef8721ae5b47146a56b48f35153
Update 0014_add_alert_rearm_seconds.py
moritz9/redash,rockwotj/redash,guaguadev/redash,pubnative/redash,alexanderlz/redash,denisov-vlad/redash,ninneko/redash,jmvasquez/redashtest,rockwotj/redash,pubnative/redash,jmvasquez/redashtest,alexanderlz/redash,denisov-vlad/redash,ninneko/redash,akariv/redash,easytaxibr/redash,EverlyWell/redash,M32Media/redash,deniso...
migrations/0014_add_alert_rearm_seconds.py
migrations/0014_add_alert_rearm_seconds.py
from playhouse.migrate import PostgresqlMigrator, migrate from redash.models import db from redash import models if __name__ == '__main__': db.connect_db() migrator = PostgresqlMigrator(db.database) with db.database.transaction(): migrate( migrator.add_column('alerts', 'rearm', models...
from playhouse.migrate import PostgresqlMigrator, migrate from redash.models import db from redash import models if __name__ == '__main__': db.connect_db() migrator = PostgresqlMigrator(db.database) with db.database.transaction(): column = models.Alert.rearm column.null = True mig...
bsd-2-clause
Python
2334350bb2b51f1805c65121ff5b9dd1735f9913
remove default OGER_API_URL
weblyzard/weblyzard_api,weblyzard/weblyzard_api,weblyzard/weblyzard_api
src/python/weblyzard_api/client/__init__.py
src/python/weblyzard_api/client/__init__.py
#!/usr/bin/python # -*- coding: utf-8 -*- ''' **webLyzard web service clients** .. codeauthor:: Albert Weichselbraun <albert.weichselbraun@htwchur.ch> .. codeauthor:: Heinz-Peter Lang <lang@weblyzard.com> ''' from os import getenv WEBLYZARD_API_URL = getenv("WEBLYZARD_API_URL") or "http://localhost:8080" WEBLYZARD_AP...
#!/usr/bin/python # -*- coding: utf-8 -*- ''' **webLyzard web service clients** .. codeauthor:: Albert Weichselbraun <albert.weichselbraun@htwchur.ch> .. codeauthor:: Heinz-Peter Lang <lang@weblyzard.com> ''' from os import getenv WEBLYZARD_API_URL = getenv("WEBLYZARD_API_URL") or "http://localhost:8080" WEBLYZARD_AP...
apache-2.0
Python
caf982d0574f27b66d1e8bc8362ee9b94c79611f
Fix a typo.
ibus/ibus-cros,luoxsbupt/ibus,fujiwarat/ibus,Keruspe/ibus,Keruspe/ibus,ueno/ibus,fujiwarat/ibus,Keruspe/ibus,Keruspe/ibus,phuang/ibus,fujiwarat/ibus,ueno/ibus,j717273419/ibus,ueno/ibus,ibus/ibus,phuang/ibus,phuang/ibus,ibus/ibus,ibus/ibus,luoxsbupt/ibus,ibus/ibus-cros,ueno/ibus,ibus/ibus-cros,ibus/ibus-cros,j717273419/...
ibus/factory.py
ibus/factory.py
# vim:set et sts=4 sw=4: # # ibus - The Input Bus # # Copyright (c) 2007-2008 Huang Peng <shawn.p.huang@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of ...
# vim:set et sts=4 sw=4: # # ibus - The Input Bus # # Copyright (c) 2007-2008 Huang Peng <shawn.p.huang@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of ...
lgpl-2.1
Python
d90678b305d76e29d2583a2b1148ef45aef93ae5
fix py27
PyThaiNLP/pythainlp
pythainlp/romanization/__init__.py
pythainlp/romanization/__init__.py
# -*- coding: utf-8 -*- from __future__ import absolute_import,unicode_literals import icu import six __all__ = ['romanization'] # ถอดเสียงภาษาไทยเป็น Latin def romanization(data): """เป็นคำสั่ง ถอดเสียงภาษาไทยเป็น Latin รับค่า ''str'' ข้อความ คืนค่าเป็น ''str'' ข้อความ Latin""" thai2latin = icu.Transliterator.create...
# -*- coding: utf-8 -*- from __future__ import absolute_import,unicode_literals __all__ = ['romanization'] try: from .pyicu import romanization except: print("error")
apache-2.0
Python
13dc6443500d09432c6410b766c5c6eda05fdf7a
Add as_data to multiple publicbody form
stefanw/froide,fin/froide,stefanw/froide,fin/froide,fin/froide,stefanw/froide,stefanw/froide,fin/froide,stefanw/froide
froide/publicbody/forms.py
froide/publicbody/forms.py
from django import forms from django.utils.translation import ugettext_lazy as _ from froide.helper.form_utils import JSONMixin from .models import PublicBody from .widgets import PublicBodySelect class PublicBodyForm(JSONMixin, forms.Form): publicbody = forms.ModelChoiceField( queryset=PublicBody.o...
from django import forms from django.utils.translation import ugettext_lazy as _ from froide.helper.form_utils import JSONMixin from .models import PublicBody from .widgets import PublicBodySelect class PublicBodyForm(JSONMixin, forms.Form): publicbody = forms.ModelChoiceField( queryset=PublicBody.o...
mit
Python
e77c3095d6572dd392215ae627cce0a241ad4c62
Bump version
dianchen96/gym,Farama-Foundation/Gymnasium,dianchen96/gym,Farama-Foundation/Gymnasium
gym/version.py
gym/version.py
VERSION = '0.2.11'
VERSION = '0.2.10'
mit
Python
e6dccf9aa31bcf12a4615287bdfb700b10f2796e
add test to suite
qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq
corehq/apps/accounting/tests/__init__.py
corehq/apps/accounting/tests/__init__.py
from __future__ import absolute_import from .test_models import * from .test_invoicing import * from .test_wire_invoice import * from .test_invoice_factory import * from .test_credit_lines import * from .test_subscription_changes import * from .test_new_domain_subscription import * from .test_renew_subscription import...
from __future__ import absolute_import from .test_models import * from .test_invoicing import * from .test_wire_invoice import * from .test_invoice_factory import * from .test_credit_lines import * from .test_subscription_changes import * from .test_new_domain_subscription import *
bsd-3-clause
Python
c99902565b95eda1a4cfc12ab6af48c2f034112c
Rename Addshore's method to be sensible
tarrow/librarybase-pwb
addpapers.py
addpapers.py
import queryCiteFile import librarybase import pywikibot from epmclib.getPMCID import getPMCID from epmclib.exceptions import IDNotResolvedException import queue import threading import time def rununthreaded(): citefile = queryCiteFile.CiteFile() citations = citefile.findRowsWithIDType('pmc') ...
import queryCiteFile import librarybase import pywikibot from epmclib.getPMCID import getPMCID from epmclib.exceptions import IDNotResolvedException import queue import threading import time def doStuff(): citefile = queryCiteFile.CiteFile() citations = citefile.findRowsWithIDType('pmc') for ...
mit
Python
96cbe6cd5b1d86663fe44c7fb4351fdb9bf7b2eb
Add a docstring for MergeMap
ForeverWintr/metafunctions
metafunctions/map.py
metafunctions/map.py
import typing as tp import itertools from metafunctions.concurrent import FunctionMerge from metafunctions.operators import concat class MergeMap(FunctionMerge): def __init__(self, function:tp.Callable, merge_function:tp.Callable=concat): ''' MergeMap is a FunctionMerge with only one function. Wh...
import typing as tp import itertools from metafunctions.concurrent import FunctionMerge from metafunctions.operators import concat class MergeMap(FunctionMerge): def __init__(self, function:tp.Callable, merge_function:tp.Callable=concat): super().__init__(merge_function, (function, )) def _get_call_...
mit
Python
c465b1f0c995ac2cb7c6c8b4ad5f721f800e2864
Fix incorrect attributes in ARGparams class
khrapovs/argamma
argparams.py
argparams.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ARG parameters class """ from __future__ import print_function, division class ARGparams(object): """Class for ARG model parameters. Attributes ---------- scale : float rho : float delta : float beta : float theta : list Raises ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ARG parameters class """ from __future__ import print_function, division class ARGparams(object): """Class for ARG model parameters. Attributes ---------- scale : float rho : float delta : float Methods ------- convert_to_theta ...
mit
Python
8f66a21945fffd9a60f49e8cd3cb2d440357c9f0
Tidy up utils.py
django-oscar/django-oscar-stores,django-oscar/django-oscar-stores,django-oscar/django-oscar-stores
stores/utils.py
stores/utils.py
from django.conf import settings from django.core.exceptions import ImproperlyConfigured def get_current_ip(request): x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR', None) if x_forwarded_for: ip = x_forwarded_for.split(',')[0] else: ip = request.META.get('REMOTE_ADDR') retur...
from django.conf import settings from django.core.exceptions import ImproperlyConfigured def get_current_ip(request): x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR') if x_forwarded_for: ip = x_forwarded_for.split(',')[0] else: ip = request.META.get('REMOTE_ADDR') return ip ...
bsd-3-clause
Python
592862bc7d55e83ef5ff903bdef839df00a7c272
Print CF_TOKEN
vijayaustin/dra_bound_compare_with_estado,vijayaustin/dra_bound_compare_with_estado
is_dra_there.py
is_dra_there.py
#!/usr/bin/python import sys import requests if len(sys.argv) < 4: print "ERROR: TOOLCHAIN_ID, BEARER, or PROJECT_NAME are not defined." exit(1) TOOLCHAIN_ID = sys.argv[1] BEARER = sys.argv[2] PROJECT_NAME = sys.argv[3] DRA_SERVICE_NAME = 'draservicebroker' DRA_PRESENT = False print BEARER try...
#!/usr/bin/python import sys import requests if len(sys.argv) < 4: print "ERROR: TOOLCHAIN_ID, BEARER, or PROJECT_NAME are not defined." exit(1) TOOLCHAIN_ID = sys.argv[1] BEARER = sys.argv[2] PROJECT_NAME = sys.argv[3] DRA_SERVICE_NAME = 'draservicebroker' DRA_PRESENT = False try: r = re...
apache-2.0
Python
f6cb915be6cf0c1659ccde07607ba579314f253d
Fix tag name
Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org
Instanssi/kompomaatti/templatetags/kompomaatti_tags.py
Instanssi/kompomaatti/templatetags/kompomaatti_tags.py
# -*- coding: utf-8 -*- from django import template from Instanssi.kompomaatti.models import Compo register = template.Library() @register.inclusion_tag('kompomaatti/tags/compo_desc_list.html') def render_frontpage_compolist(event_id): return { 'event_id': event_id, 'compos': Compo.objects.filter...
# -*- coding: utf-8 -*- from django import template from Instanssi.kompomaatti.models import Compo register = template.Library() @register.inclusion_tag('kompomaatti/tags/compo_desc_list.html') def render_base_compos_nav(event_id): return { 'event_id': event_id, 'compos': Compo.objects.filter(eve...
mit
Python
935892c03d24dbfb061d61996a672bf804d3bb00
return empty object if user not logged in
openstax/openstax-cms,Connexions/openstax-cms,openstax/openstax-cms,Connexions/openstax-cms,openstax/openstax-cms,openstax/openstax-cms
api/views.py
api/views.py
from django.core.management import call_command from django.utils.six import StringIO from django.http import JsonResponse from rest_framework import viewsets from salesforce.models import Adopter from salesforce.functions import check_if_faculty_pending from social.apps.django_app.default.models import \ DjangoSto...
from django.core.management import call_command from django.utils.six import StringIO from django.http import JsonResponse from rest_framework import viewsets from salesforce.models import Adopter from salesforce.functions import check_if_faculty_pending from social.apps.django_app.default.models import \ DjangoSto...
agpl-3.0
Python
61fcd8ba9fd6d99b36ac030cf01e43a63d4c16dc
fix bugs
onelab-eu/sfa,yippeecw/sfa,yippeecw/sfa,yippeecw/sfa,onelab-eu/sfa,onelab-eu/sfa
geni/methods/get_ticket.py
geni/methods/get_ticket.py
from geni.util.faults import * from geni.util.excep import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed from geni.util.auth import Auth from geni.util.cert import Keypair from geni.util.geniticket import * class get_ticket(Method): """ Retrieve a ticket. This operatio...
from geni.util.faults import * from geni.util.excep import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed from geni.util.auth import Auth from geni.util.cert import Keypair from geni.util.geniticket import * class get_ticket(Method): """ Retrieve a ticket. This operatio...
mit
Python
058b6d2d8319e65af36fcb35eadfb0dda37f32aa
Add ability to reset the create form in the view.
jawrainey/atc,jawrainey/atc
app/forms.py
app/forms.py
from app import models from flask.ext.wtf import Form from werkzeug.datastructures import MultiDict from wtforms import StringField, SubmitField, PasswordField, validators import datetime import re class LoginForm(Form): username = StringField('Username: ', [validators.Required(message='You must provide a usernam...
from app import models from flask.ext.wtf import Form from wtforms import StringField, SubmitField, PasswordField, validators import datetime import re class LoginForm(Form): username = StringField('Username: ', [validators.Required(message='You must provide a username.')]) password = PasswordField('Password:...
mit
Python
037c2bc9857fc1feb59f7d4ad3cb81575177e675
Drop func annotations for the sake of Python 3.5
wk-tech/python-smsfly
src/smsfly/versiontools.py
src/smsfly/versiontools.py
"""Version tools set.""" import os from setuptools_scm import get_version def get_version_from_scm_tag( *, root='.', relative_to=None, local_scheme='node-and-date', ): """Retrieve the version from SCM tag in Git or Hg.""" try: return get_version( root=root...
"""Version tools set.""" import os from setuptools_scm import get_version def get_version_from_scm_tag( *, root='.', relative_to=None, local_scheme='node-and-date', ) -> str: """Retrieve the version from SCM tag in Git or Hg.""" try: return get_version( ro...
mit
Python
206df4e20b8317b1a6ac4d6435b4e2a3e028bce2
Drop unused function
elastic-coders/aiohttp,KeepSafe/aiohttp,singulared/aiohttp,jashandeep-sohi/aiohttp,KeepSafe/aiohttp,mind1master/aiohttp,jettify/aiohttp,decentfox/aiohttp,arthurdarcet/aiohttp,vaskalas/aiohttp,esaezgil/aiohttp,esaezgil/aiohttp,pfreixes/aiohttp,esaezgil/aiohttp,Insoleet/aiohttp,panda73111/aiohttp,rutsky/aiohttp,mind1mast...
tests/test_py35/test_web_websocket_35.py
tests/test_py35/test_web_websocket_35.py
import pytest import asyncio from aiohttp import web, websocket from aiohttp.websocket_client import MsgType, ws_connect @pytest.mark.run_loop async def test_await(loop, create_server): closed = asyncio.Future(loop=loop) async def handler(request): ws = web.WebSocketResponse() await ws.prep...
import pytest import asyncio from aiohttp import web, websocket from aiohttp.websocket_client import MsgType, ws_connect async def create_server(loop, port, method, path, route_handler): app = web.Application(loop=loop) app.router.add_route(method, path, route_handler) handler = app.make_handler(keep_al...
apache-2.0
Python
6f03001d66504ceb085e87c7dfbc9c9007571080
Put the version/revision in the header.
dabodev/dabodoc,dabodev/dabodoc,dabodev/dabodoc
api/makeApiDoc.py
api/makeApiDoc.py
#!/usr/bin/env python # Run this script to generate the epydoc documentation. import sys import os import dabo dabo.ui.loadUI("wx") _outputType = "html" #_outputType = "pdf" # I think "included" is the nicest format: _inheritanceFormat = "included" ## lists all attributes together, with text that shows where inhe...
#!/usr/bin/env python # Run this script to generate the epydoc documentation. import sys import os import dabo dabo.ui.loadUI("wx") _outputType = "html" #_outputType = "pdf" # I think "included" is the nicest format: _inheritanceFormat = "included" ## lists all attributes together, with text that shows where inhe...
mit
Python
b0a7485a1859aa80b1d0745248e93daf49f6e278
Create table!!!
jrn223/Freestyle
app/Stock_market_data.py
app/Stock_market_data.py
# for email functionality, credit @s2t2 import os import sendgrid from sendgrid.helpers.mail import * # source of Email, Content, Mail, etc. # for day of week import datetime # to query Google stock data from pandas_datareader import data from datetime import date, timedelta #for sorting biggest gains to biggest los...
# for email functionality, credit @s2t2 import os import sendgrid from sendgrid.helpers.mail import * # source of Email, Content, Mail, etc. # for day of week import datetime # to query Google stock data from pandas_datareader import data from datetime import date, timedelta #for sorting biggest gains to biggest los...
mit
Python
c2598058722531662aab8831640fc367689d2a43
Update Fasttext pretrained vectors location
lvapeab/nmt-keras,lvapeab/nmt-keras
tests/utils/test_process_word_vectors.py
tests/utils/test_process_word_vectors.py
import inspect import os import pytest import numpy as np from subprocess import call from utils.preprocess_text_word_vectors import txtvec2npy def test_text_word2vec2npy(): # check whether files are present in folder vectors_name = 'wiki.fiu_vro.vec' path = os.path.dirname(inspect.getfile(inspect.current...
import inspect import os import pytest import numpy as np from subprocess import call from utils.preprocess_text_word_vectors import txtvec2npy def test_text_word2vec2npy(): # check whether files are present in folder vectors_name = 'wiki.fiu_vro.vec' path = os.path.dirname(inspect.getfile(inspect.current...
mit
Python
dc096b891589e174db300dc2c4ce30374b518ad5
change filename newindex to index
bruce3557/NTHUOJ_web,henryyang42/NTHUOJ_web,nthuoj/NTHUOJ_web,bbiiggppiigg/NTHUOJ_web,geniusgordon/NTHUOJ_web,Changron/NTHUOJ_web,bruce3557/NTHUOJ_web,geniusgordon/NTHUOJ_web,drowsy810301/NTHUOJ_web,bbiiggppiigg/NTHUOJ_web,nthuoj/NTHUOJ_web,Changron/NTHUOJ_web,geniusgordon/NTHUOJ_web,bbiiggppiigg/NTHUOJ_web,drowsy81030...
index/views.py
index/views.py
''' The MIT License (MIT) Copyright (c) 2014 NTHUOJ team 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 limitation the rights to use, copy, modify, merge, ...
''' The MIT License (MIT) Copyright (c) 2014 NTHUOJ team 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 limitation the rights to use, copy, modify, merge, ...
mit
Python
8c7f94db1cc448166b81a840708c26866c46a2ad
add v0.3.2 (#24262)
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack
var/spack/repos/builtin/packages/py-fiscalyear/package.py
var/spack/repos/builtin/packages/py-fiscalyear/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyFiscalyear(PythonPackage): """fiscalyear is a small, lightweight Python module providing...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyFiscalyear(PythonPackage): """fiscalyear is a small, lightweight Python module providing...
lgpl-2.1
Python
760447a190b2908d47b14adaa6b1ad1a9369524c
Use Django 1.2 for the cron/tasks instance too.
mihaip/streamspigot,mihaip/streamspigot,mihaip/streamspigot,mihaip/streamspigot
app/cron_tasks.py
app/cron_tasks.py
import logging import os import sys from google.appengine.dist import use_library use_library('django', '1.2') os.environ['DJANGO_SETTINGS_MODULE'] = 'django_settings' # Tweak import path so that httplib2 (which lives in datasources) can be # imported as httplib2 while the app is running. # TODO(mihaip): move httpli...
import logging import os import sys # Tweak import path so that httplib2 (which lives in datasources) can be # imported as httplib2 while the app is running. # TODO(mihaip): move httplib2 (and oauth2 and python-twitter) into a third_party # directory. APP_DIR = os.path.abspath(os.path.dirname(__file__)) DATASOURCES_DI...
apache-2.0
Python
89ba45c7ce6964a4b97b55a98569d4e676900831
Remove empty line
alrusdi/python-social-auth,tkajtoch/python-social-auth,JerzySpendel/python-social-auth,barseghyanartur/python-social-auth,python-social-auth/social-core,mrwags/python-social-auth,garrett-schlesinger/python-social-auth,lamby/python-social-auth,DhiaEddineSaidi/python-social-auth,drxos/python-social-auth,mchdks/python-soc...
social/apps/django_app/default/fields.py
social/apps/django_app/default/fields.py
import json import six from django.core.exceptions import ValidationError from django.db import models try: from django.utils.encoding import smart_unicode as smart_text smart_text # placate pyflakes except ImportError: from django.utils.encoding import smart_text class BaseJSONField(models.TextField):...
import json import six from django.core.exceptions import ValidationError from django.db import models try: from django.utils.encoding import smart_unicode as smart_text smart_text # placate pyflakes except ImportError: from django.utils.encoding import smart_text class BaseJSONField(models.TextField):...
bsd-3-clause
Python
c97433f4a898f1e0bb94ee42752947cbd7cd960e
Change menu
sevazhidkov/leonard
modules/menu.py
modules/menu.py
import random import telegram MENU = [[('handler', 'Places ☕ 🍝 🏨', 'foursquare-location-choice'), ('handler', 'Weather 🌤 ☔️ ⛄️', 'weather-show')], [('handler', 'Vinci filters 🌇 🏙 🌃', 'vinci-upload-image'), ('handler', 'Get Uber 🚘', 'uber-choose-location')], [('handler', 'Subscr...
import random import telegram MENU = [[('handler', 'Places ☕ 🍝 🏨', 'foursquare-location-choice'), ('handler', 'Weather 🌤 ☔️ ⛄️', 'weather-show')], [('handler', 'Vinci filters 🌇 🏙 🌃', 'vinci-upload-image'), ('handler', 'Get Uber 🚘', 'uber-choose-location')], [('handler', 'Subscr...
mit
Python
a93c74efbf649b17ba93859089bd560fc93c86a3
Bump version to 0.9.0
artefactual/archivematica-storage-service,artefactual/archivematica-storage-service,artefactual/archivematica-storage-service,artefactual/archivematica-storage-service
storage_service/storage_service/__init__.py
storage_service/storage_service/__init__.py
__version__ = '0.9.0'
__version__ = '0.8.0'
agpl-3.0
Python
f2084ff964d4aa92e9f6c6c1603d90dd26dab15f
Use tuple django version to compare version
GetStream/stream-django,GetStream/stream-django
stream_django/templatetags/activity_tags.py
stream_django/templatetags/activity_tags.py
import django from django import template from django.template import Context, loader from stream_django.exceptions import MissingDataException import logging logger = logging.getLogger(__name__) register = template.Library() LOG = 'warn' IGNORE = 'ignore' FAIL = 'fail' missing_data_policies = [LOG, IGNORE, FAIL] ...
import django from django import template from django.template import Context, loader from stream_django.exceptions import MissingDataException import logging logger = logging.getLogger(__name__) register = template.Library() LOG = 'warn' IGNORE = 'ignore' FAIL = 'fail' missing_data_policies = [LOG, IGNORE, FAIL] ...
bsd-3-clause
Python
7f88cf0efb2044151365fb391965e848c3c9ee26
Fix AAAPT
NicoSantangelo/sublime-text-trello
test_harness.py
test_harness.py
from AAAPT.runner import register_tests test_suites = { 'card_options': ['Trello.tests.test_card_options'], 'executable' : ['Trello.tests.test_executable'], 'operations' : ['Trello.tests.test_operations'], 'comment_formatter': ['Trello.tests.test_comment_formatter'] } register_tests(test_suites)
from AAAPT.runner import register_tests test_suites = { 'card_options': ['Trello.tests.test_card_options'], 'navigator': ['Trello.tests.test_navigator'], 'operations': ['Trello.tests.test_operations'] } register_tests(test_suites)
mit
Python
82f4694b5ddaa3bbcbc555ebeeb1501d10e4fd0c
Fix and re-enable test_disassociate_not_associated_floating_ip
manasi24/tempest,dkalashnik/tempest,danielmellado/tempest,neerja28/Tempest,neerja28/Tempest,JioCloud/tempest,rzarzynski/tempest,afaheem88/tempest_neutron,eggmaster/tempest,danielmellado/tempest,tonyli71/tempest,CiscoSystems/tempest,yamt/tempest,pandeyop/tempest,alinbalutoiu/tempest,roopali8/tempest,hayderimran7/tempest...
tempest/thirdparty/boto/test_ec2_network.py
tempest/thirdparty/boto/test_ec2_network.py
# Copyright 2012 OpenStack Foundation # 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 requ...
# Copyright 2012 OpenStack Foundation # 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 requ...
apache-2.0
Python
143dfbd65fc8d55a9595453907d5a2c67ebc0cd6
Move close connection auth required to own method
richtier/alexa-browser-client,richtier/alexa-browser-client
alexa_browser_client/alexa_browser_client/consumers.py
alexa_browser_client/alexa_browser_client/consumers.py
import json from channels.generic.websockets import WebsocketConsumer from django.conf import settings from .helpers import AudioLifecycle from alexa_browser_client.refreshtoken.constants import ( SESSION_KEY_REFRESH_TOKEN ) from .constants import AUTH_REQUIRED class AlexaConsumer(WebsocketConsumer): life...
import json from channels.generic.websockets import WebsocketConsumer from django.conf import settings from .helpers import AudioLifecycle from alexa_browser_client.refreshtoken.constants import ( SESSION_KEY_REFRESH_TOKEN ) from .constants import AUTH_REQUIRED class AlexaConsumer(WebsocketConsumer): life...
mit
Python
3578e0ec8d70ad73112d8af7c38f7b65950d91aa
Fix file exists error
haeusser/tensorflow,yongtang/tensorflow,AnishShah/tensorflow,tensorflow/tensorflow-pywrap_saved_model,girving/tensorflow,xodus7/tensorflow,aldian/tensorflow,alshedivat/tensorflow,petewarden/tensorflow_makefile,ibmsoe/tensorflow,memo/tensorflow,anand-c-goog/tensorflow,mavenlin/tensorflow,lukeiwanski/tensorflow,jbedorf/t...
tensorflow/python/training/training_util.py
tensorflow/python/training/training_util.py
# Copyright 2015 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 2015 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
c5dbbb9d9c9b0b0313c9f59c7684fe63ba2190d1
add coming soon
munisisazade/developer_portal,munisisazade/developer_portal,munisisazade/developer_portal
news/urls.py
news/urls.py
from django.conf.urls import url from news.views import TestView, index,AboutView,GalleryView,ContactsView,PrivacyView,CategoryDetailView,ComingSoonView urlpatterns = [ url(r'^$', index, name='index'), url(r'^index.aspx$', TestView.as_view(), name='main-index'), url(r'^about-us.aspx$', AboutView.as_view(),...
from django.conf.urls import url from news.views import TestView, index,AboutView,GalleryView,ContactsView,PrivacyView,CategoryDetailView,ComingSoonView urlpatterns = [ url(r'^$', index, name='index'), url(r'^index.aspx$', TestView.as_view(), name='main-index'), url(r'^about-us.aspx$', AboutView.as_view(),...
mit
Python
268b3afeba37bb20f70f8646d88c0e78ad1ee5aa
Update imageNeurons.py
openworm/Blender2NeuroML
src/NeuronBlenderImaging/imageNeurons.py
src/NeuronBlenderImaging/imageNeurons.py
"""Blender's API isn't great for automating repetitive tasks like this. It runs code asynchronously and even when trying to use the queue module, It just ignored my task ordering. (But maybe you could do it?) So this is a pyautogui script that simulates key presses on my 1080p display. It theoretically should work on...
"""Blender's API isn't great for automating repeatative tasks like this. It runs code asyncrously and even when trying to use the queue module, It just ignored my task ordering. (But maybe you could do it?) So this is a pyautogui script that simulates key presses on my 1080p display. It theoretically should work on o...
mit
Python
7377186560167f3ad5b0d368681d6e0fda755954
Update base.py
Effective-Quadratures/Effective-Quadratures,psesh/Effective-Quadratures
effective_quadratures/base.py
effective_quadratures/base.py
import numpy as np from parameter import Parameter from polynomial import Polynomial from indexset import IndexSet from effectivequads import EffectiveSubsampling from computestats import Statistics import analyticaldistributions as analytical from utils import error_function, evalfunction from qr import mgs_pivoting, ...
import numpy as np from parameter import Parameter from polynomial import Polynomial from indexset import IndexSet from effectivequads import EffectiveSubsampling from computestats import Statistics import analyticaldistributions as analytical from utils import error_function, evalfunction from qr_factorization import ...
lgpl-2.1
Python
e067dc9c6ab5613ee69e3acb9759ead18f48df3a
fix buildout_git_dl to correctly select branch
anybox/anybox.buildbot.odoo
anybox/buildbot/openerp/build_utils/buildout_git_dl.py
anybox/buildbot/openerp/build_utils/buildout_git_dl.py
"""Utility to retrieve the buildout dir from git.""" import os from subprocess import check_call from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument('url') parser.add_argument('revspec') arguments = parser.parse_args() url = arguments.url revspec = arguments.revspec if not os.path.exis...
"""Utility to retrieve the buildout dir from git.""" import os from subprocess import check_call from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument('url') parser.add_argument('revspec') arguments = parser.parse_args() url = arguments.url revspec = arguments.revspec if not os.path.exis...
agpl-3.0
Python
8f1548534e320fbb0085b063d97208e8e3a75842
Remove old word freqs not needed
RichardLitt/language-niche-research,RichardLitt/language-niche-research
nltk_demo.py
nltk_demo.py
import nltk from sys import argv script, filename = argv # Open a text file corpus_file = open(filename, 'rU') print "Opened file", filename # Read the file in as a string # Note that for huge files, there are better ways to # do this text = corpus_file.read() print "Loaded text (first 50 chars):" prin...
import nltk from sys import argv script, filename = argv # Open a text file corpus_file = open(filename, 'rU') print "Opened file", filename # Read the file in as a string # Note that for huge files, there are better ways to # do this text = corpus_file.read() print "Loaded text (first 50 chars):" prin...
mit
Python
465f2d75975b91bd4685ec9872078c2d33004b31
Bump app version number.
joyxu/kernelci-backend,kernelci/kernelci-backend,kernelci/kernelci-backend,joyxu/kernelci-backend,joyxu/kernelci-backend
app/handlers/__init__.py
app/handlers/__init__.py
__version__ = "2015.1.6" __versionfull__ = __version__
__version__ = "2015.1.5" __versionfull__ = __version__
agpl-3.0
Python
9cf1584eaadb183781200d8cb184887b516d7fc0
Remove release and unrelease
solvebio/solvebio-python,solvebio/solvebio-python,solvebio/solvebio-python
solvebio/resource/depositoryversion.py
solvebio/resource/depositoryversion.py
"""Solvebio DepositoryVersion Resource""" import re from ..client import client from ..help import open_help from .solveobject import convert_to_solve_object from .apiresource import CreateableAPIResource, ListableAPIResource, \ UpdateableAPIResource from .dataset import Dataset class DepositoryVersion(Createab...
"""Solvebio DepositoryVersion Resource""" import re from ..client import client from ..help import open_help from .solveobject import convert_to_solve_object from .apiresource import CreateableAPIResource, ListableAPIResource, \ UpdateableAPIResource from .dataset import Dataset class DepositoryVersion(Createab...
mit
Python
3962b88d764c7179f7b051153b337d180a3ba8f4
Fix the django debug toolbar not appearing and the user echo thing slowing my loadings in development.
WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,1flow/1flow,1flow/1flow
oneflow/settings/snippets/djdt.py
oneflow/settings/snippets/djdt.py
# Debug-toolbar related INSTALLED_APPS += ('debug_toolbar', ) MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware', ) INTERNAL_IPS = ( '127.0.0.1', # gurney.licorn.org '109.190.93.141', # my LAN '192.168.111.23', '192.168.111.111', ) DEBUG_TOOLBAR_PANELS = ( 'debug_to...
# Debug-toolbar related INSTALLED_APPS += ('debug_toolbar', ) MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware', ) INTERNAL_IPS = ( '127.0.0.1', # leto.licorn.org '82.236.133.193', ) DEBUG_TOOLBAR_PANELS = ( 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', 'debug...
agpl-3.0
Python
bca338a0f945e74c97b4d7dd044090ed3b3f5b11
Fix up test for recent changes to restarter.
gratipay/aspen.py,gratipay/aspen.py
aspen/tests/test_restarter.py
aspen/tests/test_restarter.py
from aspen.cli import restarter from aspen.tests.fsfix import attach_teardown class Foo: pass def test_startup_basically_works(): website = Foo() website.changes_kill = True website.dotaspen = 'bar' website.root = 'foo' restarter.install(website) expected = [] actual = restarter.extras...
from aspen import restarter from aspen.tests.fsfix import attach_teardown class Foo: pass def test_startup_basically_works(): website = Foo() website.changes_kill = True website.dotaspen = 'bar' website.root = 'foo' restarter.startup(website) expected = [] actual = restarter.extras ...
mit
Python
402619cc5ff3540df26d22f6255e5589107c0a3c
add hint on student no.
ustclug/lug-vpn-web,ustclug/lug-vpn-web,ustclug/lug-vpn-web,ustclug/lug-vpn-web
app/forms.py
app/forms.py
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, SubmitField, TextAreaField, BooleanField, HiddenField from wtforms.validators import InputRequired, Email, EqualTo, Length class RegisterForm(FlaskForm): email = StringField('USTC Email', [InputRequired(), Email(), Length(max=63)]) ...
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, SubmitField, TextAreaField, BooleanField, HiddenField from wtforms.validators import InputRequired, Email, EqualTo, Length class RegisterForm(FlaskForm): email = StringField('USTC Email', [InputRequired(), Email(), Length(max=63)]) ...
agpl-3.0
Python
503b637d360d19782fd43991a4dccde98c635999
make facebook optional
abelsonlive/particle,abelsonlive/particle
particle/app.py
particle/app.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from thready import threaded import yaml, json import logging from particle.facebook import facebook from particle.twitter import twitter from particle.promopages import promopages from particle.rssfeeds import rssfeeds from particle.facebook import fb from particle.twitt...
#!/usr/bin/env python # -*- coding: utf-8 -*- from thready import threaded import yaml, json import logging from particle.facebook import facebook from particle.twitter import twitter from particle.promopages import promopages from particle.rssfeeds import rssfeeds from particle.facebook import fb from particle.twitt...
mit
Python
7fa124e513f266f5e6745e46dafa36fe7d7cc4c5
Bump develop version to 1.4.0-dev
WSULib/eulfedora
eulfedora/__init__.py
eulfedora/__init__.py
# file eulfedora/__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/LICENSE-2.0 # ...
# file eulfedora/__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/LICENSE-2.0 # ...
apache-2.0
Python
f9b08d3f6741d8dba8448f275ee591c9de04a484
Use pypi user when uploading the bootstrap script
pypa/setuptools,pypa/setuptools,pypa/setuptools
release.py
release.py
#!/usr/bin/env python """ Script to fully automate the release process. Requires Python 2.6+ with sphinx installed and the 'hg' command on the path. """ from __future__ import print_function import subprocess import shutil import os import sys VERSION='0.6.25' def get_next_version(): digits = map(int, VERSION.spl...
#!/usr/bin/env python """ Script to fully automate the release process. Requires Python 2.6+ with sphinx installed and the 'hg' command on the path. """ from __future__ import print_function import subprocess import shutil import os import sys VERSION='0.6.25' def get_next_version(): digits = map(int, VERSION.spl...
mit
Python
7897c734a0b8b434f717f7b348eadb5512ddeda4
Work on 0.7.4; fix typo in version string building.
cournape/numscons,cournape/numscons,cournape/numscons
release.py
release.py
import os CLASSIFIERS = """\ Development Status :: 3 - Alpha Intended Audience :: Science/Research Intended Audience :: Developers License :: OSI Approved Programming Language :: Python Topic :: Software Development Topic :: Scientific/Engineering Operating System :: Microsoft :: Windows Operating System :: POSIX Oper...
import os CLASSIFIERS = """\ Development Status :: 3 - Alpha Intended Audience :: Science/Research Intended Audience :: Developers License :: OSI Approved Programming Language :: Python Topic :: Software Development Topic :: Scientific/Engineering Operating System :: Microsoft :: Windows Operating System :: POSIX Oper...
bsd-3-clause
Python
660923e486a34095c04a6cd2b155980daf52455d
add server response
eirki/gargbot_3000,eirki/gargbot_3000,eirki/gargbot_3000,eirki/gargbot_3000
gargbot_3000/server.py
gargbot_3000/server.py
#! /usr/bin/env python3.6 # coding: utf-8 from gargbot_3000.logger import log import json from flask import Flask, request, g, Response from gargbot_3000 import config from gargbot_3000 import commands from gargbot_3000 import database_manager from gargbot_3000 import quotes from gargbot_3000 import droppics app = F...
#! /usr/bin/env python3.6 # coding: utf-8 from gargbot_3000.logger import log from flask import Flask, request, g from gargbot_3000 import commands from gargbot_3000 import database_manager from gargbot_3000 import quotes from gargbot_3000 import droppics app = Flask(__name__) def get_db(): db_connection = get...
mit
Python
9509b5ca5633a26ce8a36bec5062cd6285f62884
fix harmless typo: supdoc precedes doc, not itself (does not change component assignment)
fedora-conary/conary,fedora-conary/conary,fedora-conary/conary,fedora-conary/conary,fedora-conary/conary
config/components/base/supdoc.py
config/components/base/supdoc.py
# # Copyright (c) 2004-2006 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.opensource.org/...
# # Copyright (c) 2004-2006 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.opensource.org/...
apache-2.0
Python
23990de8b8333d03ad501c1b4eec22dc5c6d169b
return start and end tokens
usc-isi-i2/etk,usc-isi-i2/etk,usc-isi-i2/etk
etk/extractors/spacy_ner_extractor.py
etk/extractors/spacy_ner_extractor.py
import spacy from etk.extractor import Extractor, InputType from etk.extraction import Extraction from typing import List class SpacyNerExtractor(Extractor): """ **Description** This extractor takes a list of spaCy NER tag as reference, and extract the tag matched substring from the input text...
import spacy from etk.extractor import Extractor, InputType from etk.extraction import Extraction from typing import List class SpacyNerExtractor(Extractor): """ **Description** This extractor takes a list of spaCy NER tag as reference, and extract the tag matched substring from the input text...
mit
Python
ac646030848847ecac51f7a7907ab58a0b812797
Add pressure func
m-takeuchi/ilislife
plot_tdepend.py
plot_tdepend.py
#!/usr/bin/env python3 # coding: utf-8 import numpy as np import pandas as pd import matplotlib.pyplot as plt from matplotlib import gridspec # datafile = 'data/160725-171642.dat' def generate_plot(datafile): base = datafile.rsplit('.dat')[0] pdffile = base+'.pdf' data = pd.read_csv(datafile, delimiter=...
#!/usr/bin/env python3 # coding: utf-8 import numpy as np import pandas as pd import matplotlib.pyplot as plt from matplotlib import gridspec # datafile = 'data/160725-171642.dat' def generate_plot(datafile): base = datafile.rsplit('.dat')[0] pdffile = base+'.pdf' data = pd.read_csv(datafile, delimiter=...
mit
Python
231798a5bc18e4b7997626caf5da3b8b16fd5031
Fix res_lvk placement
russdill/pscad
res_lvk.py
res_lvk.py
# module res_lvk # # Copyright (C) 2012 Russ Dill <Russ.Dill@asu.edu> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later ...
# module res_lvk # # Copyright (C) 2012 Russ Dill <Russ.Dill@asu.edu> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later ...
lgpl-2.1
Python
f3ca61e03581b5e82e2254343458ed3094d503a6
Create unit test
esbranson/openlaw
util/aknnltk.py
util/aknnltk.py
#! /usr/bin/python3 -uW all # -*- coding: utf-8 -*- ## # Corpus reader for Akoma Ntoso documents. # from nltk.tokenize import word_tokenize, sent_tokenize from nltk.corpus.reader.xmldocs import XMLCorpusReader import unittest class AKNCorpusReader(XMLCorpusReader): """ Corpus reader for Akoma Ntoso documents. """...
#! /usr/bin/python3 -uW all # -*- coding: utf-8 -*- ## # Corpus reader for Akoma Ntoso documents. # # import nltk.text, aknnltk # t = nltk.text.Text(aknnltk.AKNCorpusReader('/tmp/openlaw-test', '.*\.xml').words('pen.xml')) # t.plot(20) # from nltk.tokenize import word_tokenize, sent_tokenize from nltk.corpus.reader.xm...
cc0-1.0
Python
dd39c73f9044815e82fa950f605b4b929d4f17f5
Return None instead of IndexError when there is no match!
karinassuni/assistscraper
assistscraper/lxml_helpers.py
assistscraper/lxml_helpers.py
from lxml import html def document(resource_name): return html.parse("http://www.assist.org/web-assist/" + resource_name) def find_by_name(tag, name, *, parent): return parent.find('.//{tag}[@name="{name}"]'.format(tag=tag, name=name)) def find_select(name, *, parent): return find_by_name("select", na...
from lxml import html def document(resource_name): return html.parse("http://www.assist.org/web-assist/" + resource_name) # TODO: catch IndexErrors in callers def find_by_name(tag, name, *, parent): return parent.xpath('//{tag}[@name="{name}"]'.format(tag=tag, ...
mit
Python
4df6bd73b75eda9d495a43c238ba661181fef8a4
remove dot from admin actions
willkg/django-waffle,rodgomes/django-waffle,rodgomes/django-waffle,rsalmaso/django-waffle,rsalmaso/django-waffle,willkg/django-waffle,rodgomes/django-waffle,rsalmaso/django-waffle,rodgomes/django-waffle,rsalmaso/django-waffle
waffle/admin.py
waffle/admin.py
from __future__ import unicode_literals from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from waffle.models import Flag, Sample, Switch class BaseAdmin(admin.ModelAdmin): search_fields = ('name', 'note') def get_actions(self, request): actions = super(BaseAdm...
from __future__ import unicode_literals from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from waffle.models import Flag, Sample, Switch class BaseAdmin(admin.ModelAdmin): search_fields = ('name', 'note') def get_actions(self, request): actions = super(BaseAdm...
bsd-3-clause
Python
f4d8c3191eb0e354db17cc70a0f601f7efab09a7
Bump 0.41
appium/python-client,appium/python-client
appium/version.py
appium/version.py
version = '0.41'
version = '0.40'
apache-2.0
Python
c26a3dacd472415a0c6623c566af92a5ab093dc4
add csrf_exempt
MySmile/sfchat,MySmile/sfchat,MySmile/sfchat,MySmile/sfchat
apps/csp/views.py
apps/csp/views.py
import json from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt from django.views.generic import View from django.http import HttpResponse import logging logger = logging.getLogger(__name__) class CSPReport(View): REPORT_KEYS = ( 'blocked-uri', ...
import json from django.views.generic import View from django.http import HttpResponse import logging logger = logging.getLogger(__name__) class CSPReport(View): REPORT_KEYS = ( 'blocked-uri', 'document-uri', 'original-policy', 'referrer', 'script-sample', 'source...
bsd-3-clause
Python
0855e3198c5cc0c34666c52a1ec45571570b6054
remove old way to include registration urls
BryceLohr/authentic,pu239ppy/authentic2,pu239ppy/authentic2,BryceLohr/authentic,adieu/authentic2,adieu/authentic2,BryceLohr/authentic,pu239ppy/authentic2,pu239ppy/authentic2,adieu/authentic2,adieu/authentic2,BryceLohr/authentic
authentic2/auth2_auth/urls.py
authentic2/auth2_auth/urls.py
from django.conf.urls.defaults import patterns, url, include from django.conf import settings urlpatterns = patterns('', (r'login/$', 'authentic2.auth2_auth.views.login'), # (r'password/change/$','authentic2.auth2_auth.views.password_change'), ) if settings.AUTH_OPENID: urlpatterns += patterns('', ...
from django.conf.urls.defaults import patterns, url, include from django.conf import settings urlpatterns = patterns('', (r'login/$', 'authentic2.auth2_auth.views.login'), # (r'password/change/$','authentic2.auth2_auth.views.password_change'), (r'$', include('registration.urls')), ) if settings.AUTH_OPENID...
agpl-3.0
Python
6a387655f28cb09a51206197d4ca4a79a782b526
rename test
qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq
corehq/util/tests/test_spreadsheets.py
corehq/util/tests/test_spreadsheets.py
from django.test import SimpleTestCase from corehq.util.spreadsheets.excel import IteratorJSONReader class IteratorJSONReaderTest(SimpleTestCase): @staticmethod def normalize(it): r = [] for row in IteratorJSONReader(it): r.append(sorted(row.items())) return r def tes...
from django.test import SimpleTestCase from corehq.util.spreadsheets.excel import IteratorJSONReader class IteratorJSONReaderTest(SimpleTestCase): @staticmethod def normalize(it): r = [] for row in IteratorJSONReader(it): r.append(sorted(row.items())) return r def tes...
bsd-3-clause
Python
cebe6e9ee3dcee7bbe59a1804ae13899aa40cef1
Fix link in example
akaszynski/vtkInterface
examples/02-plot/plot-cmap.py
examples/02-plot/plot-cmap.py
""" Custom Colormaps ~~~~~~~~~~~~~~~~ Use a custom built colormap when plotting scalar values. """ ################################################################################ # Any colormap built for ``matplotlib`` is fully compatible with ``vtki``. # Colormaps are typically specifiedby passing the string name of...
""" Custom Colormaps ~~~~~~~~~~~~~~~~ Use a custom built colormap when plotting scalar values. """ ################################################################################ # Any colormap built for ``matplotlib`` is fully compatible with ``vtki``. # Colormaps are typically specifiedby passing the string name of...
mit
Python
a6a1d9fb87727fd8e88800dccbd83d7fddf007d0
teste com url com detail. Close #90
rg3915/orcamentos,rg3915/orcamentos,rg3915/orcamentos,rg3915/orcamentos
orcamentos/crm/tests/test_urls.py
orcamentos/crm/tests/test_urls.py
from django.contrib.auth.models import User from django.shortcuts import resolve_url as r from django.test import TestCase from django.test.client import Client from django.urls import reverse_lazy as rl from orcamentos.crm.models import Person class UrlTest(TestCase): def setUp(self): self.credentials =...
from django.contrib.auth.models import User from django.shortcuts import resolve_url as r from django.test import TestCase from django.test.client import Client # path('', c.PersonList.as_view(), name='person_list'), # path('<slug>/', c.person_detail, name='person_detail'), class UrlTest(TestCase): def setUp(s...
mit
Python
80f4b8aaf714fad295f0036f118e9886984a3b9a
add support for HC_MACH environment variable
hackerspace/hacked_cnc,hackerspace/hacked_cnc,sorki/hacked_cnc,sorki/hacked_cnc
hc/config.py
hc/config.py
import os import ConfigParser version = "0.0" bindir = "/usr/bin" sysconfdir = "/etc" prefix = "/usr" datadir = "/usr/share" libdir = "/usr/lib64" homeconfig = os.path.expanduser("~/.hc/config") def config_parser(): config = ConfigParser.SafeConfigParser() config_list = [os.path.join(sysconfdir, "hc", "confi...
import os import ConfigParser version = "0.0" bindir = "/usr/bin" sysconfdir = "/etc" prefix = "/usr" datadir = "/usr/share" libdir = "/usr/lib64" def config_parser(): config = ConfigParser.SafeConfigParser() config_list = [os.path.join(sysconfdir, "hc", "config"), os.path.expanduser("~/.h...
bsd-3-clause
Python
216413a703ef9f8132933c845cbee05e2496858c
Fix number of arguments in add_file/add_directory.
jelmer/subvertpy,jelmer/subvertpy
examples/ra_replay.py
examples/ra_replay.py
#!/usr/bin/python from subvertpy.ra import RemoteAccess conn = RemoteAccess("svn://svn.gnome.org/svn/gnome-specimen/trunk") class MyFileEditor: def change_prop(self, key, value): print "Change prop: %s -> %r" % (key, value) def apply_textdelta(self, base_checksum): # This should return ...
#!/usr/bin/python from subvertpy.ra import RemoteAccess conn = RemoteAccess("svn://svn.gnome.org/svn/gnome-specimen/trunk") class MyFileEditor: def change_prop(self, key, value): print "Change prop: %s -> %r" % (key, value) def apply_textdelta(self, base_checksum): # This should return ...
lgpl-2.1
Python
dfed09dc8f2224f157a1d0ba553223efb59c2b33
Print hello message from a test server.
DexterInd/sockjs-tornado,DexterInd/sockjs-tornado,codepython/sockjs-tornado,ImaginationForPeople/sockjs-tornado,ImaginationForPeople/sockjs-tornado,pjknkda/sockjs-tornado,ImaginationForPeople/sockjs-tornado,DexterInd/sockjs-tornado,pjknkda/sockjs-tornado,codepython/sockjs-tornado,MrJoes/sockjs-tornado,codepython/sockjs...
examples/test/test.py
examples/test/test.py
# -*- coding: utf-8 -*- import math from tornado import web, ioloop from sockjs.tornado import SockJSRouter, SockJSConnection class EchoConnection(SockJSConnection): def on_message(self, msg): self.send(msg) class CloseConnection(SockJSConnection): def on_open(self, info): self.close() ...
# -*- coding: utf-8 -*- import math from tornado import web, ioloop from sockjs.tornado import SockJSRouter, SockJSConnection class EchoConnection(SockJSConnection): def on_message(self, msg): self.send(msg) class CloseConnection(SockJSConnection): def on_open(self, info): self.close() ...
mit
Python
68f68a7c29dd49a9306445d02f5a7050aa84259e
Modify copy method into inherit
KarenKawaii/openacademy-project
openacademy/model/openacademy_course.py
openacademy/model/openacademy_course.py
from openerp import models, fields, api ''' This module create model of Course ''' class Course(models.Model): ''' This class create model of Course ''' _name = 'openacademy.course' # Model odoo name name = fields.Char(string ='Title', required=True) # Field reserved to identified name rec ...
from openerp import models, fields, api ''' This module create model of Course ''' class Course(models.Model): ''' This class create model of Course ''' _name = 'openacademy.course' # Model odoo name name = fields.Char(string ='Title', required=True) # Field reserved to identified name rec ...
apache-2.0
Python
6b5e0249374f1adc7e6eafb2e050cd6a2f03d1c9
Change the api a little bit
shawkinsl/pyolite,PressLabs/pyolite
examples/create_repository.py
examples/create_repository.py
from pyolite import Pyolite # initial olite object admin_repository = '~/presslabs/ansible-playbooks/gitolite-admin' olite = Pyolite(admin_repository=admin_repository) # create a repo repo = olite.repos.get_or_create('awesome_name') repo = olite.repos.get('awesome_name') repo = olite.repos.create('awesome_name') # a...
from pyolite import Pyolite # initial olite object admin_repository = '~/presslabs/ansible-playbooks/gitolite-admin' olite = Pyolite(admin_repository=admin_repository) # create a repo repo = olite.repos.get_or_create('awesome_name') repo = olite.repos.get('awesome_name') repo = olite.repos.create('awesome_name') # a...
bsd-2-clause
Python
534d77b88b6cc9d15cd6d803053c0241a95131a0
Fix migration.
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/tasks/migrations/0021_auto_20170503_1435.py
bluebottle/tasks/migrations/0021_auto_20170503_1435.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-05-03 12:35 from __future__ import unicode_literals from django.db import migrations, models def set_deadline_to_apply(apps, schema_editor): task = apps.get_model('tasks', 'Task') task.objects.filter(deadline_to_apply__isnull=True).update( ...
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-05-03 12:35 from __future__ import unicode_literals from django.db import migrations, models def set_deadline_to_apply(apps, schema_editor): task = apps.get_model('tasks', 'Task') task.objects.filter(deadline_to_apply__isnull=True).update( ...
bsd-3-clause
Python
c70b233cbf7e4a3ed0ac0cd7046596988b30ff4a
fix initialize
sensorbee/pymlstate,sensorbee/pymlstate
example/mnist/mnist.py
example/mnist/mnist.py
#!/usr/bin/env python """Chainer example: train a multi-layer perceptron on MNIST This is a minimal example to write a feed-forward net. It requires scikit-learn to load MNIST dataset. """ import numpy as np import chainer from chainer import cuda, FunctionSet import chainer.functions as F from chainer import optimi...
#!/usr/bin/env python """Chainer example: train a multi-layer perceptron on MNIST This is a minimal example to write a feed-forward net. It requires scikit-learn to load MNIST dataset. """ import numpy as np import chainer from chainer import cuda, FunctionSet import chainer.functions as F from chainer import optimi...
mit
Python
bd1a1e249e43d9cda4176ff62c20bda4f72e774f
Update InMoovbowling.py
mecax/pyrobotlab,sstocker46/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,sstocker46/pyrobotlab,MyRobotLab/pyrobotlab,sstocker46/pyrobotlab,MyRobotLab/pyrobotlab,mecax/pyrobotlab
home/GroG/InMoovbowling.py
home/GroG/InMoovbowling.py
# create a Blender service, we'll call it ... blender blender = Runtime.start("blender","Blender") # connect it to Blender - blender must be running the Blender.py # or easier yet, start blender with the Blender.blend file # select game mode then press p with cursor over the rendering screen if not blender.connect(): ...
# create a Blender service, we'll call it ... blender blender = Runtime.start("blender","Blender") # connect it to Blender - blender must be running the Blender.py # or easier yet, start blender with the Blender.blend file # select game mode then press p with cursor over the rendering screen if not blender.connect(): ...
apache-2.0
Python
963076f102aa4b8701eb5903c1d23092e85cb257
add possibility for config overriding
gtema/homeautomation-backend,gtema/homeautomation-backend,gtema/homeautomation-backend
homeautomation/__init__.py
homeautomation/__init__.py
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_cache import Cache from flask_login import LoginManager from flask_marshmallow import Marshmallow from flask_cors import CORS cache = Cache(config={'CACHE_TYPE': 'simple'}) app = Flask(__name__, instance_relative_config=True) app.config.from_o...
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_cache import Cache from flask_login import LoginManager from flask_marshmallow import Marshmallow from flask_cors import CORS cache = Cache(config={'CACHE_TYPE': 'simple'}) app = Flask(__name__, instance_relative_config=True) app.config.from_o...
apache-2.0
Python
7bfa3e5cfe207008f5eb3c5492e44d4930e5f849
Bump to version 0.13.4
nerevu/prometheus-api,nerevu/prometheus-api,nerevu/prometheus-api
app/setup.py
app/setup.py
try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup, find_packages with open('../requirements.txt') as file: requirements = file.read() config = { 'name': 'prometheus', 'description': 'a global asset allocation tool', 'long_description': open('README.rst', 'rt...
try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup, find_packages with open('../requirements.txt') as file: requirements = file.read() config = { 'name': 'prometheus', 'description': 'a global asset allocation tool', 'long_description': open('README.rst', 'rt...
mit
Python
58f90939fdce49e33454bc63e4bd5c35ad4c4434
bump coverage from 5.5 to 6.0.2 in /app (#59)
macbre/wbc.macbre.net,macbre/wbc.macbre.net,macbre/wbc.macbre.net,macbre/wbc.macbre.net
app/setup.py
app/setup.py
from setuptools import setup, find_packages # @see https://github.com/pypa/sampleproject/blob/master/setup.py setup( name='wbc', version='0.0.0', author='Maciej Brencz', author_email='maciej.brencz@gmail.com', description='Flask app providing WBC archives API', url='https://github.com/macbre/wb...
from setuptools import setup, find_packages # @see https://github.com/pypa/sampleproject/blob/master/setup.py setup( name='wbc', version='0.0.0', author='Maciej Brencz', author_email='maciej.brencz@gmail.com', description='Flask app providing WBC archives API', url='https://github.com/macbre/wb...
mit
Python
00f872500389f3948163a59de56178961e368fcd
solve task: use int number of seconds for subprocess timeout.
astrobin/astrobin,astrobin/astrobin,astrobin/astrobin,astrobin/astrobin
astrobin/tasks.py
astrobin/tasks.py
from django.conf import settings from celery.decorators import task from celery.task.sets import subtask from boto.exception import S3CreateError from PIL import Image as PILImage import subprocess import StringIO import os import os.path import signal from image_utils import * from storage import * from notificatio...
from django.conf import settings from celery.decorators import task from celery.task.sets import subtask from boto.exception import S3CreateError from PIL import Image as PILImage import subprocess import StringIO import os import os.path import signal from image_utils import * from storage import * from notificatio...
agpl-3.0
Python
c718612bf968fe52df10adedb979d64e517d5b8e
Fix the path to the symlinks.
mono/bockbuild,mono/bockbuild
packages/mono-master-encrypted.py
packages/mono-master-encrypted.py
import os class MonoMasterEncryptedPackage(Package): def __init__(self): Package.__init__(self, 'mono', '3.0.8', sources = ['git://github.com/mono/mono', 'git@github.com:xamarin/mono-extensions.git'], revision = os.getenv('MONO_BUILD_REVISION'), configure_flags = [ '--enable-nls=no', '--prefix=...
import os class MonoMasterEncryptedPackage(Package): def __init__(self): Package.__init__(self, 'mono', '3.0.8', sources = ['git://github.com/mono/mono', 'git@github.com:xamarin/mono-extensions.git'], revision = os.getenv('MONO_BUILD_REVISION'), configure_flags = [ '--enable-nls=no', '--prefix=...
mit
Python
a1ddbc7b8e7a49388d70ad762f831abbc36973b4
Exclude favicon from docs
jacebrowning/memegen,jacebrowning/memegen
app/views.py
app/views.py
import asyncio import log from sanic import Sanic, response from sanic_openapi import doc from app import helpers, settings, utils app = Sanic(name="memegen") helpers.configure(app) @app.get("/") @doc.exclude(True) async def index(request): return response.redirect("/docs") @app.get("/samples") @doc.exclude(...
import asyncio import log from sanic import Sanic, response from sanic_openapi import doc from app import helpers, settings, utils app = Sanic(name="memegen") helpers.configure(app) @app.get("/") @doc.exclude(True) async def index(request): return response.redirect("/docs") @app.get("/samples") @doc.exclude(...
mit
Python
1c9094f90c7e0de5bddbb9b3ca7dab6f6c60e350
patch release
auth0/auth0-python,auth0/auth0-python
auth0/__init__.py
auth0/__init__.py
__version__ = '3.2.2'
__version__ = '3.2.0'
mit
Python
d05d20a37ae30ea529b4d111e5bbc0c569f63d2b
Fix a bug.
jdhp-sap/sap-cta-data-pipeline,jdhp-sap/data-pipeline-standalone-scripts,jdhp-sap/sap-cta-data-pipeline,jdhp-sap/data-pipeline-standalone-scripts
datapipe/image/kill_isolated_pixels.py
datapipe/image/kill_isolated_pixels.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org) # This script is provided under the terms and conditions of the MIT license: # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (th...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org) # This script is provided under the terms and conditions of the MIT license: # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (th...
mit
Python
a4d986e69eb452ed1c60f0f1bda15b9b8cc282d9
Fix for #53
thouska/spotpy,thouska/spotpy,bees4ever/spotpy,thouska/spotpy,bees4ever/spotpy,bees4ever/spotpy
spotpy/examples/tutorial_rosenbrock.py
spotpy/examples/tutorial_rosenbrock.py
# -*- coding: utf-8 -*- ''' Copyright 2015 by Tobias Houska This file is part of Statistical Parameter Estimation Tool (SPOTPY). :author: Tobias Houska This class holds the example code from the Rosenbrock tutorial web-documention. ''' from __future__ import absolute_import from __future__ import division from __future...
# -*- coding: utf-8 -*- ''' Copyright 2015 by Tobias Houska This file is part of Statistical Parameter Estimation Tool (SPOTPY). :author: Tobias Houska This class holds the example code from the Rosenbrock tutorial web-documention. ''' from __future__ import absolute_import from __future__ import division from __future...
mit
Python
daec9250b45e3a3d01570c55b651cc5cf9476ff7
Fix tests
jorgebastida/aws2fa
aws2fa/helpers.py
aws2fa/helpers.py
try: from ConfigParser import ConfigParser as DefaultConfigParser except ImportError: from configparser import ConfigParser as DefaultConfigParser class ConfigParser(DefaultConfigParser): """ Adaptation of python's ConfigParser.ConfigParser removing some limitations related to sections called 'def...
from ConfigParser import ConfigParser as DefaultConfigParser class ConfigParser(DefaultConfigParser): """ Adaptation of python's ConfigParser.ConfigParser removing some limitations related to sections called 'default'. """ def set(self, section, option, value=None): """Set an option.""" ...
bsd-3-clause
Python
b5e76a74dfa040b69885a7323f63de66701a1175
Update examples.
iabdalkader/openmv,iabdalkader/openmv,kwagyeman/openmv,kwagyeman/openmv,openmv/openmv,openmv/openmv,kwagyeman/openmv,iabdalkader/openmv,openmv/openmv,iabdalkader/openmv,openmv/openmv,kwagyeman/openmv
scripts/examples/Arduino/Portenta-H7/21-Sensor-Control/himax_motion_detection.py
scripts/examples/Arduino/Portenta-H7/21-Sensor-Control/himax_motion_detection.py
# Himax motion detection example. import sensor, image, time, pyb from pyb import Pin, ExtInt sensor.reset() sensor.set_pixformat(sensor.GRAYSCALE) sensor.set_framesize(sensor.QVGA) sensor.skip_frames(time=2000) # The sensor is less noisy with lower FPS. sensor.set_framerate(15) # Configure and enable motion detect...
# Himax motion detection example. import sensor, image, time, pyb from pyb import Pin, ExtInt sensor.reset() sensor.set_pixformat(sensor.GRAYSCALE) sensor.set_framesize(sensor.QVGA) sensor.skip_frames(time=2000) # The sensor is less noisy are lower FPS. sensor.set_framerate(15) # Configure and enable motion detecti...
mit
Python
c6d8e6ea2343a327f4cc543e133fafadd421e61c
use VBox when passing plots to show()
percyfal/bokeh,gpfreitas/bokeh,htygithub/bokeh,muku42/bokeh,tacaswell/bokeh,awanke/bokeh,deeplook/bokeh,PythonCharmers/bokeh,carlvlewis/bokeh,mutirri/bokeh,stonebig/bokeh,caseyclements/bokeh,ptitjano/bokeh,Karel-van-de-Plassche/bokeh,khkaminska/bokeh,muku42/bokeh,canavandl/bokeh,canavandl/bokeh,jplourenco/bokeh,jploure...
examples/plotting/file/categorical.py
examples/plotting/file/categorical.py
from bokeh.plotting import * N = 4000 factors = ["a", "b", "c", "d", "e", "f", "g", "h"] x0 = [0, 0, 0, 0, 0, 0, 0, 0] x = [50, 40, 65, 10, 25, 37, 80, 60] p1 = figure(title="Dot Plot", tools="resize,save", y_range=factors, x_range=[0,100]) p1.segment(x0, factors, x, factors, line_width=2, line_color="green", ) p1...
from bokeh.plotting import * N = 4000 factors = ["a", "b", "c", "d", "e", "f", "g", "h"] x0 = [0, 0, 0, 0, 0, 0, 0, 0] x = [50, 40, 65, 10, 25, 37, 80, 60] p1 = figure(title="Dot Plot", tools="resize,save", y_range=factors, x_range=[0,100]) p1.segment(x0, factors, x, factors, line_width=2, line_color="green", ) p1...
bsd-3-clause
Python
2efcc4ece8db847bd683500ddd96b36072c923c5
Remove AttributesMixin
publica-io/django-publica-views,publica-io/django-publica-views
views/models.py
views/models.py
from django.db import models from django.contrib.contenttypes import generic from templates.mixins import TemplateMixin from entropy.base import ( EnabledMixin, OrderingMixin, TitleMixin, SlugMixin, TextMixin ) from settings import CONTENT_MODELS # class DisplayInstance(models.Model): # ''' # Displays ...
from django.db import models from django.contrib.contenttypes import generic from templates.mixins import TemplateMixin from entropy.base import ( AttributeMixin, EnabledMixin, OrderingMixin, TitleMixin, SlugMixin, TextMixin ) from settings import CONTENT_MODELS # class DisplayInstance(models.Model): # ...
bsd-3-clause
Python
c6076e798984f6caf40577c119a55f1bfca06e94
Add Knallerboot Coffe
thk-emq-16/team1,thk-emq-16/team1
barista/coffee.py
barista/coffee.py
class Coffee(object): def __init__(self, name: str, price: float): self.name = name self.price = price COFFEES = [Coffee('Americano', 1.50), Coffee('Cappuccino', 2.00), Coffee('Espresso', 1.30), Coffee('Latte Macchiato', 2.20), Coffee('Moccaccino', 2.30)...
class Coffee(object): def __init__(self, name: str, price: float): self.name = name self.price = price COFFEES = [Coffee('Americano', 1.50), Coffee('Cappuccino', 2.00), Coffee('Espresso', 1.30), Coffee('Latte Macchiato', 2.20), Coffee('Moccaccino', 2.30)...
mit
Python
414722bb45e22cdee9b4f1fa3fe758bc86439d30
Fix package docstring
VisTrails/VisTrails,minesense/VisTrails,VisTrails/VisTrails,VisTrails/VisTrails,VisTrails/VisTrails,minesense/VisTrails,VisTrails/VisTrails,minesense/VisTrails,minesense/VisTrails,minesense/VisTrails
vistrails/packages/tensorflow/__init__.py
vistrails/packages/tensorflow/__init__.py
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
bsd-3-clause
Python
d03460a5ccc7e1e6b11bd2723a91192291539eac
rename parent_page_id API parameter to destination_page_id for consistency with other actions
wagtail/wagtail,thenewguy/wagtail,mixxorz/wagtail,thenewguy/wagtail,wagtail/wagtail,zerolab/wagtail,mixxorz/wagtail,thenewguy/wagtail,jnns/wagtail,wagtail/wagtail,zerolab/wagtail,rsalmaso/wagtail,rsalmaso/wagtail,wagtail/wagtail,jnns/wagtail,thenewguy/wagtail,rsalmaso/wagtail,jnns/wagtail,mixxorz/wagtail,zerolab/wagtai...
wagtail/admin/api/actions/create_alias.py
wagtail/admin/api/actions/create_alias.py
from django.core.exceptions import ValidationError as DjangoValidationError from django.shortcuts import get_object_or_404 from rest_framework import fields, status from rest_framework.exceptions import ValidationError from rest_framework.response import Response from rest_framework.serializers import Serializer from ...
from django.core.exceptions import ValidationError as DjangoValidationError from django.shortcuts import get_object_or_404 from rest_framework import fields, status from rest_framework.exceptions import ValidationError from rest_framework.response import Response from rest_framework.serializers import Serializer from ...
bsd-3-clause
Python
28cde268901576e3b859478e438529f6bc158c6f
Update base.py
raiderrobert/django-webhook
webhook/base.py
webhook/base.py
""" Base webhook implementation """ import json, copy from django.http import HttpResponse from django.views.generic import View from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt class WebhookBase(View): @method_decorator(csrf_exempt) def dispatch(sel...
""" Base webhook implementation """ import json, copy from django.http import HttpResponse from django.views.generic import View from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt class WebhookBase(View): @method_decorator(csrf_exempt) def dispatch(sel...
mit
Python
3659dfe4be233b0c75237709adcfe8e879a5c713
Update ncurses.py
vadimkantorov/wigwam
wigs/ncurses.py
wigs/ncurses.py
class ncurses(Wig): tarball_uri = 'http://ftp.gnu.org/pub/gnu/ncurses/ncurses-$RELEASE_VERSION$.tar.gz' last_release_version = 'v6.0' def setup(self): self.before_configure += [S.export(S.CFLAGS, '-fPIC')] self.before_make += [S.export(S.CFLAGS, '-fPIC')]
class ncurses(Wig): tarball_uri = 'http://ftp.gnu.org/pub/gnu/ncurses/ncurses-$RELEASE_VERSION$.tar.gz' last_release_version = 'v5.9' def setup(self): self.before_configure += [S.export(S.CFLAGS, '-fPIC')] self.before_make += [S.export(S.CFLAGS, '-fPIC')]
mit
Python
39d4f6b331cd1f10e8859ac239db7c444655587d
Update send_text_example.py
dialogflow/dialogflow-python-client,api-ai/api-ai-python
examples/send_text_example.py
examples/send_text_example.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os.path, sys try: import apiai except ImportError: sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir)) import apiai import time import scipy.io.wavfile as wav CLIENT_ACCESS_TOKEN = 'YOUR_ACCESS_TOKEN' SUBSCRIBTION_KEY...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os.path, sys try: import apiai except ImportError: sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir)) import apiai import time import scipy.io.wavfile as wav CLIENT_ACCESS_TOKEN = '417a7fbdda844ac1ae922d10d4c4e4be' S...
apache-2.0
Python