gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/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. import os import re import unittest import PRESUBMIT class MockInputApi(object): def __init__(self): self.re = re self...
""" Helper functions for connecting to the Quilt Registry. """ import json import os import platform import stat import subprocess import sys import time import botocore.session import pkg_resources import requests from botocore.credentials import ( CredentialProvider, CredentialResolver, RefreshableCrede...
from flask import Flask, render_template, request, abort, jsonify from flask import Markup from monsit import db import datetime import json app = Flask(__name__) class HostInfo(object): def __init__(self, host_id, name, is_connected, last_update_time): self.id = host_id self.name = name ...
# 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...
# -*- test-case-name: twisted.web.test.test_web -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ This is a web-server which integrates with the twisted.internet infrastructure. """ from __future__ import division, absolute_import import copy import os try: from urllib import quote ...
#This file is only to be run by celery from __future__ import absolute_import import datetime import json from lib.celery import app as celery from pymongo import MongoClient #Access the database for the files client = MongoClient() db = client["files"] entries = db["entries"] SUPPORTED_FORMATS = ".txt or .j...
# Copyright 2011-2021 Rumma & Ko Ltd # License: GNU Affero General Public License v3 (see file COPYING for details) # import logging ; logger = logging.getLogger(__name__) import inspect import copy from django.conf import settings from django.db.models.signals import class_prepared from django.core.exceptions impor...
# # 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...
# See file COPYING distributed with sjs for copyright and license. import os import sys import traceback import signal import string import datetime import time import subprocess import sqlite3 class SJSError(Exception): """base class for ssggee errors derived classes should define __str__ in a way that is ...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. import gc import StringIO, sys, types from twisted.trial import unittest, runner from twisted.scripts import trial from twisted.python import util, deprecate, versions from twisted.python.compat import set from twisted.python.filepath import File...
#!/usr/bin/python # Copyright (c) 2009 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. ''' Runs various chrome tests through heapcheck_test.py. Most of this code is copied from ../valgrind/chrome_tests.py. TODO(glider): ...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst __all__ = ['quantity_input'] import inspect from numbers import Number from collections.abc import Sequence from functools import wraps import numpy as np from . import _typing as T from .core import (Unit, UnitBase, UnitsError,...
#!/usr/bin/env python """ Since one might not only be interested in the individual (hyper-)parameters of a bayesloop study, but also in arbitrary arithmetic combinations of one or more (hyper-)parameters, a parser is needed to compute probability values or distributions for those derived parameters. """ from __future_...
from operator import methodcaller from typing import ( Callable, Dict, List, Type, TypeVar, Union, Optional, ) from configargparse import Namespace from .event import Events from .exception import RunnerAlreadyExistsError from .stats import RequestStats from .runners import Runner, LocalRu...
import numpy import fractions import math import sympy from functools import reduce def rotate(l, n): return l[n:] + l[:n] class Attractor: # TODO: Use a general class for attractors (everywhere) def __init__(self, states): largest_ind = max(list(range(len(states))), key=lambda t: order_key_func...
import weakref, sys from rpython.rlib.rstrategies import logger from rpython.rlib import jit, objectmodel, rerased from rpython.rlib.objectmodel import specialize def make_accessors(strategy='strategy', storage='storage'): """ Instead of using this generator, the methods can be implemented manually. A thi...
import copy import logging import os import requests import smtplib import socket import subprocess import sys from email.mime.text import MIMEText import teuthology.lock.query import teuthology.lock.util from teuthology import repo_utils from teuthology.config import config from teuthology.exceptions import BranchN...
# coding=utf-8 # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import ast import inspect import logging from abc import abstractproperty from builtins i...
import numpy as np import rdkit import tensorflow as tf from tensorflow.python.framework import test_util from deepchem.feat.graph_features import ConvMolFeaturizer from deepchem.feat.mol_graphs import ConvMol from deepchem.models.tensorgraph.layers import Add, MaxPool2D, MaxPool3D, GraphCNN, GraphEmbedPoolLayer, Cast...
# VNWA Control from a Python Appliction # Copyright 2013 Colin O'Flynn # # Released under MIT License: # 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 l...
from JumpScale import j base = j.tools.cuisine._getBaseClass() class CuisinePNode(base): def __init__(self, executor, cuisine): self._executor = executor self._cuisine = cuisine self.defaultArch = ['amd64', 'i686'] @property def hwplatform(self): """ example: h...
""" STARBURST ACC/FEANTA GeoBrick Worker Author: Lokbondo Kung Email: lkkung@caltech.edu """ import i_worker import socket import struct # Description of the GeoBrick device. Currently hard-coded. BRICK_HOSTNAME = 'geobrickanta.solar.pvt' BRICK_PORT = 1025 BRICK_TIMEOUT = 0.5 # Program spaces that can be...
# -*- coding: utf-8 -*- from __future__ import (absolute_import, unicode_literals) """ A Python Singleton mixin class that makes use of some of the ideas found at http://c2.com/cgi/wiki?PythonSingleton. Just inherit from it and you have a singleton. No code is required in subclasses to create singleton behavior -- ...
import base64 import calendar import datetime import re import unicodedata from binascii import Error as BinasciiError from email.utils import formatdate from urllib.parse import ( ParseResult, SplitResult, _coerce_args, _splitnetloc, _splitparams, quote, quote_plus, scheme_chars, unquote, unquote_plus, url...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Based on Jimmy Tang's implementation DOCUMENTATION = ''' --- module: keystone_user version_added: "1.2" short_description: Manage OpenStack Identity (keystone) users, tenants and roles description: - Manage users,tenants, roles from OpenStack. options: login_user:...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # 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 (t...
""" aggregation.py contains utility functions to handle multiple named and lambda kwarg aggregations in groupby and DataFrame/Series aggregation """ from collections import defaultdict from functools import partial from typing import ( TYPE_CHECKING, Any, Callable, DefaultDict, Dict, Iterable, ...
# -*- coding: utf-8 -*- # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
from __future__ import absolute_import import logging import os import re import shutil import sys import tempfile import warnings import zipfile from distutils.util import change_root from distutils import sysconfig from email.parser import FeedParser from pip._vendor import pkg_resources, six from pip._vendor.dist...
# 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 ...
import atexit import functools import socket import warnings import weakref import time # So that 'setup.py doc' can import this module without Tornado or greenlet requirements_satisfied = True try: from tornado import iostream, ioloop except ImportError: requirements_satisfied = False warnings.warn("Torna...
# 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 absolute_import __author__ = 'katharine' from six.moves import range from six import iteritems import bz2 import errno import json import logging import os import os.path import platform import shutil import signal import socket import subprocess import sys import tempfile import time from lib...
import sys import inspect from collections import namedtuple from functools import update_wrapper if sys.version_info < (3,): # Python 2 from httplib import responses as http_reasons from cStringIO import StringIO as BytesIO from urlparse import urlparse, parse_qsl def _exec(code, g): exec...
from crowdsourcing.forms import * from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render from rest_framework import views as rest_framework_views from rest_framework.views import APIView from rest_framework.renderers import JSONRenderer from crowdsourcing.serializers.user import ...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe.utils.background_jobs import enqueue from frappe.utils import get_url, get_datetime from frappe.desk.form.util...
import logging import urllib import time import os import json import asyncio import itertools from .base import ProviderBase, ProviderSearchResultBase, ProviderError from ..toolbox import db from ..toolbox.net import download from ..toolbox.utils import tostr from ..config import config __all__ = ['Provider'] log =...
"""Content that is specific to Annotation IODs.""" from copy import deepcopy from typing import cast, List, Optional, Sequence, Tuple, Union import numpy as np from pydicom.dataset import Dataset from pydicom.sr.coding import Code from highdicom.ann.enum import ( AnnotationCoordinateTypeValues, AnnotationGrou...
import unittest from kivy.vector import Vector from operator import truediv class VectorTestCase(unittest.TestCase): def test_initializer_oneparameter_as_list(self): vector = Vector([1]) self.assertEqual(vector.x, 1) with self.assertRaises(IndexError): vector.y def test_i...
# Copyright (c) 2013 NTT DOCOMO, 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 requ...
'''Vector ====== The :class:`Vector` represents a 2D vector (x, y). Our implementation is made in top of a Python list. Exemple for constructing a Vector:: >>> # Construct a point at 82,34 >>> v = Vector(82, 34) >>> v[0] 82 >>> v.x 82 >>> v[1] 34 >>> v.y 34 >>> # Construc...
# coding=utf-8 """ License/Disclaimer ------------------ Copyright 2016 Brian Romanchuk Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless requ...
from __future__ import annotations from logging import addLevelName import numpy as np import ray import riip import scipy.special as ssp from scipy.optimize import minimize, root from pymwm.cutoff import Cutoff from pymwm.utils import coax_utils, eig_mat_utils from pymwm.waveguide import Sampling class Samples(Sa...
from __future__ import absolute_import import time import re import six from datetime import datetime, timedelta from django.conf import settings from django.db import models from django.db.models.loading import get_model from .fields import JSONField from .utils import setting AUTH_USER_MODEL = settings.AUTH_USER...
import os import requests import smtplib import pyexcel import pyexcel.ext.xlsx from email import Encoders from email.MIMEBase import MIMEBase from email.MIMEText import MIMEText from email.MIMEMultipart import MIMEMultipart from email.MIMEImage import MIMEImage from django.conf import settings from django.db import t...
#!/usr/bin/env python # Copyright 2015 Netherlands eScience Center <info@esciencecenter.nl> # # 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...
# Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Backend to retrieve the video streams from Shoutcast TV # Copyright 2007, Frank Scholz <coherence@beebits.net> # Copyright 2008,2009 Jean-Michel Sizun <jmDOTsizunATfreeDOTfr> from twisted.internet import defer, reactor from twisted.w...
#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ ...
import base64 import calendar import datetime import re import unicodedata import warnings from binascii import Error as BinasciiError from email.utils import formatdate from urllib.parse import ( ParseResult, SplitResult, _coerce_args, _splitnetloc, _splitparams, quote, quote_plus, scheme_chars, unquote, unquo...
# # Copyright (C) 2016 UAVCAN Development Team <uavcan.org> # # This software is distributed under the terms of the MIT License. # # Author: Pavel Kirienko <pavel.kirienko@zubax.com> # import time import pyuavcan_v0 import logging import queue from PyQt5.QtWidgets import QWidget, QDialog, QPlainTextEdit, QSpinBox, Q...
""" Central control loop ==================== An implementation of the control loop. """ import logging, json log = logging.getLogger() from . import atcommands as at from . import navdata from . import videopacket class ConnectionError(Exception): """A class used to represent a connection error to the drone. ...
# Copyright 2018 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 agreed to in writing, ...
"""TemplateEntity utility class.""" from __future__ import annotations from collections.abc import Callable import contextlib import itertools import logging from typing import Any import voluptuous as vol from homeassistant.const import ( ATTR_ENTITY_ID, CONF_ENTITY_PICTURE_TEMPLATE, CONF_FRIENDLY_NAME,...
from befh.restful_api_socket import RESTfulApiSocket from befh.exchanges.gateway import ExchangeGateway from befh.market_data import L2Depth, Trade from befh.instrument import Instrument from befh.util import Logger import time import threading from functools import partial from datetime import datetime class ExchGwK...
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Bruno Cauet. # # 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 ...
# -*- coding: utf-8 -*- """ DICS for power mapping ====================== In this tutorial, we'll simulate two signals originating from two locations on the cortex. These signals will be sinusoids, so we'll be looking at oscillatory activity (as opposed to evoked activity). We'll use dynamic imaging of coherent sourc...
# Copyright (c) 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 agreed to...
# 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...
# Copyright (c) 2011 - 2017, Intel Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
import os import subprocess import re objdump_path = "/usr/i386-linux-cgc/bin/objdump" objdump_options = ["-d", "--insn-width=20"] #we use a long insn width so we can figure out the length of the insn objdump_header_options = ["-h"] dump_ext = ".dump" bin_path = "bin" build_path = "build" cb = "YAN01_00016" cb_path ...
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
import unittest import autocomplete_light.shortcuts as autocomplete_light import django from django.contrib.auth.models import User from django.db import models from django.test import TestCase class Noname(models.Model): number = models.CharField(max_length=100) class Foo(models.Model): name = models.Char...
# -*- coding: utf-8 -*- # (c) 2009-2022 Martin Wendt and contributors; see WsgiDAV https://github.com/mar10/wsgidav # Original PyFileServer (c) 2005 Ho Chun Wei. # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license.php """ Implements two property managers: one in-memory (dict-based), and o...
try: from urllib.request import urlopen from urllib.error import HTTPError except ImportError: from urllib2 import urlopen, HTTPError from ceph_deploy import exc import logging import re import socket from ceph_deploy.lib import remoto LOG = logging.getLogger(__name__) # TODO: at some point, it might b...
# # 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...
""" The Message class represents a message that is sent or received and contains methods for publishing the message, or in the case that the message was delivered by RabbitMQ, acknowledging it, rejecting it or negatively acknowledging it. """ import datetime import json import logging import math import time import pp...
"""Tests for certbot.client.""" import os import shutil import tempfile import unittest import OpenSSL import mock from acme import jose from certbot import account from certbot import errors from certbot import util from certbot.tests import test_util KEY = test_util.load_vector("rsa512_key.pem") CSR_SAN = test_...
""" Users ===== """ from pipes import quote import posixpath import random import string from fabric.api import hide, run, settings, sudo, local import six from fabtools.group import ( exists as _group_exists, create as _group_create, ) from fabtools.files import uncommented_lines from fabtools.utils import ...
import collections.abc import difflib import itertools import re import textwrap import traceback import typing from mitmproxy.proxy import commands, context, layer from mitmproxy.proxy import events from mitmproxy.connection import ConnectionState from mitmproxy.proxy.events import command_reply_subclasses from mitmp...
# Copyright (c) 2015 VMware, 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...
# Tests some corner cases with isinstance() and issubclass(). While these # tests use new style classes and properties, they actually do whitebox # testing of error conditions uncovered when using extension types. import unittest from test import test_support import sys class TestIsInstanceExceptions(unittest.Tes...
import argparse import json import logging import os import pprint import random import requests import time import ai import config def setup_args(): parser = argparse.ArgumentParser('Mech-AI Client') parser.add_argument('-u', '--username', nargs=1) parser.add_argument('-t', '--token', nargs=1) arg...
# -*- coding: utf-8 -*- """ abm.xypops ~~~~~~~~~~ Environments not backed by networkx whose x, y traits are used in visualization """ from scipy.stats.distributions import norm from scipy.stats.distributions import uniform from sklearn.metrics.pairwise import euclidean_distances from abm.viz import displ...
"""Docker Sproc """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import os import socket import sys import time import click import docker import six from treadmill import cli from treadmill import...
#!/usr/bin/env python2.7 -B from fnmatch import fnmatch from glob import glob from logging import debug, info, error from os import path import contextlib from distutils import spawn, sysconfig import os import shutil import site import subprocess import sys import tarfile import tempfile from urllib.request import ur...
import sys import unittest import decimal import os.path from datetime import datetime from pyorient import PyOrientCommandException, PyOrientSQLParsingException from pyorient.ogm import Graph, Config from pyorient.groovy import GroovyScripts from pyorient.ogm.declarative import declarative_node, declarative_relation...
from SPARQLWrapper import SPARQLWrapper, JSON # from __init__ import QUERY_LIMIT QUERY_LIMIT="" import pandas as pd import numpy as np def run_query_with_datatype(query=None, endpoint=None, datatype=None): """ :param query: raw SPARQL query :param endpoint: endpoint source that hosts the data :param...
from typing import List from typing import Optional from sqlalchemy import Boolean from sqlalchemy import ForeignKey from sqlalchemy import inspect from sqlalchemy import Integer from sqlalchemy import String from sqlalchemy import testing from sqlalchemy.orm import clear_mappers from sqlalchemy.orm import declared_at...
#!/usr/bin/env python # Copyright (c) 2015, Job Snijders # Copyright (c) 2015, NORDUnet A/S # # This file is part of IRR Explorer # # 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 mus...
# # Copyright (c) 2014 Tom Carroll # # 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, dis...
# Copyright (c) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
# stdlib import copy import inspect from itertools import product import logging import os from pprint import pformat import signal import sys import time import traceback import unittest # project from checks import AgentCheck from config import get_checksd_path try: from util import get_hostname, get_os except ...
# Copyright 2013 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 atexit import logging import re from devil.android import device_errors logger = logging.getLogger(__name__) _atexit_messages = set() # Defines how...
# -*- coding: utf-8 -*- # MIT license # # Copyright (C) 2015-2019 by XESS Corp. # # 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...
# Copyright 2015 The Meson development team # 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 ...
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Bitcoin test...
import mock import pytest from addict import Dict from paasta_tools import utils from paasta_tools.frameworks import adhoc_scheduler from paasta_tools.frameworks import native_scheduler from paasta_tools.frameworks.native_service_config import NativeServiceConfig from paasta_tools.frameworks.native_service_config impo...
try: from unittest2 import TestCase from mock import Mock, mock except ImportError: from unittest import TestCase from mock import Mock, mock import six from cfn_sphere.exceptions import TemplateErrorException from cfn_sphere.template import CloudFormationTemplate from cfn_sphere.template.transformer ...
import hashlib import json import os import subprocess from django.conf import settings from django.core.exceptions import PermissionDenied from django.http import (HttpResponse, HttpResponseBadRequest, HttpResponseNotFound, HttpResponseServerError) from django.shortcuts import render from dja...
# All fields except for BlobField written by Jonas Haag <jonas@lophus.org> from django.db import models from django.core.exceptions import ValidationError from django.utils.importlib import import_module __all__ = ('RawField', 'ListField', 'DictField', 'SetField', 'BlobField', 'EmbeddedModelField') class ...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from python_pachyderm.proto.v2.identity import identity_pb2 as python__pachyderm_dot_proto_dot_v2_dot_identity_dot_identity__pb2 class APIStub(object): """...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe import json import random from frappe.model.document import Document class DesktopIcon(Document): def validate(self): ...
import numpy as np from collections import OrderedDict from copy import deepcopy import os import pycqed.analysis_v2.base_analysis as ba from pycqed.analysis import analysis_toolbox as a_tools from pycqed.analysis import measurement_analysis as ma_old import pygsti from pycqed.measurement.gate_set_tomography.pygsti_hel...
from vtk.vtkCommonDataModel import vtkDataObject from vtk.vtkCommonExecutionModel import vtkAlgorithm from vtk.vtkCommonExecutionModel import vtkDemandDrivenPipeline from vtk.vtkCommonExecutionModel import vtkStreamingDemandDrivenPipeline from vtk.vtkFiltersPython import vtkPythonAlgorithm class VTKAlgorithm(object): ...
# -*- coding: utf-8 -*- """ collectr.models --------------- This module contains the main models used by collectr. :copyright: (c) 2013 Cory Benfield :license: MIT License, see LICENSE for details. """ from .utils import (tree_walk, match_regexes, move_path, minified_filename, get_extension, defa...
# # lascanopyPro.py # # (c) 2013, martin isenburg - http://rapidlasso.com # rapidlasso GmbH - fast tools to catch reality # # uses lascanopy.exe to generate forestry metrics # # LiDAR input: LAS/LAZ/BIN/TXT/SHP/BIL/ASC/DTM # raster output: BIL/ASC/IMG/TIF/DTM/PNG/JPG # # for licensing see http://lastools.org/LICE...
import numpy as np class Node(object): """ Base class for nodes in the network. Arguments: `inbound_nodes`: A list of nodes with edges into this node. """ def __init__(self, inbound_nodes=[]): """ Node's constructor (runs when the object is instantiated). Sets pro...
# 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 ...
# coding: utf-8 import os from lxml import etree as ET import time import shortuuid import uuid from PIL import Image import exifread import shutil import sys import traceback from subprocess import Popen, PIPE #from http://stackoverflow.com/questions/14996453/python-libraries-to-calculate-human-readable-filesize-fro...
# 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 th...