gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from __future__ import division from __future__ import absolute_import import unittest from altgraph import GraphError from altgraph.Graph import Graph # 2To3-division: the / operations here are not converted to // as the results # are expected floats. class TestGraph (unittest.TestCase): def test_nodes(self): ...
import hashlib import logging import os from django.conf import settings from django.core.files.storage import default_storage as storage from django.db import transaction from celeryutils import task from PIL import Image from addons.models import AppSupport, Persona from editors.models import RereviewQueueTheme im...
# Copyright 2010 Jacob Kaplan-Moss # Copyright (c) 2011 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...
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:9332") else: access = Ser...
import os import re from ctypes import c_char_p from django.core.validators import ipv4_re from django.contrib.gis.geoip.libgeoip import GEOIP_SETTINGS from django.contrib.gis.geoip.prototypes import ( GeoIP_open, GeoIP_delete, GeoIP_database_info, GeoIP_lib_version, GeoIP_record_by_addr, GeoIP_record_by_name,...
#!/usr/bin/env python3 # Copyright (c) 2016-2021 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 the dumpwallet RPC.""" import datetime import os import time from test_framework.test_framework i...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'InternalTransfer.amount' db.add_column(u'accounting_tools...
import collections import enum import time from dataclasses import dataclass from typing import DefaultDict, Dict, List, Optional, Tuple, Union import wsproto.handshake from mitmproxy import flow, http from mitmproxy.connection import Connection, Server from mitmproxy.net import server_spec from mitmproxy.net.http imp...
import glob import logging import os import os.path from haikunator import Haikunator import yaml import psutil from brome.core.settings import BROME_CONFIG from brome.model.test import Test from brome.model.testbatch import Testbatch from brome.model.testinstance import Testinstance from brome.model.testresult impor...
""" :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> """ import logging import os import salt.modules.dpkg_lowpkg as dpkg from tests.support.mixins import LoaderModuleMockMixin from tests.support.mock import MagicMock, patch from tests.support.unit import TestCase DPKG_ERROR_MSG = """dpkg-query: package 'http...
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
import os import datetime import webapp2 import logging from google.appengine.api import users from google.appengine.api import memcache from google.appengine.ext import db from google.appengine.ext.webapp import template from google.appengine.api import taskqueue class Sprint(db.Model): name = db.StringProperty(re...
# util/compat.py # Copyright (C) 2005-2011 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 """Handle Python version/platform incompatibilities.""" import sys # Py2K import __bu...
import argparse import sys import warnings from gettext import gettext import py from _pytest.config.exceptions import UsageError FILE_OR_DIR = "file_or_dir" class Parser: """ Parser for command line arguments and ini-file values. :ivar extra_info: dict of generic param -> value to display in case ...
""" Project Name: blackjack-bot File Name: bot.py Author: Connor York (cxy1054@rit.edu) Updated: 7/20/16 Discord is a voice and chat app for gamers created by Hammer & Chisel, a startup based in Burlingame, CA. More information on Discord and Hammer & Chisel can be found through the following links: https://discor...
# Copyright 2014 Arista Networks, 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...
# 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...
''' Box Layout ========== .. only:: html .. image:: images/boxlayout.gif :align: right .. only:: latex .. image:: images/boxlayout.png :align: right :class:`BoxLayout` arranges children in a vertical or horizontal box. To position widgets above/below each other, use a vertical BoxLayout:: ...
__all__ = [ 'HTML5TreeBuilder', ] import warnings from bs4.builder import ( PERMISSIVE, HTML, HTML_5, HTMLTreeBuilder, ) from bs4.element import NamespacedAttribute import html5lib from html5lib.constants import namespaces from bs4.element import ( Comment, Doctype, NavigableString, Tag, ) class HTML5Tree...
# 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...
"""Implementation of JSONDecoder """ import re import sys import struct from simplejson.scanner import make_scanner try: _speedups = __import__('simplejson._speedups')._speedups c_scanstring = _speedups.scanstring except ImportError: c_scanstring = None __all__ = ['JSONDecoder'] FLAGS = re.VERBOSE | re.M...
# coding: utf-8 # # Copyright 2018 The Oppia 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 requi...
from __future__ import (absolute_import, division, print_function) import numpy as np import sys import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from matplotlib import rc rc('text', usetex=True) rc('font', family='serif') from .helpers.corner import corner from .helpers import Table from .find_co...
"""Imports and standardises data into crowdastro. Matthew Alger The Australian National University 2016 """ import argparse import csv import hashlib import logging import os from astropy.coordinates import SkyCoord import astropy.io.fits from astropy.io import ascii import astropy.utils.exceptions import astropy.wcs...
from __future__ import generators from sequence import * import classutil import UserDict import weakref def getAnnotationAttr(self, attr): 'forward attributes from slice object if available' return self.db.getSliceAttr(self.db.sliceDB[self.id], attr) def annotation_repr(self): if self.annotationType is...
# Copyright (c) 2014 Andrew Kerr # Copyright (c) 2015 Alex Meade # Copyright (c) 2015 Rushil Chugh # Copyright (c) 2015 Yogesh Kshirsagar # Copyright (c) 2015 Michael Price # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance w...
# coding=utf-8 # Copyright 2014 International Business Machines Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
# Author: Bichen Wu (bichen@berkeley.edu) 08/25/2016 """SqueezeDet Demo. In image detection mode, for a given image, detect objects and draw bounding boxes around them. In video detection mode, perform real-time detection on the video stream. """ from __future__ import absolute_import from __future__ import divisio...
# coding: utf-8 # In[1]: # Imports from datetime import datetime, timedelta from Database import db import numpy as np import pickle import os import re import matplotlib.pyplot as plt from keras.optimizers import RMSprop from keras.models import Sequential, load_model, Model from keras.preprocessing.text impo...
from __future__ import absolute_import, division, print_function from collections import OrderedDict import pytest import numpy as np from matplotlib.axes import Axes from mock import MagicMock, patch from numpy.testing import assert_array_equal from glue.core.tests.test_state import clone from glue.core.tests.util ...
#!/usr/bin/env python ### # Author : Conny Seidel <conny.seidel@amd.com.de> # Descr. : plot "MetaReport: XEN testing effort" # Created: 2009-09-28 # Updated: 2009-12-05 ### ''' Plot timely overview of XEN testing effort ''' import re import simplejson import socket from matplotlib.pylab import * from matplotlib.color...
# 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 compliance with the License. You may obtain # a ...
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
#!/usr/bin/python # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import imp import os import re import shutil import shlex import subprocess import sys ...
#!/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...
#!/usr/bin/env python # CREATED:2014-01-18 14:09:05 by Brian McFee <brm2132@columbia.edu> # unit tests for util routines # Disable cache import os try: os.environ.pop('LIBROSA_CACHE_DIR') except: pass import platform import numpy as np import scipy.sparse from nose.tools import raises, eq_ import six import w...
# -*- coding: utf-8 -*- # See the NOTICE file distributed with this work for additional information # regarding copyright ownership. # # 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 # # ...
from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render, get_object_or_404 from django.template import loader from django import forms from bitmsgapi.models import OutMessage, Address, Identity, Message import xmlrpclib import json import datetime #TODO: move stuff like this to a...
# 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...
# -*- coding: utf-8 -*- """Find depressions on a topographic surface. .. codeauthor:: gtucker, DEJH (Flow routing) """ # Routing by DEJH, Oct 15. from __future__ import print_function import numpy as np from landlab import (ModelParameterDictionary, Component, FieldError, FIXED_VALUE_BOUNDARY, CL...
from __future__ import absolute_import, division import re import traceback from bs4 import BeautifulSoup import dateutil.parser from django.utils import timezone import stripe from actstream import action from users import udemy_scraping from users.coursera_scraping import CourseraDownloader from users.edx_scraping ...
#!/usr/bin/env python from pylab import * from keyboard_reader import * import sensel import math import copy import pickle with open("dict.txt") as word_file: english_words = set(word.strip().lower() for word in word_file) keys_pressed = { 'a': 0, 'b': 0, 'c': 0, 'd': 0, 'e': 0, 'f': 0, ...
import os import sys import time import exceptions import copy import logging from threading import Thread, Lock import uuid try: import cPickle as pickle except: import pickle ''' @author: msune,lbergesio,omoya,cbermudo,CarolinaFernandez @organization: i2CAT, OFELIA FP7 PolicyEngine RuleTable class...
import json from django.contrib.auth.models import User from django.test.client import Client from django.test import TestCase from rest_framework.test import APIClient from cyder.api.authtoken.models import Token from cyder.base.eav.models import Attribute, EAVBase from cyder.base.eav.constants import ATTRIBUTE_INVEN...
# -*- coding: utf-8 -*- from hyperframe.frame import ( Frame, Flags, DataFrame, PriorityFrame, RstStreamFrame, SettingsFrame, PushPromiseFrame, PingFrame, GoAwayFrame, WindowUpdateFrame, HeadersFrame, ContinuationFrame, AltSvcFrame, ExtensionFrame ) from hyperframe.exceptions import ( UnknownFrameError,...
""" Unit tests for django-invitation. These tests assume that you've completed all the prerequisites for getting django-invitation running in the default setup, to wit: 1. You have ``invitation`` in your ``INSTALLED_APPS`` setting. 2. You have created all of the templates mentioned in this application's documenta...
""" Our mobile app shows a feed of information to the user. This module compiles that data, and exposes some utilities to construct that information. """ import pickle import random from collections import Counter from datetime import timedelta from django.contrib.auth import get_user_model from django.core.cache im...
from __future__ import print_function from contextlib import contextmanager import string import subprocess import sys import tempfile from google.cloud import bigquery as gcbq from google.cloud.exceptions import Conflict, NotFound from six import reraise import pandas as pd from django.conf import settings from dj...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# Copyright 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 optparse import os import signal import subprocess import sys import tempfile import py_utils from devil.android import device_temp_f...
""" sentry.templatetags.sentry_helpers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ # XXX: Import django-paging's template tags so we don't have to worry about # INSTALLED_APPS import datetime from...
# Copyright (c) 2015-2018 Cisco Systems, Inc. # # 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...
# =============================================================================== # Copyright 2015 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
# coding: utf-8 """ Vericred API Vericred's API allows you to search for Health Plans that a specific doctor accepts. ## Getting Started Visit our [Developer Portal](https://developers.vericred.com) to create an account. Once you have created an account, you can create one Application for Production and an...
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # 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, modi...
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utility functions for Windows builds. These functions are executed via gyp-win-tool when using the ninja generator. """ import os impor...
#!/usr/bin/env python # -*- coding: utf-8 -*- #tutorial from http://www.dototot.com/how-to-write-a-twitter-bot-with-python-and-tweepy/ import tweepy, time, sys, Queue, pprint, argparse, copy from linguistics import hard_string_similarity, make_rhyme, make_same_syl_count, normalize_word, remove_punctuation # from ppri...
from tests.app.helpers import BaseApplicationTest from flask import json from datetime import datetime from app.models import AuditEvent from app import db from dmutils.audit import AuditTypes from nose.tools import assert_equal, assert_in class TestAudits(BaseApplicationTest): def setup(self): super(Tes...
# 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...
# coding=utf-8 # Copyright 2022 The Robustness Metrics 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 appli...
# -*- coding: utf-8 -*- """ pygments.lexers.business ~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for "business-oriented" languages. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, words, ...
import tensorflow as tf # neural network for function approximation import gym # environment import numpy as np # matrix operation and math functions from gym import wrappers import gym_morph # customized environment for cart-pole import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import time star...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from cytoolz.functoolz import (thread_first, thread_last, memoize, curry, compose, pipe, complement, do, juxt) from cytoolz.functoolz import _num_required_args from operator import add, mul, itemgetter from cytoolz.utils import raises from functools import partial from cytoolz.compatibility...
""" Cylindrical & Spherical Colour Models ===================================== Defines various cylindrical and spherical colour models: - :func:`colour.RGB_to_HSV` - :func:`colour.HSV_to_RGB` - :func:`colour.RGB_to_HSL` - :func:`colour.HSL_to_RGB` - :func:`colour.RGB_to_HCL` - :func:`colour.HCL_to_RGB` ...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # MIT License. See license.txt from __future__ import unicode_literals """ Boot session from cache or build Session bootstraps info needed by common client side activities including permission, homepage, control panel variables, system defaults etc """ import we...
# # 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...
from __future__ import print_function, division import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from lib import replay_memory from common import load_annotations, numpy_to_tk_image import Tkinter from collections import OrderedDict import imgaug as ia import cPickle as pickle clas...
from __future__ import absolute_import, unicode_literals from datetime import datetime from django.core.exceptions import ObjectDoesNotExist from django.db.models.fields import Field, FieldDoesNotExist from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature from django.utils import six from django.util...
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess import string from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_NAME = os.path.basename(SCRIPT_DIR) PARAMETERS = None XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=u...
#!/usr/bin/env python import os try: __IPYTHON__ import sys del sys.argv[1:] except: pass import srwl_bl import srwlib import srwlpy import math import srwl_uti_smp def set_optics(v, names=None, want_final_propagation=True): el = [] pp = [] if not names: names = ['M1', 'M1_Grating'...
# -*- coding: utf-8 -*- """ Base classes for writing management commands (named commands which can be executed through ``django-admin`` or ``manage.py``). """ from __future__ import unicode_literals import os import sys from argparse import ArgumentParser import django from django.core import checks from django.core....
# Copyright (c) 2015, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals, absolute_import import sys import os import json import click import hashlib import cProfile import StringIO import pstats import frappe import frappe.utils from frappe.utils ...
#!/usr/bin/env python ########################################################################## # # Copyright 2009 VMware, Inc. # Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. # All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and a...
from django.core.management.base import BaseCommand import json from types import SimpleNamespace from floreal import models as m import sys from markdown import markdown from django.db import IntegrityError, DataError def get_dump(filename): print(f" * reading content of {filename}") with open(filename) as f...
# 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...
#!/usr/bin/env python3 # Copyright (c) 2014-2019 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 the REST API.""" from decimal import Decimal from enum import Enum from io import BytesIO import ...
import os import unittest from pymatgen.analysis.ferroelectricity.polarization import * from pymatgen.core.structure import Structure from pymatgen.io.vasp.inputs import Potcar from pymatgen.io.vasp.outputs import Outcar from pymatgen.util.testing import PymatgenTest test_dir = os.path.join(PymatgenTest.TEST_FILES_D...
#!/usr/bin/env python # Licensed under the Apache License, Version 2.0 from utils import * #constants WAV_WIDTH = int(WINSIZE[0] / 5) MOD_WIDTH = int(WINSIZE[0] / 5) SG_HEIGHT = int(WINSIZE[1] / 5) FADEIN_LENGTH = 69 FADEOUT_LENGTH = 120 # Audio mod generator class Fractal(ScreenPart, ComplexPlane): def __init_...
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import functools import os import re import shutil import subprocess import xml.etree.ElementTree as ET from abc import abstractmethod from contextlib import contextmanager from pants.bas...
# MIT License # # Copyright (c) 2017 # # 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, di...
#!/usr/bin/env python2.6 ''' 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 "Licens...
import os import sys import re import copy import simplejson as json from cuddlefish.bunch import Bunch MANIFEST_NAME = 'package.json' DEFAULT_LOADER = 'api-utils' DEFAULT_PROGRAM_MODULE = 'main' DEFAULT_ICON = 'icon.png' DEFAULT_ICON64 = 'icon64.png' METADATA_PROPS = ['name', 'description', 'keywords', 'author',...
#!/usr/bin/env python from contextlib import contextmanager import argparse import sys import sshtunnel from sqlalchemy import * from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from fermi_blind_search.configuration import get_config from fermi_blind_search import myLoggi...
""" This module adds improved support for Microsoft Visual C++ compilers. """ import os import sys import platform import itertools import distutils.errors from distutils.version import StrictVersion from setuptools.extern.six.moves import filterfalse if platform.system() == 'Windows': from setuptools.extern.six....
# 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...
#!/usr/bin/env python # # generateOctreeFromObj.py # Core3D # # Created by CoreCode on 16.11.07. # Copyright 2007 - 2012 CoreCode. Licensed under the MIT License, see LICENSE.txt # import sys from struct import * from vecmath import * TEXTURING = 1 GENTEX = 0 MAX_FLOAT = 1e+308 MIN_FLOAT = -1e308 MAX_USHORT = 0xF...
""" 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 ...
# Autoreloading launcher. # Borrowed from Peter Hunt and the CherryPy project (http://www.cherrypy.org). # Some taken from Ian Bicking's Paste (http://pythonpaste.org/). # # Portions copyright (c) 2004, CherryPy Team (team@cherrypy.org) # All rights reserved. # # Redistribution and use in source and binary forms, with ...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/env python from . import _import from .. import Modifiers from .bodydeclaration import BodyDeclaration from ..stmt.switchstmt import SwitchStmt from ..stmt.blockstmt import BlockStmt from ..stmt.expressionstmt import ExpressionStmt from ..stmt.returnstmt import ReturnStmt from ..expr.conditionalexpr impor...
# Copyright (c) 2012-2016 Hewlett Packard Enterprise Development LP # # Redistribution and use of this software 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, # thi...
#!/usr/bin/python # ---------------------------------------------------------------------------- # cocos "luacompile" plugin # # Copyright 2013 (C) Intel # # License: MIT # ---------------------------------------------------------------------------- ''' "luacompile" plugin for cocos command line tool ''' __docformat_...
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Module containing the test stages.""" import logging import os from chromite.cbuildbot import commands from chromite.cbuildbot import cbuildbot_c...
"""Isomap for manifold learning""" # Author: Jake Vanderplas -- <vanderplas@astro.washington.edu> # License: BSD 3 clause (C) 2011 import numpy as np from ..base import BaseEstimator, TransformerMixin from ..neighbors import NearestNeighbors, kneighbors_graph from ..utils import check_array from ..utils.graph import...
# Copyright 2020 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2015 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 by applicable law or a...
from MpfTestCase import MpfTestCase class TestEventManager(MpfTestCase): def __init__(self, test_map): super(TestEventManager, self).__init__(test_map) self._handler1_args = tuple() self._handler1_kwargs = dict() self._handler1_called = 0 self._handler2_args = tuple() ...
from __future__ import absolute_import import collections import copy import logging import random import sys import time from kafka.vendor import six import kafka.errors as Errors from kafka.future import Future from kafka.metrics.stats import Avg, Count, Max, Rate from kafka.protocol.fetch import FetchRequest from...
"""Support for Homekit covers.""" import logging from homeassistant.components.cover import ( ATTR_POSITION, ATTR_TILT_POSITION, SUPPORT_CLOSE, SUPPORT_CLOSE_TILT, SUPPORT_OPEN, SUPPORT_OPEN_TILT, SUPPORT_SET_POSITION, SUPPORT_STOP, SUPPORT_SET_TILT_POSITION, CoverDevice) from homeassistant.const import ( ...