gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import gym import numpy as np import unittest from ray.rllib.models.tf.attention_net import relative_position_embedding, \ GTrXLNet from ray.rllib.models.tf.layers import MultiHeadAttention from ray.rllib.models.torch.attention_net import relative_position_embedding \ as relative_position_embedding_torch, GTrX...
# (c) 2018, NetApp Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from ansible.modules.storage.netapp.netapp_e_host import Host from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args __metaclass__ = type try: from unitt...
# Copyright (c) 2015 SONATA-NFV and Paderborn University # 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 re...
from .utils import NamespacedClient, query_params, _make_path class CatClient(NamespacedClient): @query_params('h', 'help', 'local', 'master_timeout', 'v') def aliases(self, name=None, params=None): """ `<http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-alias.html>`_ ...
#!/usr/bin/env python """t is for people that want do things, not organize their tasks.""" from __future__ import with_statement import os, re, sys, hashlib import time, datetime from operator import itemgetter from optparse import OptionParser, OptionGroup class InvalidTaskfile(Exception): """Raised when the ...
""" Roosa - A RESTful Ontology Server and Applications """ __author__ = "Jaakko Salonen, Juha Nurmi" __copyright__ = "Copyright 2012, Jaakko Salonen, Juha Nurmi" __version__ = "0.2.0" __license__ = "MIT" __status__ = "Prototype" from flask import Flask, Blueprint, url_for, render_template, Response, make_response, req...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import unittest, json import importlib from frappe.modules import load_doctype_module, get_module_name from frappe.utils import cstr def main(app=None, module=None...
from __future__ import print_function import unittest import numpy as np import pyqg class PyqgModelTester(unittest.TestCase): def setUp(self): # need to eliminate beta and U for tests self.m = pyqg.QGModel(beta=0., U1=0., U2=0., filterfac=0.) # the maximum wavelengths to use in tests ...
# Copyright 2021 DeepMind Technologies Limited # # 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 agr...
from datetime import timedelta import json from flask import Flask, request, make_response from mock import patch, MagicMock from cpucoolerchart import crawler from cpucoolerchart._compat import to_native from cpucoolerchart.crawler import update_data from cpucoolerchart.extensions import db, cache from cpucoolerchar...
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
# 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...
#!/usr/bin/env python3 import unittest from unittest.mock import patch import sys from io import StringIO import asyncio import json import WDL from scripts import parse_wdl_workflow # Test cases class TestReadAndParseInput(unittest.TestCase): def test_read_stdin_result_type(self): with patch("sys.st...
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask import render_template from sqlalchemy.dialects.postgresql import JSONB from indico.core.db im...
# 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...
# # Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. # """ This file contains implementation of inetconf interface for physical router configuration manager """ from lxml import etree from ncclient import manager import copy import time import datetime class PhysicalRouterConfig(object): # mapping ...
importantDatabase = { "floor_00": { "nameOnWeb": "Ground Floor", "room_00": { "Device": { "Device_01": { "inNode": "dataNodeSlave01", "name": "Device02", "nameModule": "Light", "nameOnWeb": "L...
"""Calibration of predicted probabilities.""" # Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Balazs Kegl <balazs.kegl@gmail.com> # Jan Hendrik Metzen <jhm@informatik.uni-bremen.de> # Mathieu Blondel <mathieu@mblondel.org> # # License: BSD 3 clause from __future__ impo...
import os, time, sys, traceback, weakref import numpy as np import threading try: import __builtin__ as builtins import cPickle as pickle except ImportError: import builtins import pickle class ClosedError(Exception): """Raised when an event handler receives a request to close the connection or...
import os import time import numpy as np import os.path as osp from baselines import logger from collections import deque from baselines.common import explained_variance, set_global_seeds from baselines.common.policies import build_policy try: from mpi4py import MPI except ImportError: MPI = None from baselines...
#! /usr/bin/python # -*- coding: utf-8 -*- """ Generator of histology report """ import logging logger = logging.getLogger(__name__) import sys import os.path path_to_script = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(path_to_script, "../extern/dicom2fem/src")) import argparse import...
#!/usr/bin/env python3 __version__ = "0.1" __description__ = "A simple DNS lookup utility, similar to 'dig'" # Basic usage examples # iterative: python3 dns-query.py wordpress.com -s 192.228.79.201 -q A -nr # recursive: python3 dns-query.py wordpress.com -q A -r import argparse import socket import sys import struct i...
# 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 applicable ...
import os import tempfile import httplib import urllib, urllib2 import base64 from functools import wraps from string import Template from wsgiref.util import request_uri from amara.lib.iri import * from akara import logger def status_response(code): return '%i %s'%(code, httplib.responses[code]) class iterwrap...
# 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 (t...
# Copyright 2016 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 agreed to in w...
# 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...
from django.conf import settings from django.db import connection, router, transaction, connections from django.db.backends import util from django.db.models import signals, get_model from django.db.models.fields import (AutoField, Field, IntegerField, PositiveIntegerField, PositiveSmallIntegerField, FieldDoesNotEx...
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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 # # U...
#!/usr/bin/env python3 # Copyright 2020 The Pigweed 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 applicab...
# 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 math import isfinite from typing import Any, Dict, NamedTuple from graphql import graphql_sync from graphql.error import GraphQLError from graphql.language import ValueNode from graphql.pyutils import inspect from graphql.type import ( GraphQLArgument, GraphQLField, GraphQLFloat, GraphQLObjectType...
# 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 unde...
"""functions used to construct different architectures Several Functions have been borrowed and modified from https://github.com/openai/pixel-cnn """ import tensorflow as tf import numpy as np FLAGS = tf.app.flags.FLAGS def int_shape(x): return list(map(int, x.get_shape())) def concat_elu(x): """ like conc...
# 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...
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test BIP68 implementation.""" from test_framework.test_framework import IoPTestFramework from test_fra...
# 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...
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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...
import os import collections import tornado.web from tornado.escape import url_escape import uuid from framework.dependency_management.dependency_resolver import ServiceLocator from framework.lib.exceptions import InvalidTargetReference, \ InvalidParameterType from framework.lib.general import cprint from framework...
#!/usr/bin/env python # Copyright 2014 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. """ Unit tests for the contents of device_utils.py (mostly DeviceUtils). """ # pylint: disable=C0321 # pylint: disable=W0212 # pylint:...
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-13 23:50 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Locali...
import sys from pingdomlib.analysis import PingdomAnalysis checktypes = ['http', 'httpcustom', 'tcp', 'ping', 'dns', 'udp', 'smtp', 'pop3', 'imap'] legacy_notification_parameters = ['notifyagainevery', 'notifywhenbackup', 'sendnotificationwhendown', 'sendtoandroid', ...
# Copyright 2020 The FedLearner 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...
""" plugins/Qoop.py Author: Trey Stout Date Added: Mon Mar 27 17:50:22 CST 2006 Bastard interface to zoto. Takes requests from a php page, and calls qoop.hit() then returns some "xml" to qoop. """ ## STD LIBS from md5 import md5 from datetime import date, datetime from xml.dom import minidom from pprint import pprin...
""" Filename: graph_tools.py Author: Daisuke Oyama Tools for dealing with a directed graph. """ import numpy as np from scipy import sparse from scipy.sparse import csgraph from fractions import gcd class DiGraph(object): r""" Class for a directed graph. It stores useful information about the graph str...
import logging log = logging.getLogger(__name__) import numpy import time from spacq.interface.resources import Resource from spacq.interface.units import Quantity from spacq.tool.box import Synchronized from ..abstract_device import AbstractDevice, AbstractSubdevice from ..tools import quantity_unwrapped, BinaryEnc...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. # -*- test-case-name: flocker.node.test.test_docker -*- """ Docker API client. """ from __future__ import absolute_import from time import sleep from zope.interface import Interface, implementer from docker import Client from docker.errors import APIErro...
import json import os import subprocess import uuid import passlib.hash import pytest import gen import gen.build_deploy.aws import release from dcos_installer import backend from dcos_installer.config import Config, make_default_config_if_needed, to_config os.environ["BOOTSTRAP_ID"] = "12345" @pytest.fixture(scop...
# 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...
"""Perform GATK based filtering, perferring variant quality score recalibration. Performs cutoff-based soft filtering when VQSR fails on smaller sets of variant calls. """ import os from bcbio import broad, utils from bcbio.distributed.transaction import file_transaction from bcbio.log import logger from bcbio.pipeli...
#!/usr/bin/env python3 # Copyright 2016 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. """ Usage: gn_to_cmake.py <json_file_name> gn gen out/config --ide=json --json-ide-script=../../gn/gn_to_cmake.py or gn gen out/con...
from __future__ import unicode_literals import django_filters from netaddr import IPNetwork from netaddr.core import AddrFormatError from django.db.models import Q from dcim.models import Site, Device, Interface from extras.filters import CustomFieldFilterSet from tenancy.models import Tenant from utilities.filters ...
from __future__ import division, absolute_import, print_function import sys from functools import reduce import numpy as np from numpy.ma import * from numpy.core.numerictypes import float32 from numpy.ma.core import umath from numpy.testing import * pi = np.pi def eq(v, w, msg=''): result = allclose(v, w) ...
# -*- 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...
# Copyright 2015 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. """Serves JSON for a graph. This serves the JSON in the format consumed by Flot: https://github.com/flot/flot/blob/master/API.md """ from __future__ import ...
# Copyright 2012-2013 Ravello Systems, 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 agree...
import copy import intprim import matplotlib.pyplot as plt import matplotlib.animation import numpy as np import numpy.random import sklearn.metrics try: import IPython.display except: pass animation_plots = [] def create_2d_handwriting_data(num_trajectories, translation_mean, translation_std, noise_std, len...
# Copyright 2014-2020 Scalyr 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 writin...
################################# LICENSE ################################## # Copyright (c) 2009, South African Astronomical Observatory (SAAO) # # All rights reserved. # # # # Redistribu...
# Copyright (c) 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 ...
# Copyright 2014 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 logging import re import sys from telemetry.core import exceptions from telemetry.core.platform.tracing_agent import chrome_tracing_agent from teleme...
from __future__ import unicode_literals import django.test import django.test.utils import django.test.client from django.conf import settings import django.contrib.auth.models import django.core.mail import logging from test_models import (UnitTestCompany, UnitTestUser) import test_admin logging.disable(logging.C...
# Purpose: Main Function - Training Models # Info: Change the Parameters at the top of the scrip to change how the Agent interacts # Developed as part of the Software Agents Course at City University # Dev: Dan Dixey and Enrico Lopedoto # Updated: 1/3/2016 import logging import os import sys from time import t...
""" Django settings for django_get_started project. """ import sys from os import path from redcap import Project, RedcapError from twilio.access_token import AccessToken, IpMessagingGrant from twilio.rest.ip_messaging import TwilioIpMessagingClient from twilio.rest import TwilioRestClient from azure.storage.blob imp...
"""Thin wrapper of CUDA Driver API. There are four differences compared to the original C API. 1. Not all functions are ported. 2. Errors are translated into CUDADriverError exceptions. 3. The 'cu' prefix of each API is omitted and the next character is set to lower case. 4. The resulting values are returned direc...
"""""" from datetime import datetime from typing import List from mongoengine import ( Document, DateTimeField, FloatField, StringField, IntField, connect, QuerySet ) from mongoengine.errors import DoesNotExist from vnpy.trader.constant import Exchange, Interval from vnpy.trader.object imp...
""" Command handler This module contains the infrastructure for accepting commands on the command line. The processing of a command works as follows: 1. The calling object (caller) is analyzed based on its callertype. 2. Cmdsets are gathered from different sources: - channels: all available channel names are auto...
#!/usr/bin/python """ DeployMan - Management of things that need to be dynamically deployed. Used after initial deployment of base configuration, which is more static, less dynamic. DeployMan is a combination of RunMan and Sysync, which connects to a remote server to get work that needs to be deployed for this machin...
# Copyright (c) 2012 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 ...
import threading import time from sqlalchemy import pool, select, event import sqlalchemy as tsa from sqlalchemy import testing from sqlalchemy.testing.util import gc_collect, lazy_gc from sqlalchemy.testing import eq_, assert_raises, is_not_, is_ from sqlalchemy.testing.engines import testing_engine from sqlalchemy.te...
import numpy as np import pytest import pandas as pd from pandas import ( Series, date_range, ) import pandas._testing as tm from pandas.core.arrays import PeriodArray class TestSeriesIsIn: def test_isin(self): s = Series(["A", "B", "C", "a", "B", "B", "A", "C"]) result = s.isin(["A", "C...
# Copyright 2016 by MPI-SWS and Data-Ken Research. # Licensed under the Apache 2.0 License. """Common utilities for the tests """ import time import unittest import random random.seed() from antevents.base import IterableAsPublisher, DefaultSubscriber, FatalError,\ SensorEvent class RandomSensor: def __init_...
import logging from pprint import pprint import numpy as np from copy import deepcopy from pycqed.measurement.waveform_control import pulsar as ps from pycqed.measurement.waveform_control import sequence as sequence from pycqed.measurement.waveform_control import segment as segment from pycqed.measurement.randomized_b...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware 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 ...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2014-02-07 17:05:11 import os import json import time import logging import itertools from six.moves import queue as Queue from collections import deque ...
# Copyright 2015-2017 Capital One Services, 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 ...
import datetime import api.fake from flask import Blueprint, request, jsonify, render_template from fuzzywuzzy import process from flask_weasyprint import HTML, render_pdf from flask.ext.login import current_user from api.core import db from api.models.users import User from api.models.finance import ReceiptItem, Recei...
#!/usr/bin/env python # -*- coding: utf-8 -*- # copyright 2014 Hamilton Kibbe <ham@hamiltonkib.be> # # 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/LICEN...
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import copy import grp import inspect try: import argparse except ImportError: # python 2.6 from . import argparse_compat as argparse import os import pwd import sys import textwrap im...
#!/usr/bin/env python ############################################################################### # $Id$ # # Project: showind # Purpose: Display and subset wind data # Author: Kyle Shannon <kyle@pobox.com> # ############################################################################### # Copyright (c) 2013...
#!/usr/bin/env python # # $Id$ # """psutil is a module providing convenience functions for managing processes in a portable way by using Python. """ __version__ = "0.3.1" version_info = tuple([int(num) for num in __version__.split('.')]) __all__ = [ # exceptions "Error", "NoSuchProcess", "AccessDenied", "Tim...
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# 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 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...
""" Return config information """ import os import re import salt.syspaths as syspaths import salt.utils.data import salt.utils.files # Set up the default values for all systems DEFAULTS = { "mongo.db": "salt", "mongo.host": "salt", "mongo.password": "", "mongo.port": 27017, "mongo.user": "", ...
#!/usr/bin/env python """These are flows designed to discover information about the host.""" from grr.client.client_actions import admin as admin_actions from grr.client.client_actions import cloud as cloud_actions from grr.client.client_actions import operating_system as operating_system_actions from grr.client.clie...
"""Manage flooding to ports on VLANs.""" # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer. # Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd. # Copyright (C) 2015--2017 The Contributors # # Licensed under th...
# -*- coding: utf-8 -*- import json import os import re from functools import partial from django import template from django.conf import settings from django.contrib.admin import helpers from django.contrib.admin.utils import quote, unquote, capfirst from django.contrib import messages from filer.admin.patched.admin_...
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # # 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 Hybrid Logic Ltd. See LICENSE file for details. """ Tests for ``admin.release``. """ import json import os from gzip import GzipFile from StringIO import StringIO import tempfile from textwrap import dedent from unittest import skipUnless from effect import sync_perform, ComposedDispatcher, base_dispat...
"""GCode Procedure""" import decimal import string try: from . import GCodeObject except SystemError: import GCodeObject class GCodeParser: """Parse the GCode into tuple with elements. Overview: This class handle str and convert it into GCodeObject.GCode. Example: 'X-12.0056' * lexical_parse() (GCo...
from django.template import RequestContext, loader from datetime import datetime, timedelta, date from dateutil.relativedelta import relativedelta from django.http import HttpResponse, HttpResponseRedirect from django.core.urlresolvers import reverse_lazy from django.conf import settings from models import ( Status...
# Copyright 2021 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, ...
import hashlib import random from rfc822 import dump_address_pair from django.contrib import admin from django.contrib.contenttypes import generic from django.core import mail from django.core.urlresolvers import NoReverseMatch, reverse from django.core.validators import email_re from django.db import models from djan...
# -*- coding: utf-8 -*- # Copyright 2011-2012 Florian von Bock (f at vonbock dot info) # # gDBPool - db connection pooling for gevent __author__ = "Florian von Bock" __email__ = "f at vonbock dot info" __version__ = "0.1.3" import gevent from gevent import monkey; monkey.patch_all() from psyco_ge import make_psycop...
# Copyright 2021 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 o...
import datetime import hashlib try: import cPickle as pickle except ImportError: import pickle from django.db import models from django.db.models.query import QuerySet from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.mail import send_mail from django.c...
""" The document module provides the Document class, which is a container for all Bokeh objects that mustbe reflected to the client side BokehJS library. """ from __future__ import absolute_import import logging logger = logging.getLogger(__file__) import uuid from six import string_types from . import _glyph_func...
#!/usr/bin/env python # -*- coding: utf-8 -*- import matplotlib.pyplot as plt import pandas as pd import numpy as np import json # 100-900, A100, A200, A400, A700 # red # pink # purple # deep purple # indigo # blue # light blue # cyan # teal # green # light green # lime # yellow # amber # orange # deep orange # brown...
# Copyright 2011 Piston Cloud Computing, 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 # # Unle...
import networkx as nx from numpy.random import random, choice, shuffle from epidag.factory import get_workshop import epidag.factory.arguments as vld from abc import ABCMeta, abstractmethod __author__ = 'TimeWizard' __all__ = ['INetwork', 'NetworkLibrary', 'NetworkSet', 'NetworkGNP', 'NetworkBA', 'NetworkPr...