text
stringlengths
475
200k
""" This module contains the spatial lookup types, and the `get_geo_where_clause` routine for Oracle Spatial. Please note that WKT support is broken on the XE version, and thus this backend will not work on such platforms. Specifically, XE lacks support for an internal JVM, and Java libraries are required to use...
# Copyright 2017 The TensorFlow 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 applicable ...
import sys import warnings import numpy as np from numpy.testing import * warnings.filterwarnings('ignore', 'Casting complex values to real discards the imaginary part') types = [np.bool_, np.byte, np.ubyte, np.short, np.ushort, np.intc, np.uintc, np.int_, np.uint, np.longlong, np.ulonglong, ...
from django import http from django.conf import settings, global_settings from django.contrib.messages import constants, utils, get_level, set_level from django.contrib.messages.api import MessageFailure from django.contrib.messages.storage import default_storage, base from django.contrib.messages.storage.base import M...
# -*- coding: utf-8 -*- # # Copyright 2015 Outlier Bio, 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 la...
# -*- coding: utf-8 -*- """ pygments.cmdline ~~~~~~~~~~~~~~~~ Command line interface. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import sys import getopt from textwrap import dedent from pygments import __version__, highlight fro...
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2021, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
from django.db import models from django.contrib.auth.models import User as DjangoUser from django.contrib.auth.models import AbstractBaseUser from django.contrib.auth.models import UserManager import hashlib class User(models.Model): USER_TYPE = ( (1, 'student'), (2, 'business'), (3, 'non...
""" =============================== Univariate Feature Selection =============================== An example showing univariate feature selection. Noisy (non informative) features are added to the iris data and univariate feature selection is applied. For each feature, we plot the p-values for the univariate feature s...
# Copyright 2016 The TensorFlow 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 applica...
## # Copyright 2012-2017 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
from pip._vendor.packaging.version import parse as parse_version class InstallationCandidate(object): def __init__(self, project, version, location): self.project = project self.version = parse_version(version) self.location = location self._key = (self.project, self.version, self...
#!/usr/bin/env python # # Copyright 2015 clowwindy # # 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 ...
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import sys...
__author__ = 'tonycastronova' import numpy from osgeo import ogr import stdlib from emitLogging import elog def fromWKB(wkb): """ Builds a stdlib.Geometry object from a WKB string :param wkb: wkb string :return: stdlib.Geometry """ geom = None # parse the wkt string into ogr ogrgeo...
# Copyright 2018 PerfKitBenchmarker 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 appli...
#!/usr/bin/python ''' Utility scripts for contacts Copyright (C) 2012 Alex Safatli, Christian Blouin, Jose Sergio Hleap This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License...
# -*- coding: utf-8 -*- import re from cached_property import cached_property from collections import namedtuple from datetime import date, datetime import multimethods as mm from fixtures.pytest_store import store def get_product_version(ver): """Return product version for given Version obj or version string ...
from django.contrib.auth.models import AbstractBaseUser, UserManager from django.db import models class CustomUserNonUniqueUsername(AbstractBaseUser): """ A user with a non-unique username. This model is not invalid if it is used with a custom authentication backend which supports non-unique username...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2014 Didotech SRL (info at didotech.com) # All Rights Reserved. # # WARNING: This program as such is intended to be used by professional # programmers who take the whole re...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Donation' db.create_table('shoppingcart_donation', ( ('orderitem_ptr', self.gf('...
#!/usr/bin/env python """ Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import copy import httplib import random import re import socket import time from subprocess import Popen as execute from extra.beep.beep import beep from lib.core.agent imp...
# -*- coding: UTF-8 -*- logger.info("Loading 78 objects to table countries_place...") # fields: id, parent, name, country, zip_code, type, show_type, inscode loader.save(create_countries_place(1,None,['Eupen', '', ''],u'BE',u'4700',u'50',False,u'63023')) loader.save(create_countries_place(2,1,['Nispert', '', ''],u'BE',...
"""Approximate nearest neighbor search""" # Author: Maheshakya Wijewardena <[EMAIL]> # Joel Nothman <[EMAIL]> import numpy as np import warnings from scipy import sparse from .base import KNeighborsMixin, RadiusNeighborsMixin from ..base import BaseEstimator from ..utils.validation import check_array from .....
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor # # 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...
# Copyright 2015 The TensorFlow 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 applica...
# Copyright 2016 The TensorFlow 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 applica...
#!/usr/bin/python # # Copyright (c) 2016 Julien Stroheker, <[EMAIL]> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 's...
"""distutils.file_util Utility functions for operating on single files. """ # This module should be kept compatible with Python 2.1. __revision__ = "$Id: file_util.py 37828 2004-11-10 22:23:15Z loewis $" import os from distutils.errors import DistutilsFileError from distutils import log # for generating verbose ou...
"""Helper classes for tests.""" import copy import functools import unittest from unittest import TestCase from bs4 import BeautifulSoup from bs4.element import ( Comment, Doctype, SoupStrainer, ) from bs4.builder import HTMLParserTreeBuilder default_builder = HTMLParserTreeBuilder class SoupTest(unitte...
"""Support for Actions on Google Assistant Smart Home Control.""" import logging from typing import Any, Dict import voluptuous as vol # Typing imports from homeassistant.const import CONF_API_KEY, CONF_NAME from homeassistant.core import HomeAssistant, ServiceCall from homeassistant.helpers import config_validation ...
# Copyright 2017 The TensorFlow 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 applica...
from Converter import Converter from time import localtime, strftime from Components.Element import cached class ClockToText(Converter, object): DEFAULT = 0 WITH_SECONDS = 1 IN_MINUTES = 2 DATE = 3 FORMAT = 4 AS_LENGTH = 5 TIMESTAMP = 6 FULL = 7 SHORT_DATE = 8 LONG_DATE = 9 VFD = 10 AS_LENGTHHOURS = 11 AS...
import numpy as np from matplotlib import pyplot from spm1d import rft1d eps = np.finfo(float).eps def here_anova1(Y, X, X0, Xi, X0i, df): Y = np.matrix(Y) ### estimate parameters: b = Xi*Y eij = Y - X*b R = eij.T*eij ### reduced design: b0 = X0i*Y eij0 = Y...
# (c) 2016 Red Hat Inc. # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ --- author: Ansible Networking Team connection: network_cli short_...
""" Txc proxy. This proxy handles all communication between the Txc and the shell programs """ from shell.proxies.baseProxy import baseProxy import os,re import time from xmlrpclib import ServerProxy import siteconfig class txcProxy(baseProxy): def __init__(self,experiment): baseProxy.__init__(self,'txc...
# Purpose: support for ACIS based 3D entities - BODY, REGION, 3DSOLID # Created: 24.05.2015 # Copyright (C) 2015, Manfred Moitzi # License: MIT License from __future__ import unicode_literals __author__ = "mozman <[EMAIL]>" from contextlib import contextmanager from .graphics import none_subclass, entity_subclass, M...
# -*- coding: utf-8 -*- """ *************************************************************************** BasicStatistics.py --------------------- Date : November 2016 Copyright : (C) 2016 by Nyall Dawson Email : nyall dot dawson at gmail dot com ************...
''' Gesture recognition =================== This class allows you to easily create new gestures and compare them:: from kivy.gesture import Gesture, GestureDatabase # Create a gesture g = Gesture() g.add_stroke(point_list=[(1,1), (3,4), (2,1)]) g.normalize() # Add it to the database gdb ...
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General P...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
from __future__ import division, unicode_literals import os import re import sys import time from ..compat import compat_str from ..utils import ( encodeFilename, decodeArgument, format_bytes, timeconvert, ) class FileDownloader(object): """File Downloader class. File downloader objects are...
import os # toolchains options ARCH ='risc-v' CPU ='k210' CROSS_TOOL ='gcc' if os.getenv('RTT_ROOT'): RTT_ROOT = os.getenv('RTT_ROOT') else: RTT_ROOT = r'../..' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = r'/...
# # (c) 2017, Red Hat, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is...
"""Platform to retrieve Jewish calendar information for Home Assistant.""" import logging import hdate from homeassistant.components.sensor import SensorEntity from homeassistant.const import DEVICE_CLASS_TIMESTAMP, SUN_EVENT_SUNSET from homeassistant.helpers.sun import get_astral_event_date import homeassistant.util...
# coding=utf-8 # Author: Nic Wolfe <[EMAIL]> # URL: https://sickrage.github.io # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, ...
""" Tests for space utilities. """ from __future__ import print_function import itertools import warnings import numpy as np from theano.compat.six.moves import xrange import theano from theano import tensor # Can't use nose.tools.assert_raises, only introduced in python 2.7. Use # numpy.testing.assert_raises instea...
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Distrito' db.create_table('core_distrito', ( ('id', self.gf('django.db.models....
# This is a good example of how the sk.c stuff can be integrated into # the raid stuff to be able to verify the image without unpacking the # whole thing. import mapper import optparse,sys import sk if __name__ == '__main__': parser = optparse.OptionParser() parser.add_option('-p','--period',default=6, type=...
# Copyright 2013 Dag Wieers <[EMAIL]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ...
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) import numpy as np from scipy.io import loadmat # This module is an excerpt from the one in python-gsw. # Based on Robert Kern's Bunch; taken from # http://currents.soest.hawaii.edu/hgstage/pycurrents/ # pycurrents/system/uti...
#Name: Tony Ranieri #Created: October 2014 #Modified: August 2015 import numpy as np import pylab as py import matplotlib.pyplot as plt def roots(f,df,a,b,niter,epsilon): # Input # f: the function that we need to find roots for # df: derivative of the function f # a: initial left bracket x...
# Copyright 2013-2014 Emiliano Mennucci # # This file is part of FriendlyPi. # # FriendlyPi is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
""" Two players (numbered 1 and 2) are playing a game with n stones. Player 1 always plays first, and the two players move in alternating turns. The game's rules are as follows: In a single move, a player can remove 2, 3, or 5 stones from the game board. If a player is unable to make a move, that player loses the ga...
# -*- coding: utf-8 -*- import os import logging from rest_framework import status as http_status import math from collections import defaultdict from flask import request from django.apps import apps from django.utils import timezone from django.core.exceptions import ValidationError from django.db.models import Q, O...
#!/usr/bin/env python from __future__ import division, print_function, absolute_import import datetime import os import sys from os.path import join as pjoin if sys.version_info[0] >= 3: from io import StringIO else: from cStringIO import StringIO import numpy as np from numpy.testing import (TestCase, asse...
#- # Copyright (c) 2014 Michael Roe # All rights reserved. # # This software was developed by SRI International and the University of # Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 # ("CTSRD"), as part of the DARPA CRASH research programme. # # @BERI_LICENSE_HEADER_START@ # # Licensed to BER...
# -*- coding: utf-8 -*- # Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # # 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 # #...
import unittest from unittest import mock from test.support import captured_stderr import idlelib.run as idlerun class RunTest(unittest.TestCase): def test_print_exception_unhashable(self): class UnhashableException(Exception): def __eq__(self, other): return True ex1...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import os from tempfile import mkdtemp from shutil import rmtree import numpy as np import nibabel as nb from nipype.testing import (assert_equal, assert_not_equal, assert_rai...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008 Zuza Software Foundation # # This file is part of translate. # # translate is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of t...
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
import re from unicodedata import normalize from datetime import date, time, datetime, timedelta def chunk(li, n): """Yield succesive n-size chunks from l.""" for i in xrange(0, len(li), n): yield li[i:i+n] def date_and_times(meta): date_part = None time_part = None if 'date' in meta: ...
# -*- coding: utf-8 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at you...
# Copyright 2009 Brian Quinlan. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Implements ThreadPoolExecutor.""" __author__ = 'Brian Quinlan ([EMAIL])' import atexit from concurrent.futures import _base import queue import threading import weakref # Workers are created as daemon threads. T...
#!/usr/bin/python """ Read a pair of fastq files and filter out reads which IDs not found in both files """ import sys fq1 = open(sys.argv[1]) fq2 = open(sys.argv[2]) out1 = open(sys.argv[3], "w") out2 = open(sys.argv[4], "w") stack1 = dict() stack2 = dict() counter = 0 same = False while True: read1 = fq1.rea...
import unittest import tkinter from tkinter import ttk from test.support import requires import sys from tkinter.test.test_ttk.test_functions import MockTclObj from tkinter.test.support import (AbstractTkTest, tcl_version, get_tk_patchlevel, simulate_mouse_click) from tkinter.test.wid...
# -*- test-case-name: twisted.test.test_factories,twisted.internet.test.test_protocol -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Standard implementations of Twisted protocol-related interfaces. Start here if you are looking to write a new protocol implementation for Twisted. The ...
# Copyright (c) 2011, 2012 Free Software Foundation # 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 ver...
''' Copyright (c) 2014 Pivotal Software, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or ...
"""Tests for nbformat validation""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import io import os import nose.tools as nt from nbformat.validator import validate, ValidationError from ..nbjson import reads from ..nbbase import ( nbformat, new_code_c...
""" A nearly direct translation of Andrej's code https://github.com/karpathy/char-rnn """ from __future__ import division import cgt from cgt import nn, utils, profiler import numpy as np, numpy.random as nr import os.path as osp import argparse from time import time from StringIO import StringIO from param_collection...
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
"""build_ext tests """ import sys, os, shutil, tempfile, unittest, site, zipfile from setuptools.command.upload_docs import upload_docs from setuptools.dist import Distribution SETUP_PY = """\ from setuptools import setup setup(name='foo') """ class TestUploadDocsTest(unittest.TestCase): def setUp(self): ...
# =================================================================== # # Copyright (c) 2014, Legrandin <[EMAIL]> # 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...
import os import pkgutil import abc from functools import wraps class PluginMeta(abc.ABCMeta): def __new__(meta, name, bases, dct): cls = super(PluginMeta, meta).__new__(meta, name, bases, dct) cls.handlers = [] for name, obj in cls.__dict__.iteritems(): if hasattr(obj, "__c...
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. from __future__ import with_statement import errno import os import random import select import signal import sys import time import traceback from gunicorn.errors import HaltServer, AppImpo...
# Copyright (C) 2012 - 2014 EMC Corporation. # 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 # # Unle...
import warnings from openid import message as message_module class Extension(object): """An interface for OpenID extensions. @ivar ns_uri: The namespace to which to add the arguments for this extension """ ns_uri = None ns_alias = None def getExtensionArgs(self): """Get the ...
# -*- coding: utf-8 -*- """ tmdbsimple.search ~~~~~~~~~~~~~~~~~ This module implements the Search functionality of tmdbsimple. Created by Celia Oakley on 2013-10-31. :copyright: (c) 2013-2014 by Celia Oakley :license: GPLv3, see LICENSE for more details """ from .base import TMDB class Search(TMDB): """ Se...
#!/usr/bin/env python """ Easy Install ------------ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. __ https://pythonhosted.org/setuptools/easy_install.html """ impo...
# -*- coding: utf-8 -*- # This file is part of the Rocket Web Server # Copyright (c) 2011 Timothy Farrell # Modified by Massimo Di Pierro # Import System Modules import sys import errno import socket import logging import platform # Define Constants VERSION = '1.2.6' SERVER_NAME = socket.gethostname() SERVER_SOFTWAR...
# -*- coding: utf-8 -*- ''' ADC, Add with Carry Test This is an arithmetic instruction of the 6502. ''' import unittest from pynes.tests import MetaInstructionCase class AdcImmTest(unittest.TestCase): ''' Test the arithmetic operation ADC between decimal 16 and the content of the accumulator. ''' ...
#!/usr/bin/env python # # Copyright 2007,2010,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your ...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ Classes for writing XTB input files """ import logging import os from typing import Dict, Optional, Union, List from monty.json import MSONable from pymatgen.core import Molecule __author__ = "Alex Epstein...
# Copyright (c) 2010-2011 Joshua Harlan Lifton. # See LICENSE.txt for details. # TODO: add tests for all machines # TODO: add tests for new status callbacks """Base classes for machine types. Do not use directly.""" import serial import threading from plover.exception import SerialPortException import collections S...
# # Test script for the curses module # # This script doesn't actually display anything very coherent. but it # does call every method and function. # # Functions not tested: {def,reset}_{shell,prog}_mode, getch(), getstr(), # init_color() # Only called, not tested: getmouse(), ungetmouse() # import curses, sys, tempf...
from __future__ import absolute_import from __future__ import division import itertools import sys from signal import signal, SIGINT, default_int_handler import time import contextlib import logging from pip.compat import WINDOWS from pip.utils import format_size from pip.utils.logging import get_indentation from pip...
# mypy: ignore-errors # # This source file is part of the EdgeDB open source project. # # Copyright 2008-present MagicStack Inc. and the EdgeDB 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 ...
#!/usr/bin/env python from __future__ import division __author__ = "Jai Ram Rideout" __copyright__ = "Copyright 2012, The QIIME project" __credits__ = ["Jai Ram Rideout"] __license__ = "GPL" __version__ = "1.8.0-dev" __maintainer__ = "Jai Ram Rideout" __email__ = "[EMAIL]" """Contains functionality to interact with r...
# -*- coding: utf-8 -*- """Some utility functions.""" # Authors: Alexandre Gramfort <[EMAIL]> # # License: BSD (3-clause) from contextlib import contextmanager import hashlib from io import BytesIO, StringIO from math import sqrt import numbers import operator import os import os.path as op from math import ceil impor...
from django.db import models from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.utils.timezone import now, utc import calendar, datetime, string, random # Create your models here. class Thing(models.Model): name = models.CharField(max_length=255) location = models.C...
from __future__ import absolute_import, division, unicode_literals from gettext import gettext _ = gettext from . import _base from ..constants import cdataElements, rcdataElements, voidElements from ..constants import spaceCharacters spaceCharacters = "".join(spaceCharacters) class LintError(Exception): pass ...
# -*- coding: utf-8 -*- # Copyright (c) 2016 - 2017 CoNWeT Lab., Universidad Politécnica de Madrid # This file belongs to the business-charging-backend # of the Business API Ecosystem. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License...
"""Support for functionality to have conversations with Home Assistant.""" import logging import re import voluptuous as vol from homeassistant import core from homeassistant.components import http from homeassistant.components.cover import ( INTENT_CLOSE_COVER, INTENT_OPEN_COVER) from homeassistant.components.ht...
# -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Docker doc fragment DOCUMENTATION = r''' options: docker_host: description: - The URL or Unix socket path used to connect to the Do...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _, throw from frappe.utils import flt, cint, add_days, cstr import json from erpnext.accounts.doctype.pricing_rule.pric...
# # Copyright (C) 2016 FreeIPA Contributors see COPYING for license # # pylint: disable=unused-import import six from . import Command, Method, Object from ipalib import api, parameters, output from ipalib.parameters import DefaultFrom from ipalib.plugable import Registry from ipalib.text import _ from ipapython.dn ...