commit
stringlengths
40
40
old_file
stringlengths
4
236
new_file
stringlengths
4
236
old_contents
stringlengths
1
3.26k
new_contents
stringlengths
16
4.43k
subject
stringlengths
16
624
message
stringlengths
17
3.29k
lang
stringclasses
5 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
053a8f9deb8bfc0bb93cddcd48c8a7817bfe8c48
loom/analysis.py
loom/analysis.py
import six from datetime import datetime, date from collections import Mapping, Iterable from jsonmapping.transforms import transliterate IGNORE_FIELDS = ['$schema', '$sources', '$latin', '$text', '$attrcount', '$linkcount', 'id'] def latinize(text): """ Transliterate text to latin. """ if ...
import six from datetime import datetime, date from collections import Mapping, Iterable from jsonmapping.transforms import transliterate IGNORE_FIELDS = ['$schema', '$sources', '$latin', '$text', '$attrcount', '$linkcount', 'id'] def latinize(text): """ Transliterate text to latin. """ if ...
Make text a list in the index.
Make text a list in the index.
Python
agpl-3.0
occrp/loom,occrp/datamapper
af79bd6dce28e8147994a8fe2afb4df742dcd3eb
client/test_server_proxy.py
client/test_server_proxy.py
"""Code snippet to test the Java ServerProxy interface to the Pings server.""" import ServerProxy, ClientInfo sp = ServerProxy('localhost', 6543) if False: # Need to change permissions on ServerProxy Java class for this to work. print 'Calling doJsonRequest directly...' r = sp.doJsonRequest('/get_pings',...
"""Code snippet to test the Java ServerProxy interface to the Pings server.""" import ServerProxy, ClientInfo sp = ServerProxy('localhost', 6543) if False: # Need to change permissions on ServerProxy Java class for this to work. print 'Calling doJsonRequest directly...' r = sp.doJsonRequest('/get_pings',...
Add display of client geoip info. And print description of what we are printing.
Add display of client geoip info. And print description of what we are printing.
Python
bsd-3-clause
lisa-lab/pings,lisa-lab/pings,lisa-lab/pings,lisa-lab/pings
fe5edfe737a774aa86cce578321fbb7fb4c8795e
tagcache/utils.py
tagcache/utils.py
# -*- encoding: utf-8 -*- import os import errno def ensure_intermediate_dir(path): """ Basiclly equivalent to command `mkdir -p` """ try: os.makedirs(os.path.dirname(path)) except OSError, e: if e.errno != errno.EEXIST: raise e def open_file(filename, flag, mo...
# -*- encoding: utf-8 -*- import os import errno def ensure_intermediate_dir(path): """ Basiclly equivalent to command `mkdir -p` """ try: os.makedirs(os.path.dirname(path)) except OSError, e: if e.errno != errno.EEXIST: raise e def open_file(filename, flag, mo...
Fix a bug in file_open (os.open does not take keyword argument).
Fix a bug in file_open (os.open does not take keyword argument).
Python
mit
huangjunwen/tagcache
4ef8681f9dcd0f92be524925d3cacdae68c45616
tests/conftest.py
tests/conftest.py
# -*- coding: utf-8 -*- from pytest import fixture from iamport import Iamport DEFAULT_TEST_IMP_KEY = 'imp_apikey' DEFAULT_TEST_IMP_SECRET = ('ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9O' 'qDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f') def pytest_addoption(parser): parser.addoption('--imp-ke...
# -*- coding: utf-8 -*- from pytest import fixture from iamport import Iamport DEFAULT_TEST_IMP_KEY = 'imp_apikey' DEFAULT_TEST_IMP_SECRET = ( 'ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6b' 'kA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f' ) def pytest_addoption(parser): parser.addoption( '--imp-key', ...
Change %default to %(default)s for removing warning
Change %default to %(default)s for removing warning
Python
mit
iamport/iamport-rest-client-python
3a1615238d4500f0fa7b9eea9ee2bfe460bc21f9
cax/tasks/purity.py
cax/tasks/purity.py
"""Add electron lifetime """ from sympy.parsing.sympy_parser import parse_expr from pax import units from cax import config from cax.task import Task class AddElectronLifetime(Task): "Add electron lifetime to dataset" def __init__(self): self.collection_purity = config.mongo_collection('purity') ...
"""Add electron lifetime """ from sympy.parsing.sympy_parser import parse_expr from pax import units from cax import config from cax.task import Task class AddElectronLifetime(Task): "Add electron lifetime to dataset" def __init__(self): self.collection_purity = config.mongo_collection('purity') ...
Convert lifetime to float instead of sympy type.
Convert lifetime to float instead of sympy type.
Python
isc
XENON1T/cax,XENON1T/cax
46511322dc8d738cc43561025bca3298946da2e6
server.py
server.py
from swiftdav.swiftdav import SwiftProvider, WsgiDAVDomainController from waitress import serve from wsgidav.wsgidav_app import DEFAULT_CONFIG, WsgiDAVApp proxy = 'http://127.0.0.1:8080/auth/v1.0' insecure = False # Set to True to disable SSL certificate validation config = DEFAULT_CONFIG.copy() config.updat...
from swiftdav.swiftdav import SwiftProvider, WsgiDAVDomainController from waitress import serve from wsgidav.wsgidav_app import DEFAULT_CONFIG, WsgiDAVApp proxy = 'http://127.0.0.1:8080/auth/v1.0' insecure = False # Set to True to disable SSL certificate validation config = DEFAULT_CONFIG.copy() config.updat...
Increase waitress setting max_request_body_size to 5GiB
Increase waitress setting max_request_body_size to 5GiB Python waitress limits the body size to 1GiB by default, thus uploading of larger objects will fail if this value is not increased. Please note that this value should be increased if your Swift cluster supports uploading of objects larger than 5GiB.
Python
apache-2.0
cschwede/swiftdav,cschwede/swiftdav
0f7ebf148ab3f88fc983e60f689a9c740ae64e47
outgoing_mail.py
outgoing_mail.py
#!/usr/bin/env python # # Copyright 2010 Eric Entzel <eric@ubermac.net> # from google.appengine.api import mail from google.appengine.ext.webapp import template import os from_address = 'admin@' + os.environ['APPLICATION_ID'] + '.appspotmail.com' def send(to, template_name, values): path = os.path.join(os.path...
#!/usr/bin/env python # # Copyright 2010 Eric Entzel <eric@ubermac.net> # from google.appengine.api import mail from google.appengine.ext.webapp import template import os from_address = 'EventBot <admin@' + os.environ['APPLICATION_ID'] + '.appspotmail.com>' def send(to, template_name, values): path = os.path.j...
Add display name for from address
Add display name for from address
Python
mit
eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot
3822b5b142d54f83aadf7e366f2b5b925f557e1a
test/testUtils/__init__.py
test/testUtils/__init__.py
import ibmiotf.application import os class AbstractTest(object): WIOTP_API_KEY=os.getenv("WIOTP_API_KEY") WIOTP_API_TOKEN=os.getenv("WIOTP_API_TOKEN") ORG_ID = os.getenv("WIOTP_ORG_ID") appOptions = {'auth-key': WIOTP_API_KEY, 'auth-token': WIOTP_API_TOKEN} setupAppClient = ibmiotf.applicatio...
import ibmiotf.application import os class AbstractTest(object): WIOTP_API_KEY=os.getenv("WIOTP_API_KEY") WIOTP_API_TOKEN=os.getenv("WIOTP_API_TOKEN") ORG_ID = os.getenv("WIOTP_ORG_ID") if WIOTP_API_KEY is None: raise Exception("WIOTP_API_KEY environment variable is not set") if WIOTP...
Make tests throw better error if env vars are missing
Make tests throw better error if env vars are missing
Python
epl-1.0
ibm-watson-iot/iot-python,ibm-watson-iot/iot-python,ibm-messaging/iot-python
b853abc579f5dfaab896cf57c39268a36c109a83
tests/test_address_book.py
tests/test_address_book.py
from unittest import TestCase class AddressBookTestCase(TestCase): def test_add_person(self): pass def test_add_group(self): pass def test_find_person_by_first_name(self): pass def test_find_person_by_last_name(self): pass def test_find_person_by_email(self): ...
from unittest import TestCase class AddressBookTestCase(TestCase): def test_add_person(self): person = Person( 'John', 'Doe', ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42'], ['+79834772053'] ) self.address_book....
Test person adding to addressbook
Test person adding to addressbook
Python
mit
dizpers/python-address-book-assignment
097eae49564a8eefd66d903d8e8cd900054ef147
characters/views.py
characters/views.py
from django.shortcuts import get_object_or_404, redirect, render from django.views import generic from characters.forms import CharacterForm from characters.models import Character, Class, Race class CharacterIndexView(generic.ListView): template_name = 'characters/index.html' context_object_name = 'all_cha...
from django.shortcuts import get_object_or_404, redirect, render from django.views import generic from characters.forms import CharacterForm from characters.models import Character, Class, Race class CharacterIndexView(generic.ListView): template_name = 'characters/index.html' context_object_name = 'all_cha...
Order character listing by name
Order character listing by name
Python
mit
mpirnat/django-tutorial-v2
fefde8aef88cbfb13cb1f0bfcd3ac476ad7a903c
spacy/download.py
spacy/download.py
from __future__ import print_function import sys import sputnik from sputnik.package_list import (PackageNotFoundException, CompatiblePackageNotFoundException) from . import about def download(lang, force=False, fail_on_exist=True): if force: sputnik.purge(about.__titl...
from __future__ import print_function import sys import sputnik from sputnik.package_list import (PackageNotFoundException, CompatiblePackageNotFoundException) from . import about from . import util def download(lang, force=False, fail_on_exist=True): if force: sputnik...
Make installation print data path.
Make installation print data path.
Python
mit
explosion/spaCy,explosion/spaCy,aikramer2/spaCy,recognai/spaCy,aikramer2/spaCy,recognai/spaCy,oroszgy/spaCy.hu,Gregory-Howard/spaCy,recognai/spaCy,Gregory-Howard/spaCy,recognai/spaCy,Gregory-Howard/spaCy,banglakit/spaCy,oroszgy/spaCy.hu,oroszgy/spaCy.hu,spacy-io/spaCy,spacy-io/spaCy,raphael0202/spaCy,banglakit/spaCy,ex...
267a768bd1ccc87c3c1f54c4ac520a0e12e5fd5f
moksha/tests/test_clientsockets.py
moksha/tests/test_clientsockets.py
import webtest import moksha.tests.utils as testutils from moksha.api.widgets.live import get_moksha_socket from moksha.middleware import make_moksha_middleware from tw2.core import make_middleware as make_tw2_middleware class TestClientSocketDumb: def _setUp(self): def kernel(config): def a...
import webtest import moksha.tests.utils as testutils from moksha.api.widgets.live import get_moksha_socket from moksha.middleware import make_moksha_middleware from tw2.core import make_middleware as make_tw2_middleware class TestClientSocketDumb: def _setUp(self): def kernel(config): def a...
Rename test. Fix copy/pasta forgetfulness.
Rename test. Fix copy/pasta forgetfulness.
Python
apache-2.0
pombredanne/moksha,mokshaproject/moksha,mokshaproject/moksha,mokshaproject/moksha,pombredanne/moksha,pombredanne/moksha,mokshaproject/moksha,pombredanne/moksha
68cec560ad108e0e6a081ed92aab2f06a7545821
tests/conftest.py
tests/conftest.py
import pytest @pytest.fixture(autouse=True) def tagschecker(request): tags = set(request.config.getini('TAGS')) tags_marker = request.node.get_marker('tags') xfailtags_marker = request.node.get_marker('xfailtags') skiptags_marker = request.node.get_marker('skiptags') if xfailtags_marker and not ...
import pytest from docker import Client @pytest.fixture(scope="session") def docker_client(): client = Client(base_url='unix://var/run/docker.sock', timeout=180) return client @pytest.fixture(autouse=True) def tagschecker(request): tags = set(request.config.getini('TAGS')) tags_marker = request.nod...
Increase docker-py timeout to 180
Increase docker-py timeout to 180
Python
mit
dincamihai/salt-toaster,dincamihai/salt-toaster
c65c9fafbdd96f20c7a87ce88ff594edcd490b49
numpy/distutils/command/install.py
numpy/distutils/command/install.py
from distutils.command.install import * from distutils.command.install import install as old_install class install(old_install): def finalize_options (self): old_install.finalize_options(self) self.install_lib = self.install_libbase
import os from distutils.command.install import * from distutils.command.install import install as old_install from distutils.file_util import write_file class install(old_install): def finalize_options (self): old_install.finalize_options(self) self.install_lib = self.install_libbase def ru...
Fix bdist_rpm for path names containing spaces.
Fix bdist_rpm for path names containing spaces. git-svn-id: 77a43f9646713b91fea7788fad5dfbf67e151ece@2013 94b884b6-d6fd-0310-90d3-974f1d3f35e1
Python
bsd-3-clause
chadnetzer/numpy-gaurdro,illume/numpy3k,illume/numpy3k,chadnetzer/numpy-gaurdro,Ademan/NumPy-GSoC,teoliphant/numpy-refactor,chadnetzer/numpy-gaurdro,Ademan/NumPy-GSoC,illume/numpy3k,efiring/numpy-work,teoliphant/numpy-refactor,teoliphant/numpy-refactor,teoliphant/numpy-refactor,jasonmccampbell/numpy-refactor-sprint,Ade...
763e8b3d8cab43fb314a2dd6b5ebb60c2d482a52
deploy_latest_build.py
deploy_latest_build.py
#! /usr/bin/python # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
#! /usr/bin/python # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
Fix deploy CLI arg parsing
Fix deploy CLI arg parsing
Python
apache-2.0
alancutter/web-animations-perf-bot
c51fbf651ae04341233dd16f4b93b1c6b8f3d30b
observatory/emaillist/views.py
observatory/emaillist/views.py
from emaillist.models import EmailExclusion from django.shortcuts import render_to_response def remove_email(request, email): if email[-1] == '/': email = email[:-1] #Only exclude an email once if EmailExclusion.excluded(email): return #Exclude the email exclude = EmailExclusion(e...
from emaillist.models import EmailExclusion from django.shortcuts import render_to_response def remove_email(request, email): if email[-1] == '/': email = email[:-1] #Only exclude an email once if EmailExclusion.excluded(email): return render_to_response('emaillist/email_removed.html') ...
Abort early with removed if nothing needs to be done
Abort early with removed if nothing needs to be done
Python
isc
rcos/Observatory,rcos/Observatory,rcos/Observatory,rcos/Observatory,rcos/Observatory,rcos/Observatory
1205f30111b5f4789e3d68a1ff62bdb5b5597fc4
pytest-{{cookiecutter.plugin_name}}/tests/test_{{cookiecutter.plugin_name}}.py
pytest-{{cookiecutter.plugin_name}}/tests/test_{{cookiecutter.plugin_name}}.py
# -*- coding: utf-8 -*- def test_bar_fixture(testdir): """Make sure that pytest accepts our fixture.""" # create a temporary pytest test module testdir.makepyfile(""" def test_sth(bar): assert bar == "europython2015" """) # run pytest with the following cmd args result = t...
# -*- coding: utf-8 -*- def test_bar_fixture(testdir): """Make sure that pytest accepts our fixture.""" # create a temporary pytest test module testdir.makepyfile(""" def test_sth(bar): assert bar == "europython2015" """) # run pytest with the following cmd args result = t...
Implement a test for an ini option
Implement a test for an ini option
Python
mit
pytest-dev/cookiecutter-pytest-plugin,s0undt3ch/cookiecutter-pytest-plugin
67c1855f75a3c29bc650c193235576f6b591c805
payment_redsys/__manifest__.py
payment_redsys/__manifest__.py
# Copyright 2017 Tecnativa - Sergio Teruel # Copyright 2020 Tecnativa - JoΓ£o Marques { "name": "Pasarela de pago Redsys", "category": "Payment Acquirer", "summary": "Payment Acquirer: Redsys Implementation", "version": "14.0.2.0.0", "author": "Tecnativa," "Odoo Community Association (OCA)", "we...
# Copyright 2017 Tecnativa - Sergio Teruel # Copyright 2020 Tecnativa - JoΓ£o Marques { "name": "Pasarela de pago Redsys", "category": "Payment Acquirer", "summary": "Payment Acquirer: Redsys Implementation", "version": "14.0.2.0.0", "author": "Tecnativa," "Odoo Community Association (OCA)", "we...
Put real package on pypi
[IMP] payment_redsys: Put real package on pypi
Python
agpl-3.0
cubells/l10n-spain,cubells/l10n-spain,cubells/l10n-spain
a0e835cbf382cb55ff872bb8d6cc57a5326a82de
ckanext/ckanext-apicatalog_scheming/ckanext/apicatalog_scheming/validators.py
ckanext/ckanext-apicatalog_scheming/ckanext/apicatalog_scheming/validators.py
from ckan.common import _ import ckan.lib.navl.dictization_functions as df def lower_if_exists(s): return s.lower() if s else s def upper_if_exists(s): return s.upper() if s else s def valid_resources(private, context): package = context.get('package') if not private or private == u'False': ...
from ckan.common import _ import ckan.lib.navl.dictization_functions as df def lower_if_exists(s): return s.lower() if s else s def upper_if_exists(s): return s.upper() if s else s def valid_resources(private, context): package = context.get('package') if package and (not private or private == u'F...
Fix package resource validator for new packages
LK-271: Fix package resource validator for new packages
Python
mit
vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog
8c75327dfc6f6d6bc3097813db9dc4ae0e46489a
private_storage/permissions.py
private_storage/permissions.py
""" Possible functions for the ``PRIVATE_STORAGE_AUTH_FUNCTION`` setting. """ def allow_authenticated(private_file): try: return private_file.request.user.is_authenticated() except AttributeError: # Using user.is_authenticated() and user.is_anonymous() as a method is deprecated since Django 2....
""" Possible functions for the ``PRIVATE_STORAGE_AUTH_FUNCTION`` setting. """ import django if django.VERSION >= (1, 10): def allow_authenticated(private_file): return private_file.request.user.is_authenticated def allow_staff(private_file): request = private_file.request return reques...
Change the permission checks, provide distinct versions for Django 1.10+
Change the permission checks, provide distinct versions for Django 1.10+
Python
apache-2.0
edoburu/django-private-storage
4035afc6fa7f47219a39ad66f902bb90c6e81aa1
pyopenapi/scanner/type_reducer.py
pyopenapi/scanner/type_reducer.py
from __future__ import absolute_import from ..scan import Dispatcher from ..errs import SchemaError from ..spec.v3_0_0.objects import Operation from ..utils import scope_compose from ..consts import private class TypeReduce(object): """ Type Reducer, collect Operation & Model spreaded in Resources put in a glo...
from __future__ import absolute_import from ..scan import Dispatcher from ..errs import SchemaError from ..spec.v3_0_0.objects import Operation as Op3 from ..spec.v2_0.objects import Operation as Op2 from ..utils import scope_compose from ..consts import private class TypeReduce(object): """ Type Reducer, collect ...
Allow to reduce Operations in 2.0 and 3.0.0 to App.op
Allow to reduce Operations in 2.0 and 3.0.0 to App.op
Python
mit
mission-liao/pyopenapi
093202349a971ba20982976f464853e657ea3237
tests/test_cli.py
tests/test_cli.py
# Copyright 2013 Donald Stufft # # 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, so...
# Copyright 2013 Donald Stufft # # 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, so...
Add test for upload functionality
Add test for upload functionality
Python
apache-2.0
beni55/twine,dstufft/twine,jamesblunt/twine,mhils/twine,sigmavirus24/twine,pypa/twine,warner/twine,reinout/twine
661fafef2c1f86459a11683704945a1a83e4f760
lib/tagnews/geoloc/geocode_list.py
lib/tagnews/geoloc/geocode_list.py
import geocoder import time def lat_longs_from_geo_strings(lst): lats_lons = [] for addr_str in lst: g = geocoder.google(addr_str) if g.latlng is None: time.sleep(.5) lats_lons.extend(lat_longs_from_geo_strings([addr_str])) else: lats_lons.append(g.la...
import geocoder import time # don't make more than 1 request per second last_request_time = 0 def get_lat_longs_from_geostrings(geostring_list, provider='osm'): """ Geo-code each geostring in `geostring_list` into lat/long values. Also return the full response from the geocoding service. Inputs ...
Add documentation, tweak rate limit handling, remove unused function.
Add documentation, tweak rate limit handling, remove unused function.
Python
mit
chicago-justice-project/article-tagging,chicago-justice-project/article-tagging,kbrose/article-tagging,kbrose/article-tagging
e58efc792984b7ba366ebea745caa70e6660a41b
scrapyard/yts.py
scrapyard/yts.py
import cache import network import scraper YTS_URL = 'http://yts.re' ################################################################################ def movie(movie_info): magnet_infos = [] json_data = network.json_get_cached_optional(YTS_URL + '/api/listimdb.json', expiration=cache.HOUR, params={ 'imdb_id'...
import cache import network import scraper import urllib YTS_URL = 'http://yts.re' ################################################################################ def movie(movie_info): magnet_infos = [] json_data = network.json_get_cached_optional(YTS_URL + '/api/v2/list_movies.json', expiration=cache.HOUR...
Upgrade YTS to API v2
Upgrade YTS to API v2
Python
mit
sharkone/scrapyard
90ea0d2113b576e47284e7ab38ff95887437cc4b
website/jdevents/models.py
website/jdevents/models.py
from django.db import models from mezzanine.core.models import Displayable, RichText class RepeatType(models.Model): DAILY = 'daily' WEEKLY = 'weekly', MONTHLY = 'monthly' REPEAT_CHOICES = ( (DAILY, 'REPEAT_DAILY'), (WEEKLY, 'REPEAT_WEEKLY'), (MONTHLY, 'REPEAT_MONTHLY') ) ...
from django.db import models from django.utils.translation import ugettext_lazy as _ from mezzanine.core.models import Displayable, RichText class RepeatType(models.Model): DAILY = 'daily' WEEKLY = 'weekly', MONTHLY = 'monthly' REPEAT_CHOICES = ( (DAILY, _('Daily')), (WEEKLY, _('Weekl...
Fix text for repeated events.
Fix text for repeated events.
Python
mit
jonge-democraten/website,jonge-democraten/website,jonge-democraten/website,jonge-democraten/website
5abb4d9b5bfe88e9617839f5558e5b31dbf02f5b
19-getBlockHits.py
19-getBlockHits.py
# We have to import the minecraft api module to do anything in the minecraft world from mcpi.minecraft import * from mcpi.block import * from blockData import * # this means that the file can be imported without executing anything in this code block if __name__ == "__main__": """ First thing you do is create...
# We have to import the minecraft api module to do anything in the minecraft world from mcpi.minecraft import * from mcpi.block import * from blockData import * # this means that the file can be imported without executing anything in this code block if __name__ == "__main__": """ First thing you do is create...
Remove code that is not used
Remove code that is not used Function call not required so removed
Python
bsd-3-clause
hashbangstudio/Python-Minecraft-Examples
a58c3cbfa2c0147525e1afb355e355a9edeb22f8
discussion/admin.py
discussion/admin.py
from django.contrib import admin from discussion.models import Comment, Discussion, Post class CommentInline(admin.TabularInline): exclude = ('user',) extra = 1 model = Comment class PostAdmin(admin.ModelAdmin): inlines = (CommentInline,) list_filter = ('discussion',) class DiscussionAdmin(adm...
from django.contrib import admin from discussion.models import Comment, Discussion, Post class CommentInline(admin.TabularInline): extra = 1 model = Comment raw_id_fields = ('user',) class PostAdmin(admin.ModelAdmin): inlines = (CommentInline,) list_filter = ('discussion',) class DiscussionAdm...
Add user back onto the comment inline for posts
Add user back onto the comment inline for posts
Python
bsd-2-clause
lehins/lehins-discussion,lehins/lehins-discussion,incuna/django-discussion,incuna/django-discussion,lehins/lehins-discussion
b181390c9e0613fed773e05a037b89cd24b225b0
data_preparation.py
data_preparation.py
# importing modules/ libraries import pandas as pd import numpy as np orders_prior_df = pd.read_csv('Data/orders_prior_sample.csv') print('length of orders_prior_df:', len(orders_prior_df)) order_products_prior_df = pd.read_csv('Data/order_products_prior_sample.csv') print('length of order_products_prior_df:', len(or...
# importing modules/ libraries import pandas as pd import numpy as np orders_prior_df = pd.read_csv('Data/orders_prior_sample.csv') order_products_prior_df = pd.read_csv('Data/order_products_prior_sample.csv') grouped = order_products_prior_df.groupby('order_id', as_index = False) grouped_data = pd.DataFrame() gro...
Merge prior order_to_card_order with order id
feat: Merge prior order_to_card_order with order id
Python
mit
rjegankumar/instacart_prediction_model
402075770c43be3505bf6c38b713175fe8c202b4
seleniumbase/config/proxy_list.py
seleniumbase/config/proxy_list.py
""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" OR "username:password@ip_address:po...
""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" OR "username:password@ip_address:po...
Refresh the proxy example list
Refresh the proxy example list
Python
mit
mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase
a33957db32006d663112a1e6a7f0832bb0bdbedd
zerver/management/commands/process_signups.py
zerver/management/commands/process_signups.py
from __future__ import absolute_import from postmonkey import PostMonkey from django.core.management.base import BaseCommand from django.conf import settings from zerver.lib.queue import SimpleQueueClient class Command(BaseCommand): pm = PostMonkey(settings.MAILCHIMP_API_KEY, timeout=10) def subscribe(self,...
from __future__ import absolute_import from postmonkey import PostMonkey, MailChimpException from django.core.management.base import BaseCommand from django.conf import settings import logging from zerver.lib.queue import SimpleQueueClient class Command(BaseCommand): pm = PostMonkey(settings.MAILCHIMP_API_KEY, ...
Handle mailchimp error 214 (duplicate email) in signup worker
Handle mailchimp error 214 (duplicate email) in signup worker (imported from commit cb34c153fc96bca7c8faed01d019aa2433fcf568)
Python
apache-2.0
esander91/zulip,peiwei/zulip,so0k/zulip,johnnygaddarr/zulip,bastianh/zulip,bastianh/zulip,brainwane/zulip,eastlhu/zulip,verma-varsha/zulip,PhilSk/zulip,grave-w-grave/zulip,jeffcao/zulip,PhilSk/zulip,karamcnair/zulip,swinghu/zulip,sup95/zulip,aakash-cr7/zulip,MariaFaBella85/zulip,kaiyuanheshang/zulip,samatdav/zulip,dawr...
420307bcbd846e746d1a203115e0f5c21d8068e4
api/guids/views.py
api/guids/views.py
from django import http from rest_framework.exceptions import NotFound from rest_framework import permissions as drf_permissions from framework.guid.model import Guid from framework.auth.oauth_scopes import CoreScopes, ComposedScopes from api.base.exceptions import EndpointNotImplementedError from api.base import perm...
from django import http from rest_framework.exceptions import NotFound from rest_framework import permissions as drf_permissions from framework.guid.model import Guid from framework.auth.oauth_scopes import CoreScopes, ComposedScopes from api.base.exceptions import EndpointNotImplementedError from api.base import perm...
Add documentation to the /v2/guids/<guid> endpoint
Add documentation to the /v2/guids/<guid> endpoint
Python
apache-2.0
kwierman/osf.io,jnayak1/osf.io,monikagrabowska/osf.io,caseyrollins/osf.io,DanielSBrown/osf.io,doublebits/osf.io,asanfilippo7/osf.io,mfraezz/osf.io,pattisdr/osf.io,aaxelb/osf.io,DanielSBrown/osf.io,RomanZWang/osf.io,TomHeatwole/osf.io,chrisseto/osf.io,TomBaxter/osf.io,CenterForOpenScience/osf.io,TomBaxter/osf.io,cslzche...
5cc511e2e7d685fe8c2983c14d42a4fcfa704c6b
heufybot/utils/__init__.py
heufybot/utils/__init__.py
# Taken from txircd: # https://github.com/ElementalAlchemist/txircd/blob/8832098149b7c5f9b0708efe5c836c8160b0c7e6/txircd/utils.py#L9 def _enum(**enums): return type('Enum', (), enums) ModeType = _enum(LIST=0, PARAM_SET=1, PARAM_UNSET=2, NO_PARAM=3) ModuleLoadType = _enum(LOAD=0, UNLOAD=1, ENABLE=2, DISABLE=3) def...
# Taken from txircd: # https://github.com/ElementalAlchemist/txircd/blob/8832098149b7c5f9b0708efe5c836c8160b0c7e6/txircd/utils.py#L9 def _enum(**enums): return type('Enum', (), enums) ModeType = _enum(LIST=0, PARAM_SET=1, PARAM_UNSET=2, NO_PARAM=3) ModuleLoadType = _enum(LOAD=0, UNLOAD=1, ENABLE=2, DISABLE=3) def...
Add a helper function to grab network names
Add a helper function to grab network names
Python
mit
Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot
2240342e941f850d93cc6606007121159e3eb362
surveys/tests.py
surveys/tests.py
from django.test import TestCase from studygroups.models import Course from .community_feedback import calculate_course_ratings class TestCommunityFeedback(TestCase): fixtures = ['test_courses.json', 'test_studygroups.json', 'test_applications.json', 'test_survey_responses.json'] def test_calculate_course_r...
from django.test import TestCase from studygroups.models import Course from .community_feedback import calculate_course_ratings import json class TestCommunityFeedback(TestCase): fixtures = ['test_courses.json', 'test_studygroups.json', 'test_applications.json', 'test_survey_responses.json'] def test_calcul...
Update test to compare dictionaries, rather than json string
Update test to compare dictionaries, rather than json string
Python
mit
p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles
981e576635ed1830a30fd65e65d745825f73342a
nova/db/sqlalchemy/migrate_repo/versions/034_change_instance_id_in_migrations.py
nova/db/sqlalchemy/migrate_repo/versions/034_change_instance_id_in_migrations.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/...
Delete FK before dropping instance_id column.
Delete FK before dropping instance_id column.
Python
apache-2.0
Juniper/nova,Francis-Liu/animated-broccoli,yrobla/nova,ruslanloman/nova,zhimin711/nova,mikalstill/nova,maoy/zknova,redhat-openstack/nova,adelina-t/nova,mandeepdhami/nova,maoy/zknova,russellb/nova,j-carpentier/nova,usc-isi/extra-specs,psiwczak/openstack,tudorvio/nova,apporc/nova,vladikr/nova_drafts,tudorvio/nova,houshen...
98fe7592af636e0f9c4e7017a1502b7d3539dd6c
src/ggrc/migrations/versions/20160510122526_44ebc240800b_remove_response_relationships.py
src/ggrc/migrations/versions/20160510122526_44ebc240800b_remove_response_relationships.py
# Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: goodson@google.com # Maintained By: goodson@google.com """ Remove relationships related to deleted response objects Create Date: 2016-05-10 12:25:...
# Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: goodson@google.com # Maintained By: goodson@google.com """ Remove relationships related to deleted response objects Create Date: 2016-05-10 12:25:...
Change use of quotation marks
Change use of quotation marks
Python
apache-2.0
josthkko/ggrc-core,edofic/ggrc-core,kr41/ggrc-core,edofic/ggrc-core,j0gurt/ggrc-core,VinnieJohns/ggrc-core,NejcZupec/ggrc-core,VinnieJohns/ggrc-core,j0gurt/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,j0gurt/ggrc-core,kr41/ggrc-core,AleksNeStu/ggrc-core,josthkko/ggrc-core,selahssea/ggrc-core,andrei-karalionak/ggrc-co...
23e1d5d8dbac5bba45f50092d4d10aba6e0ed730
cortex/__init__.py
cortex/__init__.py
from .dataset import Dataset, Volume, Vertex, VolumeRGB, VertexRGB, Volume2D, Vertex2D from . import align, volume, quickflat, webgl, segment, options from .database import db from .utils import * from .quickflat import make_figure as quickshow load = Dataset.from_file try: from . import webgl from .webgl import sh...
from .dataset import Dataset, Volume, Vertex, VolumeRGB, VertexRGB, Volume2D, Vertex2D from . import align, volume, quickflat, webgl, segment, options from .database import db from .utils import * from .quickflat import make_figure as quickshow try: from . import formats except ImportError: raise ImportError("You ar...
Add warning for source directory import
Add warning for source directory import
Python
bsd-2-clause
gallantlab/pycortex,gallantlab/pycortex,gallantlab/pycortex,gallantlab/pycortex,gallantlab/pycortex
3d974d0fd2e98e8030a04cf1dfbb7e05d2dd7539
tests/ml/test_fasttext_helpers.py
tests/ml/test_fasttext_helpers.py
import pandas import unittest import cocoscore.ml.fasttext_helpers as fth class CVTest(unittest.TestCase): def test_train_call_parameters(self): pass if __name__ == '__main__': unittest.main()
import pandas import unittest import cocoscore.ml.fasttext_helpers as fth class CVTest(unittest.TestCase): train_path = 'ft_simple_test.txt' ft_path = '/home/lib/fastText' model_path = 'testmodel' def test_train_call_parameters(self): train_call, compress_call = fth.get_fasttext_train_calls(...
Add testcase for correct fastText predict and compress calls
Add testcase for correct fastText predict and compress calls
Python
mit
JungeAlexander/cocoscore
5d136086e8bdc222cf2ec51f2ad23e2746c5c2b7
Recording/save/replay.py
Recording/save/replay.py
import h5py import time from SimpleCV import Image recordFilename = '20130727_17h34_simpleTrack' print recordFilename + '.hdf5' #recordFile = h5py.File('20130722_21h53_simpleTrack.hdf5') recordFile = h5py.File(recordFilename + '.hdf5', 'r') imgs = recordFile.get('image') img = imgs[100,:,:,:] r = img[:,:,0] g = img[:,...
import h5py import time import sys from SimpleCV import Image, Display #recordFilename = '/media/bat/DATA/Baptiste/Nautilab/kite_project/robokite/ObjectTracking/filming_small_kite_20130805_14h03_simpleTrack.hdf5' print('') print('This script is used to display the images saved in hdf5 file generated by simpleTrack.py ...
Increase display size Use argument for filename Make a movie from images
Increase display size Use argument for filename Make a movie from images
Python
mit
baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite
ca50295c71432dde32eff813e5bd05b7a8e40ad1
cdflib/__init__.py
cdflib/__init__.py
import os from . import cdfread from . import cdfwrite from .epochs import CDFepoch as cdfepoch # This function determines if we are reading or writing a file def CDF(path, cdf_spec=None, delete=False, validate=None): if (os.path.exists(path)): if delete: os.remove(path) return ...
import os from . import cdfread from . import cdfwrite from .epochs import CDFepoch as cdfepoch # This function determines if we are reading or writing a file def CDF(path, cdf_spec=None, delete=False, validate=None): path = os.path.expanduser(path) if (os.path.exists(path)): if delete: o...
Expand user path when reading CDF
Expand user path when reading CDF
Python
mit
MAVENSDC/cdflib
07225cc0d019bb47e9d250f17639804242efcaa8
sea/contrib/extensions/celery/cmd.py
sea/contrib/extensions/celery/cmd.py
import sys from celery.__main__ import main as celerymain from sea import create_app from sea.cli import jobm def celery(argv, app): if argv[0] == "inspect": from sea.contrib.extensions.celery import empty_celeryapp empty_celeryapp.load_config(app) sys.argv = ( ["celery"] + a...
import sys from celery.__main__ import main as celerymain from sea import create_app from sea.cli import jobm def celery(argv, app): if argv[0] == "inspect": from sea.contrib.extensions.celery import empty_celeryapp empty_celeryapp.load_config(app) sys.argv = ( ["celery"] ...
Change the ordering of celery global options
Change the ordering of celery global options
Python
mit
shanbay/sea,yandy/sea,yandy/sea
001c955ffe8aef9ea3f0c6c5bcf8a857c3c10aeb
securethenews/sites/wagtail_hooks.py
securethenews/sites/wagtail_hooks.py
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from .models import Site class SiteAdmin(ModelAdmin): model = Site menu_label = 'News Sites' menu_icon = 'site' add_to_settings_menu = False list_display = ('name', 'domain', 'score') def score(self, obj): ...
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from .models import Site class SiteAdmin(ModelAdmin): model = Site menu_label = 'News Sites' menu_icon = 'site' add_to_settings_menu = False list_display = ('name', 'domain', 'score', 'grade') def score(self, obj...
Add grade to list display for News Sites
Add grade to list display for News Sites
Python
agpl-3.0
freedomofpress/securethenews,DNSUsher/securethenews,freedomofpress/securethenews,DNSUsher/securethenews,freedomofpress/securethenews,freedomofpress/securethenews,DNSUsher/securethenews
648c2af40cd6cae40eafadd2233802543ec70472
zipview/views.py
zipview/views.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import zipfile from django.views.generic import View from django.http import HttpResponse from django.core.files.base import ContentFile from django.utils.six import b class BaseZipView(View): """A base view to zip and stream several files.""" ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import zipfile from django.views.generic import View from django.http import HttpResponse from django.core.files.base import ContentFile from django.utils.six import b class BaseZipView(View): """A base view to zip and stream several files.""" ...
Remove debug code commited by mistake
Remove debug code commited by mistake
Python
mit
thibault/django-zipview
6f13946610745e348816e156c1c575d3ccd7ef8c
event_registration_analytic/models/sale_order.py
event_registration_analytic/models/sale_order.py
# -*- coding: utf-8 -*- # (c) 2016 Alfredo de la Fuente - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import api, models class SaleOrder(models.Model): _inherit = 'sale.order' @api.multi def action_button_confirm(self): project_obj = self.env['project.pr...
# -*- coding: utf-8 -*- # (c) 2016 Alfredo de la Fuente - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import api, models class SaleOrder(models.Model): _inherit = 'sale.order' @api.multi def action_button_confirm(self): project_obj = self.env['project.pr...
Fix bug when in sales order lines there is a nonrecurring service.
[FIX] event_registration_analytic: Fix bug when in sales order lines there is a nonrecurring service.
Python
agpl-3.0
avanzosc/event-wip
733890e0267d07c4d312427a30f136589a85626e
loom/test/test_benchmark.py
loom/test/test_benchmark.py
import loom.benchmark DATASET = 'dd-100-100-0.5' def test_shuffle(): loom.benchmark.shuffle(DATASET, profile=None) def test_infer(): loom.benchmark.infer(DATASET, profile=None) def test_checkpoint(): loom.benchmark.load_checkpoint(DATASET) loom.benchmark.infer_checkpoint(DATASET, profile=None) ...
import loom.benchmark DATASET = 'dd-100-100-0.5' def test_shuffle(): loom.benchmark.shuffle(DATASET, profile=None) def test_infer(): loom.benchmark.infer(DATASET, profile=None) def test_checkpoint(): loom.benchmark.load_checkpoint(DATASET, period_sec=1) loom.benchmark.infer_checkpoint(DATASET, pr...
Reduce test checkpoint period for faster tests
Reduce test checkpoint period for faster tests
Python
bsd-3-clause
posterior/loom,priorknowledge/loom,posterior/loom,priorknowledge/loom,fritzo/loom,priorknowledge/loom,posterior/loom,fritzo/loom,fritzo/loom
ddeabd76c4277c35d1e583d1a2034ba2c047d128
spacy/__init__.py
spacy/__init__.py
import pathlib from .util import set_lang_class, get_lang_class from . import en from . import de from . import zh try: basestring except NameError: basestring = str set_lang_class(en.English.lang, en.English) set_lang_class(de.German.lang, de.German) set_lang_class(zh.Chinese.lang, zh.Chinese) def loa...
import pathlib from .util import set_lang_class, get_lang_class from . import en from . import de from . import zh try: basestring except NameError: basestring = str set_lang_class(en.English.lang, en.English) set_lang_class(de.German.lang, de.German) set_lang_class(zh.Chinese.lang, zh.Chinese) def loa...
Fix mistake loading GloVe vectors. GloVe vectors now loaded by default if present, as promised.
Fix mistake loading GloVe vectors. GloVe vectors now loaded by default if present, as promised.
Python
mit
spacy-io/spaCy,raphael0202/spaCy,raphael0202/spaCy,explosion/spaCy,Gregory-Howard/spaCy,spacy-io/spaCy,oroszgy/spaCy.hu,honnibal/spaCy,banglakit/spaCy,recognai/spaCy,raphael0202/spaCy,oroszgy/spaCy.hu,spacy-io/spaCy,oroszgy/spaCy.hu,spacy-io/spaCy,banglakit/spaCy,explosion/spaCy,Gregory-Howard/spaCy,recognai/spaCy,bang...
80d557749f18ede24af7fc528a9d415af44d94f5
tests/distributions/test_normal.py
tests/distributions/test_normal.py
import tensorprob as tp def make_normal(): mu = tp.Scalar('mu') sigma = tp.Scalar('sigma', lower=0) distribution = tp.Normal(mu, sigma) return mu, sigma, distribution def test_init(): mu, sigma, distribution = make_normal() assert(distribution.mu is mu) assert(distribution.sigma is sigma...
import tensorprob as tp def make_normal(): mu = tp.Scalar('mu') sigma = tp.Scalar('sigma', lower=0) distribution = tp.Normal(mu, sigma) return mu, sigma, distribution def test_init(): mu, sigma, distribution = make_normal() assert(distribution.mu is mu) assert(distribution.sigma is sigma...
Fix broken test in the most correct way possible ;)
Fix broken test in the most correct way possible ;)
Python
mit
ibab/tensorfit,tensorprob/tensorprob,ibab/tensorprob
51e3f7a1fbb857b00a3102287849bc925198d473
tests/helpers/mixins/assertions.py
tests/helpers/mixins/assertions.py
import json class AssertionsAssertionsMixin: def assertSortedEqual(self, one, two): """Assert that the sorted of the two equal""" self.assertEqual(sorted(one), sorted(two)) def assertJsonDictEqual(self, one, two): """Assert the two dictionaries are the same, print out as json if not"""...
from harpoon.errors import HarpoonError from contextlib import contextmanager import json class NotSpecified(object): """Tell the difference between empty and None""" class AssertionsAssertionsMixin: def assertSortedEqual(self, one, two): """Assert that the sorted of the two equal""" self.ass...
Add a fuzzyAssertRaisesError helper for checking against HarpoonError
Add a fuzzyAssertRaisesError helper for checking against HarpoonError
Python
mit
delfick/harpoon,realestate-com-au/harpoon,delfick/harpoon,realestate-com-au/harpoon
992edb9ec2184f3029f1d964d6079dc28876d8ff
src/Note/tests.py
src/Note/tests.py
from django.test import TestCase # Create your tests here.
from django.test import TestCase from note.models import Page # Create your tests here. class PageMethodTests(TestCase): def test_extract_tags(self): """ Test la mΓ©thode d'extraction de tag """ p = Page() p.text = """#test Un test #plus long Test un #tag.compose Pi...
Test unitaire pour l'extraction des Tags
Test unitaire pour l'extraction des Tags
Python
mit
MaximeRaynal/SimpleNote,MaximeRaynal/SimpleNote,MaximeRaynal/SimpleNote,MaximeRaynal/SimpleNote
43e118ccc68bcbfd91a56a6572e8543d2172a79c
bot/logger/message_sender/reusable/__init__.py
bot/logger/message_sender/reusable/__init__.py
from bot.api.api import Api from bot.logger.message_sender import MessageSender class ReusableMessageSender(MessageSender): def __init__(self, api: Api, separator): self.api = api self.separator = separator def send(self, text): if self._is_new(): self._send_new(text) ...
from bot.api.domain import Message from bot.logger.message_sender import MessageSender from bot.logger.message_sender.api import ApiMessageSender from bot.logger.message_sender.message_builder import MessageBuilder class ReusableMessageSender(MessageSender): def __init__(self, sender: ApiMessageSender, builder: M...
Refactor ReusableMessageSender to be resilient against errors on first message api call, whose result is needed to get the message_id to edit further.
Refactor ReusableMessageSender to be resilient against errors on first message api call, whose result is needed to get the message_id to edit further. Also, an upper limit has been added to avoid errors because of too long messages.
Python
agpl-3.0
alvarogzp/telegram-bot,alvarogzp/telegram-bot
e76ab1f6be50e9011c4c8c0cd62815fcfdbfd28e
utils/templatetags/form_helpers.py
utils/templatetags/form_helpers.py
from django import template from django.forms.widgets import CheckboxInput register = template.Library() @register.inclusion_tag("_form_field.html") def smart_field_render(field): """ Renders a form field in different label / input orders depending if it's a checkbox or not. Also knows to only output...
from django import template from django.forms.widgets import CheckboxInput register = template.Library() @register.inclusion_tag("_form_field.html") def smart_field_render(field): """ Renders a form field in different label / input orders depending if it's a checkbox or not. Also knows to only output...
Handle exceptions in the is_checkbox filter
Handle exceptions in the is_checkbox filter
Python
agpl-3.0
pculture/unisubs,wevoice/wesub,wevoice/wesub,pculture/unisubs,pculture/unisubs,wevoice/wesub,wevoice/wesub,pculture/unisubs
8a2fb9001581f66babf59b062af266a1c332f175
debacl/__init__.py
debacl/__init__.py
""" DeBaCl is a Python library for estimation of density level set trees and nonparametric density-based clustering. Level set trees are based on the statistically-principled definition of clusters as modes of a probability density function. They are particularly useful for analyzing structure in complex datasets that ...
""" DeBaCl is a Python library for estimation of density level set trees and nonparametric density-based clustering. Level set trees are based on the statistically-principled definition of clusters as modes of a probability density function. They are particularly useful for analyzing structure in complex datasets that ...
Add tree constructors and LevelSetTree to the debacl namespace.
Add tree constructors and LevelSetTree to the debacl namespace.
Python
bsd-3-clause
CoAxLab/DeBaCl
315f98dc949a52fa56ade36276cafcc8f3d562da
dog_giffter.py
dog_giffter.py
#!/usr/bin/env python import urllib import json import yaml credentials = yaml.load(file("credentials.yml", 'r')) def main(): data=json.loads(urllib.urlopen("http://api.giphy.com/v1/gifs/search?q=cute+dog&api_key=" + credentials["giphy"]["key"] + "&limit=25").read()) print json.dumps(data, sort_keys=True, in...
#!/usr/bin/env python import urllib.request import json import yaml credentials = yaml.load(open("credentials.yml", 'r')) def main(): data=json.loads(urllib.request.urlopen("http://api.giphy.com/v1/gifs/search?q=cute+dog&api_key=" + credentials["giphy"]["key"] + "&limit=25").read()) print(json.dumps(data, so...
Change file to run with python3
Change file to run with python3
Python
mit
brandonsoto/Dog_Giffter
0889a9743d3563ecccaec6106549ef887c327a72
news/views.py
news/views.py
import json import requests from time import sleep from django.http import HttpResponse from .models import NewsFeed HACKER_NEWS_API_URL = 'http://api.ihackernews.com/page' def get_news(request=None): feed = NewsFeed.objects.latest() return json.dumps(feed.json) # View for updating the feed def update_fe...
import json import requests from time import sleep from django.http import HttpResponse from .models import NewsFeed HACKER_NEWS_API_URL = 'http://api.ihackernews.com/page' def get_news(request=None): feed = NewsFeed.objects.latest() return json.dumps(feed.json) # View for updating the feed def update_fe...
Add num_tries to the feed update. If there are more than 10 tries, the requests must stop
Add num_tries to the feed update. If there are more than 10 tries, the requests must stop
Python
mit
jgasteiz/fuzzingtheweb,jgasteiz/fuzzingtheweb,jgasteiz/fuzzingtheweb
6191f08963b636391982b976f59bd36ae8cce7e0
vocab/api.py
vocab/api.py
from merriam_webster.api import CollegiateDictionary, WordNotFoundException from translate.translate import translate_word DICTIONARY = CollegiateDictionary('d59bdd56-d417-42d7-906e-6804b3069c90') def lookup_term(language, term): # If the language is English, use the Merriam-Webster API. # Otherwise, use Wo...
from merriam_webster.api import CollegiateDictionary, WordNotFoundException from translate.translate import translate_word DICTIONARY = CollegiateDictionary('d59bdd56-d417-42d7-906e-6804b3069c90') def lookup_term(language, term): # If the language is English, use the Merriam-Webster API. # Otherwise, use Wo...
Fix malformed data bugs in lookup_term()
Fix malformed data bugs in lookup_term()
Python
mit
dellsystem/bookmarker,dellsystem/bookmarker,dellsystem/bookmarker
81d1f0352e22e5af13acca4f0d900c7b01da5dd9
migrations/versions/307a4fbe8a05_.py
migrations/versions/307a4fbe8a05_.py
"""alter table challenge Revision ID: 307a4fbe8a05 Revises: d6b40a745e5 Create Date: 2017-04-19 14:39:20.255958 """ # revision identifiers, used by Alembic. revision = '307a4fbe8a05' down_revision = 'd6b40a745e5' from alembic import op def upgrade(): try: op.create_index(op.f('ix_challenge_serial'), '...
"""alter table challenge Revision ID: 307a4fbe8a05 Revises: 1edda52b619f Create Date: 2017-04-19 14:39:20.255958 """ # revision identifiers, used by Alembic. revision = '307a4fbe8a05' down_revision = '1edda52b619f' from alembic import op def upgrade(): try: op.create_index(op.f('ix_challenge_serial'),...
Fix history chain of DB migrations.
Fix history chain of DB migrations.
Python
agpl-3.0
wheldom01/privacyidea,jh23453/privacyidea,wheldom01/privacyidea,privacyidea/privacyidea,jh23453/privacyidea,privacyidea/privacyidea,jh23453/privacyidea,privacyidea/privacyidea,privacyidea/privacyidea,privacyidea/privacyidea,wheldom01/privacyidea,jh23453/privacyidea,jh23453/privacyidea,jh23453/privacyidea,privacyidea/pr...
67d4f376586c912f852b98c75f7de04aeb05979a
pag/words.py
pag/words.py
"""Get words from files in "src/dictionary/".""" import os def get_word_list(filepath): """ Get a list of words from a file. Input: file name Output: dict with formula {word: [synonym, synonym]}""" filepath = os.path.abspath(filepath) assert os.path.isfile(filepath), 'Must be a file' ...
"""Get words from files in "src/dictionary/".""" import os def get_word_list(filepath): """ Get a list of words from a file. Input: file name Output: dict with formula {word: [synonym, synonym]}""" filepath = os.path.abspath(filepath) assert os.path.isfile(filepath), 'Must be a file' ...
Remove useless and confusing code
Remove useless and confusing code
Python
mit
allanburleson/python-adventure-game,disorientedperson/python-adventure-game
ce0b30775aedce3be7f25e61ec751116bb192cdc
src/hamcrest/core/core/__init__.py
src/hamcrest/core/core/__init__.py
from __future__ import absolute_import """Fundamental matchers of objects and values, and composite matchers.""" from hamcrest.core.core.allof import all_of from hamcrest.core.core.anyof import any_of from hamcrest.core.core.described_as import described_as from hamcrest.core.core.is_ import is_ from hamcrest.core.cor...
from __future__ import absolute_import """Fundamental matchers of objects and values, and composite matchers.""" from hamcrest.core.core.allof import all_of from hamcrest.core.core.anyof import any_of from hamcrest.core.core.described_as import described_as from hamcrest.core.core.is_ import is_ from hamcrest.core.cor...
Add not_ alias of is_not for better readability of negations
Add not_ alias of is_not for better readability of negations Example: >> assert_that(alist, is_not(has_item(item))) can be >>assert_that(alist, not_(has_item(item)))
Python
bsd-3-clause
nitishr/PyHamcrest,msabramo/PyHamcrest,msabramo/PyHamcrest,nitishr/PyHamcrest
7bd606d40372d874f49016ea381270e34c7c7d58
database/initialize.py
database/initialize.py
""" Just the SQL Alchemy ORM tutorial """ import sqlalchemy from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Integer, String engine = create_engine('sqlite:///:memory:', echo=True) Base = declarative_base() class User(Base): __tablename_...
""" Just the SQL Alchemy ORM tutorial """ import sqlalchemy from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Integer, String from sqlalchemy.orm import sessionmaker engine = create_engine('sqlite:///:memory:', echo=True) Base = declarative_ba...
Insert a user into a table
Insert a user into a table
Python
mit
b-ritter/python-notes,b-ritter/python-notes
e7759b4bae27de4a5bc4e3226287279bf64dfb5f
core/dbt/task/clean.py
core/dbt/task/clean.py
import os.path import os import shutil from dbt.task.base import ProjectOnlyTask from dbt.logger import GLOBAL_LOGGER as logger class CleanTask(ProjectOnlyTask): def __is_project_path(self, path): proj_path = os.path.abspath('.') return not os.path.commonprefix( [proj_path, os.path.a...
import os.path import os import shutil from dbt.task.base import ProjectOnlyTask from dbt.logger import GLOBAL_LOGGER as logger class CleanTask(ProjectOnlyTask): def __is_project_path(self, path): proj_path = os.path.abspath('.') return not os.path.commonprefix( [proj_path, os.path.a...
Update error message with error warning
Update error message with error warning
Python
apache-2.0
analyst-collective/dbt,fishtown-analytics/dbt,fishtown-analytics/dbt,fishtown-analytics/dbt,analyst-collective/dbt
a5e85fa144eb95b166ce4daa15780c5f4044b386
shcol/cli.py
shcol/cli.py
from __future__ import print_function import argparse import shcol import sys __all__ = ['main'] def main(cmd_args): parser = argparse.ArgumentParser( description='Generate columnized output for given string items.', version='shcol {}'.format(shcol.__version__) ) parser.add_argument( ...
from __future__ import print_function import argparse import shcol import sys __all__ = ['main'] def main(cmd_args): parser = argparse.ArgumentParser( description='Generate columnized output for given string items.', version='shcol {}'.format(shcol.__version__) ) item_help = ( 'an...
Document behavior when item args are omitted.
Document behavior when item args are omitted.
Python
bsd-2-clause
seblin/shcol
bd18f52c2ee41bbc9c33a3b98fdac1ce2ea18ea7
rest/urls.py
rest/urls.py
# Author: Braedy Kuzma from django.conf.urls import url from . import views urlpatterns = [ url(r'^posts/$', views.PostsView.as_view(), name='posts'), url(r'^posts/(?P<pid>[0-9a-fA-F\-]+)/$', views.PostView.as_view(), name='post'), url(r'^posts/(?P<pid>[0-9a-fA-F\-]+)/comments/$', views.Com...
# Author: Braedy Kuzma from django.conf.urls import url from . import views urlpatterns = [ url(r'^posts/$', views.PostsView.as_view(), name='posts'), url(r'^posts/(?P<pid>[0-9a-fA-F\-]+)/$', views.PostView.as_view(), name='post'), url(r'^posts/(?P<pid>[0-9a-fA-F\-]+)/comments/$', views.Com...
Revert "Handle second service UUID better."
Revert "Handle second service UUID better." Realized I actually made the url parsing worse, this isn't what we wanted.
Python
apache-2.0
CMPUT404W17T06/CMPUT404-project,CMPUT404W17T06/CMPUT404-project,CMPUT404W17T06/CMPUT404-project
6b558dd7fe2bbab52e56ab54cb0143baff532e8d
mkdocs/gh_deploy.py
mkdocs/gh_deploy.py
from __future__ import print_function import subprocess import os def gh_deploy(config): if not os.path.exists('.git'): print('Cannot deploy - this directory does not appear to be a git repository') return print("Copying '%s' to `gh-pages` branch and pushing to GitHub." % config['site_dir']) ...
from __future__ import print_function import subprocess import os def gh_deploy(config): if not os.path.exists('.git'): print('Cannot deploy - this directory does not appear to be a git repository') return print("Copying '%s' to `gh-pages` branch and pushing to GitHub." % config['site_dir']) ...
Check for CNAME file when using gh-deploy
Check for CNAME file when using gh-deploy If a CNAME file exists in the gh-pages branch, we should read it and use that URL as the expected GitHub pages location. For branches without a CNAME file, we will try to determine the URL using the origin URL.
Python
bsd-2-clause
cazzerson/mkdocs,michaelmcandrew/mkdocs,jeoygin/mkdocs,kubikusrubikus/mkdocs,justinkinney/mkdocs,jpush/mkdocs,peter1000/mkdocs,mkdocs/mkdocs,justinkinney/mkdocs,mkdocs/mkdocs,hhg2288/mkdocs,lbenet/mkdocs,vi4m/mkdocs,lukfor/mkdocs,mlzummo/mkdocs,lukfor/mkdocs,mlzummo/mkdocs,ramramps/mkdocs,xeechou/mkblogs,simonfork/mkdo...
726a982145a5da2530056e2012853848b07d0460
django_snooze/utils.py
django_snooze/utils.py
# -*- coding: utf-8 -*- import json from django.http import HttpResponse def json_response(content, status_code=200, headers={}): """ Simple function to serialise content and return a valid HTTP response. It takes three parameters: - content (required): the content to serialise. - status...
# -*- coding: utf-8 -*- import json from django.http import HttpResponse def json_response(content, status_code=200, headers={}): """ Simple function to serialise content and return a valid HTTP response. It takes three parameters: - content (required): the content to serialise. - statu...
Fix the Content-Type header of the json_response
Fix the Content-Type header of the json_response Seems I forgot to add the correct Content-Type header to the json_response utility. This has now been fixed.
Python
bsd-3-clause
ainmosni/django-snooze,ainmosni/django-snooze
4615a9e26f9a6064572d409ccf8a79a7ab584a38
carson/__init__.py
carson/__init__.py
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy app = Flask(__name__) app.config.from_object('carson.default_settings') db = SQLAlchemy(app) from . import api from . import models
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy app = Flask(__name__) app.config.from_object('carson.default_settings') app.config.from_envvar('CARSON_SETTINGS', silent=True) db = SQLAlchemy(app) from . import api from . import models
Allow overwriting of config from envvar
Allow overwriting of config from envvar
Python
mit
SylverStudios/carson
2cae3a623bce4336f55ef8ec12f1de1dcfb8a637
test/test_view.py
test/test_view.py
import pytest
from PySide import QtGui import qmenuview def test_title(qtbot): title = 'Test title' qmenuview.MenuView(title) assert qmenuview.title() == title def test_parent(qtbot): p = QtGui.QWidget() qmenuview.MenuView(parent=p) assert qmenuview.parent() is p
Add first simple title and parent test
Add first simple title and parent test
Python
bsd-3-clause
storax/qmenuview
c290c132368a93856066513d474078c2a2b22e39
polyaxon/libs/paths.py
polyaxon/libs/paths.py
import logging import os import shutil logger = logging.getLogger('polyaxon.libs.paths') def delete_path(path): if not os.path.exists(path): return try: if os.path.isfile(path): os.remove(path) else: shutil.rmtree(path) except OSError: logger.warnin...
import logging import os import shutil logger = logging.getLogger('polyaxon.libs.paths') def delete_path(path): if not os.path.exists(path): return try: if os.path.isfile(path): os.remove(path) else: shutil.rmtree(path) except OSError: logger.warnin...
Add exception handling for FileExistsError
Add exception handling for FileExistsError
Python
apache-2.0
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
15f0b27759b6c831d4196d7c067e6eb95927e5aa
ato_children/api/filters.py
ato_children/api/filters.py
import django_filters from ..models import Gift class GiftFilter(django_filters.FilterSet): """docstring for GiftFilter""" class Meta: model = Gift fields = ['region']
import django_filters from ..models import Gift class GiftFilter(django_filters.FilterSet): """docstring for GiftFilter""" class Meta: model = Gift fields = ['region', 'status']
Enable status filter in API
Enable status filter in API
Python
mit
webknjaz/webchallenge-ato-children,webknjaz/webchallenge-ato-children,webknjaz/webchallenge-ato-children,webknjaz/webchallenge-ato-children
89a5f257cd1fb285db78b6178e9418fbf48fdaf4
YouKnowShit/DownloadFilesRename.py
YouKnowShit/DownloadFilesRename.py
import requests import bs4 import os import urllib.request import shutil import re distDir = 'F:\\utorrent\\WEST' p = re.compile(r'(\D+\d+)\w*(.\w+)') filenames = os.listdir(distDir) upperfilenames = [] print(filenames) for filenamepref in filenames: if (filenamepref.find('_') > 0): filenameprefit = fil...
import os import re distDir = 'H:\\temp' p = re.compile(r'(\D+\d+)\w*(.\w+)') filenames = os.listdir(distDir) upperfilenames = [] print(filenames) for filenamepref in filenames: if filenamepref.find('_') > 0: filenameprefit = filenamepref[filenamepref.index('_'):] else: filenameprefit = file...
Remove [thz.la] from file names.
Remove [thz.la] from file names.
Python
mit
jiangtianyu2009/PiSoftCake
82396b5033d1dce52e0504a3703d62cdd5bc047b
tests/functions_tests/test_copy.py
tests/functions_tests/test_copy.py
import unittest import numpy import chainer from chainer import functions from chainer import gradient_check class Copy(unittest.TestCase): def setUp(self): self.x_data = numpy.random.uniform( -1, 1, (10, 5)).astype(numpy.float32) self.gy = numpy.random.uniform(-1, 1, (10, 5)).astyp...
import unittest import numpy import chainer from chainer import functions from chainer import gradient_check from chainer import testing class Copy(unittest.TestCase): def setUp(self): self.x_data = numpy.random.uniform( -1, 1, (10, 5)).astype(numpy.float32) self.gy = numpy.random.u...
Make test module for Copy runnable
Make test module for Copy runnable
Python
mit
cupy/cupy,kuwa32/chainer,cupy/cupy,hvy/chainer,niboshi/chainer,cupy/cupy,AlpacaDB/chainer,niboshi/chainer,1986ks/chainer,ktnyt/chainer,tigerneil/chainer,t-abe/chainer,wkentaro/chainer,truongdq/chainer,jnishi/chainer,cemoody/chainer,ikasumi/chainer,aonotas/chainer,chainer/chainer,wkentaro/chainer,keisuke-umezawa/chainer...
25325ee55852eb65e58c13c46660701b1cdd803f
music/migrations/0020_auto_20151028_0925.py
music/migrations/0020_auto_20151028_0925.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def set_total_duration_as_duration(apps, schema_editor): Music = apps.get_model("music", "Music") for music in Music.objects.all(): music.total_duration = music.duration music.save() cla...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def set_total_duration_as_duration(apps, schema_editor): Music = apps.get_model("music", "Music") for music in Music.objects.all(): music.total_duration = music.duration music.save() cla...
Delete timer_end in same migration as total_duration
Delete timer_end in same migration as total_duration
Python
mit
Amoki/Amoki-Music,Amoki/Amoki-Music,Amoki/Amoki-Music
c90462cc685d95c8fb03858f266691123fc37049
auth_mac/models.py
auth_mac/models.py
from django.db import models from django.contrib.auth.models import User class Credentials(models.Model): "Keeps track of issued MAC credentials" user = models.ForeignKey(User) expiry = models.DateTimeField("Expires On") identifier = models.CharField("MAC Key Identifier", max_length=16, null=True, blank=True) ...
from django.db import models from django.contrib.auth.models import User import datetime def default_expiry_time(): return datetime.datetime.now() + datetime.timedelta(days=1) def random_string(): return User.objects.make_random_password(16) class Credentials(models.Model): "Keeps track of issued MAC credentia...
Create credentials with random keys, identifiers, and expiry a day in the future..
Create credentials with random keys, identifiers, and expiry a day in the future..
Python
mit
ndevenish/auth_mac
11d6bc9cbea154c7526c31c6cb4d88b102826cc9
eloqua/endpoints_v2.py
eloqua/endpoints_v2.py
""" API MAPPING FOR Eloqua API V2 """ mapping_table = { 'content_type': 'application/json', 'path_prefix': '/API/REST/2.0', # Campaigns 'get_campaign': { 'method': 'GET', 'path': '/assets/campaign/{{campaign_id}}', 'valid_params': ['depth'] }, 'list_campaigns': { ...
""" API MAPPING FOR Eloqua API V2 """ mapping_table = { 'content_type': 'application/json', 'path_prefix': '/API/REST/2.0', # Campaigns 'get_campaign': { 'method': 'GET', 'path': '/assets/campaign/{{campaign_id}}', 'valid_params': ['depth'] }, 'list_campaigns': { ...
Add operation to update campaign.
Add operation to update campaign.
Python
mit
alexcchan/eloqua
72fcd8f8ec44bf11fa1ed746de188ee4312150c3
apps/sumo/urls.py
apps/sumo/urls.py
from django.conf import settings from django.conf.urls.defaults import patterns, url, include from django.views.generic.simple import redirect_to from sumo import views services_patterns = patterns('', url('^/monitor$', views.monitor, name='sumo.monitor'), url('^/version$', views.version_check, name='sumo.ve...
from django.conf import settings from django.conf.urls.defaults import patterns, url, include from django.views.generic.base import RedirectView from sumo import views services_patterns = patterns('', url('^/monitor$', views.monitor, name='sumo.monitor'), url('^/version$', views.version_check, name='sumo.ver...
Switch to class based generic views.
Switch to class based generic views.
Python
bsd-3-clause
feer56/Kitsune1,iDTLabssl/kitsune,silentbob73/kitsune,YOTOV-LIMITED/kitsune,mozilla/kitsune,rlr/kitsune,anushbmx/kitsune,anushbmx/kitsune,iDTLabssl/kitsune,silentbob73/kitsune,silentbob73/kitsune,iDTLabssl/kitsune,brittanystoroz/kitsune,safwanrahman/kitsune,orvi2014/kitsune,feer56/Kitsune2,turtleloveshoes/kitsune,MikkC...
2ee3de95eac0ca26b5d7567291a1e03478fd95ff
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 requests API_URL = 'http://localhost:8000/gallery/api/patie...
#!/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...
Add method to find pictures.
Add method to find pictures.
Python
mit
cdriehuys/chmvh-website,cdriehuys/chmvh-website,cdriehuys/chmvh-website
799a03a2f40186518063a12f531239071aad7d72
evesrp/util/request.py
evesrp/util/request.py
from __future__ import unicode_literals from flask import Request from itertools import repeat, chain class AcceptRequest(Request): _json_mimetypes = ['application/json',] _html_mimetypes = ['text/html', 'application/xhtml+xml'] _xml_mimetypes = ['application/xml', 'text/xml'] _rss_mimetypes = ['a...
from __future__ import unicode_literals from flask import Request class AcceptRequest(Request): _json_mimetypes = ['application/json',] _html_mimetypes = ['text/html', 'application/xhtml+xml'] _xml_mimetypes = ['application/xml', 'text/xml'] _rss_mimetypes = ['application/rss+xml', 'application/rd...
Revert "Assign quality values when checking MIME types"
Revert "Assign quality values when checking MIME types" This reverts commit b06842f3d5dea138f2962f91105926d889157773.
Python
bsd-2-clause
paxswill/evesrp,paxswill/evesrp,paxswill/evesrp
989601aef4d8a1eeb7cf873ebd2f93ad89b67e54
tests/install_tests/test_build.py
tests/install_tests/test_build.py
from distutils import ccompiler from distutils import sysconfig import unittest import pytest from install import build class TestCheckVersion(unittest.TestCase): def setUp(self): self.compiler = ccompiler.new_compiler() sysconfig.customize_compiler(self.compiler) self.settings = build....
from distutils import ccompiler from distutils import sysconfig import unittest import pytest from install import build class TestCheckVersion(unittest.TestCase): def setUp(self): self.compiler = ccompiler.new_compiler() sysconfig.customize_compiler(self.compiler) self.settings = build....
Fix to check HIP version
Fix to check HIP version
Python
mit
cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy
b3407617c723d5bac579074262166ac6790be9d6
gcloud/dns/__init__.py
gcloud/dns/__init__.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...
Add top-level 'SCOPE' alias for DNS.
Add top-level 'SCOPE' alias for DNS.
Python
apache-2.0
tartavull/google-cloud-python,dhermes/gcloud-python,jonparrott/gcloud-python,tswast/google-cloud-python,googleapis/google-cloud-python,Fkawala/gcloud-python,waprin/google-cloud-python,tseaver/google-cloud-python,daspecster/google-cloud-python,tswast/google-cloud-python,GoogleCloudPlatform/gcloud-python,calpeyser/google...
ffc1b8c83e32f4c2b5454a0ae71b9c30cc8e7596
toolz/tests/test_serialization.py
toolz/tests/test_serialization.py
from toolz import * import pickle def test_compose(): f = compose(str, sum) g = pickle.loads(pickle.dumps(f)) assert f((1, 2)) == g((1, 2)) def test_curry(): f = curry(map)(str) g = pickle.loads(pickle.dumps(f)) assert list(f((1, 2, 3))) == list(g((1, 2, 3))) def test_juxt(): f = juxt(...
from toolz import * import pickle def test_compose(): f = compose(str, sum) g = pickle.loads(pickle.dumps(f)) assert f((1, 2)) == g((1, 2)) def test_curry(): f = curry(map)(str) g = pickle.loads(pickle.dumps(f)) assert list(f((1, 2, 3))) == list(g((1, 2, 3))) def test_juxt(): f = juxt(...
Add serialization test for `complement`
Add serialization test for `complement`
Python
bsd-3-clause
pombredanne/toolz,simudream/toolz,machinelearningdeveloper/toolz,quantopian/toolz,jdmcbr/toolz,bartvm/toolz,jcrist/toolz,cpcloud/toolz,pombredanne/toolz,quantopian/toolz,simudream/toolz,machinelearningdeveloper/toolz,bartvm/toolz,llllllllll/toolz,jdmcbr/toolz,llllllllll/toolz,cpcloud/toolz,jcrist/toolz
f04ccb741ea059aed8891f647ff19b26172ba61c
src/tvmaze/parsers/__init__.py
src/tvmaze/parsers/__init__.py
"""Parse data from TVMaze.""" import datetime import typing def parse_date( val: typing.Optional[str], ) -> typing.Optional[datetime.date]: """ Parse date from TVMaze API. :param val: A date string :return: A datetime.date object """ fmt = '%Y-%m-%d' try: return datetime....
"""Parse data from TVMaze.""" import datetime import typing def parse_date( val: typing.Optional[str], ) -> typing.Optional[datetime.date]: """ Parse date from TVMaze API. :param val: A date string :return: A datetime.date object """ fmt = '%Y-%m-%d' try: return datetime....
Fix parsing duration when duration is None
Fix parsing duration when duration is None Fixes tvmaze/tvmaze#14
Python
mit
tvmaze/tvmaze
a50cca78f400077d56b328a20661c1a9d1e2aff4
app/tests/test_generate_profiles.py
app/tests/test_generate_profiles.py
import os from unittest import TestCase import re from app import generate_profiles class TestGenerateProfiles(TestCase): gen = generate_profiles.GenerateProfiles network_environment = "%s/misc/network-environment" % gen.bootcfg_path @classmethod def setUpClass(cls): cls.gen = generate_prof...
import os import subprocess from unittest import TestCase import re from app import generate_profiles class TestGenerateProfiles(TestCase): gen = generate_profiles.GenerateProfiles network_environment = "%s/misc/network-environment" % gen.bootcfg_path @classmethod def setUpClass(cls): subpr...
Add a requirement for serving the assets in all tests
Add a requirement for serving the assets in all tests
Python
mit
nyodas/enjoliver,kirek007/enjoliver,nyodas/enjoliver,kirek007/enjoliver,JulienBalestra/enjoliver,nyodas/enjoliver,kirek007/enjoliver,JulienBalestra/enjoliver,JulienBalestra/enjoliver,JulienBalestra/enjoliver,nyodas/enjoliver,kirek007/enjoliver,JulienBalestra/enjoliver,nyodas/enjoliver,kirek007/enjoliver
44db9de83aad25a1302ac4c31450a525c0095583
binobj/__init__.py
binobj/__init__.py
""" binobj ====== A Python library for reading and writing structured binary data. """ __version_info__ = (0, 1, 0) __version__ = '.'.join(str(v) for v in __version_info__)
""" binobj ====== A Python library for reading and writing structured binary data. """ # pylint: disable=wildcard-import,unused-import from .errors import * from .fields import * from .serialization import * from .structures import * __version_info__ = (0, 1, 0) __version__ = '.'.join(str(v) for v in __version_info_...
Add wildcard imports at root.
Add wildcard imports at root.
Python
bsd-3-clause
dargueta/binobj
98190f0e96b2e2880e81b4801ebd5b04c1e9f1d8
geomdl/__init__.py
geomdl/__init__.py
""" This package contains native Python implementations of several `The NURBS Book <http://www.springer.com/gp/book/9783642973857>`_ algorithms for generating B-spline / NURBS curves and surfaces. It also provides a data structure for storing elements required for evaluation these curves and surfaces. Please follow the...
""" This package contains native Python implementations of several `The NURBS Book <http://www.springer.com/gp/book/9783642973857>`_ algorithms for generating B-spline / NURBS curves and surfaces. It also provides a data structure for storing elements required for evaluation these curves and surfaces. Please follow the...
Fix importing * (star) from package
Fix importing * (star) from package
Python
mit
orbingol/NURBS-Python,orbingol/NURBS-Python
0c01cb42527fdc2a094d3cc3f2f99a75da6992fa
geoportailv3/models.py
geoportailv3/models.py
# -*- coding: utf-8 -*- import logging from pyramid.i18n import TranslationStringFactory from c2cgeoportal.models import * # noqa _ = TranslationStringFactory('geoportailv3') log = logging.getLogger(__name__)
# -*- coding: utf-8 -*- import logging from pyramid.i18n import TranslationStringFactory from c2cgeoportal.models import * # noqa from pyramid.security import Allow, ALL_PERMISSIONS from formalchemy import Column from sqlalchemy import ForeignKey from sqlalchemy.types import Integer, Boolean, Unicode from c2cgeopor...
Create the model for project specific tables
Create the model for project specific tables
Python
mit
Geoportail-Luxembourg/geoportailv3,Geoportail-Luxembourg/geoportailv3,Geoportail-Luxembourg/geoportailv3,Geoportail-Luxembourg/geoportailv3,geoportallux/geoportailv3-gisgr,geoportallux/geoportailv3-gisgr,geoportallux/geoportailv3-gisgr,Geoportail-Luxembourg/geoportailv3,geoportallux/geoportailv3-gisgr
c3284516e8dc2c7fccfbf7e4bff46a66b4ad2f15
cref/evaluation/__init__.py
cref/evaluation/__init__.py
import os import statistics from cref.structure import rmsd from cref.app.terminal import download_pdb, download_fasta, predict_fasta pdbs = ['1zdd', '1gab'] runs = 100 fragment_sizes = range(5, 13, 2) number_of_clusters = range(4, 20, 1) for pdb in pdbs: output_dir = 'predictions/evaluation/{}/'.format(pdb) ...
import os import statistics from cref.structure import rmsd from cref.app.terminal import download_pdb, download_fasta, predict_fasta pdbs = ['1zdd', '1gab'] runs = 5 fragment_sizes = range(5, 13, 2) number_of_clusters = range(4, 20, 1) for pdb in pdbs: output_dir = 'predictions/evaluation/{}/'.format(pdb) ...
Save output for every run
Save output for every run
Python
mit
mchelem/cref2,mchelem/cref2,mchelem/cref2
76bc5171cbccf9ce171f8891f24b66daa91aef0d
glitter/pages/forms.py
glitter/pages/forms.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from django.conf import settings from .models import Page from glitter.integration import glitter_app_pool class DuplicatePageForm(forms.ModelForm): class Meta: model = Page fields = ['url', 'title', 'parent...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from django.conf import settings from glitter.integration import glitter_app_pool from .models import Page class DuplicatePageForm(forms.ModelForm): class Meta: model = Page fields = ['url', 'title', 'paren...
Sort the Glitter app choices for page admin
Sort the Glitter app choices for page admin For #69
Python
bsd-3-clause
developersociety/django-glitter,developersociety/django-glitter,blancltd/django-glitter,developersociety/django-glitter,blancltd/django-glitter,blancltd/django-glitter
bda36d78984ee8b4701315170f004ed6955072ac
common/widgets.py
common/widgets.py
# This file is part of e-Giełda. # Copyright (C) 2014 Mateusz Maćkowski and Tomasz Zieliński # # e-Giełda 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 ...
# This file is part of e-Giełda. # Copyright (C) 2014 Mateusz Maćkowski and Tomasz Zieliński # # e-Giełda 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 ...
Handle "no file uploaded" situation in FileFieldLink
Handle "no file uploaded" situation in FileFieldLink Fixes ValueErrors when user has no identity card uploaded
Python
agpl-3.0
m4tx/egielda,m4tx/egielda,m4tx/egielda
49f506dce441b3a8fb1e2eb0f06c26661721785e
{{cookiecutter.app_name}}/models.py
{{cookiecutter.app_name}}/models.py
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from django.db import models from django_extensions.db.models import TimeStampedModel class {{ cookiecutter.model_name }}(TimeStampedModel): name = models.CharField( verbose_name=_('name'), max_length...
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from django.db import models from django_extensions.db.models import TimeStampedModel class {{ cookiecutter.model_name }}(TimeStampedModel): name = models.CharField( verbose_name=_('name'), max_length...
Use friendly name for admin
Use friendly name for admin
Python
mit
rickydunlop/cookiecutter-django-app-template-drf-haystack
b0d24c3aa1bea35afb81ee01fd238c8a263527c9
scripts/cts-load.py
scripts/cts-load.py
from __future__ import print_function from re import sub import sys from os.path import basename, splitext from pyspark.sql import SparkSession, Row def parseCTS(f): res = dict() text = '' locs = [] for line in f[1].split('\n'): if line != '': (loc, raw) = line.split('\t', 2) ...
from __future__ import print_function from re import sub import sys from os.path import basename, splitext from pyspark.sql import SparkSession, Row def parseCTS(f): res = dict() text = '' locs = [] id = (splitext(basename(f[0])))[0] for line in f[1].split('\n'): if line != '': ...
Add series and normalize locs.
Add series and normalize locs.
Python
apache-2.0
ViralTexts/vt-passim,ViralTexts/vt-passim,ViralTexts/vt-passim
c4fa912acc573f5590510c0345d9a9b3bc40f4c8
espresso/repl.py
espresso/repl.py
# -*- coding: utf-8 -*- from code import InteractiveConsole class EspressoConsole(InteractiveConsole, object): def interact(self): banner = """β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•...
# -*- coding: utf-8 -*- from code import InteractiveConsole class EspressoConsole(InteractiveConsole, object): def interact(self, banner = None): banner = """β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆ...
Make EspressoConsole.interact conform to InteractiveConsole.interact
Make EspressoConsole.interact conform to InteractiveConsole.interact
Python
bsd-3-clause
ratchetrobotics/espresso
bd181f778e74bbd070fd4f46329ad5c8dc637ea7
zendesk_tickets_machine/tickets/services.py
zendesk_tickets_machine/tickets/services.py
import datetime from django.utils.timezone import utc from .models import Ticket class TicketServices(): def edit_ticket_once(self, **kwargs): id_list = kwargs.get('id_list') edit_tags = kwargs.get('edit_tags') edit_requester = kwargs.get('edit_requester') edit_subject = kwargs.g...
import datetime from django.utils.timezone import utc from .models import Ticket class TicketServices(): def edit_ticket_once(self, **kwargs): id_list = kwargs.get('id_list') edit_tags = kwargs.get('edit_tags') edit_requester = kwargs.get('edit_requester') edit_subject = kwargs.g...
Adjust code style to reduce lines of code :bear:
Adjust code style to reduce lines of code :bear:
Python
mit
prontotools/zendesk-tickets-machine,prontotools/zendesk-tickets-machine,prontotools/zendesk-tickets-machine,prontotools/zendesk-tickets-machine
69df0f5148b998cc7757405b9965200276ce55b9
fireplace/cards/league/adventure.py
fireplace/cards/league/adventure.py
from ..utils import * ## # Spells # Medivh's Locket class LOEA16_12: play = Morph(FRIENDLY_HAND, "GVG_003")
from ..utils import * ## # Spells # Medivh's Locket class LOEA16_12: play = Morph(FRIENDLY_HAND, "GVG_003") ## # Temple Escape events # Pit of Spikes class LOEA04_06: choose = ("LOEA04_06a", "LOEA04_06b") # Swing Across class LOEA04_06a: play = COINFLIP & Hit(FRIENDLY_HERO, 10) # Walk Across Gingerly class L...
Implement Temple Escape event choices
Implement Temple Escape event choices
Python
agpl-3.0
beheh/fireplace,NightKev/fireplace,jleclanche/fireplace,amw2104/fireplace,amw2104/fireplace,smallnamespace/fireplace,smallnamespace/fireplace,Ragowit/fireplace,Ragowit/fireplace
5c681567c359c76e9e323a82ab9162f5098b6421
measurator/main.py
measurator/main.py
def run_main(): pass
import argparse def run_main(): path = file_path() def file_path(): parser = argparse.ArgumentParser() parser.add_argument("path") args = parser.parse_args() return args.path
Add mandatory argument: path to file
Add mandatory argument: path to file
Python
mit
ahitrin-attic/measurator-proto
418357ead146a98f2318af6c76323e2705b79cec
cvloop/__init__.py
cvloop/__init__.py
"""Provides cvloop, a ready to use OpenCV VideoCapture mapper, designed for jupyter notebooks.""" import sys OPENCV_FOUND = False OPENCV_VERSION_COMPATIBLE = False try: import cv2 OPENCV_FOUND = True except Exception as e: # print ("Error:", e) print('OpenCV is not found (tried importing cv2).', file=...
"""Provides cvloop, a ready to use OpenCV VideoCapture mapper, designed for jupyter notebooks.""" import sys OPENCV_FOUND = False OPENCV_VERSION_COMPATIBLE = False try: import cv2 OPENCV_FOUND = True except ModuleNotFoundError: print('OpenCV is not found (tried importing cv2).', file=sys.stderr) print...
Revert unnecessary change to original
Revert unnecessary change to original
Python
mit
shoeffner/cvloop
c8152d1ce0c9f83460da3d384a532d6d064d6543
cross_site_urls/urlresolvers.py
cross_site_urls/urlresolvers.py
# -*- coding:utf-8 -*- # Standard library imports from __future__ import unicode_literals import uuid import requests from django.core.exceptions import ImproperlyConfigured from django.utils import translation import slumber from .conf import settings as local_settings from .encoding import prefix_kwargs from .uti...
# -*- coding:utf-8 -*- # Standard library imports from __future__ import unicode_literals import uuid import requests from django.core.exceptions import ImproperlyConfigured from django.utils import translation import slumber from .conf import settings as local_settings from .encoding import prefix_kwargs from .uti...
Add a new settings allowing to set manually the language code of the url resolve when calling the resolver
FEAT(Resolvers): Add a new settings allowing to set manually the language code of the url resolve when calling the resolver
Python
bsd-3-clause
kapt-labs/django-cross-site-urls,kapt-labs/django-cross-site-urls
0e4db0303d4a8212a91082ace75df95fd440bbfa
server/app.py
server/app.py
from flask import Flask, request from werkzeug.utils import secure_filename import os app = Flask(__name__) app.config['UPLOAD_FOLDER'] = 'uploads/' @app.route('/') def hello_world(): return 'Team FifthEye!' @app.route('/upload', methods=['POST']) def upload(): file = request.files['file'] if file: ...
from flask import Flask, request from werkzeug.utils import secure_filename import os app = Flask(__name__) app.config['UPLOAD_FOLDER'] = 'uploads/' @app.route('/') def hello_world(): return 'Team FifthEye!' @app.route('/upload', methods=['POST']) def upload(): imgData = request.form['file'] if imgData:...
Save data sent from phone
Save data sent from phone
Python
mit
navinpai/LMTAS,navinpai/LMTAS,navinpai/LMTAS
3629e58c47941965406372cb2d3b52a3fdbadfc2
ckanext/tayside/logic/action/get.py
ckanext/tayside/logic/action/get.py
from ckan.logic.action import get as get_core from ckan.plugins import toolkit @toolkit.side_effect_free def package_show(context, data_dict): ''' This action is overriden so that the extra field "theme" is added. This is needed because when a dataset is exposed to DCAT it needs this field. Themes ar...
from ckan.logic.action import get as get_core from ckan.plugins import toolkit @toolkit.side_effect_free def package_show(context, data_dict): ''' This action is overriden so that the extra field "theme" is added. This is needed because when a dataset is exposed to DCAT it needs this field. Themes ar...
Handle logic for extras for dataset
Handle logic for extras for dataset
Python
agpl-3.0
ViderumGlobal/ckanext-tayside,ViderumGlobal/ckanext-tayside,ViderumGlobal/ckanext-tayside,ViderumGlobal/ckanext-tayside
e22bf1a54d8b532f0a417221b04e382e71b29186
LiSE/LiSE/tests/test_examples.py
LiSE/LiSE/tests/test_examples.py
from LiSE.examples import college, kobold, polygons, sickle def test_college(engy): college.install(engy) engy.turn = 10 # wake up the students engy.next_turn() def test_kobold(engy): kobold.inittest(engy, shrubberies=20, kobold_sprint_chance=.9) for i in range(10): engy.next_turn() d...
from LiSE import Engine from LiSE.examples import college, kobold, polygons, sickle def test_college(engy): college.install(engy) engy.turn = 10 # wake up the students engy.next_turn() def test_kobold(engy): kobold.inittest(engy, shrubberies=20, kobold_sprint_chance=.9) for i in range(10): ...
Add a test to catch that load error next time
Add a test to catch that load error next time
Python
agpl-3.0
LogicalDash/LiSE,LogicalDash/LiSE
73d0225b64ec82c7a8142dbac023be499b41fe0f
figures.py
figures.py
#! /usr/bin/env python import sys import re import yaml FILE = sys.argv[1] YAML = sys.argv[2] TYPE = sys.argv[3] header = open(YAML, "r") text = open(FILE, "r") copy = open(FILE+"_NEW", "wt") docs = yaml.load_all(header) for doc in docs: if not doc == None: if 'figure' in doc.keys(): for li...
#! /usr/bin/env python import sys import re import yaml FILE = sys.argv[1] YAML = sys.argv[2] TYPE = sys.argv[3] header = open(YAML, "r") text = open(FILE, "r") copy = open(FILE+"_NEW", "wt") docs = yaml.load_all(header) for doc in docs: if not doc == None: if 'figure' in doc.keys(): for li...
Make the python script silent
Make the python script silent
Python
mit
PoisotLab/PLMT
b597956cd427a3b830a498c69602753ce6117119
chrome/test/chromeos/autotest/files/client/site_tests/desktopui_SyncIntegrationTests/desktopui_SyncIntegrationTests.py
chrome/test/chromeos/autotest/files/client/site_tests/desktopui_SyncIntegrationTests/desktopui_SyncIntegrationTests.py
# Copyright (c) 2010 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from autotest_lib.client.cros import chrome_test class desktopui_SyncIntegrationTests(chrome_test.ChromeTestBase): version = 1 def run_once(sel...
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from autotest_lib.client.cros import chrome_test class desktopui_SyncIntegrationTests(chrome_test.ChromeTestBase): version = 1 binary_to_run = ...
Make the sync integration tests self-contained on autotest
Make the sync integration tests self-contained on autotest In the past, the sync integration tests used to require a password file stored on every test device in order to do a gaia sign in using production gaia servers. This caused the tests to be brittle. As of today, the sync integration tests no longer rely on a p...
Python
bsd-3-clause
dednal/chromium.src,Jonekee/chromium.src,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,keishi/chromium,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,dushu1203/chromium.src,dednal/chromium.src,chuan9/chromi...
5bcb267761e6c2694111757ee4fcf2a050f6c556
byceps/blueprints/site/guest_server/forms.py
byceps/blueprints/site/guest_server/forms.py
""" byceps.blueprints.site.guest_server.forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from flask_babel import lazy_gettext from wtforms import StringField, TextAreaField from wtforms.validators import Optional fro...
""" byceps.blueprints.site.guest_server.forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ import re from flask_babel import lazy_gettext from wtforms import StringField, TextAreaField from wtforms.validators import Le...
Make guest server form validation more strict
Make guest server form validation more strict
Python
bsd-3-clause
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps