text
stringlengths
475
200k
# # Code to abstract the parsing of APM Dataflash log files, currently only used by the LogAnalyzer # # Initial code by Andrew Chapman ([EMAIL]), 16th Jan 2014 # from __future__ import print_function import collections import os import numpy import bisect import sys import ctypes from VehicleType import VehicleType, ...
from __future__ import absolute_import from optparse import make_option from django.core.management.base import BaseCommand from zerver.models import get_user_profile_by_email, UserMessage from zerver.views.old_messages import get_old_messages_backend import cProfile import logging from zerver.middleware import LogReq...
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that .so files that are order only dependencies are specified by their install location rather than by their alias. """ # Pyth...
# Authors: Alexandre Gramfort <[EMAIL]> # Mathieu Blondel <[EMAIL]> # Olivier Grisel <[EMAIL]> # Andreas Mueller <[EMAIL]> # Eric Martin <[EMAIL]> # License: BSD 3 clause from itertools import chain, combinations import numbers import warnings import numpy as np from scipy import s...
# -*- coding: utf-8 -*- """ pygments.console ~~~~~~~~~~~~~~~~ Format colored console output. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ esc = "\x1b[" codes = {} codes[""] = "" codes["reset"] = esc + "39;49;00m" codes["bold"] = ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # xwot.py - Python tools for the extended Web of Things # Copyright (C) 2015 Alexander Rüedlinger # # 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 Foundatio...
# vi: ts=4 expandtab # # Copyright (C) 2009-2010 Canonical Ltd. # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # # Author: Ben Howard <[EMAIL]> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3, as # ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import warnings from pytest import mark from translate.tools import pretranslate from translate.convert import test_convert from translate.misc import wStringIO from translate.storage import po from translate.storage import xliff class TestPretranslate: xliff_skele...
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer [EMAIL] # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # Li...
""" Audio Tag --------- This implements a Liquid-style audio tag for Pelican, based on the pelican video plugin [1]_ Syntax ------ {% audio url/to/audio [url/to/audio] [/url/to/audio] %} Example ------- {% audio http://example.tld/foo.mp3 http://example.tld/foo.ogg %} Output ------ <audio controls><source src="http:...
# 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...
# -*- coding: utf-8 -*- """ equip.rewriter.simple ~~~~~~~~~~~~~~~~~~~~~ A simplified interface (yet the main one) to handle the injection of instrumentation code. :copyright: (c) 2014 by Romain Gaucher (@rgaucher) :license: Apache 2, see LICENSE for more details. """ import os import copy from ..utils.lo...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ compliance_checker/tests/test_feature_detection.py """ from unittest import TestCase from netCDF4 import Dataset from compliance_checker import cfutil as util from compliance_checker.tests import resources from compliance_checker.tests.helpers import MockRaggedArrayR...
#!/usr/bin/python import dbus import sys, os import time import gobject from dbus.mainloop.glib import DBusGMainLoop WPAS_DBUS_SERVICE = "fi.w1.wpa_supplicant1" WPAS_DBUS_INTERFACE = "fi.w1.wpa_supplicant1" WPAS_DBUS_OPATH = "/fi/w1/wpa_supplicant1" WPAS_DBUS_INTERFACES_INTERFACE = "fi.w1.wpa_supplicant1.Interface" ...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Manuel Sousa <[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 # ...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import unittest from telemetry import decorators from telemetry.internal.backends import android_command_line_backend from telemetry.testing ...
"""Support for LCN scenes.""" import pypck from homeassistant.components.scene import Scene from homeassistant.const import CONF_ADDRESS from . import LcnDevice from .const import ( CONF_CONNECTIONS, CONF_OUTPUTS, CONF_REGISTER, CONF_SCENE, CONF_TRANSITION, DATA_LCN, OUTPUT_PORTS, ) from ....
# Copyright (c) 2016 Ultimaker B.V. # Copyright (c) 2013 David Braam # Uranium is released under the terms of the LGPLv3 or higher. import struct import time from UM.Logger import Logger from UM.Mesh.MeshWriter import MeshWriter from UM.i18n import i18nCatalog catalog = i18nCatalog("uranium") class STLWriter(MeshWr...
def main(request, response): def fail(message): response.content = "FAIL " + request.method + ": " + str(message) response.status = 400 def getState(token): server_state = request.server.stash.take(token) if not server_state: return "Uninitialized" return ser...
""" Formatting... """ from geopy import units from geopy.compat import py3k if py3k: unichr = chr # pylint: disable=W0622 # Unicode characters for symbols that appear in coordinate strings. DEGREE = unichr(176) PRIME = unichr(8242) DOUBLE_PRIME = unichr(8243) ASCII_DEGREE = '' ASCII_PRIME = "'" ASCII_DOUBLE_PRIM...
# The following exec statement (or something like it) is needed to # prevent SyntaxError on Python < 2.5. Even though this is a test, # SyntaxErrors are not acceptable; on Debian systems, they block # byte-compilation during install and thus cause the package to fail # to install. import sys if sys.version_info[:2] >=...
#!/usr/bin/python # 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 distributed...
import logging import re from autotest.client.shared import utils, error from autotest.client import os_dep from virttest import libvirt_vm, virsh, utils_libvirtd, utils_misc from virttest.libvirt_xml import capability_xml def run(test, params, env): """ Test the command virsh capabilities (1) Call virsh...
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid at kovidgoyal.net>' __docformat__ = 'restructuredtext en' ...
#!/usr/bin/env python import sys _LINUX_PARTITIONS_FILE_NAME = '/proc/partitions' _LINUX_PARTITION_SIZE_MULTIPLIER = 1024 _LINUX_DISK_TYPE_NUMBERS = (3, 8) class DiskInfo(object): def get_disk_full_list(self): raise NotImplementedError("Should be called in subclasses") class DiskInfoLinux(DiskInfo): ...
# 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 u...
# 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 u...
# Copyright 2012 OpenStack Foundation # # 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...
"""SCons.Platform.win32 Platform-specific initialization for Win32 systems. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Platform.Platform() selection method. """ # # Copyright (c) 2001 - 2016 The SCons Foundation # # Permission is hereby...
import pygame import sys import time import serial ser = serial.Serial('/dev/ttyACM0',115200) pygame.init() pygame.joystick.init() print (pygame.joystick.get_count()) _joystick = pygame.joystick.Joystick(0) _joystick.init() print (_joystick.get_init()) print (_joystick.get_id()) print (_joystick.get_name()) print (...
from time import localtime, mktime from datetime import datetime import xml.etree.cElementTree from os import path from enigma import eDVBSatelliteEquipmentControl as secClass, \ eDVBSatelliteLNBParameters as lnbParam, \ eDVBSatelliteDiseqcParameters as diseqcParam, \ eDVBSatelliteSwitchParameters as switchParam, \...
# This file is part of Active Archives. # Copyright 2006-2011 the Active Archives contributors (see AUTHORS) # # 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 # Li...
try: import urllib.request as urllib_request import urllib.error as urllib_error import io except ImportError: import urllib2 as urllib_request import urllib2 as urllib_error import simplejson as json from ssl import SSLError import socket from .api import TwitterCall, wrap_response import sys cl...
""" Deployment for moztrap Requires commander (https://github.com/oremj/commander) which is installed on the systems that need it. """ import os import sys sys.path.append(os.path.dirname(os.path.abspath(__file__))) from commander.deploy import task, hostgroups import commander_settings as settings @task def upda...
#!/usr/bin/env python # # Copyright 2007 Neal Norwitz # Portions Copyright 2007 Google 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...
#!/usr/bin/python # (c) 2013, Vincent Van der Kussen <vincent at vanderkussen.org> # # 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,...
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain th...
# Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditi...
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # it...
# Copyright 2013 Nebula, 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 or agreed to...
# Copyright (C) 2010-2019 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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 v...
# Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati # # 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, or (at your option) any later version. # # This...
## begin license ## # # "Meresco Html" is a template engine based on generators, and a sequel to Slowfoot. # It is also known as "DynamicHtml" or "Seecr Html". # # Copyright (C) 2012 Meertens Instituut (KNAW) http://meertens.knaw.nl # Copyright (C) 2012-2018, 2020-2021 Seecr (Seek You Too B.V.) https://seecr.nl # Copyr...
""" A widget containing a grid of clickable actions/buttons. """ from collections import namedtuple, deque from PyQt4.QtGui import ( QFrame, QAction, QToolButton, QGridLayout, QFontMetrics, QSizePolicy, QStyleOptionToolButton, QStylePainter, QStyle ) from PyQt4.QtCore import Qt, QObject, QSize, QVariant, QEv...
#! /usr/bin/python3 # this code uses the 'lcdproc-python3' library: # https://github.com/jinglemansweep/lcdproc # for more details about lcdproc, see: # http://lcdproc.org/ from lcdproc.server import Server import time import urllib.request def main(): # 'localhost' must be replaced by the network address on wh...
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013, John McNamara, [EMAIL] # import unittest from ...compatibility import StringIO from ..helperfunctions import _xml_to_list from ...table import Table from ...worksheet import Worksheet from...
""" This file is concerned with providing a simple interface for data stored in Elasticsearch. The class(es) defined here are fed into the preprocessing step. """ import logging import time from abc import ABCMeta, abstractmethod from six import with_metaclass from elasticsearch import Elasticsearch, helpers def _...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Jon Hawkesworth (@jhawkesworth) <[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...
""" This module makes available standard errno system symbols. The value of each symbol is the corresponding integer value, e.g., on most systems, errno.ENOENT equals the integer 2. The dictionary errno.errorcode maps numeric codes to symbol names, e.g., errno.errorcode[2] could be the string 'ENOENT'. Symbols that ar...
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """ Provides testing capabilities for installed copies of Iris. """ # Because this file is imported by setup.py, there may be...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import filer.fields.file class Migration(migrations.Migration): dependencies = [ ('cms', '0003_auto_20140926_2347'), ('filer', '0001_initial'), ] ope...
#!/usr/bin/env python # coding: utf8 """ Oneall Authentication for web2py Developed by Nathan Freeze (Copyright © 2013) Email <[EMAIL]> This file contains code to allow using onall.com authentication services with web2py """ import os import base64 from gluon import * from gluon.storage import Storage...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import flt from erpnext.selling.doctype.customer.customer import get_customer_outstanding,...
"""Support for binary sensors using Tellstick Net.""" from homeassistant.components import binary_sensor, tellduslive from homeassistant.components.binary_sensor import BinarySensorEntity from homeassistant.helpers.dispatcher import async_dispatcher_connect from .entry import TelldusLiveEntity async def async_setup_...
# # 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...
# 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): # Changing field 'UserProfile.name' db.alter_column('auth_userprofile', 'name', self.gf('django.db.models.fields....
# separation plot # Author: Cameron Davidson-Pilon,2013 # see http://mdwardlab.com/sites/default/files/GreenhillWardSacks.pdf import matplotlib.pyplot as plt import numpy as np def separation_plot( p, y, **kwargs ): """ This function creates a separation plot for logistic and probit classification. Se...
# encoding: utf-8 from __future__ import unicode_literals import re import json from .common import InfoExtractor class CBSNewsIE(InfoExtractor): IE_DESC = 'CBS News' _VALID_URL = r'http://(?:www\.)?cbsnews\.com/(?:[^/]+/)+(?P<id>[\da-z_-]+)' _TESTS = [ { 'url': 'http://www.cbsnews....
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # ...
#!/usr/bin/env python3 # Copyright © 2012-13 Qtrac Ltd. All rights reserved. # This program or module 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 ...
"""Testing for BOSS metric.""" # Author: Johann Faouzi <[EMAIL]> # License: BSD-3-Clause import numpy as np import pytest import re from math import sqrt from pyts.metrics import boss x = np.arange(1, 6) y = np.arange(1, 6)[::-1] z = [0, 0, 0, 10, 0] @pytest.mark.parametrize( 'x, y, err_msg', [(x.reshape(...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Smewt - A smart collection manager # Copyright (c) 2011 Nicolas Wack <[EMAIL]> # # Smewt 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 th...
# Copyright: (c) 2018, Pluribus Networks # 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 from units.compat.mock import patch from ansible.modules.network.netvisor import pn_vrouter_pim_...
from LogAnalyzer import Test,TestResult import DataflashLog # import scipy # import pylab #### TEMP!!! only for dev # from scipy import signal class TestDualGyroDrift(Test): '''test for gyro drift between dual IMU data''' def __init__(self): Test.__init__(self) self.name = "Gyro Drift" self.enable = Fals...
from __future__ import absolute_import from abc import abstractmethod import os import shutil from .common import chmod_plus_w, safe_rmtree, safe_mkdir, safe_mkdtemp from .compatibility import AbstractClass from .installer import WheelInstaller from .interpreter import PythonInterpreter from .package import ( Egg...
""" YAML serializer. Requires PyYaml (http://pyyaml.org/), but that's checked for in __init__. """ import decimal import yaml from io import StringIO from django.db import models from django.core.serializers.base import DeserializationError from django.core.serializers.python import Serializer as PythonSerializer fr...
# # ImageViewCanvasGtk.py -- A FITS image widget with canvas drawing in Gtk # # Eric Jeschke ([EMAIL]) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # from ginga.gtkw import ImageViewGtk from ginga.can...
# -*- coding: utf-8 -*- """ pygments.lexers._tsql_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ These are manually translated lists from https://msdn.microsoft.com. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ # See https://msdn.microsof...
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
# python3 class Edge: def __init__(self, u, v, value): self.u = u self.v = v self.value = value class Graph: def __init__(self): self.edges = [] self.incoming_edges = [] self.graph = dict () #[[] for _ in range(n)] self.incoming_graph = dict() def...
#!/usr/bin/env python # -*- coding: utf-8 -*- # test_cancel.py - unit test for query cancellation # # Copyright (C) 2010-2011 Jan Urbański <[EMAIL]> # # psycopg2 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 Fo...
""" Wrapper for loading templates from the filesystem. """ from django.conf import settings from django.template.base import TemplateDoesNotExist from django.template.loader import BaseLoader from django.utils._os import safe_join class Loader(BaseLoader): is_usable = True def get_template_sources(self, temp...
"""Misc os module tests Made for Jython. """ import os import unittest from test import test_support class OSTestCase(unittest.TestCase): def setUp(self): open(test_support.TESTFN, 'w').close() def tearDown(self): if os.path.exists(test_support.TESTFN): os.remove(test_support.TES...
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
# *-* coding: utf-8 *-* from __future__ import unicode_literals SI_POSTALCODES = [ (1000, 'Ljubljana'), (1215, 'Medvode'), (1216, 'Smlednik'), (1217, 'Vodice'), (1218, 'Komenda'), (1219, 'Laze v Tuhinju'), (1221, 'Motnik'), (1222, 'Trojane'), (1223, 'Blagovica'), (1225, 'Lukovic...
#!/usr/bin/env python # # Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # noti...
""" The Enrollment API Views should be simple, lean HTTP endpoints for API access. This should consist primarily of authentication, request validation, and serialization. """ import logging from django.core.exceptions import ObjectDoesNotExist from django.utils.decorators import method_decorator from opaque_keys impo...
# -*- coding: utf-8 -*- """Get public registrations for staff members. python -m scripts.staff_public_regs """ from collections import defaultdict import logging from modularodm import Q from website.models import Node, User from website.app import init_app logger = logging.getLogger('staff_public_regs') STAFF...
__author__ = 'corpu' from lettuce import step, world import webtest class RegisterFieldSteps(): #Background steps @step(u'Dado que la aplicacion ACL esta en "([^"]*)"') def dado_que_la_aplicacion_acl_esta_en_group1(step, url): world.webApp = webtest.TestApp(url) @step(u'Cuando accedo a la mi...
############################################ # Copyright (c) 2012 Microsoft Corporation # # Scripts for automatically generating # Window distribution zip files. # # Author: Leonardo de Moura (leonardo) ############################################ import os import glob import re import getopt import sys import shutil...
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
""" Unit tests for enabling self-generated certificates by default for self-paced courses. """ from certificates import api as certs_api from certificates.models import CertificateGenerationConfiguration from certificates.signals import _listen_for_course_publish from openedx.core.djangoapps.self_paced.models import Se...
# Copyright (c) 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
#!/usr/bin/python # # Copyright (c) 2010, Ryan Marquardt # 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 l...
# 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 u...
import os # toolchains options ARCH='arm' CPU='cortex-m3' CROSS_TOOL='iar' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') # cross_tool provides the cross compiler # EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = '...
"""Tests for mongodb backend Authors: * Min RK """ #------------------------------------------------------------------------------- # Copyright (C) 2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this softwar...
#se!/usr/bin/python # -*- coding: utf-8 -*- from pyvows import Vows, expect from thumbor.context import Context from tc_aws import Config from fixtures.storage_fixture import IMAGE_BYTES, get_server from boto.s3.connection import S3Connection from moto import mock_s3 from tc_aws.result_storages.s3_storage import St...
#!/usr/bin/env python """Test condition for channels Copyright (C) 2011-2012, Digium, Inc. Matt Jordan <[EMAIL]> This program is free software, distributed under the terms of the GNU General Public License Version 2. """ from twisted.internet import defer from test_conditions import TestCondition import logging impo...
""" FLAC (audio) parser Documentation: * http://flac.sourceforge.net/format.html Author: Esteban Loiseau <baal AT tuxfamily.org> Creation date: 2008-04-09 """ from hachoir_parser import Parser from hachoir_core.field import FieldSet, String, Bit, Bits, UInt16, UInt24, RawBytes, Enum, NullBytes from hachoir_core.st...
"""Switches for the Elexa Guardian integration.""" from __future__ import annotations from aioguardian import Client from aioguardian.errors import GuardianError import voluptuous as vol from homeassistant.components.switch import SwitchEntity from homeassistant.config_entries import ConfigEntry from homeassistant.co...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Ravi Bhure <[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 # (a...
""" arbitrage.py Check for arbitrage opportunities. USAGE: python arbitrage.py [--all] --all Display all arbitrage opportunities, not just profitable ones """ from models import * from decimal import * import utils import sys # the coinex transaction fee TRANSAC_FEE = 0.002 # the minimum amount of to_currency r...
#!/usr/bin/env python # dump flash logs from SITL # Andrew Tridgell, April 2013 import pexpect, os, sys, shutil, atexit import optparse, fnmatch, time, glob, traceback, signal sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), 'pysim')) import util ############## main program ############# ...
# 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...
# -*- coding: utf-8 -*- # Copyright(C) 2018 Vincent A # # This file is part of a weboob module. # # This weboob module 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 Licen...
""" Python Character Mapping Codec mac_centeuro generated from 'MAPPINGS/VENDORS/APPLE/CENTEURO.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,inp...
# Copyright 2011 OpenStack Foundation. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance w...
"""HTML utilities suitable for global use.""" from __future__ import unicode_literals import re import sys import warnings from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning from django.utils.encoding import force_str, force_text from django.utils.functional import allow_lazy ...