commit
stringlengths
40
40
subject
stringlengths
1
1.49k
old_file
stringlengths
4
311
new_file
stringlengths
4
311
new_contents
stringlengths
1
29.8k
old_contents
stringlengths
0
9.9k
lang
stringclasses
3 values
proba
float64
0
1
1b4776ddb6ca0f30e4b61393ac37a8f44cfb2af4
fix auto-discovering db config
feedservice/settings.py
feedservice/settings.py
# -*- coding: utf-8 -*- import os, os.path def bool_env(val, default): """Replaces string based environment values with Python booleans""" if not val in os.environ: return default return True if os.environ.get(val) == 'True' else False DEBUG = bool_env('MYGPOFS_DEBUG', True) TEMPLATE_DEBUG = ...
# -*- coding: utf-8 -*- import os, os.path def bool_env(val, default): """Replaces string based environment values with Python booleans""" if not val in os.environ: return default return True if os.environ.get(val) == 'True' else False DEBUG = bool_env('MYGPOFS_DEBUG', True) TEMPLATE_DEBUG = D...
Python
0.000002
d86bdec5d7d57fe74cb463e391798bd1e5be87ff
Update Ghana code to match current Pombola
pombola/ghana/urls.py
pombola/ghana/urls.py
from django.conf.urls import patterns, url, include from django.views.generic import TemplateView from .views import data_upload, info_page_upload urlpatterns = patterns('', url(r'^intro$', TemplateView.as_view(template_name='intro.html')), url(r'^data/upload/mps/$', data_upload, name='data_upload'), url(...
from django.conf.urls import patterns, include, url, handler404 from django.views.generic import TemplateView import django.contrib.auth.views from .views import data_upload, info_page_upload urlpatterns = patterns('', url(r'^intro$', TemplateView.as_view(template_name='intro.html')), url(r'^data/upload/mps/...
Python
0
9b75fd09220e61fd511c99e63f8d2b30e6a0f868
stop using deprecated assertEquals()
test_csv2es.py
test_csv2es.py
## Copyright 2015 Ray Holder ## ## 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 writi...
## Copyright 2015 Ray Holder ## ## 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 writi...
Python
0
bce19fd89fc82f2d18bd1cc210d94255800a2d5c
Use relative import for Python 3 support
molo/commenting/admin_views.py
molo/commenting/admin_views.py
from .tasks import send_export_email from django.contrib import messages from django.shortcuts import redirect from django.views.generic import FormView from django_comments.views.comments import post_comment from molo.commenting.forms import AdminMoloCommentReplyForm from wagtail.contrib.modeladmin.views import Index...
from django.contrib import messages from django.shortcuts import redirect from django.views.generic import FormView from django_comments.views.comments import post_comment from molo.commenting.forms import AdminMoloCommentReplyForm from tasks import send_export_email from wagtail.contrib.modeladmin.views import IndexVi...
Python
0
b23e93a996f1e769dd64050c35b093275d6b9386
Update Kitsu service
src/services/info/kitsu.py
src/services/info/kitsu.py
# API docs: https://kitsu.docs.apiary.io from logging import debug, info, warning, error import re from .. import AbstractInfoHandler from data.models import UnprocessedShow, ShowType class InfoHandler(AbstractInfoHandler): _show_link_base = "https://kitsu.io/anime/{slug}" _show_link_matcher = "https?://kitsu\.io/...
# API docs: http://docs.kitsu.apiary.io/ from logging import debug, info, warning, error import re from .. import AbstractInfoHandler from data.models import UnprocessedShow, ShowType class InfoHandler(AbstractInfoHandler): _show_link_base = "https://kitsu.io/anime/{slug}" _show_link_matcher = "https?://kitsu\.io/...
Python
0
97a8a349d26b364e57aaac6f8d920770810aa8d8
Correct localized strings
src/sentry/constants.py
src/sentry/constants.py
""" sentry.constants ~~~~~~~~~~~~~~~~ These settings act as the default (base) settings for the Sentry-provided web-server :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from django.utils.datastructures import SortedDict from django.utils....
""" sentry.constants ~~~~~~~~~~~~~~~~ These settings act as the default (base) settings for the Sentry-provided web-server :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from django.utils.datastructures import SortedDict from django.utils....
Python
0.999887
ca2a6d06f09f5f2d511d6cf676fdd9a8f6c411cf
remove cruft, bump heroku
src/settings/production.py
src/settings/production.py
from base import * DEBUG = False ALLOWED_HOSTS = ["*"] SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY", "afaefawe23af") assert SECRET_KEY, "Set your DJANGO_SECRET_KEY env var" # Celery BROKER_URL = os.environ.get('CLOUDAMQP_URL', None) #assert BROKER_URL, "Celery BROKER_URL env var missing!" # Memcached CACHES =...
from base import * DEBUG = False ALLOWED_HOSTS = ["*"] SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY", "afaefawe23af") assert SECRET_KEY, "Set your DJANGO_SECRET_KEY env var" # Celery BROKER_URL = os.environ.get('CLOUDAMQP_URL', None) # BROKER_URL = os.environ.get("RABBITMQ_BIGWIG_URL", None) #assert BROKER_URL,...
Python
0
5526f8e3dca2f84fce34df5a134bada8479a2f69
Fix dumpdata ordering for VRFs
netbox/ipam/models/__init__.py
netbox/ipam/models/__init__.py
# Ensure that VRFs are imported before IPs/prefixes so dumpdata & loaddata work correctly from .fhrp import * from .vrfs import * from .ip import * from .services import * from .vlans import * __all__ = ( 'ASN', 'Aggregate', 'IPAddress', 'IPRange', 'FHRPGroup', 'FHRPGroupAssignment', 'Prefi...
from .fhrp import * from .ip import * from .services import * from .vlans import * from .vrfs import * __all__ = ( 'ASN', 'Aggregate', 'IPAddress', 'IPRange', 'FHRPGroup', 'FHRPGroupAssignment', 'Prefix', 'RIR', 'Role', 'RouteTarget', 'Service', 'ServiceTemplate', 'V...
Python
0
e0c046abe14d7666d9fea54dc0339579f2b0ba98
Fix indentation
neuralmonkey/runners/runner.py
neuralmonkey/runners/runner.py
from typing import Callable, Dict, List import numpy as np import tensorflow as tf from neuralmonkey.runners.base_runner import (BaseRunner, Executable, ExecutionResult, NextExecute) # tests: mypy,pylint # pylint: disable=too-few-public-methods class GreedyRunner(BaseRu...
from typing import Callable, Dict, List import numpy as np import tensorflow as tf from neuralmonkey.runners.base_runner import (BaseRunner, Executable, ExecutionResult, NextExecute) # tests: mypy,pylint # pylint: disable=too-few-public-methods class GreedyRunner(BaseRu...
Python
0.017244
fe0691595eea7197db07f3505446e1553df3d188
Bump version number after merging pull request.
src/openvr/version.py
src/openvr/version.py
# Store the version here so: # 1) we don't load dependencies by storing it in __init__.py # 2) we can import it in setup.py for the same reason # 3) we can import it into your module module # http://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package __version__ = '1.0.0602a'
# Store the version here so: # 1) we don't load dependencies by storing it in __init__.py # 2) we can import it in setup.py for the same reason # 3) we can import it into your module module # http://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package __version__ = '1.0.0601'
Python
0
4e74ba40f442dd27ddd29464b518c2a06ad1019a
Bump version
src/oscar/__init__.py
src/oscar/__init__.py
import os # Use 'dev', 'beta', or 'final' as the 4th element to indicate release type. VERSION = (1, 0, 1, 'machtfit', 22) def get_short_version(): return '%s.%s' % (VERSION[0], VERSION[1]) def get_version(): return '{}.{}.{}-{}-{}'.format(*VERSION) # Cheeky setting that allows each template to be acces...
import os # Use 'dev', 'beta', or 'final' as the 4th element to indicate release type. VERSION = (1, 0, 1, 'machtfit', 21) def get_short_version(): return '%s.%s' % (VERSION[0], VERSION[1]) def get_version(): return '{}.{}.{}-{}-{}'.format(*VERSION) # Cheeky setting that allows each template to be acces...
Python
0
6011cf6d892d4ca941c47b578fdaebc80672f532
Raise an error if the run was cancelled.
api/kiveapi/runstatus.py
api/kiveapi/runstatus.py
""" This module defines a class that keeps track of a run in Kive. """ from . import KiveRunFailedException from .dataset import Dataset class RunStatus(object): """ This keeps track of a run in Kive. There isn't a direct analogue in Kive for this, but it represents a part of Run's functionality. ...
""" This module defines a class that keeps track of a run in Kive. """ from . import KiveRunFailedException from .dataset import Dataset class RunStatus(object): """ This keeps track of a run in Kive. There isn't a direct analogue in Kive for this, but it represents a part of Run's functionality. ...
Python
0
580c133c09758050aae30ae3aa453ce3c5b22e56
refactor python
Python/stack.py
Python/stack.py
__author__ = 'Daniel' class Stack(): def __init__(self): self.items = [] def push(self, item): self.items.append(item) def is_empty(self): return self.items == [] def size(self): return len(self.items) def pop(self): return self.items.pop() def peek...
__author__ = 'Daniel' class Stack(): def __init__(self): self.items = [] def push(self, item): self.items.append(item) def is_empty(self): return self.items == [] def size(self): return len(self.items) def pop(self): return self.items.pop() def peek...
Python
0.999983
343fa1849457202a393ccfdc5b86075cc1b0b88c
add observables
plugins/feeds/public/hybdrid_analysis.py
plugins/feeds/public/hybdrid_analysis.py
import logging from datetime import timedelta from core.errors import ObservableValidationError from core.feed import Feed from core.observables import Hash, Hostname class Hybrid_Analysis(Feed): default_values = { "frequency": timedelta(minutes=5), "name": "Hybdrid-Analy...
import logging from datetime import timedelta from core.errors import ObservableValidationError from core.feed import Feed from core.observables import Hash, Hostname class Hybrid_Analysis(Feed): default_values = { "frequency": timedelta(minutes=5), "name": "Hybdrid-Analy...
Python
0.00209
aa7bbd84fa16105417ceb7f9e06d392a4e54fdc6
Remove unused import
salt/beacons/twilio_txt_msg.py
salt/beacons/twilio_txt_msg.py
# -*- coding: utf-8 -*- ''' Beacon to emit Twilio text messages ''' # Import Python libs from __future__ import absolute_import import logging # Import 3rd Party libs try: from twilio.rest import TwilioRestClient HAS_TWILIO = True except ImportError: HAS_TWILIO = False log = logging.getLogger(__name__) ...
# -*- coding: utf-8 -*- ''' Beacon to emit Twilio text messages ''' # Import Python libs from __future__ import absolute_import from datetime import datetime import logging # Import 3rd Party libs try: from twilio.rest import TwilioRestClient HAS_TWILIO = True except ImportError: HAS_TWILIO = False log =...
Python
0.000001
c340c1b92a3d82a25ce2e43b19603ee58de0b146
Improve celery logging
home/core/async.py
home/core/async.py
""" async.py ~~~~~~~~ Handles running of tasks in an asynchronous fashion. Not explicitly tied to Celery. The `run` method simply must exist here and handle the execution of whatever task is passed to it, whether or not it is handled asynchronously. """ from apscheduler.schedulers.background import BackgroundScheduler...
""" async.py ~~~~~~~~ Handles running of tasks in an asynchronous fashion. Not explicitly tied to Celery. The `run` method simply must exist here and handle the execution of whatever task is passed to it, whether or not it is handled asynchronously. """ from apscheduler.schedulers.background import BackgroundScheduler...
Python
0.000005
8414668c97c359a39cf96a37819cb7e37b54c670
Fix new Pylint
ixdjango/utils.py
ixdjango/utils.py
""" Utility classes/functions """ import os from random import choice import re from subprocess import PIPE, Popen ALPHANUMERIC = 'abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789' def random_string(length=10, chars=ALPHANUMERIC): """ Generates a random string of length specified and using supplied c...
""" Utility classes/functions """ import os from random import choice import re from subprocess import PIPE, Popen def random_string( length=10, chars='abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789' ): """ Generates a random string of length specified and using supplied chars. Useful for...
Python
0.000025
771860a6a9176dc6627f25f5faac960ab3edcc50
add expand user
src/speaker-recognition.py
src/speaker-recognition.py
#!/usr/bin/env python2 # -*- coding: UTF-8 -*- # File: speaker-recognition.py # Date: Sat Nov 29 14:06:43 2014 +0800 # Author: Yuxin Wu <ppwwyyxxc@gmail.com> import argparse import sys import glob import os import itertools import scipy.io.wavfile as wavfile sys.path.append(os.path.join( os.path.dirname(os.path.r...
#!/usr/bin/env python2 # -*- coding: UTF-8 -*- # File: speaker-recognition.py # Date: Wed Oct 29 22:42:26 2014 +0800 # Author: Yuxin Wu <ppwwyyxxc@gmail.com> import argparse import sys import glob import os import itertools import scipy.io.wavfile as wavfile sys.path.append(os.path.join( os.path.dirname(os.path.r...
Python
0.000002
06a648614d51e2c9f456a33dc164c11021c724a8
Handle adding to WHERE where WHERE already exists.
gemini/gemini_region.py
gemini/gemini_region.py
#!/usr/bin/env python import sqlite3 import re import os import sys import GeminiQuery def _report_results(args, query, gq): # report the results of the region query gq.run(query) if args.use_header and gq.header: print gq.header for row in gq: print row def get_region(args, gq): ...
#!/usr/bin/env python import sqlite3 import re import os import sys import GeminiQuery def _report_results(args, query, gq): # report the results of the region query gq.run(query) if args.use_header and gq.header: print gq.header for row in gq: print row def get_region(args, gq): ...
Python
0
9b18db54d64e168231079255334649fb9b503f3e
Add murrine back into monodevelop-mac-dev packages list
profiles/monodevelop-mac-dev/packages.py
profiles/monodevelop-mac-dev/packages.py
import os from bockbuild.darwinprofile import DarwinProfile class MonoDevelopMacDevPackages: def __init__ (self): # Toolchain self.packages.extend ([ 'autoconf.py', 'automake.py', 'libtool.py', 'gettext.py', 'pkg-config.py' ]) # Base Libraries self.packages.extend ([ 'libpng.py', 'libj...
import os from bockbuild.darwinprofile import DarwinProfile class MonoDevelopMacDevPackages: def __init__ (self): # Toolchain self.packages.extend ([ 'autoconf.py', 'automake.py', 'libtool.py', 'gettext.py', 'pkg-config.py' ]) # Base Libraries self.packages.extend ([ 'libpng.py', 'libj...
Python
0
5ca4e1df8fc67f9b56d5ea55cb4e17e78c5c6ed5
Fix test factory
project/apps/smanager/tests/factories.py
project/apps/smanager/tests/factories.py
# Standard Library import datetime import rest_framework_jwt # Third-Party from factory import Faker # post_generation, from factory import Iterator from factory import LazyAttribute from factory import PostGenerationMethodCall from factory import RelatedFactory from factory import Sequence from factory import SubF...
# Standard Library import datetime import rest_framework_jwt # Third-Party from factory import Faker # post_generation, from factory import Iterator from factory import LazyAttribute from factory import PostGenerationMethodCall from factory import RelatedFactory from factory import Sequence from factory import SubF...
Python
0.000001
1e4c1c7213763ba70780707e690e37a1c01e6b59
use cpp to preprocess the input files and handle multiple DGETs per line
generate_task_header.py
generate_task_header.py
#!/usr/bin/python import os import re from toposort import toposort_flatten import copy import subprocess dtask_re = re.compile(r'DTASK\(\s*(\w+)\s*,(.+)\)') dget_re = re.compile(r'DGET\(\s*(\w+)\s*\)') def find_tasks_in_file(filename): tasks = [] cpp = subprocess.Popen(['cpp', '-w', filename], ...
#!/usr/bin/python import os import re from toposort import toposort_flatten import copy dtask_re = re.compile('DTASK\(\s*(\w+)\s*,(.+)\)') dget_re = re.compile('DGET\(\s*(\w+)\s*\)') def find_tasks_in_file(filename): tasks = [] with open(filename) as f: for line in f: match = dtask_re.se...
Python
0
f76daf38fb8998bbf5d0b663ff64572fb240fd24
bump Python API version am: 454844e69f am: 07e940c2de am: 19c98a2e99 am: 9bc9e3d185 am: 4289bd8427
src/trace_processor/python/setup.py
src/trace_processor/python/setup.py
from distutils.core import setup setup( name='perfetto', packages=['perfetto', 'perfetto.trace_processor'], package_data={'perfetto.trace_processor': ['*.descriptor']}, include_package_data=True, version='0.3.0', license='apache-2.0', description='Python API for Perfetto\'s Trace Processor'...
from distutils.core import setup setup( name='perfetto', packages=['perfetto', 'perfetto.trace_processor'], package_data={'perfetto.trace_processor': ['*.descriptor']}, include_package_data=True, version='0.2.9', license='apache-2.0', description='Python API for Perfetto\'s Trace Processor'...
Python
0
2025dae49acd6827d0e961e9be345ad9cb3f1086
Add pytables to save cosine similarity
pygraphc/similarity/LogTextSimilarity.py
pygraphc/similarity/LogTextSimilarity.py
from pygraphc.preprocess.PreprocessLog import PreprocessLog from pygraphc.similarity.StringSimilarity import StringSimilarity from itertools import combinations from tables import * class LogTextSimilarity(object): """A class for calculating cosine similarity between a log pair. This class is intended for ...
from pygraphc.preprocess.PreprocessLog import PreprocessLog from pygraphc.similarity.StringSimilarity import StringSimilarity from itertools import combinations class LogTextSimilarity(object): """A class for calculating cosine similarity between a log pair. This class is intended for non-graph based clust...
Python
0
f9fd73d383f4c62fa7300fecdd9f8e25688ff1e0
Fix spacing.
pymatgen/command_line/aconvasp_caller.py
pymatgen/command_line/aconvasp_caller.py
#!/usr/bin/env python ''' Interface with command line aconvasp http://aflowlib.org/ Only tested on Linux inspired by Shyue's qhull_caller WARNING: you need to have a convasp in your path for this to work ''' __author__="Geoffroy Hautier" __copyright__ = "Copyright 2011, The Materials Project" __version__ = "1.0" __ma...
#!/usr/bin/env python ''' Interface with command line aconvasp http://aflowlib.org/ Only tested on Linux inspired by Shyue's qhull_caller WARNING: you need to have a convasp in your path for this to work ''' __author__="Geoffroy Hautier" __copyright__ = "Copyright 2011, The Materials Project" __version__ = "1.0" __ma...
Python
0.999999
e384aee40e41d36c2ff32b76a1d4d162e0c9cecc
Stopping for the night. corrected JsLibraryAnalyser.js
pythonium/BowerLoad/JsLibraryAnalyser.py
pythonium/BowerLoad/JsLibraryAnalyser.py
__author__ = 'Jason' import glob import os import fnmatch class Mapper: #map out files{} -> classes{} -> functions{{inputs:[],returns:[]} #moduleMap = files{classes{functions{{inputs:[],returns:[]}} moduleMap = {"files":{}} RootJsfileList = [] RootDir = os.curdir() #or js library folder path ...
__author__ = 'Jason' import glob import os class Mapper: #map out files -> classes -> functions+returns moduleMap = {} RootJsfileList = [] def __init__(self): pass def _find_entry_Points(self): os.chdir("/mydir") for file in glob.glob("*.js"): print(file) ...
Python
0.999996
a5840150f7089b1e00296f12254ef161f8ce93b6
fix foo("bar").baz()
pythonscript/pythonscript_transformer.py
pythonscript/pythonscript_transformer.py
from ast import Str from ast import Expr from ast import Call from ast import Name from ast import Assign from ast import Attribute from ast import FunctionDef from ast import NodeTransformer class PythonScriptTransformer(NodeTransformer): def visit_ClassDef(self, node): name = Name(node.name, None) ...
from ast import Str from ast import Expr from ast import Call from ast import Name from ast import Assign from ast import Attribute from ast import FunctionDef from ast import NodeTransformer class PythonScriptTransformer(NodeTransformer): def visit_ClassDef(self, node): name = Name(node.name, None) ...
Python
0.999868
a7a7ea3b224252c22422a2f8b11e452f74ea3a77
Reformat test, remove debug
pyxform/tests_v1/test_upload_question.py
pyxform/tests_v1/test_upload_question.py
""" Test upload (image, audio, file) question types in XLSForm """ from pyxform.tests_v1.pyxform_test_case import PyxformTestCase class UploadTest(PyxformTestCase): def test_image_question(self): self.assertPyxformXform( name="data", md=""" | survey | | | ...
""" Test upload (image, audio, file) question types in XLSForm """ from pyxform.tests_v1.pyxform_test_case import PyxformTestCase class UploadTest(PyxformTestCase): def test_image_question(self): self.assertPyxformXform( name="data", md=""" | survey | | |...
Python
0
3b2730edbbef3f32aef6682d9d446d8416fc7562
add setWindowMinimizeButtonHint() for dialog
quite/controller/dialog_ui_controller.py
quite/controller/dialog_ui_controller.py
from . import WidgetUiController from ..gui import Shortcut from PySide.QtCore import Qt class DialogUiController(WidgetUiController): def __init__(self, parent=None, ui_file=None): super().__init__(parent, ui_file) Shortcut('ctrl+w', self.w).excited.connect(self.w.close) def exec(self): ...
from . import WidgetUiController from ..gui import Shortcut class DialogUiController(WidgetUiController): def __init__(self, parent=None, ui_file=None): super().__init__(parent, ui_file) Shortcut('ctrl+w', self.w).excited.connect(self.w.close) def exec(self): return self.w.exec() ...
Python
0
a08919c24e1af460ccba8820eb6646492848621e
Bump Version 0.5.4
libmc/__init__.py
libmc/__init__.py
from ._client import ( PyClient, ThreadUnsafe, encode_value, MC_DEFAULT_EXPTIME, MC_POLL_TIMEOUT, MC_CONNECT_TIMEOUT, MC_RETRY_TIMEOUT, MC_HASH_MD5, MC_HASH_FNV1_32, MC_HASH_FNV1A_32, MC_HASH_CRC_32, MC_RETURN_SEND_ERR, MC_RETURN_RECV_ERR, MC_RETURN_CONN_POLL_ERR, ...
from ._client import ( PyClient, ThreadUnsafe, encode_value, MC_DEFAULT_EXPTIME, MC_POLL_TIMEOUT, MC_CONNECT_TIMEOUT, MC_RETRY_TIMEOUT, MC_HASH_MD5, MC_HASH_FNV1_32, MC_HASH_FNV1A_32, MC_HASH_CRC_32, MC_RETURN_SEND_ERR, MC_RETURN_RECV_ERR, MC_RETURN_CONN_POLL_ERR, ...
Python
0
778f284c2208438b7bc26226cc295f80de6343e0
Use loop.add_signal_handler for handling SIGWINCH.
libpymux/utils.py
libpymux/utils.py
import array import asyncio import fcntl import signal import termios def get_size(stdout): # Thanks to fabric (fabfile.org), and # http://sqizit.bartletts.id.au/2011/02/14/pseudo-terminals-in-python/ """ Get the size of this pseudo terminal. :returns: A (rows, cols) tuple. """ #assert st...
import array import asyncio import fcntl import signal import termios def get_size(stdout): # Thanks to fabric (fabfile.org), and # http://sqizit.bartletts.id.au/2011/02/14/pseudo-terminals-in-python/ """ Get the size of this pseudo terminal. :returns: A (rows, cols) tuple. """ #assert st...
Python
0
fa57fa679b575ce871af3c4769828f400e6ab28b
bump version 2.1.3 for issue #70
premailer/__init__.py
premailer/__init__.py
from premailer import Premailer, transform __version__ = '2.1.3'
from premailer import Premailer, transform __version__ = '2.1.2'
Python
0
3cdbcc16450faa958e27f60d5f2adc7a943562d8
Fix MacOS build
platforms/osx/build_framework.py
platforms/osx/build_framework.py
#!/usr/bin/env python """ The script builds OpenCV.framework for OSX. """ from __future__ import print_function import os, os.path, sys, argparse, traceback, multiprocessing # import common code sys.path.insert(0, os.path.abspath(os.path.abspath(os.path.dirname(__file__))+'/../ios')) from build_framework import Build...
#!/usr/bin/env python """ The script builds OpenCV.framework for OSX. """ from __future__ import print_function import os, os.path, sys, argparse, traceback, multiprocessing # import common code sys.path.insert(0, os.path.abspath(os.path.abspath(os.path.dirname(__file__))+'/../ios')) from build_framework import Build...
Python
0.000047
0782ba56218e825dea5b76cbf030a522932bcfd6
Remove unnecessary (and debatable) comment.
networkx/classes/ordered.py
networkx/classes/ordered.py
""" OrderedDict variants of the default base classes. """ try: # Python 2.7+ from collections import OrderedDict except ImportError: # Oython 2.6 try: from ordereddict import OrderedDict except ImportError: OrderedDict = None from .graph import Graph from .multigraph import MultiGr...
""" OrderedDict variants of the default base classes. These classes are especially useful for doctests and unit tests. """ try: # Python 2.7+ from collections import OrderedDict except ImportError: # Oython 2.6 try: from ordereddict import OrderedDict except ImportError: OrderedDic...
Python
0
05e162a7fcc9870e37a6deab176cf3c6491e8481
add docstrings for methods of PrimaryDecider and refactor them a bit
plenum/server/primary_decider.py
plenum/server/primary_decider.py
from typing import Iterable from collections import deque from plenum.common.message_processor import MessageProcessor from plenum.server.has_action_queue import HasActionQueue from plenum.server.router import Router, Route from stp_core.common.log import getlogger from typing import List logger = getlogger() class...
from typing import Iterable from collections import deque from plenum.common.message_processor import MessageProcessor from plenum.server.has_action_queue import HasActionQueue from plenum.server.router import Router, Route from stp_core.common.log import getlogger from typing import List logger = getlogger() class...
Python
0
8f78c04f6e2f21deb02a285fc78c5da907f0287b
Delete extra print()
nn/file/cnn_dailymail_rc.py
nn/file/cnn_dailymail_rc.py
import functools import tensorflow as tf from .. import flags from ..flags import FLAGS class _RcFileReader: def __init__(self): # 0 -> null, 1 -> unknown self._word_indices = flags.word_indices def read(self, filename_queue): key, value = tf.WholeFileReader().read(filename_queue) return (key, ...
import functools import tensorflow as tf from .. import flags from ..flags import FLAGS class _RcFileReader: def __init__(self): # 0 -> null, 1 -> unknown self._word_indices = flags.word_indices def read(self, filename_queue): key, value = tf.WholeFileReader().read(filename_queue) return (key, ...
Python
0.000003
55eac8bed7e08c245642c1292ebc644fcbd8e12a
Add jobs serializers' tests
polyaxon/api/jobs/serializers.py
polyaxon/api/jobs/serializers.py
from rest_framework import fields, serializers from rest_framework.exceptions import ValidationError from db.models.jobs import Job, JobStatus from libs.spec_validation import validate_job_spec_config class JobStatusSerializer(serializers.ModelSerializer): uuid = fields.UUIDField(format='hex', read_only=True) ...
from rest_framework import fields, serializers from rest_framework.exceptions import ValidationError from db.models.jobs import Job, JobStatus from libs.spec_validation import validate_job_spec_config class JobStatusSerializer(serializers.ModelSerializer): uuid = fields.UUIDField(format='hex', read_only=True) ...
Python
0
16bf079d1b139db08988fdb3cc1ff818cecfc12e
Add ModelTranslationAdminMixin.
linguist/admin.py
linguist/admin.py
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Translation class ModelTranslationAdminMixin(object): """ Mixin for model admin classes. """ pass class TranslationAdmin(admin.ModelAdmin): """ Translation model admin options. """ pass admin.site.regist...
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Translation class TranslationAdmin(admin.ModelAdmin): pass admin.site.register(Translation, TranslationAdmin)
Python
0
cfeb26b8c591b6d61f3184de74b2a37a2c2c21cc
Fix `lintreview register`
lintreview/cli.py
lintreview/cli.py
import argparse import lintreview.github as github from flask import url_for from lintreview.web import app def main(): parser = create_parser() args = parser.parse_args() args.func(args) def register_hook(args): credentials = None if args.login_user and args.login_pass: credentials = {...
import argparse import lintreview.github as github from lintreview.web import app def main(): parser = create_parser() args = parser.parse_args() args.func(args) def register_hook(args): credentials = None if args.login_user and args.login_pass: credentials = { 'GITHUB_USER'...
Python
0
01d65552b406ef21a5ab4f53fd20cdd9ed6c55f8
support github ping events
lintreview/web.py
lintreview/web.py
import logging import pkg_resources from flask import Flask, request, Response from lintreview.config import load_config from lintreview.github import get_client from lintreview.github import get_lintrc from lintreview.tasks import process_pull_request from lintreview.tasks import cleanup_pull_request config = load_c...
import logging import pkg_resources from flask import Flask, request, Response from lintreview.config import load_config from lintreview.github import get_client from lintreview.github import get_lintrc from lintreview.tasks import process_pull_request from lintreview.tasks import cleanup_pull_request config = load_c...
Python
0
7594763e5e6167c15fa7898b13283e875c13c099
Update BotPMError.py
resources/Dependencies/DecoraterBotCore/BotPMError.py
resources/Dependencies/DecoraterBotCore/BotPMError.py
# coding=utf-8 """ DecoraterBotCore ~~~~~~~~~~~~~~~~~~~ Core to DecoraterBot :copyright: (c) 2015-2017 Decorater :license: MIT, see LICENSE for more details. """ import discord __all__ = ['BotPMError'] class BotPMError: """ Class for PMing bot errors. """ def __init__(self, bot): self.bot ...
# coding=utf-8 """ DecoraterBotCore ~~~~~~~~~~~~~~~~~~~ Core to DecoraterBot :copyright: (c) 2015-2017 Decorater :license: MIT, see LICENSE for more details. """ import discord __all__ = ['BotPMError'] class BotPMError: """ Class for PMing bot errors. """ def __init__(self, bot): self.bot ...
Python
0.000001
cb7f6efbbbe640a2c360f7dc93cb2bc87b2e0ab2
fix example
entity_extract/examples/pos_extraction.py
entity_extract/examples/pos_extraction.py
#from entity_extract.extractor.extractors import PosExtractor from entity_extract.extractor.utilities import SentSplit, Tokenizer from entity_extract.extractor.extractors import PosExtractor from entity_extract.extractor.pos_tagger import PosTagger # Initialize Services sentSplitter = SentSplit() tokenizer = Tokenize...
#from entity_extract.extractor.extractors import PosExtractor from entity_extract.extractor.utilities import SentSplit, Tokenizer from entity_extract.extractor.extractors import PosExtractor from entity_extract.extractor.pos_tagger import PosTagger #p = PosExtractor() sents = p.SentPlit('This is a sentence about the ...
Python
0.0001
8dc5b661149fe075d703042cb32af7bbc0bd5d4a
Switch encoding.py to python3 type hints.
encoding.py
encoding.py
"""Script for encoding a payload into an image.""" import argparse import pathlib from PIL import Image, ImageMath import utilities def argument_parser() -> argparse.ArgumentParser: """Returns a configured argparser.ArgumentParser for this program.""" parser = argparse.ArgumentParser( description='...
"""Script for encoding a payload into an image.""" import argparse import pathlib from PIL import Image, ImageMath import utilities def argument_parser(): # type: () -> argparse.ArgumentParser """Returns a configured argparser.ArgumentParser for this program.""" parser = argparse.ArgumentParser( ...
Python
0
015fcfaaed0a3ff54801f5821df4f5527255ab06
Update SSL.py
gevent_openssl/SSL.py
gevent_openssl/SSL.py
"""gevent_openssl.SSL - gevent compatibility with OpenSSL.SSL. """ import sys import socket import OpenSSL.SSL class SSLConnection(object): """OpenSSL Connection Wapper""" def __init__(self, context, sock): self._context = context self._sock = sock self._connection = OpenSSL.SSL.Conne...
"""gevent_openssl.SSL - gevent compatibility with OpenSSL.SSL. """ import sys import socket import OpenSSL.SSL class Connection(object): def __init__(self, context, sock): self._context = context self._sock = sock self._connection = OpenSSL.SSL.Connection(context, sock) self._make...
Python
0.000001
78ef8bbb721d6673ba576726c57dfae963153153
fix bugs in evaluate.py
evaluate.py
evaluate.py
from envs import create_env import numpy as np import time import argparse def evaluate_loop(env, network, max_episodes, args): sleep_time = args.sleep_time render = args.render verbose = args.verbose last_state = env.reset() last_features = network.get_initial_features() n_episode, step = 0,...
from envs import create_env import numpy as np import time import argparse def evaluate_loop(env, network, max_episodes, args): sleep_time = args.sleep_time render = args.render verbose = args.verbose last_state = env.reset() last_features = network.get_initial_features() n_episode, step = 0,...
Python
0.000001
2e6c80717099fb6c6ca59d9d6193807b1aabfa8b
Update docstring
git_update/actions.py
git_update/actions.py
"""Git repo actions.""" import logging import os import pathlib import click from git import InvalidGitRepositoryError, Repo from git.exc import GitCommandError LOG = logging.getLogger(__name__) def crawl(path): """Crawl the path for possible Git directories. Args: path (str): Original path to craw...
"""Git repo actions.""" import logging import os import pathlib import click from git import InvalidGitRepositoryError, Repo from git.exc import GitCommandError LOG = logging.getLogger(__name__) def crawl(path): """Crawl the path for possible Git directories.""" main_dir = pathlib.Path(path) if not main...
Python
0
ef1f303072307f259e8555e0148c29677b4f7d6f
Fix approve permissions typing
idb/ipc/approve.py
idb/ipc/approve.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from typing import Set, Dict, Any from idb.grpc.types import CompanionClient from idb.grpc.idb_pb2 import ApproveRequest MAP: Dict[str, Any] = { "photos": ApproveRequest.PHOTOS, "camera": ApproveRequest.CAMERA, ...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from typing import Set, Dict # noqa F401 from idb.grpc.types import CompanionClient from idb.grpc.idb_pb2 import ApproveRequest MAP = { # type: Dict[str, ApproveRequest.Permission] "photos": ApproveRequest.PHOTOS, ...
Python
0.000009
7cb9703b1af4138e8f1a036245125d723add55a3
Fix error handling to return sensible HTTP error codes.
grano/views/__init__.py
grano/views/__init__.py
from colander import Invalid from flask import request from werkzeug.exceptions import HTTPException from grano.core import app from grano.lib.serialisation import jsonify from grano.views.base_api import blueprint as base_api from grano.views.entities_api import blueprint as entities_api from grano.views.relations_ap...
from colander import Invalid from flask import request from grano.core import app from grano.lib.serialisation import jsonify from grano.views.base_api import blueprint as base_api from grano.views.entities_api import blueprint as entities_api from grano.views.relations_api import blueprint as relations_api from grano...
Python
0
b4f0bbb8e9fd198cfa60daa3a01a4a48a0fd18af
Replace assertFalse/assertTrue(a in b)
sahara/tests/unit/plugins/storm/test_config_helper.py
sahara/tests/unit/plugins/storm/test_config_helper.py
# Copyright 2017 Massachusetts Open Cloud # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# Copyright 2017 Massachusetts Open Cloud # # 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...
Python
0.000311
d98ac8c127caf4b70c8b0da9b6b6415c47f0f3eb
remove cruft
munge/codec/__init__.py
munge/codec/__init__.py
import os import imp __all__ = ['django', 'mysql', 'json', 'yaml'] __codecs = {} def add_codec(exts, cls): if not isinstance(exts, tuple): exts = tuple(exts) # check for dupe extensions dupe_exts = set(ext for k in __codecs.keys() for ext in k).intersection(exts) if dupe_exts: raise...
import os import imp __all__ = ['django', 'mysql', 'json', 'yaml'] __codecs = {} # TODO move to .load? def _do_find_import(directory, skiplist=None, suffixes=None): # explicitly look for None, suffixes=[] might be passed to not load anything if suffixes is None: suffixes = [t[0] for t in imp.get_su...
Python
0
603c36aec2a4704bb4cf41c224194a5f83f9babe
Set the module as auto_install
sale_payment_method_automatic_workflow/__openerp__.py
sale_payment_method_automatic_workflow/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
Python
0.000001
27b0e86f15a2f89b2f8715dffa5cade17b7f5adf
Update singletons.py
omstd_lefito/lib/singletons.py
omstd_lefito/lib/singletons.py
# -*- coding: utf-8 -*- __ALL__ = ["Displayer", "IntellCollector"] # ------------------------------------------------------------------------- class Displayer: """Output system""" instance = None # --------------------------------------------------------------------- def __new__(cls, *args, **kwargs):...
# -*- coding: utf-8 -*- __ALL__ = ["Displayer", "IntellCollector"] # ------------------------------------------------------------------------- class Displayer: """Output system""" instance = None # --------------------------------------------------------------------- def __new__(cls, *args, **kwargs):...
Python
0.000001
6a6ad3224cbb28a3f109a35413a2e675cdbf1b09
Implement domain functions
openprovider/modules/domain.py
openprovider/modules/domain.py
# coding=utf-8 from openprovider.modules import E, OE, common from openprovider.models import Model def _domain(domain): sld, tld = domain.split('.', 1) return E.domain( E.name(sld), E.extension(tld), ) class DomainModule(common.Module): """Bindings to API methods in the domain mod...
# coding=utf-8 from openprovider.modules import E, common class DomainModule(common.Module): """Bindings to API methods in the domain module.""" def check(self, domain): """ Check availability for a single domain. Returns the domain's status as a string (either "active" or "free"). ...
Python
0.000505
989988aa604b5a125c765294080777c57ec6c535
Fix bug OppsDetail, add channel_long_slug
opps/articles/views/generic.py
opps/articles/views/generic.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.views.generic.detail import DetailView from django.views.generic.list import ListView from django.contrib.sites.models import get_current_site from django.shortcuts import get_object_or_404 from django.utils import timezone from django import template from djang...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.views.generic.detail import DetailView from django.views.generic.list import ListView from django.contrib.sites.models import get_current_site from django.shortcuts import get_object_or_404 from django.utils import timezone from django import template from djang...
Python
0
4a6060f476aebac163dbac8f9822539596379c0a
Use current_app.babel_instance instead of babel
welt2000/__init__.py
welt2000/__init__.py
from flask import Flask, request, session, current_app from flask.ext.babel import Babel from babel.core import negotiate_locale from welt2000.__about__ import ( __title__, __summary__, __uri__, __version__, __author__, __email__, __license__, ) # noqa app = Flask(__name__) app.secret_key = '1234567890' ba...
from flask import Flask, request, session from flask.ext.babel import Babel from babel.core import negotiate_locale from welt2000.__about__ import ( __title__, __summary__, __uri__, __version__, __author__, __email__, __license__, ) # noqa app = Flask(__name__) app.secret_key = '1234567890' babel = Babel(a...
Python
0.000018
58ec62fe47bf6e7acb3302a29fd0df48c4342cec
Enable break and continue in templates
logya/template.py
logya/template.py
# -*- coding: utf-8 -*- import io import os from jinja2 import Environment, BaseLoader, TemplateNotFound, escape def filesource(logya_inst, name, lines=None): """Read and return source of text files. A template function that reads the source of the given file and returns it. The text is escaped so it ca...
# -*- coding: utf-8 -*- import io import os from jinja2 import Environment, BaseLoader, TemplateNotFound, escape def filesource(logya_inst, name, lines=None): """Read and return source of text files. A template function that reads the source of the given file and returns it. The text is escaped so it ca...
Python
0
6f0740fbd94acc2398f0628552a6329c2a90a348
Allow start and end arguments to take inputs of multiple words such as 'New York'
greengraph/command.py
greengraph/command.py
from argparse import ArgumentParser from matplotlib import pyplot as plt from graph import Greengraph def process(): parser = ArgumentParser( description="Produce graph quantifying the amount of green land between two locations") parser.add_argument("--start", required=True, nargs="+", ...
from argparse import ArgumentParser from matplotlib import pyplot as plt from graph import Greengraph def process(): parser = ArgumentParser( description="Produce graph quantifying the amount of green land between two locations") parser.add_argument("--start", required=True, he...
Python
0.000065
75a47485629725f9035c7a4aa7c154ce30de3b5e
Add new allowed host
greenland/settings.py
greenland/settings.py
""" Django settings for greenland project. Generated by 'django-admin startproject' using Django 1.9.5. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os ...
""" Django settings for greenland project. Generated by 'django-admin startproject' using Django 1.9.5. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os ...
Python
0
3fe0a520a458a575117fc8d809f21efd133d2887
Add license file
wikilink/__init__.py
wikilink/__init__.py
""" wiki-link ~~~~~~~~ wiki-link is a web-scraping application to find minimum number of links between two given wiki pages. :copyright: (c) 2016 - 2018 by Tran Ly VU. All Rights Reserved. :license: Apache License 2.0. """ __all__ = ["wiki_link"] __author__ = "Tran Ly Vu (vutransingapore@gmail.com)" __v...
""" wiki-link ~~~~~~~~ wiki-link is a web-scraping application to find minimum number of links between two given wiki pages. :copyright: (c) 2016 - 2018 by Tran Ly VU. All Rights Reserved. :license: Apache License 2.0. """ __all__ = ["wiki_link"] __author__ = "Tran Ly Vu (vutransingapore@gmail.com)" __ve...
Python
0
7a9f3f6cc880d2bcf0cdac8b5193b471eb2b9095
Refactor Adapter pattern
structural/adapter.py
structural/adapter.py
""" Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces. """ import abc class Target(metaclass=abc.ABCMeta): """ Define the domain-specific interface that Client uses. """ def __init__(s...
""" Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces. """ import abc class Target(metaclass=abc.ABCMeta): """ Define the domain-specific interface that Client uses. """ def __init__(s...
Python
0
bc40db9fa1c4663db604cb7890de10ef91d6a65e
Use correct name
haproxystats/metrics.py
haproxystats/metrics.py
""" haproxstats.metrics ~~~~~~~~~~~~~~~~~~ This module provides the field names contained in the HAProxy statistics. """ DAEMON_METRICS = [ 'CompressBpsIn', 'CompressBpsOut', 'CompressBpsRateLim', 'ConnRate', 'ConnRateLimit', 'CumConns', 'CumReq', 'CumSslConns', 'CurrConns', 'Cu...
""" haproxstats.metrics ~~~~~~~~~~~~~~~~~~ This module provides the field names contained in the HAProxy statistics. """ DAEMON_METRICS = [ 'CompressBpsIn', 'CompressBpsOut', 'CompressBpsRateLim', 'ConnRate', 'ConnRateLimit', 'CumConns', 'CumReq', 'CumSslConns', 'CurrConns', 'Cu...
Python
0
3c63201d6113d01c870748f21be2501282a2316a
Remove unneeded import in gmail.py.
paas_manager/app/util/gmail.py
paas_manager/app/util/gmail.py
import sys import smtplib from email.mime.text import MIMEText from email.utils import formatdate from ... import config def create_message(from_addr, to_addr, subject, message, encoding): body = MIMEText(message, 'plain', encoding) body['Subject'] = subject body['From'] = from_addr body['To'] = to_add...
import sys import smtplib from email.mime.text import MIMEText from email.utils import formatdate import yaml from ... import config def create_message(from_addr, to_addr, subject, message, encoding): body = MIMEText(message, 'plain', encoding) body['Subject'] = subject body['From'] = from_addr body['T...
Python
0
4588a52ebfc3aee127a34a9e10067c0121c4f72e
add 'tab' and 'shift tab' for down/up movement
subiquity/ui/frame.py
subiquity/ui/frame.py
# Copyright 2015 Canonical, Ltd. # # This program 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 option) any later version. # # This program is distribute...
# Copyright 2015 Canonical, Ltd. # # This program 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 option) any later version. # # This program is distribute...
Python
0
791fb484937cabeb3a098bcd173db782efe53d7c
support filtering of Authors by organization and positions
authors/views.py
authors/views.py
from rest_framework import viewsets, permissions from . import serializers from . import models class AuthorViewSet(viewsets.ModelViewSet): permission_classes = (permissions.DjangoModelPermissionsOrAnonReadOnly,) queryset = models.Author.objects.all() serializer_class = serializers.AuthorSerializer f...
from rest_framework import viewsets, permissions from . import serializers from . import models class AuthorViewSet(viewsets.ModelViewSet): permission_classes = (permissions.DjangoModelPermissionsOrAnonReadOnly,) queryset = models.Author.objects.all() serializer_class = serializers.AuthorSerializer f...
Python
0
8aa52ea8f07f922bc6d5952ca8ad56bedd042a1f
Bump version number.
nativeconfig/version.py
nativeconfig/version.py
VERSION = '2.4.0'
VERSION = '2.3.0'
Python
0
fb223397ccdee519af7e17dc73db864fe0120e8b
Create a random HDFS folder for unit testing
fs/tests/test_hadoop.py
fs/tests/test_hadoop.py
""" fs.tests.test_hadoop: TestCases for the HDFS Hadoop Filesystem This test suite is skipped unless the following environment variables are configured with valid values. * PYFS_HADOOP_NAMENODE_ADDR * PYFS_HADOOP_NAMENODE_PORT [default=50070] * PYFS_HADOOP_NAMENODE_PATH [default="/"] All tests will be executed wi...
""" fs.tests.test_hadoop: TestCases for the HDFS Hadoop Filesystem This test suite is skipped unless the following environment variables are configured with valid values. * PYFS_HADOOP_NAMENODE_ADDR * PYFS_HADOOP_NAMENODE_PORT [default=50070] * PYFS_HADOOP_NAMENODE_PATH [default="/"] All tests will be executed wi...
Python
0
db33f2d1e14c48cd2c73ae3e3c835fac54f39224
lower bool priority, raise int priority
sympy/core/sympify.py
sympy/core/sympify.py
"""sympify -- convert objects SymPy internal format""" # from basic import Basic, BasicType, S # from numbers import Integer, Real # from interval import Interval import decimal class SympifyError(ValueError): def __init__(self, expr, base_exc=None): self.expr = expr self.base_exc = base_exc d...
"""sympify -- convert objects SymPy internal format""" # from basic import Basic, BasicType, S # from numbers import Integer, Real # from interval import Interval import decimal class SympifyError(ValueError): def __init__(self, expr, base_exc=None): self.expr = expr self.base_exc = base_exc d...
Python
0.999987
926bf60c77673571cb8f6d12e3754507f41b9e80
add optional args
ngage/plugins/napalm.py
ngage/plugins/napalm.py
from __future__ import absolute_import import ngage from ngage.exceptions import AuthenticationError, ConfigError import napalm_base from napalm_base.exceptions import ( ConnectionException, ReplaceConfigException, MergeConfigException ) @ngage.plugin.register('napalm') class Driver(ngage.plugins.Driver...
from __future__ import absolute_import import ngage from ngage.exceptions import AuthenticationError, ConfigError import napalm_base from napalm_base.exceptions import ( ConnectionException, ReplaceConfigException, MergeConfigException ) @ngage.plugin.register('napalm') class Driver(ngage.plugins.Driver...
Python
0.000001
68cf8281b512ea5941ec0b88ca532409e0e97866
Fix circular import
app/evaluation/emails.py
app/evaluation/emails.py
import json from django.conf import settings from django.core.mail import send_mail from comicsite.core.urlresolvers import reverse def send_failed_job_email(job): message = ( f'Unfortunately the evaluation for the submission to ' f'{job.challenge.short_name} failed with an error. The error mess...
import json from django.conf import settings from django.core.mail import send_mail from comicsite.core.urlresolvers import reverse from evaluation.models import Result, Job def send_failed_job_email(job: Job): message = ( f'Unfortunately the evaluation for the submission to ' f'{job.challenge.s...
Python
0.000005
04aa968a70b8065c9c9cd013d1266f8988c4220a
remove accidentally committed maxDiff change
tests/__init__.py
tests/__init__.py
import os import unittest import pytest class ScraperTest(unittest.TestCase): online = False test_file_name = None def setUp(self): os.environ[ "RECIPE_SCRAPERS_SETTINGS" ] = "tests.test_data.test_settings_module.test_settings" test_file_name = ( self.te...
import os import unittest import pytest class ScraperTest(unittest.TestCase): maxDiff = None online = False test_file_name = None def setUp(self): os.environ[ "RECIPE_SCRAPERS_SETTINGS" ] = "tests.test_data.test_settings_module.test_settings" test_file_name = ( ...
Python
0
cc0521c2f72c534e2fa94573f90e9ec2bb169405
use utc time for timestamps
database.py
database.py
import os.path from datetime import datetime from collections import defaultdict from flask import json from flaskext.sqlalchemy import SQLAlchemy import logging log = logging.getLogger(__name__) log.setLevel(logging.INFO) db = SQLAlchemy() class User(db.Model): id = db.Column(db.Integer, primary_key=True) ...
import os.path from datetime import datetime from collections import defaultdict from flask import json from flaskext.sqlalchemy import SQLAlchemy import logging log = logging.getLogger(__name__) log.setLevel(logging.INFO) db = SQLAlchemy() class User(db.Model): id = db.Column(db.Integer, primary_key=True) ...
Python
0.000105
c72b28ece7fe5313c7eff5f26d9ef0baaad1bad2
Update denormalization command
project/apps/api/management/commands/denormalize.py
project/apps/api/management/commands/denormalize.py
from django.core.management.base import ( BaseCommand, ) from apps.api.models import ( Convention, Contest, Award, Contestant, Entrant, Session, Performance, Song, Singer, Director, Panelist, ) class Command(BaseCommand): help = "Command to denormailze data." ...
from django.core.management.base import ( BaseCommand, ) from apps.api.models import ( Convention, Contest, Contestant, Performance, Song, Group, Singer, Director, Panelist, ) class Command(BaseCommand): help = "Command to denormailze data." def handle(self, *args, **...
Python
0.000004
74c4c832b5f99643ac23ad3885f22f7a493016f7
Update denormalization command
project/apps/api/management/commands/denormalize.py
project/apps/api/management/commands/denormalize.py
from django.core.management.base import ( BaseCommand, ) from apps.api.models import ( Convention, Contest, Award, Contestant, Entrant, Session, Performance, Song, Singer, Director, Panelist, ) class Command(BaseCommand): help = "Command to denormailze data." ...
from django.core.management.base import ( BaseCommand, ) from apps.api.models import ( Convention, Contest, Contestant, Performance, Song, Group, Singer, Director, Panelist, ) class Command(BaseCommand): help = "Command to denormailze data." def handle(self, *args, **...
Python
0.000004
7ebf1beec0912273317ed094e1c3806b2e910600
Remove commented lines
mbtiles/worker.py
mbtiles/worker.py
"""rio-mbtiles processing worker""" import logging import warnings from rasterio.enums import Resampling from rasterio.io import MemoryFile from rasterio.transform import from_bounds as transform_from_bounds from rasterio.warp import reproject, transform_bounds from rasterio.windows import Window from rasterio.window...
"""rio-mbtiles processing worker""" import logging import warnings from rasterio.enums import Resampling from rasterio.io import MemoryFile from rasterio.transform import from_bounds as transform_from_bounds from rasterio.warp import reproject, transform_bounds from rasterio.windows import Window from rasterio.window...
Python
0
6785219c9e4e4bfd1d28e4802e992b84000a7f63
increase default read timeout to 5 seconds
pyatk/channel/uart.py
pyatk/channel/uart.py
# Copyright (c) 2012-2013 Harry Bock <bock.harryw@gmail.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # ...
# Copyright (c) 2012-2013 Harry Bock <bock.harryw@gmail.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # ...
Python
0
ec9bc89372670e623dbe98c34591fba62a0ee64a
Rename merge to pack in postp.
pyfr/scripts/postp.py
pyfr/scripts/postp.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from tempfile import NamedTemporaryFile from argparse import ArgumentParser, FileType import numpy as np from pyfr.util import rm def process_pack(args): # List the contents of the directory relnames = os.listdir(args.indir) # Get the absolute fi...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from tempfile import NamedTemporaryFile from argparse import ArgumentParser, FileType import numpy as np from pyfr.util import rm def process_pack(args): # List the contents of the directory relnames = os.listdir(args.indir) # Get the absolute fi...
Python
0
ef628bcdd79ceb28e2b320059c9b00e52372663a
Improve the error message when PyGMT fails to load the GMT library (#814)
pygmt/clib/loading.py
pygmt/clib/loading.py
""" Utility functions to load libgmt as ctypes.CDLL. The path to the shared library can be found automatically by ctypes or set through the GMT_LIBRARY_PATH environment variable. """ import ctypes import os import sys from ctypes.util import find_library from pygmt.exceptions import GMTCLibError, GMTCLibNotFoundError...
""" Utility functions to load libgmt as ctypes.CDLL. The path to the shared library can be found automatically by ctypes or set through the GMT_LIBRARY_PATH environment variable. """ import ctypes import os import sys from ctypes.util import find_library from pygmt.exceptions import GMTCLibError, GMTCLibNotFoundError...
Python
0.000811
d3bc063cc35f5b7bc806c83cd23780108c509fb6
Disable checkin in embedded mode.
pykeg/core/checkin.py
pykeg/core/checkin.py
# Copyright 2014 Bevbot LLC, All Rights Reserved # # This file is part of the Pykeg package of the Kegbot project. # For more information on Pykeg or Kegbot, see http://kegbot.org/ # # Pykeg is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # ...
# Copyright 2014 Bevbot LLC, All Rights Reserved # # This file is part of the Pykeg package of the Kegbot project. # For more information on Pykeg or Kegbot, see http://kegbot.org/ # # Pykeg is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # ...
Python
0
301b2ca9cdf33665312e092937c63b1db7db888f
Add missing imports
pymessenger2/utils.py
pymessenger2/utils.py
import hashlib import hmac import six import attr import json def validate_hub_signature(app_secret, request_payload, hub_signature_header): """ @inputs: app_secret: Secret Key for application request_payload: request body hub_signature_header: X-Hub-Signature header se...
import hashlib import hmac import six def validate_hub_signature(app_secret, request_payload, hub_signature_header): """ @inputs: app_secret: Secret Key for application request_payload: request body hub_signature_header: X-Hub-Signature header sent with request ...
Python
0.000009
20d41656488ea43978f749e2e34303e49981695c
fix imports to include OR tools
pymzn/mzn/__init__.py
pymzn/mzn/__init__.py
from .model import * from .solvers import * from .minizinc import * from .templates import * __all__ = [ 'Solutions', 'minizinc', 'mzn2fzn', 'solns2out', 'MiniZincError', 'MiniZincUnsatisfiableError', 'MiniZincUnknownError', 'MiniZincUnboundedError', 'MiniZincModel', 'Statement', 'Constraint', 'Variab...
from .model import * from .solvers import * from .minizinc import * from .templates import * __all__ = [ 'Solutions', 'minizinc', 'mzn2fzn', 'solns2out', 'MiniZincError', 'MiniZincUnsatisfiableError', 'MiniZincUnknownError', 'MiniZincUnboundedError', 'MiniZincModel', 'Statement', 'Constraint', 'Variab...
Python
0
3cd595fb0a2f1d027aefe70b59e235ef3dd14d61
update basespider download
xspider/libs/basespider/basespider.py
xspider/libs/basespider/basespider.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Created on 2017-02-21 # Project: basespider import json import time import socket import requests import traceback from requests.exceptions import ReadTimeout from requests.exceptions import ConnectionError class BaseGenerator(object): """ BaseSpider Generator ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Created on 2017-02-21 # Project: basespider import json import time import socket import requests import traceback from requests.exceptions import ReadTimeout from requests.exceptions import ConnectionError class BaseGenerator(object): """ BaseSpider Generator ...
Python
0
80bc283676be51ef67fe7924bcc32adaa93fc985
Change timestamp format
guestbook/__init__.py
guestbook/__init__.py
# coding: utf-8 import pickle from datetime import datetime from collections import namedtuple, deque from flask import Flask, request, render_template, redirect, escape, Markup application = Flask(__name__) DATA_FILE = 'guestbook.dat' Post = namedtuple('Post', ['name', 'timestamp', 'comment']) def save_post(name...
# coding: utf-8 import pickle from datetime import datetime from collections import namedtuple, deque from flask import Flask, request, render_template, redirect, escape, Markup application = Flask(__name__) DATA_FILE = 'guestbook.dat' Post = namedtuple('Post', ['name', 'timestamp', 'comment']) def save_post(name...
Python
0.000162
f860a306b4c9fc583a83289ae2a6ecf407214e38
Add more checks to avoid crashing when input files are missing
pysteps/io/readers.py
pysteps/io/readers.py
"""Methods for reading files. """ import numpy as np def read_timeseries(inputfns, importer, **kwargs): """Read a list of input files using io tools and stack them into a 3d array. Parameters ---------- inputfns : list List of input files returned by any function implemented in archive. i...
"""Methods for reading files. """ import numpy as np def read_timeseries(inputfns, importer, **kwargs): """Read a list of input files using io tools and stack them into a 3d array. Parameters ---------- inputfns : list List of input files returned by any function implemented in archive. i...
Python
0
c3527f5526ee96398760cbef11d7de48f41fe998
Annotate NormOP test to skip grad check (#21894)
python/paddle/fluid/tests/unittests/test_norm_op.py
python/paddle/fluid/tests/unittests/test_norm_op.py
# Copyright (c) 2018 PaddlePaddle Authors. 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 app...
# Copyright (c) 2018 PaddlePaddle Authors. 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 app...
Python
0
dbc1df293f283367526b3a80c5f24d71e5d46be1
fix bug abort is undefined and return 204
middleware/app.py
middleware/app.py
from flask import Flask, jsonify, request, abort from sense_hat import SenseHat from hat_manager import HatManager app = Flask(__name__) sense_hat = SenseHat() hat_manager = HatManager(sense_hat) @app.route('/') def index(): return 'Welcome to the PI manager. Choose a route according to what you want to do.' ...
from flask import Flask, jsonify, request from sense_hat import SenseHat from hat_manager import HatManager app = Flask(__name__) sense_hat = SenseHat() hat_manager = HatManager(sense_hat) @app.route('/') def index(): return 'Welcome to the PI manager. Choose a route according to what you want to do.' @app.ro...
Python
0.00001
fb34eebd253727dcc718e2387cb6f4ac763f0bae
Add DateTime Completed Field to Task
tasks/models/tasks.py
tasks/models/tasks.py
"""Models for tasks Each new type of task corresponds to a task model """ from django.db import models from data import Data_FullGrid_Confidence, Data_FullGrid # Tasks class Task_Naming_001(Data_FullGrid_Confidence): class Meta: db_table = 'tbl_response_naming_001' def __unicode__(self): retu...
"""Models for tasks Each new type of task corresponds to a task model """ from django.db import models from data import Data_FullGrid_Confidence, Data_FullGrid # Tasks class Task_Naming_001(Data_FullGrid_Confidence): class Meta: db_table = 'tbl_response_naming_001' def __unicode__(self): retu...
Python
0
6db0dccc5643cb2af254b0bf052806645f7445fd
fix regression on qibuild deploy
python/qibuild/gdb.py
python/qibuild/gdb.py
## Copyright (c) 2012 Aldebaran Robotics. All rights reserved. ## Use of this source code is governed by a BSD-style license that can be ## found in the COPYING file. """ Tools for the GNU debbugger """ import os from qibuild import ui import qibuild.sh import qibuild.command def split_debug(base_dir, objcopy=Non...
## Copyright (c) 2012 Aldebaran Robotics. All rights reserved. ## Use of this source code is governed by a BSD-style license that can be ## found in the COPYING file. """ Tools for the GNU debbugger """ import os from qibuild import ui import qibuild.sh import qibuild.command def split_debug(base_dir, objcopy=Non...
Python
0.000001
547c1d5d1ff2ced0969a86eda6e0094f8b76d94f
Bump to 0.1.1 with setup.py fix
minio/__init__.py
minio/__init__.py
# Minimal Object Storage Library, (C) 2015 Minio, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# Minimal Object Storage Library, (C) 2015 Minio, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
Python
0
4bb8a61cde27575865cdd2b7df5afcb5d6860523
Add weird SLP orientation to get_world_pedir
fmriprep/interfaces/tests/test_reports.py
fmriprep/interfaces/tests/test_reports.py
import pytest from ..reports import get_world_pedir @pytest.mark.parametrize("orientation,pe_dir,expected", [ ('RAS', 'j', 'Posterior-Anterior'), ('RAS', 'j-', 'Anterior-Posterior'), ('RAS', 'i', 'Left-Right'), ('RAS', 'i-', 'Right-Left'), ('RAS', 'k', 'Inferior-Superior'), ('RAS', 'k-', 'Sup...
import pytest from ..reports import get_world_pedir @pytest.mark.parametrize("orientation,pe_dir,expected", [ ('RAS', 'j', 'Posterior-Anterior'), ('RAS', 'j-', 'Anterior-Posterior'), ('RAS', 'i', 'Left-Right'), ('RAS', 'i-', 'Right-Left'), ('RAS', 'k', 'Inferior-Superior'), ('RAS', 'k-', 'Sup...
Python
0
a059a7e8b751fbc49bd1f363378d630d774ed2c1
set subtypes to None if not supported in this TAXII version
taxii_client/utils.py
taxii_client/utils.py
import pytz import json import calendar from libtaxii.clients import HttpClient from libtaxii.messages_10 import ContentBlock as ContentBlock10 from datetime import datetime from collections import namedtuple def ts_to_date(timestamp): if not timestamp: return None return datetime.utcfromtimestam...
import pytz import json import calendar from libtaxii.clients import HttpClient from libtaxii.messages_10 import ContentBlock as ContentBlock10 from datetime import datetime from collections import namedtuple def ts_to_date(timestamp): if not timestamp: return None return datetime.utcfromtimestam...
Python
0.000001
bfa66827e5afd175c15640b1678fbba347009953
Fix unit tests
python/test/_utils.py
python/test/_utils.py
from python.ServerGateway import DwebGatewayHTTPRequestHandler def _processurl(url, verbose, headers={}, **kwargs): # Simulates HTTP Server process - wont work for all methods args = url.split('/') method = args.pop(0) DwebGatewayHTTPRequestHandler.headers = headers # This is a kludge, put headers on ...
from python.ServerGateway import DwebGatewayHTTPRequestHandler def _processurl(url, verbose, **kwargs): # Simulates HTTP Server process - wont work for all methods args = url.split('/') method = args.pop(0) f = getattr(DwebGatewayHTTPRequestHandler, method) assert f namespace = args.pop(0) ...
Python
0.000005
c7e9ea888bbbcef9e7ae29340c45e9aaf211d1da
Fix tests
tests/travis.py
tests/travis.py
import os os.environ['QT_API'] = os.environ['USE_QT_API'].lower() from qtpy import QtCore, QtGui, QtWidgets print('Qt version:%s' % QtCore.__version__) print(QtCore.QEvent) print(QtGui.QPainter) print(QtWidgets.QWidget)
import os os.environ['QT_API'] = os.environ['USE_QT_API'] from qtpy import QtCore, QtGui, QtWidgets print('Qt version:%s' % QtCore.__version__) print(QtCore.QEvent) print(QtGui.QPainter) print(QtWidgets.QWidget)
Python
0.000103
efac3c253dcd71be2c6510b5025ddedbb9a7358e
work when there's no RAVEN_CONFIG
temba/temba_celery.py
temba/temba_celery.py
from __future__ import absolute_import, unicode_literals import celery import os import raven import sys from django.conf import settings from raven.contrib.celery import register_signal, register_logger_signal # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_...
from __future__ import absolute_import, unicode_literals import celery import os import raven import sys from django.conf import settings from raven.contrib.celery import register_signal, register_logger_signal # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_...
Python
0.000004
a3e8c27be953194df2d1b84c5c35b4b6d56f9268
Use common functions. Add deep sleep logic
temp-sensor03/main.py
temp-sensor03/main.py
import machine from ds18x20 import DS18X20 import onewire import time import ujson import urequests import mybuddy #Safetynet during development #Give enough time to delete file before execution for x in range (5): print (".",end='') time.sleep (1) print ("") def get_wifi_config(): keystext = open("wifi.json")....
import machine from ds18x20 import DS18X20 import onewire import time import ujson import urequests def deepsleep(): # configure RTC.ALARM0 to be able to wake the device rtc = machine.RTC() rtc.irq(trigger=rtc.ALARM0, wake=machine.DEEPSLEEP) # set RTC.ALARM0 to fire after some time. Time is given in millisec...
Python
0.000556
460f218c2ed71a0a7aff5bb3353bca01a4841af1
Update Homework_Week4_CaseStudy2.py
Week4-Case-Studies-Part2/Bird-Migration/Homework_Week4_CaseStudy2.py
Week4-Case-Studies-Part2/Bird-Migration/Homework_Week4_CaseStudy2.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Feb 23 21:46:13 2017 @author: lamahamadeh """ ''' ============================== Case Study 2 - Bird Migration ============================== ''' #In this case study, we will continue taking a look at patterns of flight #for each of the ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Feb 23 21:46:13 2017 @author: lamahamadeh """ ''' ============================== Case Study 2 - Bird Migration ============================== ''' #In this case study, we will continue taking a look at patterns of flight #for each of the ...
Python
0.000001
e9e40dd4d9d5357069261653cd1a432e99e8e1aa
Remove unexpected dummy code
initialize_data.py
initialize_data.py
import pandas import numpy as np from google.cloud import datastore from math import floor import pdb RATING_KIND = 'Rating' MOVIE_KIND = 'Movie' PROJECT_ID = 'cf-mr-service' client = datastore.Client(PROJECT_ID) def load_from_store(): query = client.query(kind=RATING_KIND) result = query.fetch() rating =...
import pandas import numpy as np from google.cloud import datastore from math import floor import pdb RATING_KIND = 'Rating' MOVIE_KIND = 'Movie' PROJECT_ID = 'cf-mr-service' client = datastore.Client(PROJECT_ID) def load_from_store(): query = client.query(kind=RATING_KIND) result = query.fetch() rating =...
Python
0.000037
6cb9a09ee92f3be6a5d807e9c5af41bac4796435
Remove loading of env file in development
{{cookiecutter.repo_name}}/config/settings/base.py
{{cookiecutter.repo_name}}/config/settings/base.py
# -*- coding: utf-8 -*- """ Django settings for {{ cookiecutter.project_name }}. For more information on this file, see https://docs.djangoproject.com/en/stable/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/stable/ref/settings/ """ import environ # Django-env...
# -*- coding: utf-8 -*- """ Django settings for {{ cookiecutter.project_name }}. For more information on this file, see https://docs.djangoproject.com/en/stable/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/stable/ref/settings/ """ from os.path import dirname,...
Python
0
c90fce44f30398fef0c20ec08f761ae19951308a
Delete unused pipeline settings
{{cookiecutter.repo_name}}/src/settings/project.py
{{cookiecutter.repo_name}}/src/settings/project.py
# -*- coding: utf-8 -*- """ Project settings for {{cookiecutter.project_name}} Author : {{cookiecutter.author_name}} <{{cookiecutter.email}}> """ from defaults import * from getenv import env INSTALLED_APPS += ( 'applications.front', ) GRAPPELLI_ADMIN_TITLE = "Admin"
# -*- coding: utf-8 -*- """ Project settings for {{cookiecutter.project_name}} Author : {{cookiecutter.author_name}} <{{cookiecutter.email}}> """ from defaults import * from getenv import env INSTALLED_APPS += ( 'applications.front', ) GRAPPELLI_ADMIN_TITLE = "Admin" PIPELINE_CSS = { 'styleshee...
Python
0.000001
c83e8d7d83b9395b5b0428dcac2909b8d6762fe4
make Tool work without invoke scripts again
hublib/rappture/tool.py
hublib/rappture/tool.py
from __future__ import print_function from .node import Node import numpy as np from lxml import etree as ET import os import subprocess import sys from .rappture import RapXML class Tool(RapXML): def __init__(self, tool): """ tool can be any of the following: - Path to a tool.xml file. ...
from __future__ import print_function from .node import Node import numpy as np from lxml import etree as ET import os import subprocess import sys from .rappture import RapXML class Tool(RapXML): def __init__(self, tool): """ tool can be any of the following: - Path to a tool.xml file. ...
Python
0
c06ceb1c3f06bb08e9adb84d82d33325e54ec507
Update accordion.py
cmsplugin_cascade/bootstrap4/accordion.py
cmsplugin_cascade/bootstrap4/accordion.py
from django.forms import widgets, BooleanField, CharField from django.forms.fields import IntegerField from django.utils.translation import ungettext_lazy, ugettext_lazy as _ from django import VERSION as DJANGO_VERSION if DJANGO_VERSION < (2, 0): from django.utils.text import Truncator, mark_safe else: from d...
from django.forms import widgets, BooleanField, CharField from django.forms.fields import IntegerField from django.utils.translation import ungettext_lazy, ugettext_lazy as _ from django.utils.text import Truncator, mark_safe from django.utils.html import escape from entangled.forms import EntangledModelFormMixin from ...
Python
0.000001