code
stringlengths
1
199k
"""engine.SCons.Tool.f03 Tool-specific initialization for the generic Posix f03 Fortran compiler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ __revision__ = "src/engine/SCons/Tool/f03.py 2014/07/05 09:42:21...
import os import sys import tempfile import unittest from dtoc import fdt from dtoc import fdt_util from dtoc.fdt import FdtScan from patman import tools class TestFdt(unittest.TestCase): @classmethod def setUpClass(self): self._binman_dir = os.path.dirname(os.path.realpath(sys.argv[0])) self._i...
import datetime import gzip from itertools import count import os curdir = os.path.join(os.getcwd(), os.path.dirname(__file__)) import sys import threading import time import urllib import cherrypy from cherrypy._cpcompat import next, ntob, quote, xrange from cherrypy.lib import httputil gif_bytes = ntob( 'GIF89a\x...
import orange data = orange.ExampleTable("lenses") print "\nAssociation rules" rules = orange.AssociationRulesInducer(data, support = 0.3) for r in rules: print "%5.3f %5.3f %s" % (r.support, r.confidence, r) print "\nClassification rules" rules = orange.AssociationRulesInducer(data, support = 0.3, classification...
from nose.tools import * # flake8: noqa import urlparse from api.base.settings.defaults import API_BASE from website.identifiers.model import Identifier from tests.base import ApiTestCase from osf_tests.factories import ( RegistrationFactory, AuthUserFactory, IdentifierFactory, NodeFactory, ) class Tes...
"""Operations for [N, height, width] numpy arrays representing masks. Example mask operations that are supported: * Areas: compute mask areas * IOU: pairwise intersection-over-union scores """ import numpy as np EPSILON = 1e-7 def area(masks): """Computes area of masks. Args: masks: Numpy array with shape [...
"""Tests for nested structure coding.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections from google.protobuf import text_format from tensorflow.core.protobuf import struct_pb2 from tensorflow.python.data.ops import dataset_ops from tensorf...
"""This module customizes `test_combinations` for Tensorflow. Additionally it provides `generate()`, `combine()` and `times()` with Tensorflow customizations as a default. """ import functools from tensorflow.python import tf2 from tensorflow.python.eager import context from tensorflow.python.framework import ops from ...
"""Upgrade script to move from pre-release schema to new schema. Usage examples: bazel run tensorflow/lite/schema/upgrade_schema -- in.json out.json bazel run tensorflow/lite/schema/upgrade_schema -- in.bin out.bin bazel run tensorflow/lite/schema/upgrade_schema -- in.bin out.json bazel run tensorflow/lite/schema/upgra...
"""A Transformed Distribution class.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tens...
from pyjamas.ui.Sink import Sink, SinkInfo from pyjamas.ui.Frame import Frame class Frames(Sink): def __init__(self): Sink.__init__(self) self.frame=Frame(self.baseURL() + "rembrandt/LaMarcheNocturne.html") self.frame.setWidth("100%") self.frame.setHeight("48em") self.initWid...
""" This is ``docutils.parsers.rst`` package. It exports a single class, `Parser`, the reStructuredText parser. Usage ===== 1. Create a parser:: parser = docutils.parsers.rst.Parser() Several optional arguments may be passed to modify the parser's behavior. Please see `Customizing the Parser`_ below for de...
"""Wrappers to get actually replaceable DBAPI2 compliant modules and database connection whatever the database and client lib used. Currently support: - postgresql (pgdb, psycopg, psycopg2, pyPgSQL) - mysql (MySQLdb) - sqlite (pysqlite2, sqlite, sqlite3) just use the `get_connection` function from this module to get a ...
from __future__ import division, absolute_import import numpy as np from .. import EulerDeconv, EulerDeconvEW, EulerDeconvMW, sphere from ...mesher import Sphere from ... import utils, gridder model = None xp, yp, zp = None, None, None inc, dec = None, None struct_ind = None base = None pos = None field, dx, dy, dz = N...
""" amqp.five ~~~~~~~~~~~ Compatibility implementations of features only available in newer Python versions. """ from __future__ import absolute_import import io import sys try: from collections import Counter except ImportError: # pragma: no cover from collections import defaultdict def Co...
from __future__ import division from qsrlib_qsrs.qsr_qtc_simplified_abstractclass import QSR_QTC_Simplified_Abstractclass import numpy as np from qsrlib_io.world_qsr_trace import * class QSR_QTC_BC_Simplified(QSR_QTC_Simplified_Abstractclass): """QTCBC simplified relations. Values of the abstract properties ...
"""Tests for factory_boy/MongoEngine interactions.""" import factory import os from .compat import unittest try: import mongoengine except ImportError: mongoengine = None if os.environ.get('SKIP_MONGOENGINE') == '1': mongoengine = None if mongoengine: from factory.mongoengine import MongoEngineFactory ...
""" This is an implementation of an ASCII Text UI suitable for producing simple automated reports. """ import re, types, textwrap, csv, sys import pyflag.FlagFramework as FlagFramework import pyflag.DB as DB import pyflag.conf import pyflag.UI as UI config=pyflag.conf.ConfObject() import pyflag.Registry as Registry imp...
from __future__ import print_function, unicode_literals from sickbeard import helpers, logger meta_session = helpers.make_session() def getShowImage(url, imgNum=None): if url is None: return None # if they provided a fanart number try to use it instead if imgNum is not None: tempURL = url.sp...
"""Extract reference documentation from the NumPy source tree. """ import inspect import textwrap import re import pydoc from io import StringIO from warnings import warn import collections class Reader(object): """A line-based string reader. """ def __init__(self, data): """ Parameters ...
class constant(): folder_name = 'results' MAX_HELP_POSITION = 27 CURRENT_VERSION = '0.9.1' output = None file_logger = None # jitsi options jitsi_masterpass = None # mozilla options manually = None path = None bruteforce = None specific_path = None mozilla_software = '' # ie options ie_historic = None #...
'''OpenGL extension NV.texgen_emboss This module customises the behaviour of the OpenGL.raw.GL.NV.texgen_emboss to provide a more Python-friendly API Overview (from the spec) This extension provides a new texture coordinate generation mode suitable for multitexture-based embossing (or bump mapping) effects. Given tw...
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging import os import posixpath from contextlib import contextmanager from twitter.common.collections import OrderedSet from pants.base.build_environment impo...
import os import unittest from unittest.mock import patch from airflow.providers.apache.hive.sensors.hive_partition import HivePartitionSensor from tests.providers.apache.hive import DEFAULT_DATE, TestHiveEnvironment from tests.test_utils.mock_hooks import MockHiveMetastoreHook @unittest.skipIf('AIRFLOW_RUNALL_TESTS' n...
""" Implementation of stack data structure in Python. """ class Stack: def __init__(self,*vargs): self.stack = list(vargs) def __repr__(self): return str(self.stack) def top(self): return self.stack[0] def push(self,elem): self.stack.insert(0,elem) def pop(self): ...
"""A library for managing flags-like configuration that update dynamically. """ import logging import os import re import time try: from google.appengine.api import memcache from google.appengine.ext import db from google.appengine.api import validation from google.appengine.api import yaml_object except: fro...
"""PyCrypto AES implementation.""" from .cryptomath import * from .aes import * if pycryptoLoaded: import Crypto.Cipher.AES def new(key, mode, IV): return PyCrypto_AES(key, mode, IV) class PyCrypto_AES(AES): def __init__(self, key, mode, IV): AES.__init__(self, key, mode, IV, "py...
import logging import os from autotest.client.shared import error, utils from virttest import data_dir, utils_test def umount_fs(mountpoint): if os.path.ismount(mountpoint): result = utils.run("umount -l %s" % mountpoint, ignore_status=True) if result.exit_status: logging.debug("Umount %...
from django.conf.urls import patterns, include, url from misago.threads.views.privatethreads import PrivateThreadsView urlpatterns = patterns('', url(r'^private-threads/$', PrivateThreadsView.as_view(), name='private_threads'), url(r'^private-threads/(?P<page>\d+)/$', PrivateThreadsView.as_view(), name='private...
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('pootle_app', '0014_set_directory_tp_path'), ] operations = [ migrations.AlterIndexTogether( name='directory', index_together=set([('obsol...
from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse_lazy from django.utils.decorators import method_decorator from django.views.generic import (DetailView, ListView) from django.views.generic.edit import (CreateView, ...
""" Group Configuration Tests. """ import json import mock import ddt from django.conf import settings from django.test.utils import override_settings from opaque_keys.edx.keys import AssetKey from opaque_keys.edx.locations import AssetLocation from contentstore.utils import reverse_course_url from contentstore.views.c...
import types def is_string_like(maybe): """Test value to see if it acts like a string""" try: maybe+"" except TypeError: return 0 else: return 1 def is_list_or_tuple(maybe): return isinstance(maybe, (types.TupleType, types.ListType))
""" Client side of the scheduler manager RPC API. """ from oslo.config import cfg from oslo import messaging from nova.objects import base as objects_base from nova.openstack.common import jsonutils from nova import rpc rpcapi_opts = [ cfg.StrOpt('scheduler_topic', default='scheduler', ...
import jsonschema import mock from rally.deployment.engines import devstack from tests.unit import test SAMPLE_CONFIG = { "type": "DevstackEngine", "provider": { "name": "ExistingServers", "credentials": [{"user": "root", "host": "example.com"}], }, "localrc": { "ADMIN_PASSWORD":...
import serial, sys, optparse, time, fdpexpect parser = optparse.OptionParser("update_mode") parser.add_option("--baudrate", type='int', default=57600, help='baud rate') parser.add_option("--rtscts", action='store_true', default=False, help='enable rtscts') parser.add_option("--dsrdtr", action='store_true', default=Fals...
from buildbot.changes.filter import ChangeFilter _hush_pyflakes = ChangeFilter # keep pyflakes happy
import unittest import uuid from django.core.checks import Error, Warning as DjangoWarning from django.db import connection, models from django.test import ( SimpleTestCase, TestCase, skipIfDBFeature, skipUnlessDBFeature, ) from django.test.utils import isolate_apps, override_settings from django.utils.functional i...
""" =============================================== Create topographic ERF maps in delayed SSP mode =============================================== This script shows how to apply SSP projectors delayed, that is, at the evoked stage. This is particularly useful to support decisions related to the trade-off between denoi...
import os import CTK UPLOAD_DIR = "/tmp" def ok (filename, target_dir, target_file, params): txt = "<h1>It worked!</h1>" txt += "<pre>%s</pre>" %(os.popen("ls -l '%s'" %(os.path.join(target_dir, target_file))).read()) txt += "<p>Params: %s</p>" %(str(params)) txt += "<p>Filename: %s</p>" %(filename) ...
from sha import sha from random import randint try: from entropy import entropy except ImportError: def entropy(n): s = '' for i in range(n): s += chr(randint(0,255)) return s def intify(hstr): """20 bit hash, big-endian -> long python integer""" assert len(hstr) == 2...
""" demonstrate adding a FigureCanvasGTK3Agg widget to a Gtk.ScrolledWindow using GTK3 accessed via pygobject """ from gi.repository import Gtk from matplotlib.figure import Figure from numpy import arange, sin, pi from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as FigureCanvas win = Gtk.Window() wi...
__version__ = "2.0"
from test.test_support import verify, verbose, run_doctest import Cookie import warnings warnings.filterwarnings("ignore", ".* class is insecure.*", DeprecationWarning) cases = [ ('chips=ahoy; vienna=finger', {'chips':'ahoy', 'vienna':'finger'}), ('keebler="E=mc2;...
ANSIBLE_METADATA = {'metadata_version': '1.0', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: tower_job_launch author: "Wayne Witzel III (@wwitzel3)" version_added: "2.3" short_description: Launch an Ansible Job. description: - Launch an A...
"""Copyright 2008 Orbitz WorldWide 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 ...
import unittest import random, sys, time, re sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_browse as h2b, h2o_import as h2i, h2o_glm, h2o_util, h2o_rf class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod def setUpClass(cls): # as...
from nova import db from nova import exception from nova import objects from nova.objects import base from nova.objects import fields class VirtualInterface(base.NovaPersistentObject, base.NovaObject, base.NovaObjectDictCompat): # Version 1.0: Initial version VERSION = '1.0' fields = ...
"""Grover's quantum search algorithm example.""" from sympy import pprint from sympy.physics.quantum import qapply from sympy.physics.quantum.qubit import IntQubit from sympy.physics.quantum.grover import (OracleGate, superposition_basis, WGate, grover_iteration) def demo_vgate_app(v): for i in range(2**v.n...
import re import subprocess import sys import six _RE_INFO_USER_EMAIL = r'Logged in as (?P<email>\S+)\.$' class AuthorizationError(Exception): pass def _RunCommand(command): try: return six.ensure_str( subprocess.check_output(['luci-auth', command], stderr=subprocess.STDO...
import sys from functools import update_wrapper from future.utils import iteritems from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.models.base import ModelBase from django.utils import six from django.views.decorators.cache import never_cache from django.template....
""" Pure Python PNG Reader/Writer This is an implementation of a subset of the PNG specification at http://www.w3.org/TR/2003/REC-PNG-20031110 in pure Python. It reads and writes PNG files with 8/16/24/32/48/64 bits per pixel (greyscale, RGB, RGBA, with 8 or 16 bits per layer), with a number of options. For help, type ...
"""Functions used by least-squares algorithms.""" from math import copysign import numpy as np from numpy.linalg import norm from scipy.linalg import cho_factor, cho_solve, LinAlgError from scipy.sparse import issparse from scipy.sparse.linalg import LinearOperator, aslinearoperator EPS = np.finfo(float).eps def inters...
__license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import sys, os from calibre import prints as prints_, preferred_encoding, isbytestring from calibre.utils.config import Config, ConfigProxy, JSONConfig from calibre.utils.ipc.launch import Worker fr...
"""The met component.""" from datetime import timedelta import logging from random import randrange import metno from homeassistant.const import ( CONF_ELEVATION, CONF_LATITUDE, CONF_LONGITUDE, EVENT_CORE_CONFIG_UPDATE, LENGTH_FEET, LENGTH_METERS, ) from homeassistant.core import Config, HomeAss...
I am a bad file that should not pass compileall.
from blur.quickinit import * def tableSizeInMegs(tableName): q = Database.current().exec_('SELECT * FROM table_size_in_megs(?)',[QVariant(tableName)]) if q.next(): return q.value(0) return None def pruneTable(tableName, defaultSizeLimit, orderColumn, rowsPerIteration = 100): maxSize = Config.getInt('assburnerTableL...
"""cascade folder deletes to imapuid Otherwise, since this fk is NOT NULL, deleting a folder which has associated imapuids still existing will cause a database IntegrityError. Only the mail sync engine does such a thing. Nothing else should be deleting folders, hard or soft. This also fixes a problem where if e.g. some...
from coalib.bearlib.aspects import Root, Taste @Root.subaspect class Spelling: """ How words should be written. """ class docs: example = """ 'Tihs si surly som incoreclt speling. `Coala` is always written with a lowercase `c`. """ example_language = 'reStructured...
import Gaffer import GafferImage def nodeMenuCreateCommand( menu ) : median = GafferImage.Median() median["radius"].gang() return median Gaffer.Metadata.registerNode( GafferImage.Median, "description", """ Applies a median filter to the image. This can be useful for removing noise. """, )
""" This program basically does face detection an blurs the face out. """ print __doc__ from SimpleCV import Camera, Display, HaarCascade cam = Camera() display = Display() haarcascade = HaarCascade("face") while display.isNotDone(): # Get image, flip it so it looks mirrored, scale to speed things up img = cam....
import numpy as np from numpy.testing import * from numpy.testing.noseclasses import KnownFailureTest import nose def test_slow(): @dec.slow def slow_func(x,y,z): pass assert_(slow_func.slow) def test_setastest(): @dec.setastest() def f_default(a): pass @dec.setastest(True) d...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('third_party_auth', '0020_cleanup_slug_fields'), ] operations = [ migrations.AddField( model_name='ltiproviderconfig', name='enabl...
import hashlib import itertools import logging import os import re from openerp import tools from openerp.osv import fields,osv _logger = logging.getLogger(__name__) class ir_attachment(osv.osv): """Attachments are used to link binary files or url to any openerp document. External attachment storage -------...
from ..broker import Broker class IssueDetailBroker(Broker): controller = "issue_details" def show(self, **kwargs): """Shows the details for the specified issue detail. **Inputs** | ``api version min:`` None | ``api version max:`` None | ``required:`` T...
from django.utils.translation import ugettext_lazy as _ import horizon from horizon.test.test_dashboards.dogs import dashboard class Puppies(horizon.Panel): name = _("Puppies") slug = "puppies" dashboard.Dogs.register(Puppies)
import sys import os import subprocess from optparse import OptionParser def main(argv=None): parser = OptionParser(usage="Usage: %prog [options] [--] VAR=VALUE... command [options] arg1 arg2...") parser.add_option("-i", "--ignore-environment", action="store_true", default=False, ...
import maya.cmds import IECore import IECoreMaya class VectorParameterUI( IECoreMaya.ParameterUI ) : def __init__( self, node, parameter, **kw ) : self.__dim = parameter.getTypedValue().dimensions() if self.__dim == 2: layout = maya.cmds.rowLayout( numberOfColumns = 3, columnWidth3 = [ IECoreMaya.Parame...
import re import urllib from htmlentitydefs import name2codepoint from BeautifulSoup import BeautifulSoup from browser import Browser, BrowserError class SearchError(Exception): """ Base class for Google Search exceptions. """ pass class ParseError(SearchError): """ Parse error in Google results...
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 field 'XForm.shared_data' db.add_column('odk_logger_xform', 'shared_data', self.gf('django.db.models.fields.BooleanField')(def...
"""Test the california_housing loader, if the data is available, or if specifically requested via environment variable (e.g. for travis cron job).""" import pytest from sklearn.datasets.tests.test_common import check_return_X_y from functools import partial def test_fetch(fetch_california_housing_fxt): data = fetch...
""" Lexical translation model that considers word order. IBM Model 2 improves on Model 1 by accounting for word order. An alignment probability is introduced, a(i | j,l,m), which predicts a source word position, given its aligned target word's position. The EM algorithm used in Model 2 is: E step - In the training data...
import sys import openerp.netsvc as netsvc import openerp.osv as base import openerp.pooler as pooler from openerp.tools.safe_eval import safe_eval as eval class Env(dict): def __init__(self, cr, uid, model, ids): self.cr = cr self.uid = uid self.model = model self.ids = ids ...
import os import sys from optparse import OptionParser, OptionValueError import math import vtk cohesion = 1.0 friction_angle = 20 * math.pi / 180.0 sinphi = math.sin(friction_angle) cosphi = math.sin(friction_angle) cohcos = cohesion * cosphi dp_c = 3.0 dp_phi = math.pi / 6.0 dp_sinphi = math.sin(dp_phi) dp_cosphi = m...
"""Resource management library.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os as _os import sys as _sys from tensorflow.python.util import tf_inspect as _inspect from tensorflow.python.util.tf_export import tf_export try: from rules_python.py...
""" Read SAS sas7bdat or xport files. """ from pandas import compat from pandas.io.common import _stringify_path def read_sas(filepath_or_buffer, format=None, index=None, encoding=None, chunksize=None, iterator=False): """ Read SAS files stored as either XPORT or SAS7BDAT format files. Paramete...
from alembic import op import sqlalchemy as sa def upgrade(): op.create_table( 'dvr_host_macs', sa.Column('host', sa.String(length=255), nullable=False), sa.Column('mac_address', sa.String(length=32), nullable=False, unique=True), sa.PrimaryKeyConstraint('host') ...
from __future__ import unicode_literals import sys from os.path import abspath, dirname, join sys.setrecursionlimit(2000) sys.path.insert(1, dirname(dirname(abspath(__file__)))) sys.path.append(abspath(join(dirname(__file__), "_ext"))) needs_sphinx = '1.3' # Actually 1.3.4, but micro versions aren't supported here. ex...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' cache: pickle short_description: Pickle formatted files. description: - This cache uses Python's pickle serialization format, in per host files, saved to the filesystem. version_added: "2....
from openerp import models, fields, api, osv class mother(models.Model): _name = 'test.inherit.mother' _columns = { # check interoperability of field inheritance with old-style fields 'name': osv.fields.char('Name', required=True), } surname = fields.Char(compute='_compute_surname') ...
from openerp import models import math class MrpProduction(models.Model): _inherit = 'mrp.production' def _get_workorder_in_product_lines( self, workcenter_lines, product_lines, properties=None): super(MrpProduction, self)._get_workorder_in_product_lines( workcenter_lines, produc...
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( parse_duration, fix_xml_ampersands, ) class TNAFlixIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?tnaflix\.com/(?P<cat_id>[\w-]+)/(?P<display_id>[\w-]+)/video(?P<id>\d+)' _TITLE_REGEX = r'<tit...
DOCUMENTATION = ''' --- module: profitbricks short_description: Create, destroy, start, stop, and reboot a ProfitBricks virtual machine. description: - Create, destroy, update, start, stop, and reboot a ProfitBricks virtual machine. When the virtual machine is created it can optionally wait for it to be 'running' ...
import os.path, shutil import Task, Runner, Utils, Logs, Build, Node, Options from TaskGen import extension, after, before EXT_VALA = ['.vala', '.gs'] class valac_task(Task.Task): vars = ("VALAC", "VALAC_VERSION", "VALAFLAGS") before = ("cc", "cxx") def run(self): env = self.env inputs = [a.srcpath(env) for a in...
from django.conf import settings from django.template import loader from django.views.i18n import set_language from xadmin.plugins.utils import get_context_dict from xadmin.sites import site from xadmin.views import BaseAdminPlugin, CommAdminView, BaseAdminView class SetLangNavPlugin(BaseAdminPlugin): def block_top...
""" Database models for the badges app """ from importlib import import_module from django.conf import settings from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.db import models from django.utils.translation import ugettext_lazy as _ from jsonfield import JSONFi...
import unittest import re import os class ImportLoadLibs(unittest.TestCase): """ Test which libraries are loaded during importing ROOT """ # The whitelist is a list of regex expressions that mark wanted libraries # Note that the regex has to result in an exact match with the library name. known_...
import unittest from airflow import models from airflow.api.common.experimental.mark_tasks import set_state, _create_dagruns from airflow.settings import Session from airflow.utils.dates import days_ago from airflow.utils.state import State DEV_NULL = "/dev/null" class TestMarkTasks(unittest.TestCase): def setUp(se...
import pandas as pd import pytz from datetime import datetime from dateutil import rrule from zipline.utils.tradingcalendar import end, canonicalize_datetime, \ get_open_and_closes start = pd.Timestamp('1994-01-01', tz='UTC') def get_non_trading_days(start, end): non_trading_rules = [] start = canonicalize_...
r"""CelebA dataset formating. Download img_align_celeba.zip from http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html under the link "Align&Cropped Images" in the "Img" directory and list_eval_partition.txt under the link "Train/Val/Test Partitions" in the "Eval" directory. Then do: unzip img_align_celeba.zip Use the scrip...
{ 'name': 'Point of Sale', 'version': '1.0.1', 'category': 'Point Of Sale', 'sequence': 20, 'summary': 'Touchscreen Interface for Shops', 'description': """ Quick and Easy sale process =========================== This module allows you to manage your shop sales very easily with a fully web based...
"""Deprecated core event interfaces. This module is **deprecated** and is superseded by the event system. """ from . import event, util class PoolListener(object): """Hooks into the lifecycle of connections in a :class:`.Pool`. .. note:: :class:`.PoolListener` is deprecated. Please refer to :cla...
"""utilities for analyzing expressions and blocks of Python code, as well as generating Python from AST nodes""" import re from mako import compat from mako import exceptions from mako import pyparser class PythonCode(object): """represents information about a string containing Python code""" def __init__(self,...
def f(a, L=<warning descr="Default argument value is mutable">[]</warning>): L.append(a) return L def f(a, L=<warning descr="Default argument value is mutable">list()</warning>): L.append(a) return L def f(a, L=<warning descr="Default argument value is mutable">set()</warning>): L.append(a) retu...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ lookup: redis_kv author: Jan-Piet Mens <jpmens(at)gmail.com> version_added: "0.9" short_description: fetch data from Redis description: - this looup returns a list of items given to it, ...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: azure_rm_acs version_added: "2.4" short_description: Manage an ...
from __future__ import unicode_literals, division, absolute_import from tests import FlexGetBase class TestSortBy(FlexGetBase): __yaml__ = """ tasks: test1: sort_by: title mock: - {title: 'B C D', url: 'http://localhost/1'} - {title: 'A B C', url...
"""Meta-estimators for building composite models with transformers In addition to its current contents, this module will eventually be home to refurbished versions of Pipeline and FeatureUnion. """ from ._column_transformer import ColumnTransformer, make_column_transformer from ._target import TransformedTargetRegresso...
import json def lambda_handler(event, context): return { 'statusCode': 200, 'body': json.dumps('Hello from Lambda!') }
import wx import sys import os import time import threading import math import pynotify import pygame.mixer sys.path.append(os.getenv("PAPARAZZI_HOME") + "/sw/ext/pprzlink/lib/v1.0/python") from pprzlink.ivy import IvyMessagesInterface WIDTH = 150 HEIGHT = 40 UPDATE_INTERVAL = 250 class RadioWatchFrame(wx.Frame): d...