gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from sixquiprend.models.card import Card from sixquiprend.models.chosen_card import ChosenCard from sixquiprend.models.column import Column from sixquiprend.models.hand import Hand from sixquiprend.models.heap import Heap from sixquiprend.models.six_qui_prend_exception import SixQuiPrendException from sixquiprend.model...
# Blender import system clutter import bpy from bpy.types import GPencilFrame import bmesh from mathutils import Vector import math from math import sin, cos import numpy as np import sys from pathlib import Path UTILS_PATH = Path.home() / "Documents/python_workspace/data-science-learning" sys.path.append(str(UTILS_P...
# Copyright 2013 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 req...
# -*- coding: utf-8 -*- """ Created on Wed Mar 9 17:03:58 2016 @author: Tobias Jachowski """ import persistent from collections import deque class Node(persistent.Persistent): """ State information via references: Node implements a directed acyclic graph with depth and breadth first traversal. Each...
""" This module contains functions to: - solve a single equation for a single variable, in any domain either real or complex. - solve a system of linear equations with N variables and M equations. """ from __future__ import print_function, division from sympy.core.sympify import sympify from sympy.core impor...
# ---------------------------------------------------------------------------- # cocos2d # Copyright (c) 2008-2011 Daniel Moisset, Ricardo Quesada, Rayentray Tappa, # Lucio Torre # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the...
# encoding: utf-8 """ USAGE: twitter [action] [options] ACTIONS: authorize authorize the command-line tool to interact with Twitter follow follow a user friends get latest tweets from your friends (default action) help print this help text that you are currently reading leave ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# 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 # distributed under t...
# -*- coding: utf-8 -*- import mock import unittest from nose.tools import * # noqa from github3 import GitHubError from github3.repos import Repository from tests.base import OsfTestCase, get_default_metaschema from tests.factories import ExternalAccountFactory, ProjectFactory, UserFactory from framework.auth imp...
# 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 numpy as np import pytest import pandas as pd import pandas.util.testing as tm from .base import BaseExtensionTests class BaseGetitemTests(BaseExtensionTests): """Tests for ExtensionArray.__getitem__.""" def test_iloc_series(self, data): ser = pd.Series(data) result = ser.iloc[:4] ...
#!/usr/bin/env python # Copyright 2014 Open Connectome Project (http://openconnecto.me) # # 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 # #...
# 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...
import numpy as np ''' Homework 1 Problem 10 Problem type: 3 - parameter estimation ''' class HMM: """ Steps: Compute alpha[0] : 1XN Scale alpha[0] Compute alpha[1:T-1] : TXN Scale alpha[1:T-1] Compute beta[T-1] : 1XN Compute scaled...
""" Copyright (c) 2015-2020 Raj Patel(raj454raj@gmail.com), StopStalk 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 ...
#!/usr/bin/env python3 import json import logging import os logging.basicConfig(level=logging.DEBUG) import requests PUSH_URL = "https://{}/api/dashboard/demo/tile".format( os.environ.get('DASHBOARD_IP_PORT', 'localhost:8000') ) PUSH_URL += "/{tile_id}" DEMO_ADDRESS = "https://docs.d45hb04rd.space" tiles_data ...
# 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, division, print_function, unicode_literals) import sys is_py2 = sys.version[0] == "2" if is_py2: import Queue as queue else: import queue as queue import threading from resnet.utils import logger from resnet.utils.batch_iter import IBatchIterato...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
#!/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. """Moves C++ files to a new location, updating any include paths that point to them, and re-ordering headers as needed. If multipl...
# -*- coding:utf-8 -*- import gettext import json import os from os import path import unittest from django.conf import settings from django.core.urlresolvers import reverse from django.test import ( LiveServerTestCase, TestCase, modify_settings, override_settings) from django.utils import six from django.utils._o...
from sympy import (Add, conjugate, diff, I, Integer, latex, Mul, oo, pi, Pow, pretty, Rational, sin, sqrt, Symbol, symbols, sympify) from sympy.utilities.pytest import raises from sympy.physics.quantum.dagger import Dagger from sympy.physics.quantum.qexpr import QExpr from sympy.physics.quantum.stat...
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Repository module to handle different types of repositories.""" from __future__ import print_function import constants import logging import os i...
import requests import urllib3 import zlib from vendor import readability from simplejson.decoder import JSONDecodeError from requests.packages.urllib3.exceptions import LocationParseError from socket import error as SocketError from mongoengine.queryset import NotUniqueError from lxml.etree import ParserError from uti...
# 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/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
"""Administration form for file attachment storage settings.""" from __future__ import unicode_literals from django import forms from django.utils.translation import ugettext_lazy as _ from djblets.siteconfig.forms import SiteSettingsForm from reviewboard.admin.checks import (get_can_use_amazon_s3, ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
#!/usr/bin/env python2.7 # ============================================================================= # IMPORTS # ============================================================================= import ConfigParser import MySQLdb import praw from praw.errors import APIException, RateLimitExceeded import re from reque...
import math import mathutils import bpy from bpy import data, context, types from bpy_extras.io_utils import axis_conversion from .. import constants, logger, utilities, exceptions from .constants import ( MESH, EMPTY, ARMATURE, LAMP, SPOT, SUN, POINT, HEMI, CAMERA, PERSP, OR...
"""Provide a way to connect entities belonging to one device.""" from collections import OrderedDict import logging from typing import TYPE_CHECKING, Any, Dict, List, Optional, Set, Tuple, Union import attr from homeassistant.const import EVENT_HOMEASSISTANT_STARTED from homeassistant.core import Event, callback impo...
from tests.test_cases import TestCase class GetCollectionTestCase(TestCase): def test_app_should_respond_with_articles(self): response = self.client.get('/api/articles') self.assertEqual(response.status_code, 200) meta = response.document.get('meta', None) self.assertIsNone(meta...
'''Test the queue functionality''' from common import TestQless class TestJobs(TestQless): '''We should be able to list jobs in various states for a given queue''' def test_malformed(self): '''Enumerate all the ways that the input can be malformed''' self.assertMalformed(self.lua, [ ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 nu from __future__ import (unicode_literals, absolute_import, division, print_function) import logging from collections import OrderedDict from snisi_core.indicators import Indicator from snisi_core.models.Reporting imp...
""" Class for automated creation of Makefiles """ import os class Makefile(object): """ Class for building a Makefile """ def __init__(self, src=None): self.load(src) def load(self, src=None): """ Reinitialize all class members """ self.lines = [] self.source = [] ...
import json import uuid import datetime import os import socket class jsonprocesser: def __init__(self): self.client_mac = str(hex(uuid.getnode())) self.filestamp = datetime.datetime.now().strftime("%H-%M_%d-%m-%y") self.timestamp = str(datetime.datetime.utcnow()) pri...
#!/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. """Extract UserMetrics "actions" strings from the Chrome source. This program generates the list of known actions we expect to see...
########################################################################## # # Copyright (c) 2013, Image Engine Design 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: # # * Redistribu...
# ---------------------------------------------------------------------------- # cocos2d # Copyright (c) 2008-2010 Daniel Moisset, Ricardo Quesada, Rayentray Tappa, # Lucio Torre # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the...
from test.test_support import (TESTFN, run_unittest, import_module, unlink, requires, _2G, _4G) import unittest import os, re, itertools, socket, sys mmap = import_module('mmap') PAGESIZE = mmap.PAGESIZE class MmapTests(unittest.TestCase): def setUp(self): if os.path.exist...
#-*- coding: utf-8 -*- #! /usr/bin/env python ''' filename: lab17_runTFLenet5_mnist.py description: simple end-to-end LetNet5 implementation - For the purpose of EverybodyTensorFlow tutorial - - training with Mnist data set from Yann's website. - the benchmark test error rat...
import pytest from plenum.common.signer_did import DidSigner from stp_core.crypto.util import randomSeed from plenum.common.constants import NODE_IP, NODE_PORT, CLIENT_IP, CLIENT_PORT, \ ALIAS, SERVICES, VALIDATOR from plenum.common.signer_simple import SimpleSigner from plenum.common.util import cryptonymToHex, ...
# Copyright 2019 The KerasTuner Authors # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
# -*- coding: utf-8 -*- from hashlib import sha256 from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models, IntegrityError from django.utils.text import slugify from django.core.exceptions import ValidationError class Migration(Schem...
import math import torch #################################### # Problem Class A. Single equations. #################################### def A1(): diffeq = lambda t, y: -y init = lambda: (torch.tensor(0.), torch.tensor(1.)) solution = lambda t: torch.exp(-t) return diffeq, init, solution def A2(): ...
import utils from config import Config from parser import Parser from dataset import DataSet from network import Network import eval_performance as perf import sys import time import pickle import threading import numpy as np import tensorflow as tf from os import path from copy import deepcopy from tabulate import ta...
# Copyright 2014 Hewlett-Packard Development Company, L.P. # 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...
#!/usr/bin/env python import sys import numpy as np import matplotlib matplotlib.use('Agg') import scipy import pylab import scipy.cluster.hierarchy as sch from scipy import stats # User defined color maps (in addition to matplotlib ones) bbcyr = {'red': ( (0.0, 0.0, 0.0), (0.25, 0.0, 0.0), ...
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
"""Wireup """ from __future__ import absolute_import, division, print_function, unicode_literals import atexit import fnmatch import os import urlparse from tempfile import mkstemp import aspen from aspen.testing.client import Client from babel.core import Locale from babel.messages.pofile import read_po from babel.n...
""" The :mod:`source` module concerns itself with manipulating buffers of source code: creating ranges of characters corresponding to a token, combining these ranges, extracting human-readable location information and original source from a range. """ from __future__ import absolute_import, division, print_function, u...
""" Author: Benjamin Torben-Nielsen Date: 18/08/2015 """ import h5py import numpy as np import neuron from neuron import h import btstructs """ - Convert BBP's H5 morphology format to the more standard SWC format. - Create a passive model from an SWC file """ class h5_point(object) : def __init__(self,x,y,z...
# Copyright 2018 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 division import numpy as np from neupy import init from neupy.utils import format_data from neupy.exceptions import NotTrained from neupy.algorithms.base import BaseNetwork from neupy.core.properties import ( IntProperty, Property, TypedListProperty, NumberProperty, ) __all__ = ('LVQ'...
# -*- python -*- # # This file is part of the CNO package # # Copyright (c) 2012-2014 - EMBL-EBI # # File author(s): Thomas Cokelaer (cokelaer@ebi.ac.uk) # # Distributed under the GLPv3 License. # See accompanying file LICENSE.txt or copy at # http://www.gnu.org/licenses/gpl-3.0.html # # website: http://githu...
''' Copyright (c) 2011-2014, Agora Games, LLC All rights reserved. https://github.com/agoragames/haigha/blob/master/LICENSE.txt ''' from chai import Chai from collections import deque from haigha import channel from haigha.channel import Channel, SyncWrapper from haigha.exceptions import ChannelError, ChannelClosed,...
# Copyright 2008-2013 Nokia Siemens Networks Oyj # # 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...
import json import pytz from datetime import datetime from sqlalchemy import schema, types from sqlalchemy.orm import relationship, validates from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.dialects import mysql __all__ = ['Base', 'ContentBlock', 'DataCollection', 'Service', 'InboxM...
import os import argparse from flask import current_app try: from flask_script import Manager except ImportError: Manager = None from alembic import __version__ as __alembic_version__ from alembic.config import Config as AlembicConfig from alembic import command alembic_version = tuple([int(v) for v in __alem...
import numpy as n, matplotlib.pyplot as p, scipy.special import cosmolopy.perturbation as pb import cosmolopy.density as cd from scipy.integrate import quad, tplquad import itertools from scipy.interpolate import interp1d from scipy.interpolate import RectBivariateSpline as RBS Om,sig8,ns,h,Ob = 0.315, 0.829, 0.96, 0....
import sys as __sys import requests as __requests # from Bio import Seq as Seq from Bio import SeqIO as __SeqIO from Bio import SeqRecord as __SeqRecord import StringIO as __StringIO import re as __re import pandas as __pd import numpy as __np __web_request_status_collection = {200: "The request was processed success...
########################################################################## # # Copyright (c) 2013-2015, Image Engine Design 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: # # * Redi...
from __future__ import absolute_import, print_function, division import warnings import six from .headers import Headers from .. import encoding, utils CONTENT_MISSING = 0 if six.PY2: # pragma: nocover _native = lambda x: x _always_bytes = lambda x: x else: # While the HTTP head _should_ be ASCII, it'...
#Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/tools/docco/examples.py import string testannotations=""" def annotations(canvas): from reportlab.lib.units import inch canvas.drawString(inch...
# # Copyright (c) 2004 Conectiva, Inc. # # Written by Gustavo Niemeyer <niemeyer@conectiva.com> # # This file is part of Smart Package Manager. # # Smart Package Manager is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Fou...
# coding: utf-8 # #Clustering the [Enron e-mail corpus](http://www.cs.cmu.edu/~./enron/) using the Infinite Relational Model # --- # # ##Let's setup our environment # In[1]: get_ipython().magic(u'matplotlib inline') import pickle import time import itertools as it import numpy as np import matplotlib.pylab as plt ...
"""The tests for the androidtv platform.""" import base64 import copy import logging from androidtv.constants import APPS as ANDROIDTV_APPS from androidtv.exceptions import LockNotAcquiredException import pytest from homeassistant.components.androidtv.media_player import ( ANDROIDTV_DOMAIN, ATTR_COMMAND, ...
import warnings from collections import defaultdict import numpy as np import pandas as pd from .coding import strings, times, variables from .coding.variables import SerializationWarning, pop_to from .core import duck_array_ops, indexing from .core.common import contains_cftime_datetimes from .core.pycompat import i...
from matplotlib import pyplot import numpy class roll_state: def __init__(self, dice=[], score=0): self.dice = numpy.array(dice, dtype=numpy.int32) self.score = score def __str__(self): return "dice: " + str(self.dice) + " score: " + str(self.score) def is_sequential(state): i...
"""Manage images. We make an important design decision: Importing images requires root privilege; unlike rkt, which does not. We make this decision for the simplicity of implementation. To not require root privilege, rkt has to split import into two steps: * The first step, the ``fetch`` command, merely copies a ta...
#!/usr/bin/env python #=============================================================================== # Copyright (c) 2014 Geoscience Australia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: #...
import ZSI import ZSI.TCcompound from ZSI.schema import LocalElementDeclaration, ElementDeclaration, TypeDefinition, GTD, GED ################################################ # targetNamespace # https://www.eway.com.au/gateway/managedpayment ################################################ class Eway: targetNames...
# -*- coding: utf-8 -*- # Copyright 2022 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...
#----------------------------------------- # code to recreate the spline garch model # Example is drawn from the Oxmetrics 7.0 # G@RCH package using NASDAQ returns #----------------------------------------- #------------------------------------------- # import necessary packages and functions #------------------------...
#!/usr/bin/env python # Copyright (c) 2008 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either version 2 of the License, or # version 3 of the Licens...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import six import re, copy, os import frappe from frappe import _ from frappe.utils import now, cint from frappe.model import no_value_fields, default_fields from frappe.model....
"""Module for preparing data from NCBI. Most low layer module for manipulating data.""" import os import pickle from collections import defaultdict from Bio import Entrez from Bio import SeqIO # TODO: move to init CACHE_DIR = "../../Diploma/cache" if not os.path.isdir(CACHE_DIR): CACHE_DIR = "cache/" if not ...
#!/usr/bin/env python # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
import time import tempfile import shutil import unittest import email.utils from contextlib import contextmanager from scrapy.http import Response, HtmlResponse, Request from scrapy.spiders import Spider from scrapy.settings import Settings from scrapy.exceptions import IgnoreRequest from scrapy.utils.test import get...
# -*- coding: utf-8 -*- # Copyright 2015 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
""" tests.tests_reference ~~~~~~~~~~~~~~~~~~~~~ """ from jsonspec.pointer import extract, stage from . import TestMappingType, TestSequenceType from jsonspec.pointer import RefError, DocumentPointer, Pointer from jsonspec.pointer import exceptions as events from . import TestCase class TestPointer(TestCase)...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 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...
# # Chris Lumens <clumens@redhat.com> # # Copyright 2007, 2008, 2009, 2010 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that...
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
# Copyright 2019 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...
"""Database objects.""" import sqlalchemy from collections import Mapping from sqlalchemy.engine.url import make_url from sqlalchemy.event import listen from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import scoped_session from sqlalchemy.orm.session import sessionmaker from .exceptions im...
# 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...
"""Support for Xiaomi Philips Lights.""" import asyncio import datetime from datetime import timedelta from functools import partial import logging from math import ceil from miio import Ceil, DeviceException, PhilipsBulb, PhilipsEyecare, PhilipsMoonlight from miio.gateway.gateway import ( GATEWAY_MODEL_AC_V1, ...
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2014 Thomas Voegtlin # # 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...
import os import logging import struct import claripy from cle import MetaELF from cle.backends.elf.symbol import ELFSymbol, ELFSymbolType from cle.address_translator import AT from archinfo import ArchX86, ArchAMD64, ArchARM, ArchAArch64, ArchMIPS32, ArchMIPS64, ArchPPC32, ArchPPC64 from ..tablespecs import StringTa...
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
""" Copyright (c) 2020 Alex Forencich 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, publish, distribute...
""" Abstract base class for the various polynomial Classes. The ABCPolyBase class provides the methods needed to implement the common API for the various polynomial classes. It operates as a mixin, but uses the abc module from the stdlib, hence it is only available for Python >= 2.6. """ from __future__ import divisi...
""" Field classes. """ from __future__ import absolute_import, unicode_literals import copy import datetime import os import re import sys try: from urllib.parse import urlsplit, urlunsplit except ImportError: # Python 2 from urlparse import urlsplit, urlunsplit from decimal import Decimal, DecimalExcepti...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
# 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...
# -*- coding: UTF-8 -*- from conference import cachef from conference import dataaccess as cdata from conference import models as cmodels from assopy import models as amodels from assopy import utils as autils from p3 import models from django.contrib.auth.models import User from django.contrib.contenttypes.models impo...