gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from __future__ import (absolute_import, division, print_function, unicode_literals) exec(open("ground.py").read()) from scipy.spatial import procrustes """ utility.py -------------- A few helpful routines for plotting TS, Jan 2016 (made compatible with vectorized hamiltonian.py) """ from mat...
# ---------------------------------------------------------------------------- # Copyright (c) 2016--, The Wetlab Assistant Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # --------------------------------------...
#!/usr/bin/env python from __future__ import print_function from itertools import izip from rtkit.resource import RTResource from rtkit.authenticators import CookieAuthenticator from rtkit.errors import RTResourceError from rtkit import set_logging from jira.client import JIRA from jira.exceptions import JIRAError fro...
# Copyright 2011 OpenStack Foundation # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2011 Grid Dynamics # Copyright 2011 Eldar Nugaev, Kirill Shileev, Ilya Alekseyev # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with...
# Lint as: python2, python3 # Copyright 2020 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law ...
# MIT License # # Copyright (c) 2017 Yi Zhu # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publi...
# Copyright (c) 2013 - 2015 EMC Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
# Copyright 2010 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...
# =============================================================================== # Copyright 2016 Jake Ross # # 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...
#!/usr/bin/python # Copyright (c) 2016 Intel Corporation # # 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...
# # 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...
import hashlib import io import os import mimetypes import pathlib import json from collections import OrderedDict import pygit2 from rest_framework import serializers from rest_framework.exceptions import NotFound from rest_framework.reverse import reverse as drf_reverse from django.core.cache import cache from dja...
import pytest from math import sqrt, exp, sin, cos from functools import lru_cache from numpy.testing import (assert_warns, assert_, assert_allclose, assert_equal, assert_array_equal, suppress_warnings) import ...
"""Partial dependence plots for regression and classification models.""" # Authors: Peter Prettenhofer # Trevor Stephens # Nicolas Hug # License: BSD 3 clause from collections.abc import Iterable import warnings import numpy as np from scipy import sparse from scipy.stats.mstats import mquantiles ...
""" The formatting module provides classes for formatting simulation/analysis records in different ways: summary, list or table; and in different mark-up formats: currently text or HTML. :copyright: Copyright 2006-2015 by the Sumatra team, see doc/authors.txt :license: BSD 2-clause, see LICENSE for details. """ from ...
#!/usr/bin/python3 import itertools ############################################################################### def chunks(values, size): it = iter(values) item = list(itertools.islice(it, size)) while item: yield item item = list(itertools.islice(it, size)) #######################...
import os import re from celery.result import AsyncResult from django.db.models import Q from django import forms from django.conf import settings from django.contrib.gis.geos import Point from django.contrib import messages from django.contrib.auth.decorators import login_required from django.http import JsonResponse...
# -*- coding: utf-8 -*- """ pygments.formatters.html ~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for HTML output. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import sys import StringIO from pygments.formatter import Formatter fr...
#!/usr/bin/env python import sys, time, signal import RPi.GPIO as GPIO from daemon import Daemon import datetime #s_log = open("/tmp/home_automation.log", "a") #s_log.write("Opening Log file") class MyDaemon(Daemon): def run(self): GPIO.setmode(GPIO.BOARD) gpio18 = 12 #Garage Door Down gpio13 =...
import pandas as pd import matplotlib.pyplot as plt import Attack_Calc as atk import seaborn as sns import numpy as np from matplotlib.backends.backend_pdf import PdfPages def data_input(): # import and fold data df = pd.read_csv('input_data/units.csv') df.sort_values(by=['name'], ascending=[True], inpl...
# -*- coding: utf-8 -*- import time import datetime import mock from factory import SubFactory from factory.fuzzy import FuzzyDateTime, FuzzyAttribute, FuzzyChoice from mock import patch, Mock import factory import pytz from factory.django import DjangoModelFactory from django.utils import timezone from django.db.uti...
#!/usr/bin/env python # Created by Raul Peralta-Lozada import os import yaml import json import rospy import actionlib import time from math import pi from std_srvs.srv import Empty from nav_msgs.msg import Odometry from move_base_msgs.msg import MoveBaseAction, MoveBaseGoal from geometry_msgs.msg import PoseStamped...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tool to build, run and manage dockerized development environments.""" import argparse import json import os import platform import sys import tarfile import tempfile try: import docker except ImportError: print('Please ensure docker is installed.') sys.exit(1) ...
#!/usr/bin/env python3 # Copyright 2021 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. """Tests for create_unwind_table.py. This test suite contains tests for the custom unwind table creation for 32-bit arm builds. """ i...
import os import hmac import json import time import asyncio import hashlib import functools import furl from waterbutler.core import streams from waterbutler.core import provider from waterbutler.core import exceptions from waterbutler.core.path import WaterButlerPath from waterbutler.providers.cloudfiles import se...
#!/usr/bin/env python from __future__ import division import argparse import datetime import os import os.path as osp import random import socket os.environ['MPLBACKEND'] = 'Agg' # NOQA # import cv2 # FIXME: cv2 should be imported first to avoid segfault. import chainer from chainer import training from chainer....
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright (C) 2010 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...
# Natural Language Toolkit: WordNet Browser Application # # Copyright (C) 2001-2015 NLTK Project # Author: Jussi Salmela <jtsalmela@users.sourceforge.net> # Paul Bone <pbone@students.csse.unimelb.edu.au> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ A WordNet Browser application whic...
""" Module to set up run time parameters for Clawpack. The values set in the function setrun are then written out to data files that will be read in by the Fortran code. """ import os import numpy as np try: CLAW = os.environ['CLAW'] except: raise Exception("*** Must first set CLAW enviornment variable") #...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
# coding=utf-8 """Functions to parse latex for server""" import collections import re import string import CHEMaths from simpleeval import simple_eval def latex_valid(latex: str, mode: str) -> (bool, str): """Check if there is any syntax error in the given latex string depending on given mode Return True and ...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
# 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...
# 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...
from __future__ import print_function from builtins import map from builtins import object import re import socket import time import _thread import queue from ssl import wrap_socket, CERT_NONE, CERT_REQUIRED, SSLError DEFAULT_NAME = 'skybot' DEFAULT_REALNAME = 'Python bot - http://github.com/rmmh/skybot' DEFAULT_NI...
#!/usr/bin/env python # Copyright (c) 2012 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. """Script to parse perf data from Chrome Endure test executions, to be graphed. This script connects via HTTP to a buildbot master...
from SimpleCV.Color import Color from SimpleCV.base import time, cv, np from SimpleCV.Features.Features import Feature, FeatureSet from SimpleCV.ImageClass import Image class TrackSet(FeatureSet): """ **SUMMARY** TrackSet is a class extended from FeatureSet which is a class extended from Python's lis...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # Copyright (c) 2011 Piston Cloud Computing, Inc # Copyright (c) 2011 OpenStack Foundation # (c) Cop...
"""Kernel Principal Components Analysis.""" # Author: Mathieu Blondel <mathieu@mblondel.org> # License: BSD 3 clause import numpy as np from scipy import linalg from scipy.sparse.linalg import eigsh from ..utils._arpack import _init_arpack_v0 from ..utils.extmath import svd_flip from ..utils.validation import check_...
"""Attention mechanisms. This module defines the interface of attention mechanisms and a few concrete implementations. For a gentle introduction and usage examples see the tutorial TODO. An attention mechanism decides to what part of the input to pay attention. It is typically used as a component of a recurrent netwo...
import datetime import hashlib import urllib from django.contrib import auth from django.contrib.auth.signals import user_logged_in from django.core.exceptions import ImproperlyConfigured from django.db import models from django.db.models.manager import EmptyManager from django.contrib.contenttypes.models import Conte...
from django.core.exceptions import ObjectDoesNotExist from tardis.tardis_portal.models import DatasetParameterSet from tardis.tardis_portal.models import DatafileParameterSet from tardis.tardis_portal.models import ExperimentParameterSet from tardis.tardis_portal.models import ParameterName from tardis.tardis_portal.m...
''' network.py - Network methods for dealing with UMIs ========================================================= ''' from __future__ import absolute_import import collections import itertools import sys import regex import numpy as np from umi_tools._dedup_umi import edit_distance import umi_tools.Utilities as U imp...
data = ( 'mil', # 0x00 'milg', # 0x01 'milm', # 0x02 'milb', # 0x03 'mils', # 0x04 'milt', # 0x05 'milp', # 0x06 'milh', # 0x07 'mim', # 0x08 'mib', # 0x09 'mibs', # 0x0a 'mis', # 0x0b 'miss', # 0x0c 'ming', # 0x0d 'mij', # 0x0e 'mic', # 0x0f 'mik', # 0x10 'mit', # ...
from collections import Counter from functools32 import lru_cache from itertools import combinations from collections import namedtuple import datetime import hashlib import sys import time import signal ''' name some intermediate data structures ''' LogLine = namedtuple('LogLine', ['ts', 'text']) DataRecord = namedtu...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from __future__ import annotations import sys from abc import ABC, abstractmethod from contextlib import contextmanager from os.path import expandvars from ...config.constants import AppEnvVars from ...utils.structures import EnvVars class EnvironmentInterface(ABC): """ Example usage: === ":octicons-fi...
# Copyright 2013 IBM Corp. # # 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 agree...
import bisect import copy import xml.etree.ElementTree as ET from operator import attrgetter from pydmrs.components import * class LinkLabel(namedtuple('LinkLabelNamedTuple', ('rargname', 'post'))): """ A label for a link """ __slots__ = () # Suppress __dict__ def __new__(cls, rargname, post):...
# pylint: disable=too-many-lines '''Arsenal client library''' # # Copyright 2015 CityGrid Media, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/license...
#!/usr/bin/python # # Copyright (c) 2011 The Cockcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib impor...
# ---------------------------------------------------------------- # Copyright 2016 Cisco Systems # # 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/LICENS...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import base64 import cStringIO import json import os from PIL import Image import pandas as pd import six import shutil import tensorflow as tf import tempfile from tensorflow.contrib.learn.python.learn.utils...
import argparse import sys import math from collections import namedtuple from itertools import count import gym import numpy as np import scipy.optimize from gym import wrappers import torch import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import tor...
# HELPS GENERATE CROSS PLATFORM INSTALL SCRIPTS # -*- coding: utf-8 -*- """ TODO: needs a big cleanup. Remove global variables, use functions instead. Make an easy, versionable, and overrideable set of aliases. CommandLine: ib python ./_scripts/util_cplat_packages.py python ./_scripts/util_cpla...
# # Copyright (C) 2016, 2017 # The Board of Trustees of the Leland Stanford Junior University # Written by Stephane Thiell <sthiell@stanford.edu> # # 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 Lic...
#! /usr/bin/env python # -*- coding: utf-8 -*- '''PDF handler to parse PDF file''' from StringIO import StringIO ######## PDFHandler class # maybe use cStringIO.StringIO instead class stdmodel(object): '''a class to model stdout for pdfminer file parameter Can get context use get() method''' # saved string _str...
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import Authenticati...
"""The tests for Climate device triggers.""" import pytest import voluptuous_serialize import homeassistant.components.automation as automation from homeassistant.components.climate import DOMAIN, const, device_trigger from homeassistant.const import TEMP_CELSIUS from homeassistant.helpers import config_validation as ...
#=============================================================================== # Copyright 2007 Matt Chaput # # 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/li...
# Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
#!/usr/bin/env python2 # Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. import argparse import base64 import h5py import lmdb import logging import numpy as np import PIL.Image import os import sys try: from cStringIO import StringIO except ImportError: from StringIO import StringIO # Add path ...
# ---------------------------------------------------------------- # Copyright 2016 Cisco Systems # # 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/LICENS...
#!/usr/bin/env python # -*- coding: utf-8 -*- import matplotlib.pyplot as plt import matplotlib.pyplot as plt2 from numpy import * from scipy import interpolate from matplotlib import rcParams, rcParamsDefault import argparse from nema_common import * outputformat = "" def plot_rates(geometry,float_activity,N_true,...
#!/usr/bin/env python import os def dump_date(date): return date.strftime('%Y-%m-%dT%H:%M:%S.%fZ') class DumperNotFoundError(RuntimeError): pass class GPXDumper: TAB = ' ' def dump(self, activity): buffer = [] buffer.append('<?xml version="1.0" encoding="UTF-8"?>\n') buffe...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
""" This module contains essential stuff that should've come with Python itself ;) It also contains functions (or functionality) which is in Python versions higher than 2.5 which used to be the lowest version supported by Scrapy. """ import os import re import inspect import weakref import errno import six from funct...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
import pytz import functools import httplib as http from dateutil.parser import parse as parse_date from django.apps import apps from django.utils import timezone from django.conf import settings from django.db import models from osf.utils.fields import NonNaiveDateTimeField from website.prereg import utils as prereg...
# -*- coding: utf-8 -*- """ Created on Tue Aug 30 08:57:31 2016 @author: nicholas """ import copy import sys import logging import os import unittest import shutil import time from Bio import SeqIO from riboSeed.shared_methods import parse_clustered_loci_file, \ pad_genbank_sequence, get_genbank_record, combin...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
#! /usr/bin/python # # See README for usage instructions. import sys import os import subprocess # We must use setuptools, not distutils, because we need to use the # namespace_packages option for the "google" package. try: from setuptools import setup, Extension except ImportError: try: sys.stderr.write("run...
# Copyright 2021 DeepMind Technologies Limited and Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
# Copyright (C) 2010-2013 Claudio Guarnieri. # Copyright (C) 2014-2016 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. """Database migration from Cuckoo 0.6 to Cuckoo 1.1. Revision ID: 263a45963c72 Revises: None Create Date:...
import os import sys from ffig.clang.cindex import AccessSpecifier from ffig.clang.cindex import CursorKind from ffig.clang.cindex import Diagnostic from ffig.clang.cindex import ExceptionSpecificationKind from ffig.clang.cindex import TypeKind def _get_annotations(node): return [c.displayname for c in node.get_c...
# Uses the HID API introduced in Mac OS X version 10.5 # http://developer.apple.com/library/mac/#technotes/tn2007/tn2187.html from ctypes import * from ctypes import util # Load frameworks iokit = cdll.LoadLibrary(util.find_library('IOKit')) cf = cdll.LoadLibrary(util.find_library('CoreFoundation')) # Core Foundatio...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
import contextlib import os import sys import tracemalloc import unittest from unittest.mock import patch from test.support.script_helper import (assert_python_ok, assert_python_failure, interpreter_requires_environment) from test import support try: import _testcapi except ...
# Copyright 2015, 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 -*- ''' Install software from the FreeBSD ``ports(7)`` system .. versionadded:: 2014.1.0 This module allows you to install ports using ``BATCH=yes`` to bypass configuration prompts. It is recommended to use the :mod:`ports state <salt.states.freebsdports>` to install ports, but it it also possible...
"""Mean shift clustering algorithm. Mean shift clustering aims to discover *blobs* in a smooth density of samples. It is a centroid based algorithm, which works by updating candidates for centroids to be the mean of the points within a given region. These candidates are then filtered in a post-processing stage to elim...
from __future__ import absolute_import import os import re import configargparse from netlib import http from . import filt, utils, version from .proxy import config APP_HOST = "mitm.it" APP_PORT = 80 class ParseException(Exception): pass def _parse_hook(s): sep, rem = s[0], s[1:] parts = rem.split(sep...
""" Tests that skipped rows are properly handled during parsing for all of the parsers defined in parsers.py """ from datetime import datetime from io import StringIO import numpy as np import pytest from pandas.errors import EmptyDataError from pandas import ( DataFrame, Index, ) import pandas._testing as ...
# -*- coding: utf-8 -*- """Pan & zoom transform.""" #------------------------------------------------------------------------------ # Imports #------------------------------------------------------------------------------ import math import sys import numpy as np from .transform import Translate, Scale, pixels_to...
from __future__ import unicode_literals, division, absolute_import import logging from flexget import plugin from flexget.event import event from flexget.utils.log import log_once log = logging.getLogger('imdb') class FilterImdb(object): """ This plugin allows filtering based on IMDB score, votes and genres...
import json import sys, traceback import dsz, dsz.cmd import sqlite3 import ops.db import ops.project import datetime from _errordata import getErrorFromCommandId, getLastError IMPORT_MAP = {'time': 'dsztime'} class OpsObject(object, ): def __init__(self, debug=False, datadict=None, cmdname=''): self.tim...
# coding=utf-8 # # # 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 writi...
#!/bin/env python # Automatically translated python version of # OpenSceneGraph example program "osgvirtualprogram" # !!! This program will need manual tuning before it will work. !!! import sys from osgpypp import osg from osgpypp import osgDB from osgpypp import osgText from osgpypp import osgViewer # Translate...
import http.client import inspect import warnings from enum import Enum from typing import Any, Dict, List, Optional, Sequence, Set, Tuple, Type, Union, cast from fastapi import routing from fastapi.datastructures import DefaultPlaceholder from fastapi.dependencies.models import Dependant from fastapi.dependencies.uti...
# # @file TestL3Model.py # @brief L3 Model unit tests # # @author Akiya Jouraku (Python conversion) # @author Sarah Keating # # ====== WARNING ===== WARNING ===== WARNING ===== WARNING ===== WARNING ====== # # DO NOT EDIT THIS FILE. # # This file was generated automatically by converting the file located at # ...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
""" switchFlow.py: Basic l2_learning switch that switches flows between a real sensor and a simulation Topology used: linuxrouter.py Status: Incomplete. """ from pox.core import core import pox.openflow.libopenflow_01 as of import pox.lib.packet as pkt from pox.lib.recoco import Timer from pox.lib.util import dpid_t...
# tcpmib.py # Copyright (c) 2012 Maxim Kolosov ANY_SIZE = 1 TCPIP_OWNING_MODULE_SIZE = 16 MIB_TCP_STATE = 0 MIB_TCP_STATE_CLOSED = 1 MIB_TCP_STATE_LISTEN = 2 MIB_TCP_STATE_SYN_SENT = 3 MIB_TCP_STATE_SYN_RCVD = 4 MIB_TCP_STATE_ESTAB = 5 MIB_TCP_STATE_FIN_WAIT1 = 6 MIB_TCP_STATE_FIN_WAIT2 = 7...
"""Config flow for Apple TV integration.""" from __future__ import annotations import asyncio from collections import deque from ipaddress import ip_address import logging from random import randrange from pyatv import exceptions, pair, scan from pyatv.const import DeviceModel, PairingRequirement, Protocol from pyatv...
""" Utility functions for project. """ import numpy as np # Functions # ----------------------------------------------------------------------------- def lump(cp, h, k, Gb, t, V, SA, Ti, Tinf): """ Lumped capacitance method """ Lc = V/SA # characteristic length for sphere, m Bi ...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...