gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: [email protected] Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
# 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...
########################### # Latent ODEs for Irregularly-Sampled Time Series # Author: Yulia Rubanova ########################### import gc import numpy as np import sklearn as sk import numpy as np #import gc import torch import torch.nn as nn from torch.nn.functional import relu import lib.utils as utils from lib....
#! /usr/bin/env python from __future__ import absolute_import, division, print_function from __future__ import unicode_literals import nose from nose.tools import assert_equal, assert_true import numpy as np import pymatgen as pmg from sknano.core import rezero_array from sknano.core.crystallography import Crystal2...
# encoding: 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): # Deleting model 'SyncShard' db.delete_table('webinars_syncshard') # Deleting model 'SyncJob' ...
import json from datetime import datetime from html2text import html2text from dojo.models import Finding class MobSFParser(object): def get_scan_types(self): return ["MobSF Scan"] def get_label_for_scan_types(self, scan_type): return "MobSF Scan" def get_description_for_scan_types(s...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import HTMLParser import smtplib from frappe import msgprint, throw, _ from frappe.email.smtp import SMTPServer, get_outgoing_email_account from frappe.email.email_b...
# # ------------------------------------------------------------ # Copyright (c) All rights reserved # SiLab, Institute of Physics, University of Bonn # ------------------------------------------------------------ # import unittest import yaml from bitarray import bitarray from basil.dut import Dut cnfg_yaml = """...
# 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/licenses/LICENSE-2.0 # # Unless ...
"""Sensors flow for Withings.""" import typing as types from homeassistant.config_entries import ConfigEntry from homeassistant.helpers.entity import Entity from homeassistant.helpers.typing import HomeAssistantType from homeassistant.util import slugify from . import const from .common import _LOGGER, WithingsDataMa...
#!/usr/bin/env python3 import importlib import inspect import logging import sys import synapseclient try: from synapseclient.core.exceptions import SynapseHTTPError except ModuleNotFoundError: from synapseclient.exceptions import SynapseHTTPError from . import config from . import example_filetype_format fro...
# Copyright (c) 2011 Florian Mounier # Copyright (c) 2011 Anshuman Bhaduri # Copyright (c) 2012-2014 Tycho Andersen # Copyright (c) 2013 xarvh # Copyright (c) 2013 Craig Barnes # Copyright (c) 2014 Sean Vig # Copyright (c) 2014 Adi Sieker # Copyright (c) 2014 Sebastien Blot # # Permission is hereby granted, free of cha...
import random import string import typing # noqa import pyparsing as pp import mitmproxy.net.websockets from mitmproxy.utils import strutils from . import base, generators, actions, message NESTED_LEADER = b"pathod!" class WF(base.CaselessLiteral): TOK = "wf" class OpCode(base.IntField): names = { ...
# # Copyright (c) 2012 Atis Elsts # # 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 following disclaimer. #...
class BSTree: def __init__(self, value, comp): """ Creates a new binary search tree (BST) data structure Args: value: The data of the root node of the BST comp(new_element, root): The comparison function for maintaining order Operations: insert: Insert a new element into the BST search: Find an ...
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import logging import os from contextlib import contextmanager from pants.cache.artifact import TarballArtifact from pants.cache.artifact_cache import ArtifactCache, UnreadableArtifact fr...
from statsmodels.compat.python import (lrange, iterkeys, iteritems, lzip, reduce, itervalues, zip, string_types, range) from statsmodels.compat.collections import OrderedDict import numpy as np import pandas as pd import datetime import textw...
__author__ = 'yuxiang' # derived from honda.py by fyang import datasets import datasets.kitti import os import PIL import datasets.imdb import numpy as np import scipy.sparse from utils.cython_bbox import bbox_overlaps from utils.boxes_grid import get_boxes_grid import subprocess import cPickle from fast_rcnn.config i...
#!/usr/bin/env python """ Class that constructs a MultiplexMarkovchain given the counts. Also has methods to get the null model and the parameters of the probability distribution associated with the Markov chain. Currently handles only 4-state Markov chains (i.e. two layer networks). """ from __future__ import divisi...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Models for storing campaign-related entities derived from raw CAL-ACCESS data. """ from datetime import date from calaccess_processed_elections import corrections, get_expected_election_date # Managers from calaccess_processed_filings.managers import Form501FilingManag...
# Copied from pytorch repository since my installation does not have this yet. import math import random import torch from torch.autograd import Variable def calculate_gain(nonlinearity, param=None): """Return the recommended gain value for the given nonlinearity function. The values are as follows: ======...
# coding: utf-8 # imports import os import re import datetime from PIL import Image # filebrowser imports from filebrowser.settings import SAVE_FULL_URL, ADMIN_THUMBNAIL from filebrowser.conf import fb_settings from filebrowser.functions import get_file_type, url_join, get_version_path class FileObject(object): ...
# # This file is part of the PyMeasure package. # # Copyright (c) 2013-2017 PyMeasure Developers # # 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 limit...
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2012 Isaku Yamahata <yamahata at private email ne jp> # # 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 # # h...
############################################################### # MPySIR: MPI python script for SIR # # SCRIPT: sirutils.py ############################################################### """ # Author: [email protected] # Date: 09.06.2015 # Version: 1.4 """ """ Some functions useful for MPI parallel programming """ f...
import re import urllib import os from datetime import datetime from django.conf import settings from django.utils import six from django.utils.safestring import mark_safe from django.utils.functional import curry from django.core.files.images import ImageFile from django.contrib.staticfiles import finders from sorl....
#! /usr/bin/env python # # oravg_s2.py - An engine, adapted from the original oravg.py, to # calculate orientation averaged cross sections and # orientation-dependent spectral information starting from several # fixed orientation spectra of a nanoparticle with axial # symmetry. Uses interpolation on the sphere S^2 with...
# -*- coding: utf-8 -*- # # This file is part of sensim # License: BSD 3 clause # 2016, 2017 """Helpers for sentence semantic similarity model. .. Author:: Hussein AL-NATSHEH <[email protected]> """ from polyglot.text import Text from polyglot.mapping import Embedding import numpy as np from skle...
""" The :mod:`model_selection.split<surprise.model_selection.split>` module contains various cross-validation iterators. Design and tools are inspired from the mighty scikit learn. The available iterators are: .. autosummary:: :nosignatures: KFold RepeatedKFold ShuffleSplit LeaveOneOut Predef...
# ================================================================= # # Authors: Tom Kralidis <[email protected]> # # Copyright (c) 2014 Tom Kralidis # # 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 ...
#!/usr/bin/env python2 # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_framew...
# -*- coding: utf-8 -*- # # 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 ...
from django.utils.timezone import now as timezone_now from zerver.lib.actions import do_change_stream_invite_only from zerver.lib.test_classes import ZulipTestCase from zerver.models import Message, UserMessage, get_client, get_realm, get_stream class TopicHistoryTest(ZulipTestCase): def test_topics_history_zeph...
# Copyright (c) 2010 Citrix Systems, Inc. # Copyright 2010 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....
"""Test the MySensors config flow.""" from __future__ import annotations from typing import Any from unittest.mock import patch import pytest from homeassistant import config_entries, setup from homeassistant.components.mysensors.const import ( CONF_BAUD_RATE, CONF_DEVICE, CONF_GATEWAY_TYPE, CONF_GAT...
"""Responses. responses serve both testing purpose aswell as dynamic docstring replacement """ responses = { "_v3_accounts": { "url": "/v3/accounts", "response": { "accounts": [ { "id": "101-004-1435156-002", "tags": [] ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 compli...
#!/usr/bin/python # Copyright 2013-present Barefoot Networks, 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 ap...
# 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 law or agree...
#!/usr/bin/python # ---------------------------------------------------------------------------- # modify the runtime template for prebuilt engine # # Copyright 2014 (C) zhangbin # # License: MIT # ---------------------------------------------------------------------------- ''' modify the runtime template for prebuilt ...
#!/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. from xml.dom import minidom from writers import gpo_editor_writer, xml_formatted_writer class AdmxElementType: '''The different...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import pytest import subprocess import time import ray from ray.utils import _random_string from ray.tests.utils import (run_and_get_output, run_string_as_driver, run_str...
# Copyright 2016 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 2012 Vaibhav Bajpai # Copyright 2009 Shikhar Bhushan # # 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...
import sys import time import unittest import mock from promstats import Stats, _PY_35 version_info = sys.version_info def _patch_url_opener(test_case): """A shortcut for patching URL opener on different Py versions.""" if version_info.major >= 3: patch_module = 'urllib.request.OpenerDirector.open...
"""Build Environment used for isolation during sdist building """ # The following comment should be removed at some point in the future. # mypy: strict-optional=False # mypy: disallow-untyped-defs=False import logging import os import sys import textwrap from collections import OrderedDict from distutils.sysconfig im...
import signal import sys import unittest from unittest import mock import asyncio from asyncio import base_subprocess from asyncio import subprocess from asyncio import test_utils try: from test import support except ImportError: from asyncio import test_support as support if sys.platform != 'win32': from ...
import re import sys import time import datetime import traceback from decimal import Decimal import threading import electrum from electrum import WalletStorage, Wallet from electrum_gui.kivy.i18n import _ from electrum.contacts import Contacts from electrum.paymentrequest import InvoiceStore from electrum.util impor...
# vim: set et sw=4 sts=4 fileencoding=utf-8: # # Python camera library for the Rasperry-Pi camera module # Copyright (c) 2013-2015 Dave Jones <[email protected]> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # ...
""" ============================= Generic SpectralModel wrapper ============================= .. moduleauthor:: Adam Ginsburg <[email protected]> """ import numpy as np from pyspeckit.mpfit import mpfit,mpfitException from pyspeckit.spectrum.parinfo import ParinfoList,Parinfo import copy from astropy import lo...
"""A script testing the extraction pipeline of RHEA Steps 1) Initialise Format, Extractor and RadialVelocity 2) Define file paths for science, flat and dark frames 3) Extract/import spectra 4) Create/import reference spectra 5) Calculate radial velocities 6) Plot radial velocities """ import numpy as np try: impor...
import hashlib import warnings import logging import io import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL from urllib3.util.retry import Retry...
# -*- coding: utf-8 -*- """ Survey module with XForm Survey objects and utility functions. """ import codecs import os import re import tempfile import xml.etree.ElementTree as ETree from collections import defaultdict from datetime import datetime from functools import lru_cache from pyxform import constants from pyx...
# -*- coding: utf-8 -*- """ This module offers timezone implementations subclassing the abstract :py:`datetime.tzinfo` type. There are classes to handle tzfile format files (usually are in :file:`/etc/localtime`, :file:`/usr/share/zoneinfo`, etc), TZ environment string (in all known formats), given ranges (with help fr...
import time from collections import OrderedDict, defaultdict from functools import reduce, wraps from inspect import signature import matplotlib.pyplot as plt from rfho import as_list import tensorflow as tf import rfho as rf try: from IPython.display import IFrame import IPython except ImportError: pr...
# Copyright 2017 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from collections import OrderedDict import json import multiprocessing import optparse import os import shlex import sys # Add testrunner to the path. s...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from __future__ import unicode_literals import collections import copy import datetime import numbers import operator import re import scorched.strings import scorched.exc import scorched.dates from functools import reduce from collections.abc import Iterable from scorched.compat import str from scorched.compat impo...
from validator import Validator from collections import defaultdict import re class EtherValidator(Validator): def __init__(self, rule): self.corpus = rule[0] self.doc = rule[1] self.domain = rule[2] self.name = rule[3] self.operator = rule[4] self.argument = rule[5...
""" Copyright: Jev Kuznetsov Licence: BSD Interface to interactive brokers together with gui widgets """ import sys # import os from time import sleep from PyQt4.QtCore import (SIGNAL, SLOT) from PyQt4.QtGui import (QApplication, QFileDialog, QDialog, QVBoxLayout, QHBoxLayout, QDialogButtonBox, ...
# -*- 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): # Changing field 'MixFavourite.user' db.alter_column(u'spa_mixfavourite', 'user_id', self.gf('django.db.mod...
# -*- coding: utf-8 -*- """ @file @brief Defines a :epkg:`sphinx` extension for a quote. """ from docutils import nodes from docutils.parsers.rst import directives import sphinx from sphinx.locale import _ from docutils.parsers.rst.directives.admonitions import BaseAdmonition from docutils.statemachine import StringLi...
"""Implementation of JSONEncoder """ import re from decimal import Decimal def _import_speedups(): try: from simplejson import _speedups return _speedups.encode_basestring_ascii, _speedups.make_encoder except ImportError: return None, None c_encode_basestring_ascii, c_make_encoder = _im...
# 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 """ Interact with the Censys Search API through the command line. """ import os import sys import csv import time import json import argparse from pathlib import Path from typing import Union, Optional, List, Tuple import requests from censys.base import CensysAPIBase from censys.config import ...
from __future__ import unicode_literals import datetime import os import re import sys import types from django.conf import settings from django.http import (HttpResponse, HttpResponseServerError, HttpResponseNotFound, HttpRequest, build_request_repr) from django.template import Template, Context, TemplateDoesNot...
#!/usr/bin/env python import os try: __IPYTHON__ import sys del sys.argv[1:] except: pass import srwl_bl import srwlib import srwlpy import srwl_uti_smp def set_optics(v=None): el = [] pp = [] names = ['Fixed_Mask', 'Fixed_Mask_M1A', 'M1A', 'M1A_Watchpoint', 'Watchpoint', 'M2A_VDM', 'M2A...
#!/usr/bin/env python from __future__ import print_function from collections import defaultdict from collections import deque from subprocess import call from optparse import OptionParser from tempfile import mkstemp import os import random import re import shlex import shutil import subprocess import sys import time i...
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com [email protected] from unittest import TestCase import mock from preggy import expect ...
import os, signal, subprocess, sys import StringIO import ShUtil import Test import Util import platform import tempfile import re class InternalShellError(Exception): def __init__(self, command, message): self.command = command self.message = message kIsWindows = platform.system() == 'Windows'...
# -*- coding: utf-8 -*- # Copyright 2017 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. """Test simple_chrome_builder module.""" from __future__ import print_function import os import mock from chromite.cros_bisec...
# Lint as: python2, python3 # Copyright 2020 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 # ...
# SDT2PrintMarkdown.py # # Print SDT2 to markdown from .SDT2Classes import * hideDetails = False tables = False pageBreakBeforeMCandDevices = False pageBreakToken = '\n<!--BREAK-->' # tabulator level tab = 0 def incTab(): global tab tab += 1 def decTab(): global tab if (tab > 0): tab -= 1 def ...
"""CherryPy Application and Tree objects.""" import os import sys import cherrypy from cherrypy._cpcompat import ntou, py3k from cherrypy import _cpconfig, _cplogging, _cprequest, _cpwsgi, tools from cherrypy.lib import httputil class Application(object): """A CherryPy Application. Servers and gateways...
data = ( '', # 0x00 '', # 0x01 '', # 0x02 '', # 0x03 '', # 0x04 '', # 0x05 '', # 0x06 '', # 0x07 '', # 0x08 '', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c '', # 0x0d '', # 0x0e '', # 0x0f '', # 0x10 '', # 0x11 '', # 0x12 '', # 0x13 '', # 0x14 '', # 0x15 '',...
# -*- 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...
# Copyright (c) 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
# 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 ...
#! /usr/bin/env python ''' Andrew Till Fall 2014 PhD Research This clustering module clusters indicators and uses labels to compute a generalized energy mesh: Create observations from subset of indicators, viz. indicators[strt:end] Cluster observations and extract labels Combine labels from each subset ...
import tensorflow as tf from sklearn.metrics import confusion_matrix, classification_report, accuracy_score from sklearn.model_selection import train_test_split import matplotlib.pyplot as plt import numpy as np from library.utils import file_utils from sklearn.preprocessing import StandardScaler, MinMaxScaler import m...
# -*- coding: utf-8 -*- # This file is part of MediaFile. # Copyright 2016, Adrian Sampson. # # 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 limitati...
#! /usr/bin/env python """DBF accessing helpers. FIXME: more documentation needed Examples: Create new table, setup structure, add records: dbf = Dbf(filename, new=True) dbf.addField( ("NAME", "C", 15), ("SURNAME", "C", 25), ("INITIALS", "C", 10), ...
"""Helper objects for maintaining PLM state and interfaces.""" import logging import binascii import insteonplm.utils __all__ = "Address" _LOGGER = logging.getLogger(__name__) class Address: """Datatype definition for INSTEON device address handling.""" def __init__(self, addr): """Create an Address...
""" visicon copyright info: name='visicon', version='0.1', description='IP address visualisation', author='Antisense', author_email='[email protected]', url='http://code.google.com/p/visicon', ======= An attempt at visualising a user based on their IP address. Visicon would optimally be a direct port of Visiglyph [1...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # Database Module # -------------------- from __future__ import unicode_literals import MySQLdb from MySQLdb.times import DateTimeDeltaType from markdown2 import UnicodeWithAttrs import warnings import datetime import ...
"""vobject module for reading vCard and vCalendar files.""" from __future__ import print_function import copy import codecs import logging import re import six import sys # ------------------------------------ Python 2/3 compatibility challenges ---- # Python 3 no longer has a basestring type, so.... try: bases...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Sub programs for operating some Keithley instruments author : Eoin O'Farrell email : [email protected] last edited : July 2013 Classes for: Keithley 6221 InitializeInstruments ScanInstruments InitializeDataFile WriteDataFile CloseDataFile GraphData """ import...
# Copyright 2016 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 2014 CloudFounders NV # # 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 writ...
# Copyright 2016 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 -*- from __future__ import print_function from datetime import datetime, time import pytest from numpy import nan from numpy.random import randn import numpy as np from pandas import (DataFrame, Series, Index, Timestamp, DatetimeIndex, MultiIndex, to_date...
#! /usr/bin/python import selenium, selenium.webdriver, getpass from sys import exit, stderr, argv, stdout, stdin def safeFindElementByID(driver, theID, failOnError=True): while True: try: return driver.find_element_by_id(theID) except: #errorFile.write("Could not find {0} ...
from os.path import dirname from shutil import rmtree try: from scipy.misc import imread #try: from cv2 import IMREAD_UNCHANGED, imread except ImportError: imread = None from pylab import imshow, show from numpy import (array, arccos, arctan2, cos, cross, dot, hstack, load, pi, sin, square, sqrt) ...
''' How well do the GBT and VLA data match in the overlap regions? ''' from spectral_cube import SpectralCube import matplotlib.pyplot as plt import os from radio_beam import Beam import astropy.units as u import numpy as np from scipy import stats from statsmodels.nonparametric.smoothers_lowess import lowess from st...
# App.py # Application stuff. # The application is responsible for managing the main frame window. # # We also grab the FileOpen command, to invoke our Python editor " The PythonWin application code. Manages most aspects of MDI, etc " import win32con import win32api import win32ui import sys import string import os fro...
import codecs import requests from six import iteritems from six import BytesIO from six.moves.urllib_parse import urljoin from lxml.html import _nons, HTMLParser from .py2compat import parse_headers from .iterable import one from .http import DEFAULT_TIMEOUT, readable_from_response, merge_setting from .etree import ge...
"""The registration module contains classes for image registration. Image registration aims to align two images using a particular transformation. miapy currently supports multi-modal rigid registration, i.e. align two images of different modalities using a rigid transformation (rotation, translation, reflection, or t...
import schedule import logging import re import datetime import io import time import traceback import importlib import pkgutil import inspect import reporter.dq_log from datetime import date, datetime from enum import Enum from weasyprint import HTML from jinja2 import Environment, FileSystemLoader from reporter.email...
from silverraw import silvershop, silvercom, silverbook, silvercore import os from datetime import datetime from enum import Enum import pyxb # Imports for suds import urllib2, httplib, socket from suds.client import Client from suds.sax.text import Raw from suds.transport.http import HttpTransport, Reply, Transport...
import glob,os # Build a map from REFPROP name to CAS code RP2CAS = {} for file in glob.glob('C:\\Program Files (x86)\\REFPROP\\fluids\\*.fld'): lines = open(file,'r').readlines() root,RPFluid = os.path.split(file) for line in lines: if line.find('CAS number') > -1: CAS_...