gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import os import sys import json import tempfile import shutil import hashlib import glob import textwrap from subprocess import call, check_output, CalledProcessError from optparse import make_option import debug # pyflakes:ignore from django.core.management.base import BaseCommand 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 ...
# -*- coding: utf-8 -*- import httplib as http import contextlib import mock from nose.tools import * # flake8: noqa import re from tests.base import ApiTestCase, DbTestCase from tests import factories from tests.utils import make_drf_request from api.base.settings.defaults import API_BASE from api.base.serializers...
"Supporting objects and functions to convert Matplotlib objects into Bokeh." #----------------------------------------------------------------------------- # Copyright (c) 2012 - 2014, Continuum Analytics, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.t...
# 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 ...
from __future__ import print_function, division from sympy.core.add import Add from sympy.core.compatibility import is_sequence from sympy.core.containers import Tuple from sympy.core.expr import Expr from sympy.core.mul import Mul from sympy.core.relational import Equality, Relational from sympy.core.singleton import...
# Copyright 2015 IBM Corp. 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
# -*- coding: utf-8 -*- """ .. module:: pytfa :platform: Unix, Windows :synopsis: Thermodynamics-based Flux Analysis .. moduleauthor:: pyTFA team MILP-fu to reformulate problems """ import sympy # import optlang from collections import namedtuple from .variables import LinearizationVariable from .constraints i...
# Licensed to the StackStorm, Inc ('StackStorm') 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 th...
# # Copyright Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://aws.amazon.com/apache2.0 # # or in the "license" file accompanyi...
# Copyright 2015, 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 f...
#!/usr/bin/env python # -*- coding: UTF-8 -*- import numpy as np import tensorflow as tf import argparse import os from tensorpack import * from tensorpack.tfutils.symbolic_functions import * from tensorpack.tfutils.summary import * from tensorpack.tfutils.varreplace import remap_variables from dorefa import get_do...
# -*- 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 2016 gRPC 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 applicable law or agreed to in writing...
"""Implements the command line interface. """ from __future__ import absolute_import from __future__ import unicode_literals import sys from os import path import argparse if hasattr(argparse, '__version__') and argparse.__version__ < '1.1': raise RuntimeError('Needs at least argparse 1.1 to function, you are '+...
from kivy.app import App from kivy.factory import Factory from kivy.properties import ObjectProperty from kivy.lang import Builder from electrum_cesc.util import base_units from electrum_cesc.i18n import languages from electrum_cesc_gui.kivy.i18n import _ from electrum_cesc.plugins import run_hook from electrum_cesc.b...
from flask import Flask, Response, render_template, request import json from subprocess import Popen, PIPE import os from tempfile import mkdtemp from werkzeug import secure_filename app = Flask(__name__) @app.route("/") def index(): return """ Available API endpoints: GET /containers List al...
from ..utils import type_from_ast, is_valid_literal_value from ..error import GraphQLError from ..type.definition import is_composite_type, is_input_type, is_leaf_type, GraphQLNonNull from ..language import ast from ..language.visitor import Visitor, visit from ..language.printer import print_ast class ValidationRule...
"""Custom tkinter frames that hold multiple widgets plus capabilities to store data and send it to a callback. Provides the following classes: * _ToolBar: A base class for creating toolbars, intended to be subclassed and extended. * FirstOrderBar: holds numerical inputs required for first-order simulation ...
# -*- coding: utf-8 -*- # 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...
import numpy as np from numpy.testing import run_module_suite, assert_array_equal, assert_raises from skimage import img_as_ubyte, img_as_uint, img_as_float from skimage import data, util from skimage.morphology import cmorph, disk from skimage.filter import rank def test_random_sizes(): # make sure the size is ...
import itertools import heapq import collections import operator from functools import partial from random import Random from .compatibility import map, filterfalse, zip, zip_longest, iteritems, filter from .utils import no_default __all__ = ('remove', 'accumulate', 'groupby', 'merge_sorted', 'interleave', ...
# -*- coding: utf-8 -*- from __future__ import print_function, absolute_import import os import win32api import win32con import win32gui_struct try: import winxpgui as win32gui except ImportError: import win32gui import itertools import glob from ava.shell import resource_path from ava.shell.base import S...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
from __future__ import unicode_literals import logging from django.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _, ugettext from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse from django.contrib.redirects.m...
# -*- coding: utf-8 -*- import hmac import json import time import unittest from base64 import b64encode, b64decode from aiorest_ws.auth.token.managers import JSONWebTokenManager from aiorest_ws.auth.token.exceptions import ParsingTokenException, \ InvalidSignatureException, TokenNotBeforeException, TokenExpiredE...
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
from __future__ import division, print_function, absolute_import import numpy as np import scipy.linalg from scipy.sparse import csc_matrix from scipy.optimize._trustregion_constr.projections \ import projections, orthogonality from numpy.testing import (TestCase, assert_array_almost_equal, ...
from sympy import (log, sqrt, Rational as R, Symbol, I, exp, pi, S, cos, sin, Mul, Pow, O) from sympy.simplify.radsimp import expand_numer from sympy.simplify.simplify import expand from sympy.core.function import expand_multinomial, expand_power_base from sympy.core.compatibility import range from sympy.utilities...
# -*- coding: utf-8 -*- # Copyright 2018 Sebastian Semper, Christoph Wagner # https://www.tu-ilmenau.de/it-ems/ # # 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....
from SimPEG import Mesh, Regularization, Maps, Utils, EM from SimPEG.EM.Static import DC import numpy as np import matplotlib.pyplot as plt #%matplotlib inline import copy import pandas as pd from scipy.sparse import csr_matrix, spdiags, dia_matrix,diags from scipy.sparse.linalg import spsolve from scipy.stats import...
from data import datasets from easyminercenter.lib.api import * import logging import sys import getopt logging.basicConfig(stream=sys.stdout, level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') API_URL = '' API_KEY = '' USE_AUTO_CONF_SUPP = False USE_CBA = False MAX_RULES_COUNT = 10000 MIN_CONFID...
""" The merger of argparse and cmd goes here. This holds the main base class used by all commands. """ import collections import functools import inspect import itertools import re import shlex from . import supplement from .. import completer, layout, eventing, session, paging def parse_docstring(entity): """ ...
#!/usr/bin/python # # Copyright (c) 2011 The SaveCoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib impor...
# -*- coding: utf-8 -*- """ Created on Mon May 29 11:14:44 2017 @author: ning """ import pandas as pd import os import numpy as np from collections import Counter from imblearn.combine import SMOTETomek from sklearn.ensemble import RandomForestClassifier from imblearn.over_sampling import SMOTE#,RandomOverSampler fro...
# import subprocess from pyglet.sprite import Sprite from functions import * from main import logger import random class Mob(Sprite): """The main mob constructor""" def __init__(self, game, variant="YAY", debug=False): super(Mob, self).__init__( game.window.textures["mob1Q"], ...
import io, os, subprocess, wave import math, audioop, collections import json from urllib2 import Request, urlopen class AudioSource: def __init__(self): raise NotImplementedError("Abstract Class") def __enter__(self): raise NotImplementedError("Abstract Class") def __exit__(self, exc_type...
import re from flaskapp.meta import mail from flaskapp.models import User from . import WebsiteTestCase, users class AuthTests(WebsiteTestCase): def test_create_account(self): # test form page resp = self.client.get(self.url_for('auth.create_account')) self.assertEqual(resp.status_code, ...
# -*- 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...
from contextlib import contextmanager import gc import os import os.path from alembic.config import Config from alembic import command from maxminddb.const import MODE_AUTO from sqlalchemy import ( event, inspect, ) from sqlalchemy.schema import ( DropTable, MetaData, Table, ) from webtest import T...
"""Alexa entity adapters.""" import logging from typing import TYPE_CHECKING, List from homeassistant.components import ( alarm_control_panel, alert, automation, binary_sensor, camera, cover, fan, group, image_processing, input_boolean, input_number, light, lock, ...
from unittest import TestCase import json, requests from jsonschema import validate import socket import unittest ipServer = socket.gethostbyname(socket.gethostname()) port = "10000" URLBASE = "http://127.0.0.1:" + port URISOBA = "/api/soba/v1/occupants" stringTemplate = {"type": "string"} numberTemplate = {"type":...
from __future__ import print_function import json import os import sys import unittest from django.core.exceptions import ImproperlyConfigured from environ import Env, Path, REDIS_DRIVER class BaseTests(unittest.TestCase): URL = 'http://www.google.com/' POSTGRES = 'postgres://uf07k1:wegauwhg@ec2-107-21-253...
from pyglet.gl import * from plot_mode import PlotMode from threading import Thread, Event, RLock from color_scheme import ColorScheme from sympy.core.basic import S from time import sleep class PlotModeBase(PlotMode): """ Intended parent class for plotting modes. Provides base functionality in conjunc...
from celery import chain from waldur_core.core import executors from waldur_core.core import tasks as core_tasks from waldur_core.core import utils as core_utils from waldur_core.structure import executors as structure_executors from . import models from .tasks import SetInstanceErredTask class VolumeCreateExecutor...
import json import logging import os import shutil import time from subprocess import Popen, PIPE from urllib import parse import requests from flask import session from son_editor.app.database import db_session, scan_project_dir, sync_project_descriptor from son_editor.app.exceptions import NotFound, InvalidArgument...
# coding: utf-8 """ Qc API Qc API # noqa: E501 The version of the OpenAPI document: 3.0.0 Contact: cloudsupport@telestream.net Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from telestream_cloud_qc.configuration import Configuration class...
from typing import List, Set, Tuple, Optional, Union, Dict from hwt.code import SwitchLogic, Switch from hwt.hdl.statements.statement import HdlStatement from hwt.hdl.types.bits import Bits from hwt.interfaces.std import HandshakeSync from hwt.math import log2ceil from hwt.pyUtils.uniqList import UniqList from hwt.syn...
# -*- coding: utf-8 -*- import numpy as np from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.figure import Figure import pymoskito as pm class TwoPendulum(pm.PostProcessingModule): """ plot diagrams of all system quantities """ def __init__(self): ...
import json from twisted.trial.unittest import TestCase from twisted.internet import reactor from twisted.internet.defer import succeed, inlineCallbacks, returnValue from twisted.internet.endpoints import serverFromString from twisted.test.proto_helpers import StringTransport from twisted.web.client import HTTPConnect...
#!/usr/bin/env python # pylint: disable=missing-docstring,no-self-use import json import pytest from six.moves.urllib.parse import quote, urlencode from oic.oauth2 import Grant from oic.oauth2.exception import GrantError, MissingEndpoint, ResponseError from oic.oauth2.message import AccessTokenResponse, Authorizatio...
#! /usr/bin/pythonw # # This file is part of DBGraffle released under the MIT license. # See the LICENSE for more information. # # Written by Paul Davis # Today is August 11, 2005 # DBGraffle for OmniGraffle 4 # An extension of DBGraffle which is outdated # after a most impressive 2 day release. # Requires: # # OmniG...
"""Training script with multi-scale inputs for the DeepLab-ResNet network on the PASCAL VOC dataset for semantic image segmentation. This script trains the model using augmented PASCAL VOC, which contains approximately 10000 images for training and 1500 images for validation. """ from __future__ import print_funct...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
# 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...
# -*- coding: utf-8 -*- """ Entity properties ================= Entities are a collection of Properties of different types. These classes implement the default set of types used in endpoints. At entity class level, these properties are used in querying entities: .. code-block:: python >>> import datetime >...
""" Unit tests for the sumatra.dependency_finder module """ from __future__ import print_function from __future__ import unicode_literals from builtins import str from builtins import object try: import unittest2 as unittest except ImportError: import unittest import distutils.spawn import sumatra.dependency_f...
""" The :mod:`sklearn.utils` module includes various utilities. """ from collections import Sequence import numpy as np from scipy.sparse import issparse import warnings from .murmurhash import murmurhash3_32 from .validation import (as_float_array, assert_all_finite, warn_if_not_float, ...
# Authors: Mark Wronkiewicz <wronk@uw.edu> # Yousra Bekhti <yousra.bekhti@gmail.com> # Eric Larson <larson.eric.d@gmail.com> # # License: BSD (3-clause) import os.path as op import warnings from copy import deepcopy import numpy as np from numpy.testing import assert_allclose, assert_array_equal fro...
''' Google API-based feature extraction classes. ''' import logging import time import warnings import os from collections import defaultdict import numpy as np import pandas as pd from pliers.extractors.image import ImageExtractor from pliers.extractors.text import TextExtractor from pliers.extractors.video import ...
"""Node visitor""" import ast from .binopdesc import BinaryOperationDesc from .boolopdesc import BooleanOperationDesc from .cmpopdesc import CompareOperationDesc from .nameconstdesc import NameConstantDesc from .unaryopdesc import UnaryOperationDesc from .context import Context from .loopcounter import LoopCounter fr...
# -*- coding: utf-8 -*- import sys, os, re # Check Sphinx version import sphinx if sphinx.__version__ < "1.1": raise RuntimeError("Sphinx 1.1 or newer required") needs_sphinx = '1.1' # ----------------------------------------------------------------------------- # General configuration # -----------------------...
# 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 from code import Code from model import PropertyType import cpp_util import schema_util class HGenerator(object): def __init__(self, type_g...
from django.test import TestCase from django.db.models import ObjectDoesNotExist from cntapp.models import Directory, Document, SubDirRelation from .helpers import DocumentFactory, PdfDocumentFactory, DirectoryFactory, init_test_dirs from .helpers import DOCUMENT_BASE_NAME, DIRECTORY_BASE_NAME class DocumentTest(Te...
"""SCons.Tool.rpmutils.py RPM specific helper routines for general usage in the test framework and SCons core modules. Since we check for the RPM package target name in several places, we have to know which machine/system name RPM will use for the current hardware setup. The following dictionaries and functions try t...
# 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...
import csv import gzip import logging import mmap import os import sys import textwrap from collections import Counter, defaultdict from itertools import groupby from operator import itemgetter import pandas as pd import pyfaidx from Bio import SeqIO from Bio.SeqRecord import SeqRecord from Bio.Seq import Seq import ...
# Copyright 2016 EMC 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/licenses/LICENSE-2.0 # # Unless required ...
#!/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 to perform Xcode-style build steps. These functions are executed via gyp-mac-tool when using the Makefile generator. ""...
# coding: utf-8 """ Generated by: https://openapi-generator.tech """ from dataclasses import dataclass import re # noqa: F401 import sys # noqa: F401 import typing import urllib3 from urllib3._collections import HTTPHeaderDict from openapi_client import api_client, exceptions import decimal # noqa: F401 fro...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2013 NTT MCL Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
from __future__ import absolute_import """Routine to monitor the modal gain in each pixel as a function of time. Uses COS Cumulative Image (CCI) files to produce a modal gain map for each time period. Modal gain maps for each period are collated to monitor the progress of each pixel(superpixel) with time. Pixels th...
# -*- coding: utf-8 -*- # Copyright 2017, Digital Reasoning # # 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 ...
# encoding: utf-8 import os from copy import copy import httplib2 import oauth2client import inspector from . import keyring from .. import utils def from_params(**params): credentials = {} for key, value in params.items(): if key in ('client_id', 'client_secret', 'client_email', 'private_key', 'ac...
#!/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...
#!/usr/bin/env python """ Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import ntpath import re from lib.core.common import Backend from lib.core.common import hashDBWrite from lib.core.common import isStackingAvailable from lib.core.common impor...
# -*- coding: utf-8 -*- from __future__ import division, absolute_import, print_function import numpy as np import pandas as pd idx = pd.IndexSlice from scipy import interpolate from scipy import stats from collections import OrderedDict from kpfm.lockin import LockIn, FIRStateLockVarF, FIRStateLock def masklh(x, l=N...
from __future__ import unicode_literals import boto3 import sure # noqa import json from moto.ec2 import utils as ec2_utils from uuid import UUID from moto import mock_ecs from moto import mock_ec2 @mock_ecs def test_create_cluster(): client = boto3.client('ecs', region_name='us-east-1') response = client.c...
# 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 ast import os from buildbot.changes.filter import ChangeFilter from buildbot.schedulers.basic import SingleBranchScheduler from buildbot.schedulers.t...
from __future__ import unicode_literals from random import randint from django.template import Template from django.template.loader import render_to_string from django.template.defaultfilters import slugify from .compatibility import text_type from .layout import LayoutObject, Field, Div from .utils import render_fie...
# -*- coding: utf-8 -*- """ Shot-O-matic ~~~~~~ A simple screenshot upload/showcase website, using the Flask microframework (http://flask.pocoo.org). :copyright: (c) 2010 by Aljoscha Krettek. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import os impo...
import logging import json from django.test import TestCase from builds.models import Version from projects.models import Project from projects import tasks log = logging.getLogger(__name__) class PrivacyTests(TestCase): fixtures = ["eric"] def tearDown(self): tasks.update_docs = self.old_bd ...
#!/usr/bin/env python from __future__ import print_function import fileinput import glob import os import shutil import sys ### Begin compatibility block for pre-v2.6: ### # # ignore_patterns and copytree funtions are copies of what is included # in shutil.copytree of python v2.6 and later. # ### When compatibility i...
from __future__ import print_function # import numpy in two ways, both uses needed import numpy as np import numpy import numba.unittest_support as unittest from numba import njit, jit, testing, utils from numba.errors import (TypingError, LoweringError, UnsupportedError) from .support import TestCase, tag from numba...
# pylint: disable-msg=E1101,W0613,W0603 from itertools import islice import os import numpy as np import pandas._libs.json as json from pandas._libs.tslibs import iNaT from pandas.compat import StringIO, long, u, to_str from pandas import compat, isna from pandas import Series, DataFrame, to_datetime, MultiIndex from ...
# BOM_SOLAR_ASCII_TO_NETCDF.PY # # The input proprietary format supported by this example is a Bureau of # Meteorology (BoM) ArcView ASCII grid file. The format contains a header # (defines the shape and size of the grid), space-separated ASCII data, and # tail metadata that contains internal BoM processing informatio...
from __future__ import unicode_literals from django import forms from django.contrib import admin from django.contrib.admin import AdminSite from django.contrib.contenttypes.admin import GenericStackedInline from django.core import checks from django.test import SimpleTestCase, override_settings from .models import A...
# Copyright 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/licenses/LICENSE-2.0 # # Unless req...
from otp.ai.AIBase import * from toontown.toonbase import ToontownGlobals from direct.distributed.ClockDelta import * from ElevatorConstants import * from direct.distributed import DistributedObjectAI from direct.fsm import ClassicFSM, State from direct.fsm import State from direct.task import Task from direct.directno...
# -*- coding: utf-8 -*- # # 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 #...
__author__ = 'deathowl' import uuid import hmac from hashlib import sha1 from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible from django.contrib.auth.models import User from uuidfield import UUIDField from django.core.excep...
import numpy as np import unittest from numba.core.compiler import compile_isolated, Flags from numba.core import errors, types from numba import typeof from numba.tests.support import TestCase, MemoryLeakMixin, tag enable_pyobj_flags = Flags() enable_pyobj_flags.enable_pyobject = True force_pyobj_flags = Flags() fo...
# -*- coding: utf-8 -*- """ Launches a GUI mask builder for each file associated with the targets specidied by the 'targets' variable. When the script is launched, a three pane plot of the science images will be displayed. The center pane in this triptych is the active pane for which you are build a mask. The followi...
######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. 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...
# # peepdf is a tool to analyse and modify PDF files # http://peepdf.eternal-todo.com # By Jose Miguel Esparza <jesparza AT eternal-todo.com> # # Copyright (C) 2014 Jose Miguel Esparza # # This file is part of peepdf. # # peepdf is free software: you can redistribute it and/or modify # it u...
# Copyright (c) 2015 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 ...
#!/usr/bin/env python3 import argparse as ap import os import sys import re # all the warnings GKLEE can emit as well as the program's name # dict(string -> tuple of regular expressions) GKLEE = { "prog" : "GKLEE", "volatile" : ( re.compile("These two threads access common memory location, it is "+ ...
# -*- coding: utf-8 -*- """ test_invalid_headers.py ~~~~~~~~~~~~~~~~~~~~~~~ This module contains tests that use invalid header blocks, and validates that they fail appropriately. """ import itertools import pytest import h2.config import h2.connection import h2.errors import h2.events import h2.exceptions import h2....
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Copyright 2016 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
# 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 or agreed to in writing, ...