gt
stringclasses
1 value
context
stringlengths
2.49k
119k
r""" Clustal format (:mod:`skbio.io.format.clustal`) =============================================== .. currentmodule:: skbio.io.format.clustal Clustal format (``clustal``) stores multiple sequence alignments. This format was originally introduced in the Clustal package [1]_. Format Support -------------- **Has Snif...
# -*- coding: utf-8 -*- """Routines for version management. These module has :py:class:`Version` class which is a base class for entrypoints ``scd.version``. All entrypoints of such class should be subclasses of :py:class:`Version`. Currently, it ``scd.version`` has following defined entrypoints: +------------+-----...
# Copyright 2011,2013,2017 James McCauley # # 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/env python # encoding: utf-8 # Thomas Nagy, 2006-2018 (ita) """ This tool helps with finding Qt5 tools and libraries, and also provides syntactic sugar for using Qt5 tools. The following snippet illustrates the tool usage:: def options(opt): opt.load('compiler_cxx qt5') def configure(conf): conf.lo...
#!/usr/bin/env python # Copyright 2015, Rackspace US, 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...
# coding: utf-8 # PYTHON IMPORTS import os, re from types import MethodType # DJANGO IMPORTS from django.shortcuts import render_to_response, HttpResponse from django.template import RequestContext as Context from django.http import HttpResponseRedirect, HttpResponseBadRequest, Http404 from django.contrib.admin.views...
#!/usr/bin/python ################ # The MIT License (MIT) # # Copyright (c) <2013> <Martin de Bruyn> # # 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 withou...
# -*- coding: utf-8 -*- """ Auth* related model. This is where the models used by :mod:`repoze.who` and :mod:`repoze.what` are defined. It's perfectly fine to re-use this definition in the GAPProject application, though. """ import os from datetime import datetime import sys import random try: from hashlib impor...
"""The tests for the sun automation.""" from datetime import datetime import pytest from unittest.mock import patch from homeassistant.const import SUN_EVENT_SUNRISE, SUN_EVENT_SUNSET from homeassistant.setup import async_setup_component from homeassistant.components import sun import homeassistant.components.automat...
from Observation import Observation import Cube from transit import * import limbdarkening.phoenix as LD from .imports import * class TS(Talker): """ A transmission spectrum object, which can contain depths + uncertainties, lightcurves, covariance matrices.""" def __init__(self, obs=None, binsize=100, remake=Fals...
from __future__ import unicode_literals from __future__ import division import logging import threading from ..elements.elementbase import LogicElement, Attribute from ..tags.context import DataSetterBase from .. import namespaces from ..compat import implements_to_string from fs.path import basename, join, splitext...
# Ensure that loader is imported before loader_tags, or a circular import may happen # when this file is loaded from an `__init__.py` in an application root. # The __init__.py files in applications are loaded very early due to the scan of of translation.activate() import django import django.template.loader # noqa # ...
"""Z-Wave Constants.""" DOMAIN = "zwave" ATTR_NODE_ID = "node_id" ATTR_TARGET_NODE_ID = "target_node_id" ATTR_ASSOCIATION = "association" ATTR_INSTANCE = "instance" ATTR_GROUP = "group" ATTR_VALUE_ID = "value_id" ATTR_MESSAGES = "messages" ATTR_NAME = "name" ATTR_RETURN_ROUTES = "return_routes" ATTR_SCENE_ID = "scene_...
import ply.lex as lex import ply.yacc as yacc reserved = { 'if': 'IF', 'then': 'THEN', 'else': 'ELSE', 'switch': 'SWITCH', 'function': 'FUNCTION', 'do': 'DO', 'done': 'DONE', 'let': 'LET', 'in': 'IN', 'set': 'SET', 'to': 'TO', 'true': 'TRUE', 'false': 'FALSE' } toke...
def run(command): print command os.system(command) def select_background(filt, out_flag_file): import tempfile ...
# -*- coding: utf-8 -*- import time from django.db.models import Q from django.shortcuts import render from django.http import HttpResponseRedirect from django.http import HttpResponseNotFound from django.contrib.auth.hashers import make_password from django.contrib.auth.hashers import check_password from django.views....
#!/usr/bin/env python3 import sys import zlib import socket import struct import hashlib import binascii from pyexfil.includes.prepare import PrepFile from pyexfil.includes.exceptions import FileDoesNotExist from pyexfil.includes.general import _split_every_n, does_file_exist from pyexfil.includes.encryption_wrappers...
import functools import os import pkgutil import sys from argparse import _SubParsersAction from collections import defaultdict from difflib import get_close_matches from importlib import import_module import django from django.apps import apps from django.conf import settings from django.core.exceptions import Improp...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
# 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...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright IBM Corp. 2013 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...
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
"""Low-level MediaFire API Client""" from __future__ import unicode_literals import hashlib import requests import logging import six from six.moves.urllib.parse import urlencode from requests_toolbelt import MultipartEncoder from requests.adapters import HTTPAdapter from requests.exceptions import RequestExcepti...
# 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...
# -*- coding: utf-8 -*- from django.db import models, migrations class Migration(migrations.Migration): dependencies = [("users", "0003_auto_20160406_2128")] operations = [ migrations.AlterField( model_name="editor", name="home_wiki", field=models.CharField( ...
from api_lib import APITest from publish import DefaultSigningOptions class SnapshotsAPITestCreateShowEmpty(APITest): """ GET /api/snapshots/:name, POST /api/snapshots, GET /api/snapshots/:name/packages """ def check(self): snapshot_name = self.random_name() snapshot_desc = {u'Descript...
# Project imports import os import sys sys.path.insert(0, os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))))) import helper from elodie.localstorage import Db from elodie import constants os.environ['TZ'] = 'GMT' def test_init_writes_files(): db = Db() assert os....
# 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...
# # 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 us...
#!/usr/bin/env python """ @package mi.instrument.satlantic.isusv3.ooicore.driver @file /Users/foley/sandbox/ooici/marine-integrations/mi/instrument/satlantic/isusv3/ooicore/driver.py @author Steve Foley @brief Driver for the ooicore Development notes/todo list: * Menu handlers need to find the operating mode they wil...
#!/usr/bin/env python3 # Copyright 2017 The Kubernetes 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 appl...
#!/usr/bin/python import os import sys import tempfile import getopt import re import socket import logging import argparse import xml.etree.ElementTree as ET logging.basicConfig(level=logging.DEBUG) try: import MySQLdb except ImportError: print 'This program requires the python MySQLdb module' sys.exit(10...
""" Collection of classes to extract information from the site. """ import re, sys import socket import urllib import urllib.request from collections import Counter, defaultdict from html.parser import HTMLParser def search_for_urlless(cache, matcher, results, printer, fp_category, fps, tmp_set): for response in c...
from collections import defaultdict from data_structs import PinDirection, ConnectionType from utils import yield_muxes from rr_utils import add_node, connect # ============================================================================= class SwitchboxModel(object): """ Represents a model of connectivity ...
#!/usr/local/bin/python2.7 #FREEBSD 2 Minutes ARP Expires - /bin/echo "net.link.ether.inet.max_age 300" >> /etc/sysctl.conf #Crontab -e "* * * * * /usr/local/bin/python2.7 /root/Security.py" import subprocess import ConfigParser import string, os, sys, httplib import xml.etree.ElementTree as ET from datetime import da...
# Copyright 2013 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 a...
from ...rl import Plant import numpy as np import warnings class SpeedReward(Plant): """A :py:class:`Plant` with focus on the speed of the robot. """ def __init__(self): super(SpeedReward, self).__init__(state_space_dim=2) def state_input(self, state): """Return the location, sampl...
from __future__ import print_function, division, absolute_import import os from time import sleep import pytest from toolz import concat, valmap, partial from dask import compute, get, delayed from dask.compatibility import FileNotFoundError from dask.utils import filetexts from dask.bytes import compression from da...
from __future__ import absolute_import, division, print_function import pytest sa = pytest.importorskip('sqlalchemy') pytest.importorskip('psycopg2') import os import itertools from datashape import dshape from odo.backends.csv import CSV from odo import odo, into, resource, drop, discover from odo.utils import as...
import json import os import uuid import xml.etree.cElementTree as ET from bson.objectid import ObjectId from clustering.mongo.MongoHandler import MongodbFactory from clustering.mvn.Mvn import Mvn from config.config import conf from error.ErrorHandler import ModuleWriteException, ModuleErrorCompilingException, \ ...
""" This module contains functions to solve a single equation for a single variable. """ from __future__ import print_function, division from sympy.core.sympify import sympify from sympy.core import S, Pow, Dummy, pi, Expr, Wild, Mul, Equality, Symbol from sympy.core.numbers import I, Number, Rational, oo from sympy.c...
#!/usr/bin/python from optparse import OptionParser import fileinput import sys from datetime import date import re # get start date, end date, and filename from user def process_input(): parser = OptionParser() parser.add_option("-f", "--file", dest="filename", help="read from *.ics FILE") #metavar="FILE"?? parse...
import os import os.path import tempfile import shutil import json from nose.tools import eq_ from nose.tools import with_setup from build_pack_utils import utils from build_pack_utils import BuildPack newrelic = utils.load_extension('extensions/newrelic') class TestNewRelic(object): def setUp(self): se...
import os import random import sys import time import numpy as np import tensorflow as tf from global_module.implementation_module import model from global_module.implementation_module import reader from global_module.settings_module import set_params, set_dir iter_train = 0 iter_valid = 0 def run_epoch(session, w...
from rethinkengine.connection import get_conn from rethinkengine.fields import ObjectIdField from rethinkengine.errors import InvalidQueryError, DoesNotExist import rethinkdb as r __all__ = ['QuerySet', 'QuerySetManager'] REPR_SIZE = 20 class QuerySet(object): def __init__(self, document): self._docum...
# -*- coding: utf-8 -*- from greendizer.clients.base import extract_id_from_uri from greendizer.clients.dal import Node from greendizer.clients.resources import (User, Company, EmailBase, InvoiceBase, InvoiceNodeBase, AnalyticsBase, TimespanDigestNode,...
# 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...
import os import h5py import pyroaring as roaring import pytoml as toml import re from scipy import sparse from . import reversepolish as rpn MAXROWS = 2**32 class MapFile: def __init__(self, filepath, mode='r'): self._mode = mode try: fmode = { 'r': 'rb', ...
from __future__ import unicode_literals from django.contrib.auth.models import User from django.http import HttpResponseRedirect from django.shortcuts import render, render_to_response from django.utils.translation import ugettext_lazy as _ from djblets.siteconfig.models import SiteConfiguration from haystack.inputs i...
"""Module for storing/displaying Rust compiler messages.""" import sublime import collections import functools import html import itertools import os import re import textwrap import urllib.parse import uuid import webbrowser from . import util, themes, log from .batch import * from .levels import * # Key is window...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- # pylint: ...
# Copyright 2015 Google Inc. All Rights Reserved. """Implementation of retrying logic.""" import collections import functools import itertools import random import sys import time _DEFAULT_JITTER_MS = 1000 # TODO(cherba): replace retry logic elsewhere # (appengine/lib, compute, bigquery ...) with this implementat...
import amsoil.core.pluginmanager as pm from amsoil.core import serviceinterface import amsoil.core.log logger=amsoil.core.log.getLogger('gsarpc') from apiexceptionsv2 import GFedv2NotImplementedError xmlrpc = pm.getService('xmlrpc') class GSAv2Handler(xmlrpc.Dispatcher): """ Handle XML-RPC Slice Authority A...
from __future__ import (division, print_function) from pomegranate import * from nose.tools import with_setup from nose.tools import assert_equal from nose.tools import assert_not_equal import random import numpy as np def setup(): ''' Build a model that we want to use to test sequences. This model will be somewh...
#! /usr/bin/python3 # Import the GUI library Tkinter import tkinter # Import the messagebox module explicitly from tkinter import messagebox # Import the webbroswer module for opening a link import webbrowser # Import the client module from ttt_client import TTTClientGame # Import multi-threading module import threadi...
import json import sys import uuid from textwrap import dedent from typing import Any, Dict, List import sqlalchemy from sqlalchemy.sql.type_api import TypeEngine from trino.exceptions import TrinoQueryError # noqa from datahub.ingestion.extractor import schema_util from datahub.ingestion.source.sql.sql_common impor...
# Copyright 2020, Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
# Copyright (c) 2008 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.web.http_headers}. """ import sys from twisted.python.compat import set from twisted.trial.unittest import TestCase from twisted.web.http_headers import _DictHeaders, Headers class HeadersTests(TestCase): """ ...
# Copyright (C) 2012 Midokura Japan K.K. # Copyright (C) 2013 Midokura PTE 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.or...
import ConfigParser import hmac import uuid import os import pytest from mock import patch, Mock from lecli import api_utils, cli ID_WITH_VALID_LENGTH = str(uuid.uuid4()) ID_WITH_INVALID_LENGTH = str(uuid.uuid4()) + 'invalid' MOCK_API_URL = 'http://mydummylink.com' def test_gensignature(): with patch.object(hm...
import test from nose.tools import * import numpy as np import neural def test_softmax_log_bias(): softmax = neural.layer.Softmax(4, log=True) softmax.setup(2, 1, neural.layer.Input(3)) assert_equal(len(softmax.weights), 2) assert_equal(softmax.weights[0].get_value().shape, (3, 4)) assert_equal...
""" Module defining input/output interfaces to HoloViews. There are two components for input/output: Exporters: Process (composite) HoloViews objects one at a time. For instance, an exporter may render a HoloViews object as a svg or perhaps pickle it. Archives: A collection of HoloViews objects...
# Copyright 2012 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 ag...
# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors # For license information, please see license.txt import json import time import requests import frappe from frappe import _ from frappe.custom.doctype.custom_field.custom_field import create_custom_field from frappe.frappeclient impo...
# Copyright (C) 2014 Ivan Melnikov <iv at altlinux dot org> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
from pysis.services.base import Service from uuid import UUID class Reports(Service): """Reports Service Consumes Reports API: <{url}/reports> """ def __init__(self, client): """Creates Reports object with a client""" super(Reports, self).__init__(client) def getAllReportTypes(sel...
# 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 copy import datetime import os from django.conf import settings from django.db.models.fields import Field from django.core.files.base import File, ContentFile from django.core.files.storage import default_storage from django.core.files.images import ImageFile, get_image_dimensions from django.core.files.uploade...
# encoding: utf-8 """Constant values related to the Open Packaging Convention. In particular, this includes content (MIME) types and relationship types. """ class CONTENT_TYPE(object): """Content type URIs (like MIME-types) that specify a part's format.""" ASF = "video/x-ms-asf" AVI = "video/avi" B...
from django.contrib.gis.geoip import GeoIPException from django.shortcuts import render_to_response from django.template import RequestContext from django.template import loader from django.template import Context from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required fro...
# -*- coding: utf-8 -*- # # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# 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 requ...
import copy import re import numpy as np from plotly import colors from ..util import color_intervals, process_cmap # Constants # --------- # Trace types that are individually positioned with their own domain. # These are traces that don't overlay on top of each other in a shared subplot, # so they are positioned i...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
from numpy import array, mean, median, std, size, arange, percentile,\ asarray, zeros, corrcoef, where, unique, array_equal, delete, \ ravel, logical_not, unravel_index, prod, random, shape, \ dot, outer, expand_dims, ScalarType, ndarray, sqrt, pi, angle, fft, \ roll, polyfit, polyval, ceil, float64, fi...
from sympy import (binomial, Catalan, cos, Derivative, E, exp, EulerGamma, factorial, Function, harmonic, Integral, log, nan, oo, pi, Product, product, Rational, S, sqrt, Sum, summation, Symbol, symbols, sympify, zeta, oo, I, Abs, Piecewise) from sympy.abc import...
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test BIP68 implementation.""" import time from test_framework.blocktools import create_block, create_...
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# # 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 # ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Contains a class to handle a validation result for a single VOTable file. """ from __future__ import absolute_import, division, print_function, unicode_literals from ....extern import six from ....extern.six.moves import http_client, urllib from ....e...
from datetime import datetime try: from functools import lru_cache except ImportError: # pragma: no cover from backports.functools_lru_cache import lru_cache from iso8601 import iso8601 from pyparsing import Word, ZeroOrMore, Literal, Forward, Combine, Optional, Regex, OneOrMore, \ CaselessLiteral, Suppre...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import mock import pytest from soco import SoCo from soco.exceptions import SoCoUPnPException IP_ADDR = "192.168.1.101" @pytest.yield_fixture() def moco(): """A mock soco with fake services and hardcoded is_coordinator. Allows calls to servic...
""" This module is designed to perceive bond types of kappa.Molecule instances. Design from: http://www.sciencedirect.com/science/article/pii/S1093326305001737 @author: Alex Kerr """ import csv import numpy as np from ... import package_dir def main(mol, nstates=2000, mintps=0, maxtps=None): """Return the perc...
# Copyright 2019 Red Hat, 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...
from django.db.migrations.graph import ( CircularDependencyError, MigrationGraph, NodeNotFoundError, ) from django.test import TestCase from django.utils.encoding import force_text class GraphTests(TestCase): """ Tests the digraph structure. """ def test_simple_graph(self): """ Te...
# 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 os import yaml import StringIO import contextlib import sys import logging from traceback import format_tb import teuthology from . import report from .job_status import get_status from .misc import get_user, merge_configs from .nuke import nuke from .run_tasks import run_tasks from .repo_utils import fetch_qa_...
# Copyright 2021 DeepMind Technologies Limited # # 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 agr...
# -*- coding: utf-8 -*- r''' Install Python packages with pip to either the system or a virtualenv Windows Support =============== .. versionadded:: 2014.7.4 Salt now uses a portable python. As a result the entire pip module is now functional on the salt installation itself. You can pip install dependencies for your...
import sys import unittest from flaky import flaky import pytest from qtpy import QtCore, QtGui, QtWidgets from qtpy.QtTest import QTest from qtconsole.console_widget import ConsoleWidget from qtconsole.qtconsoleapp import JupyterQtConsoleApp from . import no_display if sys.version[0] == '2': # Python 2 from IP...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2014 Mirantis, 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...
import datetime import json import logging import requests import iso8601 import os from base64 import b64encode from Crypto import Random from dateutil.parser import parse as dateutil_parse from gevent import Greenlet from hashlib import sha256 from humanize import naturaltime from operator import itemgetter from nu...
import json import requests import os class ArcGIS: """ A class that can download a layer from a map in an ArcGIS web service and convert it to something useful, like GeoJSON. Usage: >>> import arcgis >>> source = "http://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/USA_Congr...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
""" Inspiration: http://scikit-learn.org/stable/auto_examples/classification/plot_classifier_comparison.html Args: - retrain binary model with latest image samples Writes: - settings for binary model - clusters reclassified with new model """ import os import numpy as np import pandas as pd from sklearn.linear_mod...
#!/usr/bin/env python2.5 # # Copyright 2010 the Melange 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 applic...
# Copyright 2017, Google LLC All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
from factory import * from datetime import datetime from django.test import TestCase class DatasetTest(TestCase): def test_serializeOne(self): schmog = UserFactory.createRandomUser("test") table = StructureFactory.createTable(schmog) datasetF = DatasetForm({"created": datetime.now()}) ...
#!/usr/bin/env python3 # # Copyright 2015 Signal Processing Devices Sweden AB. All rights reserved. # # Description: ADQ14 FWDAQ streaming example # Documentation: # import numpy as np import ctypes as ct import matplotlib.pyplot as plt import sys import time import os sys.path.insert(1, os.path.dirname(os.path.re...
#!/usr/bin/env python """ An HTTP server tailored for step-debugging through Emscripten-compiled code Usage: debug-emscripten-httpd.py This will serve the entire contents of the project's directory, along with all of its subdirectories, to the local machine. It will also serve files from some key, system-level d...