text
stringlengths
12
6.59M
import datetime import json import pickle import re import time import traceback import uuid from functools import wraps from huey.exceptions import DataStoreGetException from huey.exceptions import DataStorePutException from huey.exceptions import DataStoreTimeout from huey.exceptions import QueueException from huey....
#! /usr/bin/env python # $Id$ """Gnuplot -- A pipe-based interface to the gnuplot plotting program. This is the main module of the Gnuplot package. Copyright (C) 1998,1999 Michael Haggerty This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as pu...
from fixtures import * def pluck(prop, s): """ generate the values from the given attribute with name `prop` from the given sequence of items `s`. Args: prop (str): the name of an attribute. s (sequnce): a bunch of objects. Yields: any: the values of the requested field across the ...
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin, BaseUserManager from django.core.mail import send_mail from core.mixins import * from core.models import notification_channel_format, channel_components from co...
#!/usr/bin/env python # coding: utf-8 ######################################################################### ######################################################################### """ File Name: bitmap.py Author: Wan Ji E-mail: wanji@live.com Created on: Thu May 1 15:26:18 2014 CST """ DESCRIP...
import hashlib import os import socket import sys import base64 import time from django.db.models import F, Q from xos.config import Config from synchronizers.base.syncstep import SyncStep from synchronizers.base.ansible import run_template_ssh from synchronizers.base.SyncInstanceUsingAnsible import SyncInstanceUsingAn...
import logging import struct import time from asyncio import get_event_loop, gather, ensure_future from colorlog import ColoredFormatter from secret_handshake.network import SHSClient from ssb.muxrpc import MuxRPCAPI, MuxRPCAPIException from ssb.packet_stream import PacketStream, PSMessageType from ssb.util import lo...
""" .. module:: packet_out .. role:: red BitPie.NET packet_out() Automat .. raw:: html <a href="packet_out.png" target="_blank"> <img src="packet_out.png" style="max-width:100%;"> </a> EVENTS: * :red:`cancel` * :red:`failed` * :red:`inbox-packet` * :red:`item-cancelle...
# -*- coding: utf-8 -*- """ Autores: XXX Grupo YYY Este código es fruto ÚNICAMENTE del trabajo de sus miembros. Declaramos no haber colaborado de ninguna manera con otros grupos, haber compartido el ćodigo con otros ni haberlo obtenido de una fuente externa. """ """ IMPLICIT SCHEME +-------------------------------...
# -*- coding: utf-8 -*- # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import logging from functools import reduce from odoo import api, fields, models _logger = logging.getLogger(__name__) def secondsToStr(t): return "%d:%02d:%02d....
import collections import cPickle from astromodels.utils.io import display from astromodels.core.node_ctype import _Node from astromodels.utils.valid_variable import is_valid_variable_name class DuplicatedNode(Exception): pass class ProtectedAttribute(RuntimeError): pass class NonExistingAttribute(Runtim...
"""distutils The main package for the Python Module Distribution Utilities. Normally used from a setup script as from distutils.core import setup setup (...) """ # Distutils version # # Updated automatically by the Python release process. # #--start constants-- __version__ = "3.2.3rc1" #--end constants--
import unittest import six from functools import partial from scrapy.loader import ItemLoader from scrapy.loader.processors import Join, Identity, TakeFirst, \ Compose, MapCompose, SelectJmes from scrapy.item import Item, Field from scrapy.selector import Selector from scrapy.http import HtmlResponse # test items...
# Copyright 2020 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# coding=utf-8 # Copyright 2020 The Trax Authors. # # 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...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ Utilities for prettifying output to the console. """ from __future__ import division, print_function import io import re import math import sys import time from ..config.configs import ConfigurationItem __all__ = [ 'isa...
from pyfakefs.fake_filesystem_unittest import TestCase from unittest import main import getgauge import configparser import os import logging import sys config = configparser.RawConfigParser() config.read(os.path.join(getgauge.util.get_project_root(), 'env/default/python.properties')) class LoggerTests(TestCase): ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains hooks for zest.releaser for use in semi-automated releases of Astropy. """ def prereleaser_middle(data): """ prereleaser.middle hook to replace the version string in setup.py; zest.releaser already does this normally...
#! /usr/bin/env python2 # vim:fileencoding=UTF-8 import sys import os import re import tweepy import readline import pprint import traceback import tempfile DEFAULT_AUTHFILE = os.path.expanduser("~") + "/.twitter_auth" readline.parse_and_bind('tab: complete') class TweetShell: def __init__(self, authfile): self._...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import argparse import sys import six from .. import config from .. import util from .. import __version__ # This lis...
"""Implement Blaze/Bazel label.""" __all__ = [ 'Label', ] from collections import namedtuple from pathlib import PurePath from pathlib import PurePosixPath import iga.env import iga.fargparse from iga.error import IgaError class Label(namedtuple('Label', 'package target')): @staticmethod def parse(lab...
# -*- coding: utf-8 -*- """ python-bna Battle.net Authenticator routines in Python. Specification can be found here: <http://bnetauth.freeportal.us/specification.html> Python implementation by Jerome Leclanche <j.leclanche@gmail.com> """ from time import time from hashlib import sha1 RSA_KEY = 104890018807986556874...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Specify and constraints to determine which targets are observable for an observer. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from abc import ABCMeta, abstractmethod import numpy as...
import unittest from textwrap import dedent from conllu.models import Metadata, Token, TokenList, TokenTree from conllu.parser import ParseException, serialize from tests.helpers import capture_print class TestToken(unittest.TestCase): def test_xupos_to_xupostag(self): token = Token({"id": 1, "xpos": "DT...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Specify and constraints to determine which targets are observable for an observer. """ from __future__ import (absolute_import, division, print_function, unicode_literals) # Standard library from abc import ABCMeta, abstractme...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_django-publica-templates ------------ Tests for `django-publica-templates` models module. """ import unittest from templates import models from django.template import loader, Context import test_settings as settings from templates.utils.cache import get_cache...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Define the Enhanced Character-Separated-Values (ECSV) which allows for reading and writing all the meta data associated with an astropy Table object. """ import re from collections import OrderedDict from ...extern import six from . import core, bas...
import pytest from pytorch_lightning import Trainer from pytorch_lightning.examples.new_project_templates.lightning_module_template import LightningTemplateModel from pytorch_lightning.testing_models.lm_test_module import LightningTestModel from argparse import Namespace from test_tube import Experiment from pytorch_li...
import os import sys from PyQt5.QtCore import QPoint, QRect, Qt from PyQt5.QtGui import ( QColor, QIcon, QImage, QPainter, QPalette, ) from PyQt5.QtWidgets import ( QAction, QApplication, QDockWidget, QFileDialog, QMainWindow, QMdiArea, QScrollArea, QWidget, ) APPL...
import contextlib import io import os import sys import tempfile try: import fcntl except ImportError: fcntl = None __version__ = '1.2.1' PY2 = sys.version_info[0] == 2 text_type = unicode if PY2 else str # noqa def _path_to_unicode(x): if not isinstance(x, text_type): return x.decode(sys.ge...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module defines base classes for all models. The base class of all models is `~astropy.modeling.Model`. `~astropy.modeling.FittableModel` is the base class for all fittable models. Fittable models can be linear or nonlinear in a regression analys...
#!/usr/bin/env python # file: img4latex.py # vim:fileencoding=utf-8:fdm=marker:ft=python # # Copyright © 2014-2018 R.F. Smith <rsmith@xs4all.nl>. # SPDX-License-Identifier: MIT # Created: 2014-12-05T01:26:59+01:00 # Last modified: 2021-05-31T12:36:26+0200 """Create a suitable LaTeX figure environment for image files.""...
import pytest from pytorch_lightning import Trainer from pytorch_lightning.examples.new_project_templates.lightning_module_template import LightningTemplateModel from argparse import Namespace from test_tube import Experiment from pytorch_lightning.callbacks import ModelCheckpoint import numpy as np import warnings imp...
""" Functions that are from earlier versions of `augur validate` and haven't yet been moved into `validate.py`. There's a lot of duplication here which can be abstracted and refactored over time. """ import sys from collections import defaultdict def collectTreeAttrsV2(root, warn): """ Collect all keys specif...
import pytest import torch import platform import os import fnmatch import timm from timm import list_models, create_model, set_scriptable, has_model_default_key, is_model_default_key, \ get_model_default_value from timm.models.fx_features import NodePathTracer if hasattr(torch._C, '_jit_set_profiling_executor'):...
from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np import pandas as pd from pandas.tseries.offsets import BDay import os import csv import json import logging import datetime as dt from auquanToolbox.dataloader import load_data from auquanToolbox.resultviewer import lo...
#!/usr/bin/python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import json import unittest import websocket from pushtest.pushTestCase import PushTestCase from pus...
#------------------------------------------------------------------------------ # setlx2py: test_parser.py # # Unit tests for the Parser class in setlx_parser.py # Beware: Only syntax is tested here! # # Copyright (C) 2013, Jan-Christoph Klie # License: Apache v2 #-------------------------------------------------------...
from __future__ import unicode_literals import json import unittest from libdrafter import Parser class TestEncrypt(unittest.TestCase): def setUp(self): self.parser = Parser() self.source = b""" # My API ## GET /message + Response 200 (text/plain) Hello World! """ self.e...
# -*- coding: utf-8 -*- from __future__ import absolute_import import re import unittest import logging import os import sys from copy import copy, deepcopy from lark.utils import isascii from lark import Token, Transformer_NonRecursive, LexError try: from cStringIO import StringIO as cStringIO except ImportErr...
# -*- coding: utf-8 -*- """Characters, the base of life in the MUD.""" # Part of Atria MUD Server (https://github.com/whutch/atria) # :copyright: (c) 2008 - 2016 Will Hutcheson # :license: MIT (https://github.com/whutch/atria/blob/master/LICENSE.txt) import re from .const import * from .entities import Attribute, ENT...
""" Handy functions for flattening nested containers containing numpy arrays. The main purpose is to make examples and optimizers simpler. """ from autograd import make_vjp from autograd.builtins import type import autograd.numpy as np def flatten(value): """Flattens any nesting of tuples, lists, or dicts, with nu...
"""Test the parser component.""" import unittest from beacontools import parse_packet, EddystoneUIDFrame, EddystoneURLFrame, \ EddystoneEncryptedTLMFrame, EddystoneTLMFrame class TestParser(unittest.TestCase): """Test the parser.""" def test_bad_packets(self): """Test if rando...
#!/usr/bin/env python # coding: utf-8 # # Usage: python -matx screenrecord -o out.avi import os import time import traceback import cv2 import numpy as np from atx import adb2 as adb def main(output='out.avi', scale=0.5, portrait=False, overwrite=True, verbose=True): if os.path.exists(output): ...
import unittest import pyrtl import pyrtl.core import pyrtl.wire import pyrtl.passes from helperfunctions import testmissing class TestPasses(unittest.TestCase): def setUp(self): pyrtl.reset_working_block() pyrtl.set_debug_mode(True) def tearDown(self): pyrtl.reset_working_block() ...
# -*- coding: utf-8 -*- # © 2015 ABF OSIELL <http://osiell.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': "Audit Log", 'version': "9.0.1.0.0", 'author': "ABF OSIELL,Odoo Community Association (OCA)", 'license': "AGPL-3", 'website': "http://www.osiell.com", 'categ...
# coding: utf-8 """ Test suite for PgTune. """ from unittest.mock import MagicMock, patch import pytest import smdba.postgresqlgate class TestPgTune: """ Test PgTune class. """ def test_estimate(self): """ Test estimation with 10 connection and 8GB RAM :return: """ ...
#!/usr/bin/python """ This python file just runs all of the terminal commands needed to run the project. It just saves time not having to manually type in these commands every time you want to run the project. At the moment it only works for the example project, as the project later develops this script might be upda...
import os import sys import re import shutil import json import pytest import warnings from pipenv.core import activate_virtualenv, _get_command_posix from pipenv.utils import ( temp_environ, get_windows_path, mkdir_p, normalize_drive, TemporaryDirectory ) from pipenv.vendor import toml from pipenv.vendor import de...
#!/usr/bin/python """ This python file just runs all of the terminal commands needed to run the project. It just saves time not having to manually type in these commands every time you want to run the project. At the moment it only works for the example project, as the project later develops this script might be upda...
import unittest from distance.bytes import DstBytes, Magic from distance.prober import BytesProber from distance.base import BaseObject, ObjectFragment from distance.levelobjects import LevelObject from distance import DefaultProbers from distance._impl.fragments.levelfragments import GoldenSimplesFragment from distan...
from pygrok import grok_match def test_one_pat(): text = '1024' pat = '%{INT:test_int}' m = grok_match(text, pat) assert m['test_int'] == '1024', 'grok match failed:%s, %s' % (text, pat, ) text = '1024' pat = '%{NUMBER:test_num}' m = grok_match(text, pat) assert m['test_num'] == '1...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_pypepa ---------------------------------- Tests for `pypepa` module. """ import unittest import logging from pypepa import pypepa simple_components = """ P = (a,r).P1; P1 = (b, r).P; Q = (a,r).Q1; Q1 = (b, r).Q; """ simple_choice_component = """ P = (a, r).P...
"""Unit tests for mbedtls.random.""" import pickle import random from collections import defaultdict import pytest import mbedtls._random as _drbg import mbedtls.mpi as _mpi from mbedtls.exceptions import TLSError def sample(start, end, k=20): return random.sample(range(start, end), k) class TestEntropy: ...
from nose.plugins.skip import SkipTest from nose.tools import assert_raises_regexp from nose.tools import eq_ from nose.tools import ok_ from pyrecord import Record from pyrecord import RecordInitializationError class TestInitialization(object): def test_initialization(self): Point = Record.create_t...
import pytest import overpy from tests import read_file, new_server_thread, BaseRequestHandler class HandleResponseJSON02(BaseRequestHandler): """ """ def handle(self): self.request.send(b"HTTP/1.0 200 OK\r\n") self.request.send(b"Content-Type: application/json\r\n") self.request...
from serfclient import result class TestSerfResult(object): def test_initialises_to_none(self): r = result.SerfResult() assert r.head is None assert r.body is None def test_provides_a_pretty_printed_form_for_repl_use(self): r = result.SerfResult(head={"a": 1}, body=('foo', 'ba...
import os import jsonschema import json import pathlib import copy import glob import pytest hescore_examples = [ 'townhouse_walls', 'house1' ] def get_example_json(filebase): rootdir = pathlib.Path(__file__).resolve().parent.parent jsonfilepath = str(rootdir / 'examples' / f'{filebase}.json') wi...
""" Tests for the test server itself. Not intended to be run by the greater test suite, only by specifically targeting it on the command-line. Rationale: not really testing Fabric itself, no need to pollute Fab's own test suite. (Yes, if these tests fail, it's likely that the Fabric tests using the test server may als...
# -*- coding: utf-8 -*- import json import os import tempfile import uuid import pytest from freezegun import freeze_time import rasa import rasa.constants from rasa.core import events, utils from rasa.core.events import Event, UserUttered, SlotSet, BotUttered from rasa.model import unpack_model from tests.nlu.utilit...
""" Unittests for PyRate shared utility objects. """ import os import shutil import sys import tempfile import unittest from itertools import product from numpy import isnan, where, nan from os.path import join, basename, exists from stat import S_IRGRP, S_IWGRP, S_IWOTH, S_IROTH, S_IRUSR, S_IWUSR import numpy as np ...
import numpy as np try: import PIL.Image as Image except ImportError: pass from .. import util from ..visual.color import to_float from ..visual.texture import unmerge_faces, TextureVisuals from ..visual.material import SimpleMaterial from ..constants import log, tol def parse_mtl(mtl, resolver=None): ...
import copy import unittest import numpy from numpy.testing import assert_equal from nose.tools import raises, ok_ # , with_setup from tsutils import eq_ from railgun import SimObject, relpath, cmem from railgun.simobj import CDT2CTYPE, CDT2DTYPE, POINTER class Int1DimArrayAsObject(object): _ctype_ = POINTER(C...
import numpy as np import os from .dxf import load_dxf from .svg_io import svg_to_path from ..path import Path, Path2D, Path3D from . import misc from ... import util def load_path(obj, file_type=None, **kwargs): """ Load a file to a Path object. Parameters ----------- obj : One of the followin...
#!/usr/bin/env python3 # -*- coding: utf8 -*- import sys import os.path import locale import contextlib from pprint import pprint import operator import subprocess import hashlib import configparser import json import csv import gettext from oxy.arg import parse as argparse from oxy.mssql import Mssql from oxy.fire...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division import os import socket import sys import pytest from thriftpy.transport import TTransportException from thriftpy.transport.socket import TSocket, TServerSocket def _test_socket(server_socket, client_socket): server_socket.listen() c...
import numpy as np from shapely.geometry import Point, Polygon, LineString from collections import deque from ..constants import log, time_function from ..constants import tol_path as tol from .polygons import polygons_obb, transform_polygon from ..util import transformation_2D class RectangleBin: ''' ...
#!/usr/bin/env python3 """ Convert flat DICOM file set into a BIDS-compliant Nifti structure The DICOM input directory can be organized with or without session subdirectories: With Session Subdirectories: <DICOM Directory>/ <SID 1>/ <Session 1>/ Session 1 DICOM files ... <Session 2>/ ...
#!/usr/bin/env python import os import shlex import json import time import tempfile import signal from subprocess import Popen, PIPE from ethereum.utils import sha3, privtoaddr, encode_hex from devp2p.crypto import privtopub as privtopub_enode from genesis_builder import mk_genesis, generate_accounts # DEFAULTS NUM_...
"""This module is for testing stocks""" from unittest import mock from django.test import TestCase from stocks.models import Stock, DailyStockQuote from stocks import stock_helper import pandas as pd from yahoo_historical import Fetcher from authentication.plaid_middleware import PlaidMiddleware import pytest import ar...
import nose import angr import simuvex import subprocess import logging l = logging.getLogger('angr.tests.strtol') import os test_location = str(os.path.dirname(os.path.realpath(__file__))) def run_strtol(threads): test_bin = os.path.join(test_location, "../../binaries/tests/x86_64/strtol_test") b = angr.Pr...
import numpy as np en_lat_bottom = -5 en_lat_top = 5 en_lon_left = 360-170 en_lon_right = 360-120 class FeatureExtractor(object): def __init__(self): pass def transform(self, temperatures_xray, n_burn_in, n_lookahead, skf_is): self.n_lookahead = n_lookahead """Combine two variabl...
from syft import TensorBase import syft import unittest import numpy as np import math # Here's our "unit tests". class DimTests(unittest.TestCase): def testDimOne(self): t = TensorBase(np.array([1, 2, 3])) self.assertTrue(t.dim() == 1) def testView(self): t = TensorBase([1.0, 2.0, 3....
""" Entry point for tsrc push """ import argparse import itertools import textwrap from typing import cast, List, Optional, Set # noqa import cli_ui as ui import tsrc from tsrc.gitlab_client.interface import Client, User, MergeRequest from tsrc.cli.push import RepositoryInfo WIP_PREFIX = "WIP: " class UserNotFou...
from tw2.core.testbase import ( WidgetTest as _WidgetTest, ) import tw2.core as twc import tw2.forms as twf import tw2.bootstrap.forms as twb import datetime def test_every_widget_exposed(): """ Is widget exposed by tw2.forms also in tw2.bootstrap? """ is_widget = lambda obj: isinstance(obj, twc.widgets...
"""Tools for interacting with Boolean expressions.""" import re from ..definitions import (CONSTANT_VALUES, DELIMITERS, is_valid_identifier, OPERATOR_MAPPING, TT_NOT_OP) from ..errors import (BadParenPositionError, EmptyExpressionError, ExpressionOrderError, InvalidArg...
from tw2.core.testbase import ( WidgetTest as _WidgetTest, ) import tw2.core as twc import tw2.forms as twf import tw2.bootstrap.forms as twb import datetime def test_every_widget_exposed(): """ Is widget exposed by tw2.forms also in tw2.bootstrap? """ is_widget = lambda obj: isinstance(obj, twc.widgets...
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the tests package.""" # # (C) Pywikibot team, 2014-2020 # # Distributed under the terms of the MIT license. from contextlib import suppress from tests.aspects import unittest, TestCase class HttpServerProblemTestCase(TestCase): """Test HTTP status 502 cause...
# -*- coding: utf-8 -*- # This file is part of Tumulus. # # Copyright (C) 2013 OKso (http://okso.me) # # 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...
# -*- coding: utf-8 -*- # """ TODO. """ from __future__ import print_function import logging from ..integrator import Base from ..lib.utils import ctype from ..lib.utils.timing import decallmethods, timings __all__ = ["SIA"] logger = logging.getLogger(__name__) # # split # @timings def split(ps, condition): ...
import pkg_resources pkg_resources.declare_namespace(__name__) # namespace imports from twentyc.rpc.client import ( # noqa RestClient, TypeWrap, NotFoundException, PermissionDeniedException, InvalidRequestException )
## # Copyright (c) 2005-2007 Apple 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 l...
# -*- coding: utf-8 -*- # # utils.py # # Copyright (C) 2010 Antoine Mercadal <antoine.mercadal@inframonde.eu> # This file is part of ArchipelProject # http://archipelproject.org # # 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...
"""Unit tests for client library""" from hil.flaskapp import app from hil.client.base import ClientBase, FailedAPICallException from hil.client.client import Client, HTTPClient, HTTPResponse from hil.test_common import config_testsuite, config_merge, \ fresh_database, fail_on_log_warnings, server_init from hil.mode...
import fcntl import logging import os import subprocess import shutil import sys import tempfile import time import yaml from datetime import datetime from traceback import format_tb from teuthology import setup_log_file from . import beanstalk from . import report from . import safepath from .config import config as...
import warnings import re import math from collections import Counter from typing import Optional import pkg_resources from functools import lru_cache from pyphen import Pyphen langs = { "en": { # Default config "fre_base": 206.835, "fre_sentence_length": 1.015, "fre_syll_per_word": 84.6,...
#!/usr/bin/env python ## The Director is optional functionality that can be used with the ## Thespian environment. The Director provides a management facility ## for managing and coordinating between loadable sources. It is ## possible to use Thespian without using the Director, and it is ## possible to use Thespian...
# -*- coding: utf-8 -*- # tifffile.py # Copyright (c) 2008-2019, Christoph Gohlke # Copyright (c) 2008-2019, The Regents of the University of California # Produced at the Laboratory for Fluorescence Dynamics # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, a...
import matplotlib as mpl import numpy as np from matplotlib.dates import DateConverter, num2date from matplotlib.markers import MarkerStyle from . import _color from ._axes import _mpl_cmap2pgf_cmap from ._hatches import _mpl_hatch2pgfp_pattern from ._markers import _mpl_marker2pgfp_marker from ._util import get_legen...
from collections import Iterable from collections import namedtuple from collections import defaultdict from contextlib import closing from itertools import chain from jinja2 import Environment from jinja2 import FileSystemLoader from multiprocessing.pool import ThreadPool from tilequeue.config import create_query_boun...
from collections import namedtuple from cStringIO import StringIO from shapely.geometry import MultiPolygon from shapely import geometry from shapely.wkb import loads from tilequeue.tile import coord_to_mercator_bounds from tilequeue.tile import tolerance_for_zoom from tilequeue.transform import calculate_padded_bounds...
# commands.py # # Copyright (c) 2008-2009 Trevor Caira # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, m...
from contextlib import contextmanager from enum import Enum import rpyc _host = "localhost" _port = 18861 class Status(Enum): PLAYING = 2 PAUSED = 1 STOPPED = 0 def configure(host=None, port=None): global _host global _port if host is not None: _host = host if port is not N...
# Core capabilities from .app import * from .window import * # from .command import * # Font support from .font import Font # # Widgets from .widgets.box import * from .widgets.button import * # # from .widgets.icon import * # from .widgets.image import * # from .widgets.imageview import * from .widgets.label import ...
# -*- coding: utf-8 -*- # Copyright 2015 Ravshello Authors # License: Apache License 2.0 (see LICENSE or http://apache.org/licenses/LICENSE-2.0.html) __version__ = '1.9.0rc2' __date__ = '2017/01/12'
#coding=utf8 from django.contrib.auth import get_user_model from django.core.urlresolvers import reverse from django.utils.encoding import smart_unicode VERB_DICT = { 'createpubcard': ''' 创建了一个公开的活动卡''', 'createpricard': ''' 创建了一个私密的活动卡''', 'invitepub': ''' 邀请你加入一个公开的活动''', 'invitepri': ''' 邀请你加入一个私密...
# coding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import os, sys, copy from datetime import datetime from . import register_parser from .util import Timestamp, paginate from .util.printing import format_table, page_output, get_field, get_cell, tabulate, GREEN, BLUE fro...
from __future__ import absolute_import, division, print_function, unicode_literals import os, sys from datetime import datetime import boto3 from . import register_parser from .util import parse_time_input from .util.printing import format_table, page_output, get_field, get_cell, tabulate from .util.aws import ARN, ...
import string import random import math import itertools import re import datetime from django.utils import timezone from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.db import models from django.db import IntegrityError from django.db.models import ObjectDoesNotExist...
import importlib from importlib import abc from .. import abc as testing_abc from .. import util from . import util as source_util import imp import inspect import io import marshal import os import sys import types import unittest import warnings class SourceOnlyLoaderMock(abc.SourceLoader): # Globals that sh...