prompt
large_stringlengths
72
9.34k
completion
large_stringlengths
0
7.61k
<|file_name|>cost.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016, the GPyOpt Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) from ...models import GPModel import numpy as np class CostModel(object): """ Class to handle the cost of evaluating the function. param cost_withGradie...
super(CostModel, self).__init__() self.cost_type = cost_withGradients # --- Set-up evaluation cost if self.cost_type is None: self.cost_withGradients = constant_cost_withGradients self.cost_type = 'Constant cost' elif self.cost_type == 'evaluation_time'...
<|file_name|>cost.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016, the GPyOpt Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) from ...models import GPModel import numpy as np class CostModel(object): """ Class to handle the cost of evaluating the function. param cost_withGradie...
""" Predicts the time cost of evaluating the function at x. """ m, _, _, _ = self.cost_model.predict_withGradients(x) return np.exp(m)
<|file_name|>cost.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016, the GPyOpt Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) from ...models import GPModel import numpy as np class CostModel(object): """ Class to handle the cost of evaluating the function. param cost_withGradie...
""" Predicts the time cost and its gradient of evaluating the function at x. """ m, _, dmdx, _= self.cost_model.predict_withGradients(x) return np.exp(m), np.exp(m)*dmdx
<|file_name|>cost.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016, the GPyOpt Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) from ...models import GPModel import numpy as np class CostModel(object): """ Class to handle the cost of evaluating the function. param cost_withGradie...
""" Updates the GP used to handle the cost. param x: input of the GP for the cost model. param x_cost: values of the time cost at the input locations. """ if self.cost_type == 'evaluation_time': cost_evals = np.log(np.atleast_2d(np.asarray(cost_x)).T) ...
<|file_name|>cost.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016, the GPyOpt Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) from ...models import GPModel import numpy as np class CostModel(object): """ Class to handle the cost of evaluating the function. param cost_withGradie...
""" Constant cost function used by default: cost = 1, d_cost = 0. """ return np.ones(x.shape[0])[:,None], np.zeros(x.shape)
<|file_name|>cost.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016, the GPyOpt Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) from ...models import GPModel import numpy as np class CostModel(object): """ Class to handle the cost of evaluating the function. param cost_withGradie...
self.cost_withGradients = constant_cost_withGradients self.cost_type = 'Constant cost'
<|file_name|>cost.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016, the GPyOpt Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) from ...models import GPModel import numpy as np class CostModel(object): """ Class to handle the cost of evaluating the function. param cost_withGradie...
self.cost_model = GPModel() self.cost_withGradients = self._cost_gp_withGradients self.num_updates = 0
<|file_name|>cost.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016, the GPyOpt Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) from ...models import GPModel import numpy as np class CostModel(object): """ Class to handle the cost of evaluating the function. param cost_withGradie...
self.cost_withGradients = cost_withGradients self.cost_type = 'User defined cost'
<|file_name|>cost.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016, the GPyOpt Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) from ...models import GPModel import numpy as np class CostModel(object): """ Class to handle the cost of evaluating the function. param cost_withGradie...
cost_evals = np.log(np.atleast_2d(np.asarray(cost_x)).T) if self.num_updates == 0: X_all = x costs_all = cost_evals else: X_all = np.vstack((self.cost_model.model.X,x)) costs_all = np.vstack((self.cost_model.model.Y,cos...
<|file_name|>cost.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016, the GPyOpt Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) from ...models import GPModel import numpy as np class CostModel(object): """ Class to handle the cost of evaluating the function. param cost_withGradie...
X_all = x costs_all = cost_evals
<|file_name|>cost.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016, the GPyOpt Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) from ...models import GPModel import numpy as np class CostModel(object): """ Class to handle the cost of evaluating the function. param cost_withGradie...
X_all = np.vstack((self.cost_model.model.X,x)) costs_all = np.vstack((self.cost_model.model.Y,cost_evals))
<|file_name|>cost.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016, the GPyOpt Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) from ...models import GPModel import numpy as np class CostModel(object): """ Class to handle the cost of evaluating the function. param cost_withGradie...
__init__
<|file_name|>cost.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016, the GPyOpt Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) from ...models import GPModel import numpy as np class CostModel(object): """ Class to handle the cost of evaluating the function. param cost_withGradie...
_cost_gp
<|file_name|>cost.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016, the GPyOpt Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) from ...models import GPModel import numpy as np class CostModel(object): """ Class to handle the cost of evaluating the function. param cost_withGradie...
_cost_gp_withGradients
<|file_name|>cost.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016, the GPyOpt Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) from ...models import GPModel import numpy as np class CostModel(object): """ Class to handle the cost of evaluating the function. param cost_withGradie...
update_cost_model
<|file_name|>cost.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016, the GPyOpt Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) from ...models import GPModel import numpy as np class CostModel(object): """ Class to handle the cost of evaluating the function. param cost_withGradie...
constant_cost_withGradients
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys<|fim▁hole|>from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relative to tasks.py) 'deploy_path': '..', # Github Page...
import datetime from invoke import task from invoke.util import cd
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
"""Remove generated files""" if os.path.isdir(CONFIG['deploy_path']): shutil.rmtree(CONFIG['deploy_path']) os.makedirs(CONFIG['deploy_path'])
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
"""Build local version of site""" c.run('pelican -s pelicanconf.py')
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
"""`build` with the delete switch""" c.run('pelican -d -s pelicanconf.py')
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
"""Automatically regenerate site upon file modification""" c.run('pelican -r -s pelicanconf.py')
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
"""Serve site at http://localhost:8000/""" class AddressReuseTCPServer(RootedHTTPServer): allow_reuse_address = True server = AddressReuseTCPServer( CONFIG['deploy_path'], ('', CONFIG['port']), ComplexHTTPRequestHandler) sys.stderr.write('Serving on port {port} ...\n'....
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
allow_reuse_address = True
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
"""`build`, then `serve`""" build(c) serve(c)
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
"""Build production version of site""" c.run('pelican -s publishconf.py')
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
"""Publish to production via rsync""" c.run('pelican -s publishconf.py') c.run( 'rsync --delete --exclude ".DS_Store" -pthrvz -c ' '{} {production}:{dest_path}'.format( CONFIG['deploy_path'].rstrip('/') + '/', **CONFIG))
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
"""Publish to GitHub Pages""" preview(c) c.run('ghp-import -b {github_pages_branch} ' '-m {commit_message} ' '{deploy_path} -p'.format(**CONFIG))
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
shutil.rmtree(CONFIG['deploy_path']) os.makedirs(CONFIG['deploy_path'])
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
clean
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
build
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
rebuild
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
regenerate
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
serve
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
reserve
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
preview
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
publish
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
gh_pages
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
from errors import * from manager import SchemaManager
<|file_name|>test_MatplotlibTimelines.py<|end_file_name|><|fim▁begin|>import unittest <|fim▁hole|> theSuite=unittest.TestSuite()<|fim▁end|>
from PyFoam.Basics.MatplotlibTimelines import MatplotlibTimelines
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
"""Set up a Ring Door Bell and StickUp Camera.""" ring = hass.data[DATA_RING] cams = [] cams_no_plan = [] for camera in ring.doorbells: if camera.has_subscription: cams.append(RingCam(hass, camera, config)) else: cams_no_plan.append(camera) for camera in...
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
"""An implementation of a Ring Door Bell camera.""" def __init__(self, hass, camera, device_info): """Initialize a Ring Door Bell camera.""" super(RingCam, self).__init__() self._camera = camera self._hass = hass self._name = self._camera.name self._ffmpeg = hass...
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
"""Initialize a Ring Door Bell camera.""" super(RingCam, self).__init__() self._camera = camera self._hass = hass self._name = self._camera.name self._ffmpeg = hass.data[DATA_FFMPEG] self._ffmpeg_arguments = device_info.get(CONF_FFMPEG_ARGUMENTS) self._las...
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
"""Return the name of this camera.""" return self._name
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
"""Return a unique ID.""" return self._camera.id
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
"""Return the state attributes.""" return { ATTR_ATTRIBUTION: ATTRIBUTION, 'device_id': self._camera.id, 'firmware': self._camera.firmware, 'kind': self._camera.kind, 'timezone': self._camera.timezone, 'type': self._camera.family, ...
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
"""Return a still image response from the camera.""" from haffmpeg.tools import ImageFrame, IMAGE_JPEG ffmpeg = ImageFrame(self._ffmpeg.binary, loop=self.hass.loop) if self._video_url is None: return image = await asyncio.shield(ffmpeg.get_image( self._v...
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
"""Generate an HTTP MJPEG stream from the camera.""" from haffmpeg.camera import CameraMjpeg if self._video_url is None: return stream = CameraMjpeg(self._ffmpeg.binary, loop=self.hass.loop) await stream.open_camera( self._video_url, extra_cmd=self._ffmp...
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
"""Update the image periodically.""" return True
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
"""Update camera entity and refresh attributes.""" _LOGGER.debug("Checking if Ring DoorBell needs to refresh video_url") self._camera.update() self._utcnow = dt_util.utcnow() try: last_event = self._camera.history(limit=1)[0] except (IndexError, TypeError): ...
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
cams.append(RingCam(hass, camera, config))
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
cams_no_plan.append(camera)
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
cams.append(RingCam(hass, camera, config))
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
cams_no_plan.append(camera)
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
cameras = str(', '.join([camera.name for camera in cams_no_plan])) err_msg = '''A Ring Protect Plan is required for the''' \ ''' following cameras: {}.'''.format(cameras) _LOGGER.error(err_msg) hass.components.persistent_notification.create( 'Error: {}<br ...
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
return
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
return
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
video_url = self._camera.recording_url(last_recording_id) if video_url: _LOGGER.info("Ring DoorBell properties refreshed") # update attributes if new video or if URL has expired self._last_video_id = last_recording_id self._video_u...
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
_LOGGER.info("Ring DoorBell properties refreshed") # update attributes if new video or if URL has expired self._last_video_id = last_recording_id self._video_url = video_url self._expires_at = FORCE_REFRESH_INTERVAL + self._utcnow
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
setup_platform
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
__init__
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
name
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
unique_id
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
device_state_attributes
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
async_camera_image
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
handle_async_mjpeg_stream
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
should_poll
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
update
<|file_name|>0004_auto_20160525_1032.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('account', '0003_remove_userprofile_is_check'), ] <|fim▁hole|> ...
operations = [ migrations.RemoveField(
<|file_name|>0004_auto_20160525_1032.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): <|fim_middle|> <|fim▁end|>
dependencies = [ ('account', '0003_remove_userprofile_is_check'), ] operations = [ migrations.RemoveField( model_name='userprofile', name='is_create', ), migrations.RemoveField( model_name='userprofile', name='is_delete', ...
<|file_name|>MenuBarItemStylesExample.py<|end_file_name|><|fim▁begin|>from muntjac.ui.vertical_layout import VerticalLayout from muntjac.ui.menu_bar import MenuBar, ICommand from muntjac.terminal.external_resource import ExternalResource class MenuBarItemStylesExample(VerticalLayout): def __init__(self): ...
<|file_name|>MenuBarItemStylesExample.py<|end_file_name|><|fim▁begin|> from muntjac.ui.vertical_layout import VerticalLayout from muntjac.ui.menu_bar import MenuBar, ICommand from muntjac.terminal.external_resource import ExternalResource class MenuBarItemStylesExample(VerticalLayout): <|fim_middle|> class Se...
def __init__(self): super(MenuBarItemStylesExample, self).__init__() self._menubar = MenuBar() menuCommand = MenuCommand(self) # Save reference to individual items so we can add sub-menu items to # them f = self._menubar.addItem('File', None) newItem = f.ad...
<|file_name|>MenuBarItemStylesExample.py<|end_file_name|><|fim▁begin|> from muntjac.ui.vertical_layout import VerticalLayout from muntjac.ui.menu_bar import MenuBar, ICommand from muntjac.terminal.external_resource import ExternalResource class MenuBarItemStylesExample(VerticalLayout): def __init__(self): ...
super(MenuBarItemStylesExample, self).__init__() self._menubar = MenuBar() menuCommand = MenuCommand(self) # Save reference to individual items so we can add sub-menu items to # them f = self._menubar.addItem('File', None) newItem = f.addItem('New', None) ...
<|file_name|>MenuBarItemStylesExample.py<|end_file_name|><|fim▁begin|> from muntjac.ui.vertical_layout import VerticalLayout from muntjac.ui.menu_bar import MenuBar, ICommand from muntjac.terminal.external_resource import ExternalResource class MenuBarItemStylesExample(VerticalLayout): def __init__(self): ...
def __init__(self, c): self._c = c def menuSelected(self, selectedItem): er = ExternalResource('http://www.google.com') self._c.getWindow().open(er)
<|file_name|>MenuBarItemStylesExample.py<|end_file_name|><|fim▁begin|> from muntjac.ui.vertical_layout import VerticalLayout from muntjac.ui.menu_bar import MenuBar, ICommand from muntjac.terminal.external_resource import ExternalResource class MenuBarItemStylesExample(VerticalLayout): def __init__(self): ...
self._c = c
<|file_name|>MenuBarItemStylesExample.py<|end_file_name|><|fim▁begin|> from muntjac.ui.vertical_layout import VerticalLayout from muntjac.ui.menu_bar import MenuBar, ICommand from muntjac.terminal.external_resource import ExternalResource class MenuBarItemStylesExample(VerticalLayout): def __init__(self): ...
er = ExternalResource('http://www.google.com') self._c.getWindow().open(er)
<|file_name|>MenuBarItemStylesExample.py<|end_file_name|><|fim▁begin|> from muntjac.ui.vertical_layout import VerticalLayout from muntjac.ui.menu_bar import MenuBar, ICommand from muntjac.terminal.external_resource import ExternalResource class MenuBarItemStylesExample(VerticalLayout): def __init__(self): ...
def __init__(self, c): self._c = c def menuSelected(self, selectedItem): self._c.getWindow().showNotification('Action ' + selectedItem.getText())
<|file_name|>MenuBarItemStylesExample.py<|end_file_name|><|fim▁begin|> from muntjac.ui.vertical_layout import VerticalLayout from muntjac.ui.menu_bar import MenuBar, ICommand from muntjac.terminal.external_resource import ExternalResource class MenuBarItemStylesExample(VerticalLayout): def __init__(self): ...
self._c = c
<|file_name|>MenuBarItemStylesExample.py<|end_file_name|><|fim▁begin|> from muntjac.ui.vertical_layout import VerticalLayout from muntjac.ui.menu_bar import MenuBar, ICommand from muntjac.terminal.external_resource import ExternalResource class MenuBarItemStylesExample(VerticalLayout): def __init__(self): ...
self._c.getWindow().showNotification('Action ' + selectedItem.getText())
<|file_name|>MenuBarItemStylesExample.py<|end_file_name|><|fim▁begin|> from muntjac.ui.vertical_layout import VerticalLayout from muntjac.ui.menu_bar import MenuBar, ICommand from muntjac.terminal.external_resource import ExternalResource class MenuBarItemStylesExample(VerticalLayout): def <|fim_middle|>(self): ...
__init__
<|file_name|>MenuBarItemStylesExample.py<|end_file_name|><|fim▁begin|> from muntjac.ui.vertical_layout import VerticalLayout from muntjac.ui.menu_bar import MenuBar, ICommand from muntjac.terminal.external_resource import ExternalResource class MenuBarItemStylesExample(VerticalLayout): def __init__(self): ...
__init__
<|file_name|>MenuBarItemStylesExample.py<|end_file_name|><|fim▁begin|> from muntjac.ui.vertical_layout import VerticalLayout from muntjac.ui.menu_bar import MenuBar, ICommand from muntjac.terminal.external_resource import ExternalResource class MenuBarItemStylesExample(VerticalLayout): def __init__(self): ...
menuSelected
<|file_name|>MenuBarItemStylesExample.py<|end_file_name|><|fim▁begin|> from muntjac.ui.vertical_layout import VerticalLayout from muntjac.ui.menu_bar import MenuBar, ICommand from muntjac.terminal.external_resource import ExternalResource class MenuBarItemStylesExample(VerticalLayout): def __init__(self): ...
__init__
<|file_name|>MenuBarItemStylesExample.py<|end_file_name|><|fim▁begin|> from muntjac.ui.vertical_layout import VerticalLayout from muntjac.ui.menu_bar import MenuBar, ICommand from muntjac.terminal.external_resource import ExternalResource class MenuBarItemStylesExample(VerticalLayout): def __init__(self): ...
menuSelected
<|file_name|>switch_subdesign.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Written by Daniel M. Aukes and CONTRIBUTORS Email: danaukes<at>asu.edu. Please see LICENSE for full license. """ import sys import popupcad import qt.QtCore as qc import qt.QtGui as qg if __name__=='__main__':<|fim▁hole|> ...
<|file_name|>switch_subdesign.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Written by Daniel M. Aukes and CONTRIBUTORS Email: danaukes<at>asu.edu. Please see LICENSE for full license. """ import sys import popupcad import qt.QtCore as qc import qt.QtGui as qg if __name__=='__main__': <|fim...
app = qg.QApplication(sys.argv[0]) filename_from = 'C:/Users/danaukes/Dropbox/zhis sentinal 11 files/modified/sentinal 11 manufacturing_R08.cad' filename_to = 'C:/Users/danaukes/Dropbox/zhis sentinal 11 files/modified/sentinal 11 manufacturing_R09.cad' d = popupcad.filetypes.design.Design.load...
<|file_name|>switch_subdesign.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Written by Daniel M. Aukes and CONTRIBUTORS Email: danaukes<at>asu.edu. Please see LICENSE for full license. """ import sys import popupcad import qt.QtCore as qc import qt.QtGui as qg if __name__=='__main__': app = qg....
if len(list1.selectedIndexes())==1 and len(list2.selectedIndexes())==1: ii_from = list1.selectedIndexes()[0].row() ii_to = list2.selectedIndexes()[0].row() print(ii_from,ii_to) d.replace_subdesign_refs(subdesign_list[ii_from].id,subdesign_list...
<|file_name|>switch_subdesign.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Written by Daniel M. Aukes and CONTRIBUTORS Email: danaukes<at>asu.edu. Please see LICENSE for full license. """ import sys import popupcad import qt.QtCore as qc import qt.QtGui as qg if __name__=='__main__': app = qg....
ii_from = list1.selectedIndexes()[0].row() ii_to = list2.selectedIndexes()[0].row() print(ii_from,ii_to) d.replace_subdesign_refs(subdesign_list[ii_from].id,subdesign_list[ii_to].id) d.subdesigns.pop(subdesign_list[ii_from].id) ...
<|file_name|>device_trigger.py<|end_file_name|><|fim▁begin|>"""Provides device automations for ZHA devices that emit events.""" import voluptuous as vol import homeassistant.components.automation.event as event from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA from homeassistant.components.dev...
async def async_attach_trigger(hass, config, action, automation_info):
<|file_name|>device_trigger.py<|end_file_name|><|fim▁begin|>"""Provides device automations for ZHA devices that emit events.""" import voluptuous as vol import homeassistant.components.automation.event as event from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA from homeassistant.components.dev...
"""Validate config.""" config = TRIGGER_SCHEMA(config) if "zha" in hass.config.components: trigger = (config[CONF_TYPE], config[CONF_SUBTYPE]) try: zha_device = await async_get_zha_device(hass, config[CONF_DEVICE_ID]) except (KeyError, AttributeError): raise ...
<|file_name|>device_trigger.py<|end_file_name|><|fim▁begin|>"""Provides device automations for ZHA devices that emit events.""" import voluptuous as vol import homeassistant.components.automation.event as event from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA from homeassistant.components.dev...
"""Listen for state changes based on configuration.""" trigger = (config[CONF_TYPE], config[CONF_SUBTYPE]) try: zha_device = await async_get_zha_device(hass, config[CONF_DEVICE_ID]) except (KeyError, AttributeError): return None if trigger not in zha_device.device_automation_trigger...
<|file_name|>device_trigger.py<|end_file_name|><|fim▁begin|>"""Provides device automations for ZHA devices that emit events.""" import voluptuous as vol import homeassistant.components.automation.event as event from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA from homeassistant.components.dev...
"""List device triggers. Make sure the device supports device automations and if it does return the trigger list. """ zha_device = await async_get_zha_device(hass, device_id) if not zha_device.device_automation_triggers: return triggers = [] for trigger, subtype in zha_device....
<|file_name|>device_trigger.py<|end_file_name|><|fim▁begin|>"""Provides device automations for ZHA devices that emit events.""" import voluptuous as vol import homeassistant.components.automation.event as event from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA from homeassistant.components.dev...
trigger = (config[CONF_TYPE], config[CONF_SUBTYPE]) try: zha_device = await async_get_zha_device(hass, config[CONF_DEVICE_ID]) except (KeyError, AttributeError): raise InvalidDeviceAutomationConfig if ( zha_device.device_automation_triggers is None ...
<|file_name|>device_trigger.py<|end_file_name|><|fim▁begin|>"""Provides device automations for ZHA devices that emit events.""" import voluptuous as vol import homeassistant.components.automation.event as event from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA from homeassistant.components.dev...
raise InvalidDeviceAutomationConfig
<|file_name|>device_trigger.py<|end_file_name|><|fim▁begin|>"""Provides device automations for ZHA devices that emit events.""" import voluptuous as vol import homeassistant.components.automation.event as event from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA from homeassistant.components.dev...
return None
<|file_name|>device_trigger.py<|end_file_name|><|fim▁begin|>"""Provides device automations for ZHA devices that emit events.""" import voluptuous as vol import homeassistant.components.automation.event as event from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA from homeassistant.components.dev...
return
<|file_name|>device_trigger.py<|end_file_name|><|fim▁begin|>"""Provides device automations for ZHA devices that emit events.""" import voluptuous as vol import homeassistant.components.automation.event as event from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA from homeassistant.components.dev...
async_validate_trigger_config
<|file_name|>device_trigger.py<|end_file_name|><|fim▁begin|>"""Provides device automations for ZHA devices that emit events.""" import voluptuous as vol import homeassistant.components.automation.event as event from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA from homeassistant.components.dev...
async_attach_trigger
<|file_name|>device_trigger.py<|end_file_name|><|fim▁begin|>"""Provides device automations for ZHA devices that emit events.""" import voluptuous as vol import homeassistant.components.automation.event as event from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA from homeassistant.components.dev...
async_get_triggers
<|file_name|>FiredriveCom.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from pyload.plugin.internal.DeadCrypter import DeadCrypter <|fim▁hole|> __name = "FiredriveCom" __type = "crypter" __version = "0.03" __pattern = r'https?://(?:www\.)?(firedrive|putlocker)\.com/share/.+' __confi...
class FiredriveCom(DeadCrypter):