gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import tarfile import os import shelve import logging import logging.config import indexer.callnumber as call_number from indexer import oai_reader class Builder(object): """ Handles the entire build process This is a bit of God object, which is unfortunate. """ def __init__(self, categorizer,...
import argparse import re import time import curses import bisect import queue import can from argparse_addons import Integer from .. import database from .__utils__ import format_message from .__utils__ import format_multiplexed_name class QuitError(Exception): pass class Monitor(can.Listener): def __ini...
# pylint: disable=wrong-or-nonexistent-copyright-notice import numpy as np import pytest import cirq def test_projector_matrix(): q0 = cirq.NamedQubit('q0') zero_projector = cirq.ProjectorString({q0: 0}) one_projector = cirq.ProjectorString({q0: 1}) coeff_projector = cirq.ProjectorString({q0: 0}, 1....
#! /usr/bin/env python """ pyparsing based grammar for DCPU-16 0x10c assembler """ try: from itertools import izip_longest except ImportError: from itertools import zip_longest as izip_longest try: basestring except NameError: basestring = str import logging log = logging.getLogger("dcpu16_asm") log....
#!/usr/bin/python import json import csv import sys import argparse import os import uuid import hashlib # convert incident_id to UUID import copy import logging import re from datetime import datetime import ConfigParser # Default Configuration Settings cfg = { 'log_level': 'warning', 'log_file': None, '...
"""Support for skip/xfail functions and markers.""" import os import platform import sys import traceback from collections.abc import Mapping from typing import Generator from typing import Optional from typing import Tuple from typing import Type import attr from _pytest.config import Config from _pytest.config impo...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS import functools import pytest import numpy as np from ... import units as u from .. import (PhysicsSphericalRepresentation, CartesianRepresentation, CylindricalRepresentation, SphericalRepresentation, ...
# 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...
# 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 ...
# Natural Language Toolkit: Chunk parsing API # # Copyright (C) 2001-2013 NLTK Project # Author: Edward Loper <[email protected]> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ Named entity chunker """ from __future__ import print_function import os, re, pickle from xml.etre...
"""Kea Control Channel - socket""" # pylint: disable=invalid-name,line-too-long import pytest import misc import srv_msg import srv_control from forge_cfg import world @pytest.mark.v6 @pytest.mark.controlchannel @pytest.mark.kea_only def test_control_channel_socket_config_get(): misc.test_setup() srv_contr...
from datetime import datetime import logging import re from google.appengine.api import memcache from google.appengine.api.labs.taskqueue import TaskAlreadyExistsError from google.appengine.api.urlfetch import DownloadError from google.appengine.ext import db from google.appengine.ext import deferred import simplejso...
# Copyright (c) 2013 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
# getTypeOf(scope,fqn) and getTypeOfExpr(scope,ast) from bike.parsing.fastparserast import Class, Function, Module, Root, getRoot, Package, Instance, getModule from bike.parsing.parserutils import generateLogicalLines, makeLineParseable,splitLogicalLines, makeLineParseable from bike.parsing import visitor from bike im...
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2006-2008 (ita) """ Java support Javac is one of the few compilers that behaves very badly: * it outputs files where it wants to (-d is only for the package root) * it recompiles files silently behind your back * it outputs an undefined amount of files (inner cla...
from io_utilities.base_importData import base_importData from io_utilities.base_exportData import base_exportData from .general_feature_format import general_feature_format from python_statistics.calculate_interface import calculate_interface from .genome_annotations import genome_annotations import json class gff_cov...
from django.views.generic import View from django.shortcuts import render_to_response, get_object_or_404 ,render from django.contrib.auth.decorators import login_required from django.http import HttpResponse , HttpResponseRedirect from django.core import serializers from django.template import RequestContext from djang...
#!/usr/bin/env python import argparse import copy import dateutil.parser import dateutil.tz import datetime import json import logging import time import urllib import urllib2 import threading NEXT_ACTION_LABEL = u'next_action' args = None class TraversalState(object): """Simple class to contain the state of the i...
""" Collection of physical constants and conversion factors. Most constants are in SI units, so you can do print '10 mile per minute is', 10*mile/minute, 'm/s or', 10*mile/(minute*knot), 'knots' The list is not meant to be comprehensive, but just convenient for everyday use. """ """ BasSw 2006 physical constants: imp...
# Copyright (c) 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
from __future__ import print_function, unicode_literals import os from django.conf import settings from django.contrib.auth.models import User from django.core import mail from django.utils import six from djblets.siteconfig.models import SiteConfiguration from djblets.webapi.testing.testcases import WebAPITestCaseMi...
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- """CherryPy Server to provide recommendations of semantic similarity.""" import os import json import codecs import cherrypy import argparse import configparser from gensim.models import Word2Vec from nltk.tokenize import word_tokenize from jinja2 import Environment, Fi...
# -*- coding: utf-8; -*- from __future__ import unicode_literals from datetime import datetime from multiprocessing import Process, Queue import time import sys import six import signal import dateutil.parser import docker from docker.errors import APIError from ..utils import parse_stream, normalize_keys,...
# Copyright 2016-2017 Capital One Services, LLC # Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 import functools from botocore.exceptions import ClientError from concurrent.futures import as_completed from c7n.actions import ActionRegistry, BaseAction from c7n.filters import FilterRegis...
# coding=utf-8 # pylint: disable-msg=E1101,W0612 import pytest import pandas as pd import numpy as np from pandas import (Series, date_range, isna, Index, Timestamp) from pandas.compat import lrange, range from pandas.core.dtypes.common import is_integer from pandas.core.indexing import IndexingError from pandas.ts...
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl import pytest from io import BytesIO from zipfile import ZipFile from openpyxl.xml.functions import fromstring, tostring from openpyxl.tests.helper import compare_xml from openpyxl.xml.constants import ( ARC_CONTENT_TYPES, ARC_WORKBOOK...
""" .. module: lemur.sources.service :platform: Unix :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :license: Apache, see LICENSE for more details. .. moduleauthor:: Kevin Glisson <[email protected]> """ import arrow from flask import current_app from lemur import database from lemur.source...
#!/usr/bin/env python import sys import getopt import time import os import subprocess # "solver" should point to the binary built. # e.g. "/home/z3-str/str" solver = os.path.join(os.path.abspath(os.path.dirname(__file__)), "str_static") #=================================================================== def enco...
# 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...
# sql/crud.py # Copyright (C) 2005-2016 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Functions used by compiler.py to determine the parameters rendered within INSERT and ...
import fnmatch import itertools import json import random import re import string import traceback import urllib import botconfig import src.settings as var from src import proxy, debuglog from src.events import Event from src.messages import messages # message either privmsg or notice, depending on user settings def...
from __future__ import absolute_import from __future__ import print_function import numpy as np import logging import re from scipy.spatial import Delaunay, ConvexHull from scipy.special import factorial from scipy.spatial.qhull import QhullError from lmatools.lasso import empirical_charge_density as cd # logger = l...
"""Service manager for agilefant """ import os import os.path import shutil import sys import time import tempfile import stat import urllib2 import engage.drivers.service_manager as service_manager import engage.drivers.resource_metadata as resource_metadata import engage.utils import engage.utils.path as iupath impo...
from flask import current_app as app, render_template, request, redirect, abort, jsonify, json as json_mod, url_for, session, Blueprint from CTFd.utils import ctftime, view_after_ctf, authed, unix_time, get_kpm, user_can_view_challenges, is_admin, get_config, get_ip, is_verified, ctf_started, ctf_ended, ctf_name, is_o...
# progress reporting # Author:: Sam Steingold (<[email protected]>) # Copyright:: Copyright (c) 2014, 2015, 2016 Magnetic Media Online, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Yo...
# -*- coding: utf-8 -*- from itertools import repeat import six from django.db import models, connections from django.db.models.query import QuerySet from django.utils.encoding import smart_text from djorm_pgfulltext.utils import adapt # Compatibility import and fixes section. try: from django.db.transaction im...
# 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 ...
#!/usr/bin/env python """Defines the main menu module for a program that inputs a MemberHub directory dump, a school roster, and a hub map to perform analyses on the MemberHub directory. """ import directory_tools import roster_tools import hub_map_tools import import_file_tools import roster import actions STUDENT_I...
# Copyright 2019 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 __future__ import print_function import json import os import sys import shutil import subprocess import tempfile CHROMIUM_PATH = os.path.join(os.path...
""" The MIT License (MIT) Copyright (c) 2016 Stratos Goudelis 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, me...
import os.path import os import logging import socket from base64 import b64encode import sys from urllib3 import PoolManager, proxy_from_url, Timeout from urllib3.util.retry import Retry from urllib3.util.ssl_ import ( ssl, OP_NO_SSLv2, OP_NO_SSLv3, OP_NO_COMPRESSION, PROTOCOL_TLS, DEFAULT_CIPHERS, ) from url...
# -*- coding: utf-8 -*- # # field.py # The collection of fields definitions for coregeo # # Copyright 2010 Atsushi Shibata # """ The collection of fields definitions for aha $Id: field.py 654 2010-08-23 02:02:08Z ats $ """ __author__ = 'Atsushi Shibata <[email protected]>' __docformat__ = 'plaintext' __licenc...
""" OptMAGE Unit Tests """ import os import unittest from Bio import SeqIO from Bio.Alphabet import generic_dna from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from optmage.oligo_designer import DEFAULT_GENOME from optmage.oligo_designer import DEFAULT_OLIGO_SIZE from optmage.oligo_designer import DEFAUL...
# -*- 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): # Deleting model 'EncounterInitiative' db.delete_table(u'dm_encounterinitiative') # Adding model 'N...
import inspect import traceback from pythonscriptcffi import ffi, lib @ffi.def_extern() def pybind_init_sys_path_and_argv(pythonpath, res_path, data_path): pythonpath = ffi.string(pythonpath) res_path = ffi.string(res_path) data_path = ffi.string(data_path) import sys from godot.bindings import O...
from dtreeviz.utils import * import numpy as np import pandas as pd import graphviz from pathlib import Path from sklearn import tree from graphviz.backend import run, view import matplotlib.pyplot as plt from dtreeviz.shadow import * from numbers import Number import matplotlib.patches as patches from mpl_toolkits.mp...
from __future__ import unicode_literals from ..predicate import PredicateRegistry, match_instance, match_key from ..cache import DictCachingKeyLookup, LruCachingKeyLookup from ..error import RegistrationError from ..dispatch import dispatch import pytest def register_value(generic, key, value): """Low-level funct...
import os import warnings from django.conf import settings, global_settings from django.core.exceptions import ImproperlyConfigured from django.http import HttpRequest from django.test import SimpleTestCase, TransactionTestCase, TestCase, signals from django.test.utils import override_settings from django.utils import...
# -*- coding: UTF-8 -*- # Copyright 2009-2020 Rumma & Ko Ltd # License: GNU Affero General Public License v3 (see file COPYING for details) """Views for `lino.modlib.bootstrap3`. """ from past.utils import old_div from django import http from django.conf import settings from django.views.generic import View from dja...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 #Copyright 2013 Cloudbase Solutions SRL #Copyright 2013 Pedro Navarro Perez #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 Li...
#!/usr/bin/python3 # # A simple python program to demonstrate writing numbers to the console # in BIG ASCII style. # import sys import os import collections import re #import getopt import argparse def setup_ascii_dictionary(dictionary_file): # Open our acii character reprentation database. # translate it into a ...
# -*- coding: utf-8 -*- """ pygments.lexers.prolog ~~~~~~~~~~~~~~~~~~~~~~ Lexers for Prolog and Prolog-like languages. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, bygroups from pyg...
"""Converters for OSS Vizier's protos from/to PyVizier's classes.""" import datetime from typing import List, Optional, Sequence, Tuple, Union from absl import logging from vizier.pyvizier.oss import metadata_util from vizier.pyvizier.shared import parameter_config from vizier.pyvizier.shared import trial from vizier....
# 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...
# 3p from nose.plugins.attrib import attr # project from checks import AgentCheck from tests.checks.common import AgentCheckTest @attr(requires='postgres') class TestPostgres(AgentCheckTest): CHECK_NAME = 'postgres' def test_checks(self): host = 'localhost' port = 15432 dbname = 'dat...
# ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation,...
from __future__ import print_function import logging import pprint import math import numpy import os import operator import theano from six.moves import input from picklable_itertools.extras import equizip from theano import tensor from blocks.bricks import Tanh, Initializable from blocks.bricks.base import applicat...
# 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...
# -*- coding: utf-8 -*- import datetime import fuse import mock import os import six import stat import tempfile import threading import time from girder.cli import mount from girder.exceptions import ValidationException from girder.models.file import File from girder.models.setting import Setting from girder.models.u...
# Copyright (C) 2016-2019 Virgil Security Inc. # # Lead Maintainer: Virgil Security Inc. <[email protected]> # # 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) Redistribution...
import argparse import os import logging import configparser import zendesk import filesystem import translate DEFAULE_LOG_LEVEL = 'WARNING' CONFIG_FILE = 'zendesk-help-cms.config' class ImportTask(object): def execute(self, args): print('Running import task...') categories = zendesk.fetcher(ar...
from polyglot.nodeserver_api import Node import nest import requests from nest import utils as nest_utils import sys from login import USERNAME, PASSWORD # Globally disable SSL warnings from requests package. requests.packages.urllib3.disable_warnings() NEST_STATES = {0: "off", 1: "heat", 2: "cool", 3: "range", 13: ...
""" Ray queries using the pyembree package with the API wrapped to match our native raytracer. """ import numpy as np from copy import deepcopy from pyembree import __version__ as _ver from pyembree import rtcore_scene from pyembree.mesh_construction import TriangleMesh from pkg_resources import parse_version from ...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
import re import zipfile import os from collections import defaultdict import subprocess import StringIO import xlrd import magic import messytables import lib from ckan.lib import helpers as ckan_helpers import logging log = logging.getLogger(__name__) def sniff_file_format(filepath): '''For a given filepath,...
# Copyright 2016 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,...
""" There are two types of functions: 1) defined function like exp or sin that has a name and body (in the sense that function can be evaluated). e = exp 2) undefined function with a name but no body. Undefined functions can be defined using a Function class as follows: f = Function('f') (the result...
# Copyright (c) 2021 PaddlePaddle 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 appli...
"""Tests for binary operators on subtypes of built-in types.""" import unittest from test import support from operator import eq, ne, lt, gt, le, ge from abc import ABCMeta def gcd(a, b): """Greatest common divisor using Euclid's algorithm.""" while a: a, b = b%a, a return b def isint(x): """...
import copy import datetime from django.core.exceptions import EmptyResultSet, FieldError from django.db.backends import utils as backend_utils from django.db.models import fields from django.db.models.query_utils import Q from django.utils.functional import cached_property class Combinable: """ Provides the...
# 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 the Li...
#!/usr/bin/env python import click import sys from solar.core import resource from solar.core import signals from solar.core import validation from solar.core.resource import virtual_resource as vr from solar import events as evapi from solar.dblayer.model import ModelMeta PROFILE = False #PROFILE = True if PROFIL...
""" contains all available validation functions """ import common_utils as utils import re import logging import output_messages import basedefs import types import traceback import os import os.path import tempfile import cracklib from setup_controller import Controller def validateNFSMountPoint(param, options=[]): ...
""" Multiclass and multilabel classification strategies =================================================== This module implements multiclass learning algorithms: - one-vs-the-rest / one-vs-all - one-vs-one - error correcting output codes The estimators provided in this module are meta-estimators: they re...
# Copyright 2011 Kurt Le Breton, All Rights Reserved import mwire import unittest class MWireFunctions(unittest.TestCase): def setUp(self): self.m = mwire.M('192.168.0.6', 6330) def test_exists_01(self): """ test1="aaa" test1[1,"x"]="hello" test1[1,"y"]="world" ...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'DatabaseLock' db.create_table(u'logical_databaselock', ( ...
from __future__ import print_function import argparse import six import sys import contextlib from humancrypto import PrivateKey, Certificate, CSR from humancrypto import pki, yearutil from humancrypto.error import VerifyMismatchError, PasswordMatchesWrongYear def do(parser): def deco(f): parser.set_defa...
from __future__ import absolute_import import logging import tempfile import os.path from pip.compat import samefile from pip.exceptions import BadCommand from pip._vendor.six.moves.urllib import parse as urllib_parse from pip._vendor.six.moves.urllib import request as urllib_request from pip._vendor.packaging.versio...
# -*- coding: utf-8 -*- import logging from asyncinit import asyncinit from .blockchainobject import BlockchainObject from ..exceptions import AccountDoesNotExistsException from ..account import Account as SyncAccount, AccountUpdate as SyncAccountUpdate log = logging.getLogger() class Account(BlockchainObject, Sy...
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
# Copyright 2020 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...
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
import calendar import urlparse import re import time_util import struct import base64 # Also defined in saml2.saml but can't import from there XSI_NAMESPACE = 'http://www.w3.org/2001/XMLSchema-instance' XSI_NIL = '{%s}nil' % XSI_NAMESPACE # --------------------------------------------------------- class NotValid(Ex...
# Copyright (c) 2012 - 2015 EMC Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
from __future__ import absolute_import import os import re import six import time import logging import posixpath from sentry.models import Project, EventError from sentry.plugins import Plugin2 from sentry.lang.native.symbolizer import Symbolizer from sentry.lang.native.utils import find_all_stacktraces, \ find_...
#!/usr/bin/python # # Copyright 2011 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...
from __future__ import division import sys import albow # used for translation update from pygame import Rect, Surface, image from pygame.locals import K_RETURN, K_KP_ENTER, K_ESCAPE, K_TAB, KEYDOWN, SRCALPHA from pygame.mouse import set_cursor from pygame.cursors import arrow as arrow_cursor from pygame.transform impo...
# 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 """Read/write data from an ESRI ASCII file into a RasterModelGrid. ESRI ASCII functions ++++++++++++++++++++ .. autosummary:: :toctree: generated/ ~landlab.io.esri_ascii.read_asc_header ~landlab.io.esri_ascii.read_esri_ascii ~landlab.io.esri_ascii.write_esri_ascii """ import o...
import nose.tools from angr import SimState, SimHeapPTMalloc # TODO: Make these tests more architecture-independent (note dependencies of some behavior on chunk metadata size) def chunk_iterators_are_same(iterator1, iterator2): for ck in iterator1: ck2 = next(iterator2) if ck.base != ck2.base: ...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt import base64 import frappe import os import unittest from frappe import _ from frappe.core.doctype.file.file import move_file, get_files_in_folder from frappe.utils import get_files_path # test_records = frap...
#!/usr/bin/python """\ xml2cython: process xml files generated by gccxml and generate cython code Usage: xml2cython header xmlfile By default, xml2cython pull out every function available in the xmlfile. There are some basic filter you can use to limit the functions pulled out: - -f/--filter-function-name: o...
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import inspect import logging import os import sys import time from collections import namedtuple import six import yaml from box import Box from jinja2 import Environment from jinja2 import FileSystemLoader from jinja2 import select_autoescape from slackcl...
''' GTF gene models See: http://mblab.wustl.edu/GTF22.html GTF is a 1-based format, meaning that start sites start counting at 1. We read in those start sites and subtract one so that the internal representation is 0-based. Notes: All internal positions returned are 0-based. If a transcript is missing a CDS ...
# coding=utf-8 """Utils functions for supporting the code.""" from __future__ import absolute_import from __future__ import division from absl import flags import numpy as np from numpy.core.numeric import False_ # pylint: disable=unused-import import tensorflow.compat.v1 as tf from tqdm import tqdm from ieg.datas...
"""Contains the Tilt mode code""" # tilt.py # Mission Pinball Framework # Written by Brian Madden & Gabe Knuth # Released under the MIT License. (See license info at the end of this file.) # Documentation and more info at http://missionpinball.com/mpf from mpf.system.config import CaseInsensitiveDict from mpf.system...
"""Tests for the WLED sensor platform.""" from datetime import datetime from unittest.mock import MagicMock, patch import pytest from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN, SensorDeviceClass from homeassistant.components.wled.const import DOMAIN from homeassistant.const import ( ATTR_DEVI...
''' Test actioning.py execute_runbook() ''' import mock import unittest from actioning import execute_runbook import actioning class ExecuteRunbooksTest(unittest.TestCase): ''' Run unit tests against the execute_runbook method ''' def setUp(self): ''' Setup mocked data ''' self.config = moc...