gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# -*- coding: utf-8 -*- # Copyright (c) 2015-2020, Exa Analytics Development Team # Distributed under the terms of the Apache License 2.0 """ Container ######################## The :class:`~exa.core.container.Container` class is the primary object for data processing, analysis, and visualization. In brief, containers a...
"""Statistics helper.""" from __future__ import annotations from collections import defaultdict from collections.abc import Callable, Iterable import dataclasses from datetime import datetime, timedelta from itertools import chain, groupby import logging import re from statistics import mean from typing import TYPE_CH...
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import click from flask_multipass import IdentityInfo from terminaltables import AsciiTable from indico.c...
import logging import numpy as np import pandas as pd from tardis.plasma.properties.base import ProcessingPlasmaProperty from tardis.plasma.exceptions import PlasmaConfigError logger = logging.getLogger(__name__) __all__ = ['LevelBoltzmannFactorLTE', 'LevelBoltzmannFactorDiluteLTE', 'LevelBoltzmannFactor...
# -*- coding: utf-8 -*- """Integration tests for methods implemented on GitHub.""" import github3 import uritemplate from .helper import IntegrationHelper SSH_KEY = ( # Generated for this alone then deleted 'ssh-rsa ' 'AAAAB3NzaC1yc2EAAAADAQABAAABAQCl4l154T4deeLsMHge0TpwDVd5rlDYVyFFr3PP3ZfW+' 'RZJAHs...
# 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 datetime from StringIO import StringIO try: # pragma: no cover import Image except ImportError: # pragma: no cover from Pillow import Image import colander from kotti.views.edit import ContentSchema from kotti.views.edit import generic_edit from kotti.views.edit import generic_add from kotti.views.vie...
""" pyexcel.internal.sheets.column ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Generic table column :copyright: (c) 2015-2017 by Onni Software Ltd. :license: New BSD License """ import types import pyexcel._compact as compact from . import _shared as utils class Column(utils.CommonPropertyAmongRo...
import os import unittest from conans.model.info import ConanInfo from conans.model.ref import PackageReference from conans.model.settings import bad_value_msg, undefined_value from conans.paths import CONANFILE, CONANINFO from conans.test.utils.deprecation import catch_deprecation_warning from conans.test.utils.tools...
from __future__ import absolute_import import re from cStringIO import StringIO from datetime import datetime, date, timedelta from psycopg2.extensions import QuotedString, Binary, AsIs from pytz import timezone class PostgresWriter(object): """Base class for :py:class:`mysql2pgsql.lib.postgres_file_writer.Post...
#!/usr/bin/env python # Written by Andrew Dalke # Copyright (c) 2008 by Dalke Scientific, AB # Modified by Jim Pivarski, 2016 # # (This is the MIT License with the serial numbers scratched off and my # name written in in crayon. I would prefer "share and enjoy" but # apparently that isn't a legally acceptable.) # #...
""" Django settings for hellomama_registration project. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ from kombu import Exchange, Queue import os import djceler...
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
from PIL import Image from PIL import ImageEnhance from PIL import ImageFilter from PIL import ImageOps from StringIO import StringIO import hashlib import pickle import os import urllib2 from django.conf import settings from django.http import HttpResponse # attempt to import requests try: import requests h...
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2017, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
import math import numpy as np import matplotlib.pyplot as plt from datetime import datetime startTime = datetime.now() def angular_momentum(posArray, velArray, massArray): '''calculates the total angular momentum for a system of objects ''' numObjects=len(massArray) numDimensions=len(posArray[0]) ...
#!/usr/bin/python # Copyright (C) 2014, Dariusz Kluska <darkenk@gmail.com> # Copyright (C) 2014, Sebastian Gozdz <ssabuss@gmail.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistrib...
## # Helper functions used to auto-generate R unit tests ## from uuid import uuid4 from random import randrange, uniform, random, choice, sample, randint, seed from math import floor, ceil import sys count = 0 def setup_random_seed(random_seed=None): if random_seed is not None: SEED = random_seed else...
# Copyright 2017 Battelle Energy Alliance, 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 t...
#!/usr/bin/python # -*- coding: utf-8 -*- import unittest import sys sys.path.append('.') from chempy.molecule import Molecule from chempy.pattern import MoleculePattern ################################################################################ class MoleculeCheck(unittest.TestCase): def testIsomorphism...
# -*- coding: utf-8 -*- import 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 'Revision.changes' db.add_column('avocado_revision', 'changes', self.gf...
'''Adversarially learned inference and Bi-GAN Currently noise encoder is not implemented. ''' __author__ = 'R Devon Hjelm and Samuel Lavoie' __author_email__ = 'erroneus@gmail.com' from cortex.plugins import register_plugin, ModelPlugin from cortex.built_ins.models.gan import ( get_positive_expectation, get_neg...
__author__ = 'SolarLune' from bge import logic, render import math,time # Nodemaps for game space navigation. class Node(): def __init__(self, obj): self.obj = obj self.obj['nm_node'] = self # Place yourself in the "owner" game object self.position = self.obj.worldPosition ...
"""Tests for the imager site app.""" from django.test import TestCase from django.contrib.auth.models import User from imager_profile.models import UserProfile import factory from django.test import Client, RequestFactory from django.urls import reverse_lazy class UserFactory(factory.django.DjangoModelFactory): ...
import copy from django.forms import widgets from django.contrib.auth.models import User from rest_framework import serializers from main.models import UserProfile from main.forms import UserProfileForm, RegistrationFormUserProfile from odk_logger.models import XForm from api.models import Project, OrganizationPro...
#!/usr/bin/env python # -*- coding: utf-8 -*- # """ Implements some usefull functions when dealing with validity of different types of information. """ import calendar import re import time import sys from datetime import timedelta from datetime import datetime TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ" TIME_FORMAT_WITH_FR...
"""test_resources""" import unittest from nose.tools import eq_, assert_raises from routes import * class TestSubmapper(unittest.TestCase): def test_submapper(self): m = Mapper() c = m.submapper(path_prefix='/entries', requirements=dict(id='\d+')) c.connect('entry', '/{id}') eq_('...
# Copyright 2015 Red Hat, 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 a...
""" Sphinx plugins for Django documentation. """ import json import os import re from docutils import nodes from docutils.parsers.rst import directives from sphinx import addnodes, __version__ as sphinx_ver from sphinx.builders.html import StandaloneHTMLBuilder from sphinx.writers.html import SmartyPantsHTMLTranslato...
""" Admin commands """ import time import re from django.conf import settings from evennia.server.sessionhandler import SESSIONS from evennia.server.models import ServerConfig from evennia.utils import prettytable, search, class_from_module COMMAND_DEFAULT_CLASS = class_from_module(settings.COMMAND_DEFAULT_CLASS) ...
#!/usr/bin/python2.7 # # Copyright 2015 The AMP HTML 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 # # Unle...
## # Copyright (c) 2005-2014 Apple Inc. All rights reserved. # # 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, mod...
from functools import wraps import string import cycl import math import numpy as np import logging log = logging.getLogger(__name__) def memoize(fct): """ This is a decorator which cache the result of a function based on the given parameter. """ return_dict = {} @wraps(fct) def wrappe...
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from tapi_server.models.base_model_ import Model from tapi_server.models.tapi_common_admin_state_pac import TapiCommonAdminStatePac # noqa: F401,E501 from tapi_server....
""" 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 ...
#------------------------- #3d Renderer #Daniel Miron #7/5/2013 # #Allows 3d viewing of nerve cord or neuron stacks. #Includes ability to fully rotate image in 3 dimensions and to mark locations in 3-space #------------------------- import h5py import numpy as np import glob import os import sys sys.path.append(r'c:\P...
#!/usr/bin/env python """ .. py:currentmodule:: FileFormat.test_MicroscopeParameters .. moduleauthor:: Hendrix Demers <hendrix.demers@mail.mcgill.ca> Tests for modules `MicroscopeParameters`. """ # Script information for the file. __author__ = "Hendrix Demers (hendrix.demers@mail.mcgill.ca)" __version__ = "" __date__...
from ct.models import UnitStatus, UnitLesson def next_lesson(self, edge, fsmStack, request, useCurrent=False, **kwargs): """ Edge method that moves us to right state for next lesson (or END). """ fsm = edge.fromNode.fsm unitStatus = fsmStack.state.get_data_attr('unitStatus') if useCurrent: ...
#!/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. """Unit tests for scm.py.""" import logging import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirna...
"""This module includes common functions for visualization.""" from collections import OrderedDict import matplotlib.pyplot as plt import numpy as np from elfi.model.elfi_model import Constant, ElfiModel, NodeReference def nx_draw(G, internal=False, param_names=False, filename=None, format=None): """Draw the `...
import re from lib import BaseTest class CreateMirror1Test(BaseTest): """ create mirror: all architectures + all components """ runCmd = "aptly mirror create --ignore-signatures mirror1 http://mirror.yandex.ru/debian/ wheezy" def check(self): self.check_output() self.check_cmd_ou...
import os import re import sys import time import json import pipes import shutil import inspect import urllib2 import urlparse import argparse import itertools import traceback import subprocess import collections import multiprocessing class P: bugreport_page = 'http://github.com/vadimkantorov/wigwam/issues' wigwa...
#!/usr/bin/env python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """MB - the Meta-Build wrapper around GYP and GN MB is a wrapper script for GYP and GN that can be used to generate build files for se...
# Written by Ross Cohen # See LICENSE.txt for license information. from bencode import bdecode, bencode from db import db from crypt import crypt from errno import ECONNRESET from getpass import getpass from os import environ import sha import socket import SRP from StringIO import StringIO import struct class AuthEr...
# 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...
# 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 # distr...
# Copyright (c) 2021, DjaoDjin 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and t...
import mxnet as mx import proposal import proposal_target from rcnn.config import config def get_vgg_conv(data): """ shared convolutional layers :param data: Symbol :return: Symbol """ # group 1 conv1_1 = mx.symbol.Convolution( data=data, kernel=(3, 3), pad=(1, 1), num_filter=64, w...
# -*- coding: utf-8 -*- """ DEPRICATE: use TestResult instead not really used most things in here can be depricated """ from __future__ import absolute_import, division, print_function import utool import utool as ut from ibeis.expt import results_organizer from ibeis.expt import results_analyzer print, print_, pr...
# -*- coding: utf-8 -*- # Copyright 2022 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...
#!/usr/bin/env python from __future__ import absolute_import, division, print_function import base64 import binascii from contextlib import closing import copy import functools import sys import threading import datetime from io import BytesIO from tornado.escape import utf8, native_str from tornado import gen from ...
# 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...
""" codegen ~~~~~~~ Extension to ast that allow ast -> python code generation. :copyright: Copyright 2008 by Armin Ronacher. :license: BSD. Modified by ipkn to support python3 ast.arg """ import os import string from ast import * BINOP_SYMBOLS = {} BINOP_SYMBOLS[Add] = '+' BINOP_SYMBOLS[Sub]...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import json import argh import argparse import math import signal from faker import Factory from functools import partial from concurrent.futures import ThreadPoolExecutor from typing import NamedTuple, Optional from cr8.insert_json import to_insert from cr8.mi...
#!/usr/bin/env python2 # Copyright 2015 Mathias Garbe <mathias.garbe@inovex.de> # # 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 ...
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
# -*- coding: utf-8 -*- """ celery.datastructures ~~~~~~~~~~~~~~~~~~~~~ Custom types and data structures. """ from __future__ import absolute_import from __future__ import with_statement import sys import time from collections import defaultdict from itertools import chain from billiard.einfo import Ex...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 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...
"""This module contains the general information for StorageControllerProps ManagedObject.""" from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class StorageControllerPropsConsts: pass class StorageControllerProps(ManagedObject): """This ...
""" Cisco_IOS_XR_infra_rmf_oper This module contains a collection of YANG definitions for Cisco IOS\-XR infra\-rmf package operational data. This module contains definitions for the following management objects\: redundancy\: Redundancy show information Copyright (c) 2013\-2015 by Cisco Systems, Inc. All rights r...
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# Copyright 2021 The Cirq Developers # # 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 ...
# 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 ...
from __future__ import absolute_import # SMOP compiler runtime support library # Copyright 2014 Victor Leikehman # MIT license import six.moves.builtins import numpy from numpy.fft import fft2 from numpy.linalg import inv from numpy.linalg import qr as _qr from six.moves import range try: from scipy.linalg impo...
#!/usr/bin/python from datetime import date,datetime import sqlalchemy import json import pprint import uuid import logging import os import utils from config import ComicStreamerConfig from comicstreamerlib.folders import AppFolders from sqlalchemy.orm import scoped_session from sqlalchemy.orm import sessionmaker...
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
# -*- coding: utf-8 -*- """ Regridding and interpolation """ import copy from functools import reduce import iris from iris.fileformats.pp import EARTH_RADIUS from iris.analysis.cartography import rotate_winds import numpy as np import operator import scipy.interpolate as scinter from . import io, coords from .excepti...
# Copyright (c) 2015 Intel Corpration # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
"""ClearCase SCM provider.""" import logging import os import platform import re import subprocess import sys import tempfile from django.conf import settings from django.utils.encoding import force_text from django.utils.translation import ugettext_lazy as _ from reviewboard.diffviewer.parser import DiffParser from...
# -*- coding: utf-8 -*- """Parser for Windows XML EventLog (EVTX) files.""" import pyevtx from dfdatetime import filetime as dfdatetime_filetime from dfdatetime import semantic_time as dfdatetime_semantic_time from plaso.containers import events from plaso.containers import time_events from plaso.lib import definiti...
import numpy as np import matplotlib.pyplot as plt from simulate import simulate class possum(simulate): """ Class for creating polarization and faraday rotation spectra. Frequency Coverages: _createWSRT() Frequency range for the Westerbork Synthesis Radio Telescope 310 - 380 MHz _createASKAP12...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
"""Fake multinode docker monitoring script. This script is the "docker compose server" for the fake_multinode provider using Docker compose. It should be started before running `RAY_FAKE_CLUSTER=1 ray up <cluster_config>`. This script reads the volume directory from a supplied fake multinode docker cluster config fil...
# -*- coding: utf-8 -*- # Copyright (c) 2013, Mayo Clinic # 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 # ...
# Una pelota rebotando contra 4 paredes. Tanto la pelota como las # paredes son sprites. import pygame import threading import time from empty_display import EmptyDisplay import lib.colors as Color SPEED = 8 class Ball(pygame.sprite.Sprite): def __init__(self, color, width,...
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. # # 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 appl...
# Copyright (c) 2017 The sqlalchemy-bigquery Authors # # 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, mer...
""" byceps.services.board.topic_command_service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from __future__ import annotations from datetime import datetime from ...database import db from ...events.board import ( ...
""" Format functions unit tests. """ import unittest import sys sys.path.append('..') from format import remove_duplicates, transform, prepare_for_parsing class TestFormat(unittest.TestCase): """ Format functions unittest class. """ def setUp(self): pass # Tests for remove_duplicates_from...
#!/usr/bin/env python # # Copyright (C) 2014 Narf Industries <info@narfindustries.com> # # 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 # th...
from django.db import models, router from django.db.models.options import normalize_together from django.db.migrations.state import ModelState from django.db.migrations.operations.base import Operation from django.utils import six class CreateModel(Operation): """ Create a model's table. """ serializ...
""" :mod:`pandas.io.html` is a module containing functionality for dealing with HTML IO. """ from __future__ import annotations from collections import abc import numbers import os import re from typing import ( Pattern, Sequence, ) from pandas._typing import FilePathOrBuffer from pandas.compat._optional im...
# -*- coding: utf-8 -*- ''' Configure ``portage(5)`` ''' # Import python libs from __future__ import absolute_import import os import shutil # Import salt libs import salt.utils # Import third party libs import salt.ext.six as six # pylint: disable=import-error try: import portage HAS_PORTAGE = True except I...
# tiny tiff parser # Ange Albertini, BSD Licence, 2011 import struc import sys tags_types = [ ('ACTIVEAREA', 50829), ('ANALOGBALANCE', 50727), ('ANTIALIASSTRENGTH', 50738), ('ARTIST', 315), ('ASSHOTICCPROFILE', 50831), ('ASSHOTNEUTRAL', 50728), ('ASSHOTPREPROFILEMATRIX', 50832), ('ASSHOTWHITEXY', 50729), ('...
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from typing import Dict, Iterable, Optional, Tuple, Union, cast from pants.backend.native.subsystems.native_build_step import ToolchainVariant from pants.backend.native.targets.external_n...
#$Id$ class Project: """This class is used to create object for Projects.""" def __init__(self): """Initialize the parameters for projects object.""" self.project_id = '' self.project_name = '' self.customer_id = '' self.customer_name = '' self.currency_code = ...
#!/usr/bin/env python __author__ = 'RADICAL Team' __email__ = 'radical@rutgers.edu' __copyright__ = 'Copyright 2013-19, RADICAL Research, Rutgers University' __license__ = 'MIT' ''' Setup script, only usable via pip. ''' import re import os import sys import glob import shutil import subprocess as sp fr...
#! /usr/bin/env python #ant1 201411 import browser import math from browser import document as doc from browser.timer import request_animation_frame as raf from browser import svg from browser import ajax def IsOneTileMove(x1,y1,x2,y2): if (abs(x1-x2)==1 and y1==y2) or (x1==x2 and abs(y1-y2)==1): ...
import sys import os import logging import nose import angr from angr.sim_variable import SimStackVariable, SimRegisterVariable from angr.knowledge_plugins.variables import VariableType l = logging.getLogger('test_variablerecovery') test_location = os.path.join(os.path.dirname(os.path.realpath(__file__)), ...
from django.contrib.auth import get_user_model from rest_framework import generics, permissions, status, response from rest_framework.decorators import api_view from rest_framework.authtoken.models import Token from rest_framework.response import Response from rest_framework.reverse import reverse from django.contrib.a...
from itertools import chain from xpath import dsl as x from xpath.renderer import to_xpath from capybara.driver.node import Node as Base from capybara.exceptions import ReadOnlyElementError, UnselectNotAllowed from capybara.helpers import normalize_whitespace from capybara.node.simple import Simple from capybara.utils...
import docker from docker.constants import DEFAULT_DATA_CHUNK_SIZE from docker.models.containers import Container, _create_container_args from docker.models.images import Image import unittest from .fake_api import FAKE_CONTAINER_ID, FAKE_IMAGE_ID, FAKE_EXEC_ID from .fake_api_client import make_fake_client import pyte...
import os from django.shortcuts import render, redirect from django.contrib.auth import logout, login, authenticate from django.contrib.auth.decorators import login_required from django.db.models import Count from django.http import JsonResponse, HttpResponseRedirect, HttpResponse from django.utils.crypto import get_r...
"""Inception V3 model for Keras. Note that the input image format for this model is different than for the VGG16 and ResNet models (299x299 instead of 224x224), and that the input preprocessing function is also different (same as Xception). # Reference - [Rethinking the Inception Architecture for Computer Vision]( ...
""" ==== grid ==== """ import numpy as np class Grid: """Grid class to allow the Q-space grid to be defined in different ways. The grid can be defined be either specifying the corners of the volume or by the axis vectors. The grid is defined by three vectors **v1**, **v2** and **v3**; the range ...
#! /usr/bin/env python ''' A script to create a simple, browser-based countdown timer. usage: python browsertimer.py ''' # Imports from bokeh.layouts import column, row from bokeh import plotting as bkplt from bokeh.models import ColumnDataSource, Button, Slider, CustomJS # Set default/starting values default_minutes...
""" Simple settings file management for Python applications. Files ----- Besett uses JSON files to manage settings in a basic hierarchy. In order of increasing priority: 1. Global (default) settings 2. Plugin/addin settings 3. User settings 4. Runtime settings Each level in the hierarchy consists of one...
"""Wrap vtk.vtkRenderWindowInteractor.""" import weakref import logging import collections.abc from functools import partial from pyvista.utilities import try_callback from pyvista import _vtk log = logging.getLogger(__name__) log.setLevel('CRITICAL') log.addHandler(logging.StreamHandler()) class RenderWindowInter...
#!/bin/env python # # Copyright 2013 Graham McVicker and Bryce van de Geijn # # 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...