gt
stringclasses
1 value
context
stringlengths
2.49k
119k
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2014 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...
# # File: # PyEarthScience_read_ASCII_and_plot_counts_per_country.py # # Synopsis: # Read ASCII data and draw countries of global map with colors depending on their values. # # Category: # map plot # labelbar # read ASCII file # text # # Based on DKRZ's NCL example: # NCL_read_ASCII_and_plot_co...
# -*- coding: utf-8 -*- """ Created on Fri Dec 18 15:52:58 2015 LIFTINGSURFACE.PY ============================================================ This module contains the definition of the class of 3d lifting surfaces. This class can be instantiated to generate wings, tailplanes, fins, propeller- or rotor blades, etc...
import datetime import json import mimetypes import os import re import sys import time from collections.abc import Mapping from email.header import Header from http.client import responses from urllib.parse import quote, urlparse from django.conf import settings from django.core import signals, signing from django.co...
# 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...
import common, colors import psmove import time import psutil, os import random import numpy from piaudio import Audio from enum import Enum from multiprocessing import Process, Value, Array import json from math import sqrt # How fast/slow the music can go SLOW_MUSIC_SPEED = 1.5 #this was 0.5 FAST_MUSIC_SPEED = 0.5 ...
import pylab as plt import numpy as np from astrometry.util.fits import * from astrometry.libkd.spherematch import match_radec import fitsio import os from collections import Counter from scipy.ndimage.measurements import label, find_objects import time #import sys #sys.path.append('legacypipe/py') from legacypipe.su...
"""Tests for Konnected Alarm Panel config flow.""" from unittest.mock import patch import pytest from homeassistant import config_entries from homeassistant.components import konnected from homeassistant.components.konnected import config_flow from tests.common import MockConfigEntry @pytest.fixture(name="mock_pan...
# -*-coding:utf-8 -* # Copyright (c) 2011-2015, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, thi...
# -*- coding: UTF-8 -*- # Copyright 2019-2020 Rumma & Ko Ltd # License: GNU Affero General Public License v3 (see file COPYING for details) # from decimal import Decimal from lino_xl.lib.ledger.utils import ZERO, ONE from django.db import models from django.db.models import Q from django.conf import settings from dja...
from numpy.linalg import LinAlgError from numpy import arange, mean, median from warnings import warn matplotlib_installed = True try: import matplotlib.pyplot as plt import matplotlib.transforms as transforms from mpl_toolkits.axes_grid1 import make_axes_locatable except ImportError: matplotlib_insta...
# -*- 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...
""" menu_LBLA.py - main program for the LOB Demo Center mod_python/APACHE web application $Date: 2008-08-22 19:52:28 +0200 (Fri, 22 Aug 2008) $ $Rev: 58 $ """ # Copyright 2004-2008 Software AG # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with ...
# # public domain # __doc__ = """ simple sam i2p socket implemenation """ from i2p import datatypes from enum import Enum import collections import logging import os import string import random import socket as pysocket from contextlib import wraps Error = pysocket.error class State(Enum): """ state of a s...
# coding: utf-8 from __future__ import unicode_literals import re from .adobepass import AdobePassIE from ..compat import compat_str from ..utils import ( int_or_none, determine_ext, parse_age_limit, try_get, urlencode_postdata, ExtractorError, ) class GoIE(AdobePassIE): _SITE_INFO = { ...
# -*- coding: utf-8 -*- """ requests.session ~~~~~~~~~~~~~~~~ This module provides a Session object to manage and persist settings across requests (cookies, auth, proxies). """ from .defaults import defaults from .models import Request from .hooks import dispatch_hook from .utils import header_expand from .packages...
# Generated by Django 2.2 on 2019-04-17 03:48 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('core', '0004_child_picture'), ] operations = [ ...
""" daemon.py Daemon @author: K.Edeline """ import sys import os import pwd import time import atexit from signal import SIGTERM class Daemon(object): """ Spawn a double-forked daemon Subclass Daemon class and override the run() method. """ def __init__(self, pidfile='/var/run/mydaemon.pid', std...
# 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...
1#!/usr/bin/env python2.7 """MongoDB hub for insertion of data into our servers. This module inserts into GVA2015_data collection documents with the following structure:: { "_id": ObjectID(...), "house": HOUSE_NAME, "basetime": DATE VALUE IN TIMESTAMP, "topic": MQTT TOPIC WITH '/' ...
# Copyright (c) 2015 Midokura SARL # 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 require...
"""module concerns itself with the creation, updating and deleting of Cloudformation template instances. see `trop.py` for the *generation* of Cloudformation templates.""" from collections import namedtuple from contextlib import contextmanager import logging import json import os from pprint import pformat from func...
"""A pytest plugin which helps testing Django applications This plugin handles creating and destroying the test environment and test database and provides some useful text fixtures. """ import contextlib import inspect from functools import reduce import os import sys import types import py import pytest from .djan...
#!/usr/bin/env python # Copyright 2014 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 ...
# 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 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 use this ...
#!/bin/env python # -*- encoding: utf-8 -*- import sys, urllib, time, json, traceback from optparse import OptionParser NG_STATUS_URI = 'http://127.0.0.1:9091/monitor/basic_status' class Histogram(object): def __init__(self, values = None): self.values = [] self.dirty = False self.add(v...
""" Contains the variations() function for expanding an English word into multiple variations by programmatically adding and removing suffixes. Translated to Python from the ``com.sun.labs.minion.lexmorph.LiteMorph_en`` class of Sun's `Minion search engine <https://minion.dev.java.net/>`_. """ import re # Rule excep...
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2010-2015,2018 Contributor # # 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...
#=============================================================================== # 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...
""" Main program for 2to3. """ from __future__ import print_function from __future__ import with_statement import sys import os import difflib import logging import shutil import optparse from . import refactor def diff_texts(a, b, filename): """Return a unified diff of two strings.""" a = a.splitlines() ...
from BeautifulSoup import BeautifulSoup, BeautifulStoneSoup from django.http import HttpResponse from urllib2 import build_opener, URLError, urlopen from urlparse import urljoin from django.db.models import aggregates from django.db.models.sql import aggregates as sql_aggregates from django.utils import simplejson cli...
#!/usr/bin/env python """Main Starminder script.""" from datetime import datetime import random from typing import Callable, Optional, Union import boto3 from emoji import emojize from github import Github from github.AuthenticatedUser import AuthenticatedUser from github.Repository import Repository from jinja2 i...
# 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. import contextlib import httplib import logging import os import tempfile import time from pylib import android_commands from pylib import constants fro...
#!/usr/bin/env python2.7 from __future__ import print_function from datetime import tzinfo, timedelta, datetime import fnmatch import glob import json import os import sys import tempfile import time import types from functools import wraps from pprint import pprint import click import link_header import requests ...
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2015-2016 Rapptz 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 u...
import bz2 import argparse import os import json import re import sys FILE_SUFFIX = ".bz2" OUTPUT_FILE = "output.bz2" REPORT_FILE = "RC_report.txt" def main(): assert sys.version_info >= (3, 3), \ "Must be run in Python 3.3 or later. You are running {}".format(sys.version) parser = argparse.ArgumentParser(...
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
#!/usr/bin/python # Copyright 2017 The Bazel 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 ...
# encoding: utf-8 from __future__ import (absolute_import, division, print_function) from owscapable.etree import etree from owscapable import crs, util from owscapable.util import testXMLValue, testXMLAttribute, nspath_eval, xmltag_split, dict_union, extract_xml_list from owscapable.namespaces import Namespaces def...
from rick.motion_control import euclidian_path_planning_control from detection.opencv import get_lego_piece from detection.opencv import get_purple_lego, get_lego_boxes, detect_purple import time from .motion_control import euclidian_path_planning_control, kalman_filter from .utils import * import cv2 import numpy as ...
""" LICENCE ------- Copyright 2013 by Kitware, Inc. All Rights Reserved. Please refer to KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. """ import math import numpy as np import os import os.path as osp from subprocess import call ...
from lib import config import psycopg2 import psycopg2.extras import json import time import sys import traceback connString = config.getConfig()['connString']; def getConnection(): try: return psycopg2.connect(connString); except: print('Unable to connect to database!') def backUpCardSet(set...
#!/usr/bin/env python3 # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# 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...
# coding: utf-8 """ Wavefront REST API Documentation <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the W...
"""Support for IGN Sismologia (Earthquakes) Feeds.""" from __future__ import annotations from datetime import timedelta import logging from georss_ign_sismologia_client import IgnSismologiaFeedManager import voluptuous as vol from homeassistant.components.geo_location import PLATFORM_SCHEMA, GeolocationEvent from ho...
"""Raffle View Test""" import datetime import re from django.test import TransactionTestCase from django.core.urlresolvers import reverse from apps.managers.challenge_mgr import challenge_mgr from apps.managers.challenge_mgr.models import RoundSetting from apps.utils import test_utils from apps.widgets.raffle.models ...
import six import time import random from monotonic import monotonic as now from weibo.common import reflection from weibo.common import log as logging from weibo.common.gettextutils import _, _LI, _LE DEFAULT_INTERVAL = 60.0 LOG = logging.getLogger(__name__) class InvalidPeriodicTaskArg(Exception): message = ...
#!/usr/bin/env python import argparse import re import os import sys import uuid import glob import cPickle import types import inspect from copy import copy from mtools import __version__ from datetime import timedelta from dateutil.tz import tzutc, tzoffset try: import matplotlib.pyplot as plt from matplot...
#!/usr/bin/python """ Provides "transport" based functions: --Create / Delete: -Transport Zones -Transport Nodes -Transport Connectors --Verify / Check: -Transport Nodes, Zones and Connectors...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
""" sentry.interfaces ~~~~~~~~~~~~~~~~~ Interfaces provide an abstraction for how structured data should be validated and rendered. :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import itertools import urlparse from django.http import Qu...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import shu...
#!/usr/bin/python #encoding: utf8 import time import pprint import json import os import copy import shutil import requesocks as requests #import requests from scrapy.selector import Selector import urllib3 import sys from datetime import datetime, timedelta def numerate_date( d ): if d is None: return Non...
# Copyright 2011 OpenStack Foundation # Copyright 2013 Rackspace Hosting # 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/lice...
# Copyright (c) 2014 Thales Services SAS # 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 r...
# Copyright 2018 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 agreed to in writing, ...
""" solar equations """ import numpy as np import pandas as pd import ephem import datetime import collections from math import * from timezonefinder import TimezoneFinder import pytz from cea.constants import HOURS_IN_YEAR __author__ = "Jimeno A. Fonseca" __copyright__ = "Copyright 2015, Architecture and Building...
# Copyright (c) 2011-2015 Rackspace US, 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...
# -*- coding: utf-8 -*- """ Created on Wed Mar 21 14:24:21 2012 @author: Marangoni """ from __future__ import print_function import importlib import sys, os from gdxpy import * import numpy as np import re import traceback #import sets as setsLib import collections import optparse import pdb import subprocess import...
from unittest import mock from ddt import data, ddt from django.core.exceptions import ObjectDoesNotExist from rest_framework import status, test from waldur_core.core import utils as core_utils from waldur_core.structure.tests import factories as structure_factories from waldur_mastermind.marketplace import models a...
# Copyright (c) 2015 Thales Services SAS # # 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 l...
import os from collections import OrderedDict, defaultdict from contextlib import suppress from pathlib import Path from typing import Dict, List, Optional from astropy import units as u from panoptes.utils.library import load_module from pydantic.dataclasses import dataclass from panoptes.utils.utils import get_quan...
from client.sources.doctest import models from client.utils import output import sys import unittest class DoctestTest(unittest.TestCase): NAME = 'doctest' POINTS = 1 FILE = 'operator' def setUp(self): self.old_stdout = sys.stdout self.old_logger = output._logger sys.stdout = o...
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from elasticsearch import...
# -*- coding: utf-8 -*- """This file contains classes used for preprocessing in plaso.""" import abc from dfwinreg import registry_searcher from artifacts import definitions as artifact_definitions from dfvfs.helpers import file_system_searcher from plaso.lib import errors class ArtifactPreprocessorPlugin(object)...
from future import standard_library standard_library.install_aliases() from builtins import object, str from copy import deepcopy from pickle import dumps import simplejson import os import getpass from socket import getfqdn from uuid import uuid1 import numpy as np try: from collections import OrderedDict except...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS from __future__ import absolute_import, division, print_function, unicode_literals import io # THIRD-PARTY import numpy as np from numpy.testing import assert_array_equal # LOCAL from .. import converters from .. import excepti...
# -*- coding: utf-8 -*- # Copyright (c) 2011 Red Hat, Inc # Copyright (c) 2010 Seth Vidal # # kitchen is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your opt...
# 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...
import os import pickle import re import pprint from datetime import date, datetime from collections import namedtuple from operator import attrgetter from kconfig import settings from kconfig import tComponentsBook, helpdeskCompBook from kconfig import trackersBook from kconfig import tHelpDeskNodesBook from kernel.Co...
# Copyright 2009 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
"""The Lua lexer.""" import re from .. import util __all__ = [ 'LexerError', 'Token', 'TokSpace', 'TokNewline', 'TokComment', 'TokString', 'TokNumber', 'TokName', 'TokLabel', 'TokKeyword', 'TokSymbol', 'Lexer', 'LUA_KEYWORDS' ] LUA_KEYWORDS = { 'and', 'break'...
try: from invoke.vendor.six.moves.queue import Queue except ImportError: from six.moves.queue import Queue from invoke.util import ExceptionHandlingThread from .connection import Connection from .exceptions import GroupException class Group(list): """ A collection of `.Connection` objects whose API ...
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import argparse import os from pathlib import Path from textwrap import dedent from typing import Any, Dict, Sequence, cast import toml import yaml fro...
# -*- coding: utf-8 -*- """The preprocess plugins manager.""" from dfvfs.helpers import file_system_searcher from dfvfs.helpers import windows_path_resolver from dfvfs.lib import errors as dfvfs_errors from dfwinreg import interface as dfwinreg_interface from dfwinreg import regf as dfwinreg_regf from dfwinreg import ...
import time import six import os import ssl from six.moves import http_client from six.moves.urllib.parse import urlparse class Stream: def __init__(self, server, port=80, headers={}, url='/', ssl_enabled=False, ssl_verification_enabled=True): ''' Initialize a stream object and an HTTP o...
# 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...
# 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...
# orm/interfaces.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ Contains various base classes used throughout the ORM. Defines the now depreca...
# 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 use ...
"""Tests for Plex config flow.""" from unittest.mock import patch import asynctest import plexapi.exceptions import requests.exceptions from homeassistant.components.plex import config_flow from homeassistant.const import CONF_HOST, CONF_PORT, CONF_SSL, CONF_TOKEN, CONF_URL from homeassistant.setup import async_setup...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ============================================================================== # File: file.py # Author: Cashiuus # Created: 09-Feb-2022 - Revised: # # Depends: n/a # Compat: 3.7+ # #-[ Usage ]----------------------------------------...
from scipy.spatial.distance import euclidean import scipy.spatial as ss import numpy as np from math import floor import smpmap import astar from types import (MobTypes, ItemTypes, ObjectTypes, Door, TrapDoor) from window import Slot import logging import time import utils LIGHT_MATRIX = np.array([[13, 6], [1, 7]]) ...
# -*- coding: utf-8 -*- """ tests.test_config ~~~~~~~~~~~~~~~~~ :copyright: (c) 2016 by the Flask Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import pytest import os from datetime import timedelta import flask # config keys used for the TestConfig TEST_KEY =...
import sys from Bio import Entrez class TaxString(object): @classmethod def _tax_string_to_tax_dict(cls, tax, email='hjcamero@live.unc.edu'): # if tax is a full/partial string, get only lowest element if ";" in tax: tax = tax.split[";"][-1] # if tax s...
# # Copyright 2012 New Dream Network, LLC (DreamHost) # Copyright 2013 IBM Corp. # Copyright 2013 eNovance <licensing@enovance.com> # Copyright Ericsson AB 2013. All rights reserved # Copyright 2014 Hewlett-Packard Company # Copyright 2015 Huawei Technologies Co., Ltd. # # Licensed under the Apache License, Version 2.0...
import re import logging import arrow import pytz import json from sqlalchemy import func import sendgrid from smtpapi import SMTPAPIHeader from flask import render_template, url_for from pmg import db, app log = logging.getLogger(__name__) class EmailTemplate(db.Model): __tablename__ = "email_template" ...
from collections import OrderedDict import mock from nose.tools import * from website.notifications.events.base import Event, register, event_registry from website.notifications.events.files import ( FileAdded, FileRemoved, FolderCreated, FileUpdated, AddonFileCopied, AddonFileMoved, AddonFileRenamed, ) from ...
# Copyright 2011 Isaku Yamahata # 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 b...
# Copyright 2014: Mirantis 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 b...
"""Support for Envisalink devices.""" import asyncio import logging import voluptuous as vol from homeassistant.core import callback import homeassistant.helpers.config_validation as cv from homeassistant.const import EVENT_HOMEASSISTANT_STOP, CONF_TIMEOUT from homeassistant.helpers.entity import Entity from homeassi...
from collections import deque from contextlib import contextmanager import time import warnings from django.conf import settings from django.db import DEFAULT_DB_ALIAS from django.db.backends.signals import connection_created from django.db.backends import utils from django.db.transaction import TransactionManagementE...
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from parlai.core.params import ParlaiParser import copy import json import os import random import re from collections i...
from StringIO import StringIO import pickle import sys import gc import copy from os import path from numpy.testing import * from numpy.testing.utils import _assert_valid_refcount, WarningManager from numpy.compat import asbytes, asunicode, asbytes_nested import warnings import tempfile import numpy as np if sys.versi...
import discord import asyncio from discord.ext import commands import pydealer from player import Player suit_map = {'Diamonds': '\u2662', 'Clubs': '\u2667', 'Hearts': '\u2661', 'Spades': '\u2664' } class Game(object): def __init__(self,bot=None, server=None): self.bot ...
# Copyright 2013 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 l...