gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import sys from col...
# coding: utf-8 """ Qc API Qc API # noqa: E501 The version of the OpenAPI document: 3.0.0 Contact: cloudsupport@telestream.net Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from telestream_cloud_qc.configuration import Configuration class...
# Copyright 2015 Huawei Technologies Co., Ltd. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
""" Set of classes to manipulate/display emails inside the webmail. """ import os import re import email import chardet import six from django.conf import settings from django.core.files.base import ContentFile from django.core.files.storage import default_storage from django.urls import reverse from django.utils.enc...
#!/usr/bin/env python """A library for tests.""" import datetime import doctest import email import functools import itertools import logging import os import shutil import threading import time import unittest from unittest import mock from absl.testing import absltest import pkg_resources from grr_response_core 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 # d...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import datetime from frappe import _ import frappe import frappe.database import frappe.utils import frappe.utils.user from frappe import conf from frappe.sessions import Sess...
import pytest from django.test.utils import override_settings from django.urls.exceptions import NoReverseMatch from olympia import amo from olympia.activity.models import ActivityLog, VersionLog from olympia.amo.tests import ( APITestClientWebToken, TestCase, addon_factory, reverse_ns, user_facto...
# 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 ...
# 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 -*- """ Copyright (c) 2012 University of Oxford 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, modif...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2011 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
# 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...
"""\ CGBF.py Perform basic operations over contracted gaussian basis functions. Uses the functions in PGBF.py. References: OHT = K. O-ohata, H. Taketa, S. Huzinaga. J. Phys. Soc. Jap. 21, 2306 (1966). THO = Taketa, Huzinaga, O-ohata, J. Phys. Soc. Jap. 21,2313 (1966). This program is part of the PyQuante qua...
from __future__ import absolute_import import time import os.path as op import numpy as nm from sfepy.base.testing import TestCommon def fix_u_fun(ts, coors, bc=None, problem=None, extra_arg=None): return nm.zeros_like(coors) class Test(TestCommon): @staticmethod def from_conf(conf, options): im...
# Copyright (c) 2016 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 ...
# -*- coding: utf-8 -*- """ Pdb debugger class. Modified from the standard pdb.Pdb class to avoid including readline, so that the command line completion of other programs which include this isn't damaged. In the future, this class will be expanded with improvements over the standard pdb. The code in this file is ma...
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
from tulip import * import tulipplugins try: import json json_available = True except ImportError: json_available = False class PropertyManipulation(tlp.Algorithm): def __init__(self, context): tlp.Algorithm.__init__(self, context) self.addPropertyParameter("property by list",\ "the property to s...
""" sentry.plugins.base.v1 ~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function __all__ = ('Plugin',) import logging from django.core.urlresolvers import reverse from...
# -*- mode: python; tab-width: 2; coding: utf8 -*- # # Copyright (C) 2015 Niklas Rosenstein # # 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 # # ...
from five import grok from plone.app.dexterity.behaviors import metadata from plone.directives import form from plone.supermodel import model from Products.CMFCore.utils import getToolByName from Products.statusmessages.interfaces import IStatusMessage from tn.plonemailing import _ from tn.plonemailing import interface...
from __future__ import unicode_literals from django.contrib.auth.models import User from django.test.client import RequestFactory from djblets.conditions import ConditionSet, Condition from reviewboard.scmtools.conditions import (IsRepositoryPrivateOperator, IsRepositoryPu...
# Copyright (c) 2010-2013 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functiona...
from enum import Enum from sqlalchemy import Column, Integer, String, ForeignKey, Table, Text, Boolean, DateTime, Enum as DBEnum, text, \ BigInteger, and_, or_, LargeBinary from sqlalchemy.orm import relationship from commandment.profiles.ad import ADMountStyle, ADNamespace, ADPacketSignPolicy, ADPacketEncryptPol...
import unittest import urwid import mock from .util import render_to_content, render_widgets_to_content, render_to_text from gviewer.basic_widget import BasicWidget, ReadonlyConfirmWidget from gviewer.config import Config from gviewer.context import Context, DisplayerContext from gviewer.parent import ParentFrame, Foo...
#!/usr/bin/env python3 # This sample script demonstrates how to # 1. get a list of event property expressions # 2. create a new event property expression # 3. get an event property expression by id # 4. update an existing event property expression # 5. delete an event property expression import importlib import json i...
import sys import os import re import socket import json import time import zipfile import shutil from fnmatch import fnmatch import datetime import tempfile import locale try: # Python 3 from urllib.parse import urlencode, urlparse import compileall str_cls = str except (ImportError): # Python 2 ...
# Copyright 2015 rpaas authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. import json import unittest from rpaas import api, admin_api, storage from . import managers class AdminAPITestCase(unittest.TestCase): @classmethod def...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import sys import threading import Queue from pyglet import app from pyglet import clock from pyglet import event _is_epydoc = hasattr(sys, 'is_epydoc') and sys.is_epydoc class PlatformEventLoop(object): ''' :since: py...
# # 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...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 Justin Santa Barbara # # 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/L...
# Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or ht...
# Copyright 2016 The Oppia 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 applicable ...
from collections import namedtuple from timeit import default_timer as timer import numpy as np import tensorflow as tf from tensorflow.python.ops.rnn_cell import * from tensorflow.python.ops.rnn import * class ExponentialMovingAverager: """Maintains an exponential moving average value.""" def __init__(self, a...
#!/usr/bin/env python # vim: set fileencoding=utf8 : # See http://www.python.org/dev/peps/pep-0263/ #----------------------------------------------------------------------# # Package Documentation # #----------------------------------------------------------------------# ...
import theano import theano.tensor as T from theano.tensor.shared_randomstreams import RandomStreams from theano.sandbox.cuda.rng_curand import CURAND_RandomStreams import numpy as np import theano.misc.pycuda_init import theano.sandbox.cuda as cuda import time from abc import ABCMeta import sys import pycuda.autoinit...
# Natural Language Toolkit: Nonmonotonic Reasoning # # Author: Daniel H. Garrette <dhgarrette@gmail.com> # # Copyright (C) 2001-2012 NLTK Project # URL: <http://www.nltk.org> # For license information, see LICENSE.TXT """ A module to perform nonmonotonic reasoning. The ideas and demonstrations in this module are base...
import logging class InvalidSortKey(Exception): message = "Sort key supplied was not valid." # copy from glance/db/sqlalchemy/api.py def paginate_query(query, model, limit, sort_keys, marker=None, sort_dir=None, sort_dirs=None): """Returns a query with sorting / pagination criteria added. ...
""" Simple returner for Couchbase. Optional configuration settings are listed below, along with sane defaults. .. code-block:: yaml couchbase.host: 'salt' couchbase.port: 8091 couchbase.bucket: 'salt' couchbase.ttl: 24 couchbase.password: 'password' couchbase.skip_verify_views: False To u...
import copy from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * from direct.showbase import AppRunnerGlobal from direct.showbase import DirectObject from direct.showbase import PythonUtil import os from pandac.PandaModules import * import re import sys import token import tok...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
from __future__ import unicode_literals import hashlib import hmac import logging from base64 import b64encode from collections import OrderedDict from datetime import datetime from django.contrib.sites.models import Site from django.db.models import Model from django.db.models.query import QuerySet from django.http....
import asyncio import re from copy import copy from numbers import Number import aiohttp import bleach import discord from bs4 import BeautifulSoup from redbot.core import Config, checks, commands from discord.ext.commands import formatter # Special thanks to judge2020 for telling me about this method for getting # p...
"""Partial dependence plots for tree ensembles. """ # Authors: Peter Prettenhofer # License: BSD 3 clause from itertools import count import numbers import numpy as np from scipy.stats.mstats import mquantiles from ..utils.extmath import cartesian from ..externals.joblib import Parallel, delayed from ..externals im...
from collections import namedtuple import datetime import logging from django.conf import settings from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from django_prbac.models import Role, UserRole, Grant from dimagi.utils.couch.database import iter_docs from di...
# -*- coding: utf-8 -*- # $URL$ # $Date$ # $Revision$ # See LICENSE.txt for licensing terms import os from urllib.parse import urljoin, urlparse from xml.sax.saxutils import escape import docutils.nodes from rst2pdf.basenodehandler import NodeHandler from rst2pdf.image import MyImage, missing from rst2pdf.opt_imp...
# -*- coding: utf-8 -*- # # Copyright (c) 2008-2009 Benoit Chesneau <benoitc@e-engura.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTW...
from .quadratic import Quadratic from .rosenbrock import Rosenbrock from .beale import Beale from .booth import Booth from .matyas import Matyas from .logistic_regression import LogisticRegression from .stochastic_logistic_regression import StochasticLogisticRegression from .stochastic_linear_regression import Stochast...
from __future__ import unicode_literals, absolute_import from collections import deque from datetime import timedelta from threading import RLock from six.moves import map, range from .datetime import now class NotificationQueue(object): """ A special queue for Notification objects. When a notificatio...
import os import re import secrets import time import pytest from flask import Response import hailtop.batch_client.aioclient as aioclient from hailtop.batch_client.client import BatchClient, Job from hailtop.config import get_user_config from .serverthread import ServerThread from .utils import batch_status_job_cou...
"""Testbed for open/close PyTables files. This uses the HotShot profiler. """ from __future__ import print_function import os import sys import getopt import pstats import cProfile as prof import time import subprocess # From Python 2.4 on import tables filename = None niter = 1 def show_stats(explain, tref): ...
# 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 class BaseCodec(object): """ Base audio/video codec class. """ encoder_options = {} codec_name = None ffmpeg_codec_name = None def parse_options(self, opt): if 'codec' not in opt or opt['codec'] != self.codec_name: raise ValueError('invalid codec...
# orm/util.py # Copyright (C) 2005-2013 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 from .. import sql, util, event, exc as sa_exc, inspection from ..sql import expression, ...
"""Temporary files. This module provides generic, low- and high-level interfaces for creating temporary files and directories. All of the interfaces provided by this module can be used without fear of race conditions except for 'mktemp'. 'mktemp' is subject to race conditions and should not be used; it is provided f...
# -*- coding: utf-8 -*- # """ This script takes a continuation file and a solution file and plots the states next to a continuation diagram. All frames are written to PNG files which can later be concatenated into a movie. """ import os.path import numpy as np import paraview.simple as pv import matplotlib.pyplot as ...
#!/usr/bin/python # # Copyright (C) 2006 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 ...
""" This modules implements a Parallel test runner for unittest """ from pickle import PicklingError import collections import multiprocessing import multiprocessing.managers import queue import sys import threading import time import unittest # noinspection PyProtectedMember from unittest.runner import _WritelnDecora...
import pickle from base64 import b64decode, b64encode from django.core import checks from django.db import models from django.utils.encoding import force_bytes from django.utils.translation import ugettext_lazy as _ from django_cryptography.core.signing import SignatureExpired from django_cryptography.utils.crypto im...
import base64 import collections.abc import hashlib import hmac from calendar import timegm from datetime import datetime from functools import partial from urllib.parse import urlencode from geopy.exc import ConfigurationError, GeocoderQueryError, GeocoderQuotaExceeded from geopy.geocoders.base import DEFAULT_SENTINE...
# encoding: utf-8 from __future__ import unicode_literals try: import urllib.request as urllib_request import urllib.error as urllib_error except ImportError: import urllib2 as urllib_request import urllib2 as urllib_error try: from cStringIO import StringIO except ImportError: from io import ...
""" Provides functionality to interact with hvacs. For more details about this component, please refer to the documentation at https://home-assistant.io/components/hvac/ """ import logging import os from homeassistant.helpers.entity_component import EntityComponent from homeassistant.config import load_yaml_config_f...
import json import os import random import time from contextlib import contextmanager from datetime import datetime, timedelta from decimal import Decimal from functools import partial from urlparse import SplitResult, urlsplit, urlunsplit from django import forms, test from django.db import connections, transaction, ...
# This file is part of beets. # Copyright 2013, 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 limitation the rights to use, copy, ...
# 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...
# vim: fdm=indent # author: Fabio Zanini # date: 17/06/20 # content: Custom ks_2samp that also returns the position of the max import warnings from collections import namedtuple import math from math import gcd import numpy as np from scipy.stats import distributions import scipy.special as special Kstes...
""" KINASE dataset loader """ import os import logging import time import numpy as np import deepchem from deepchem.molnet.load_function.kaggle_features import merck_descriptors TRAIN_URL = "https://deepchemdata.s3-us-west-1.amazonaws.com/datasets/KINASE_training_disguised_combined_full.csv.gz" VALID_UR = "https://de...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2016-07-21 10:40:53 import networkx as nx from networkx import nx_pydot import more_itertools import collections import numpy as np import lydia1_obs_par dn = "/home/patrick/projects/apcocsm/lydia/" G = nx_pydot.read_dot(dn + "lydia1.dot") def get_root(G)...
#!/usr/bin/env python """ epitopepredict plotting Created February 2016 Copyright (C) Damien Farrell This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of th...
#!/usr/bin/env python """ Run the queries described in README cmd: env ABAC_CN=1 keystore=`pwd` ./query.py number of credentials, 3 + 6 + 3 x #VAL# """ import os import sys import ABAC import time import datetime import math debug=0 ctxt = ABAC.Context() ctxt.set_no_partial_proof() cred_count = 3 + 6 + 3 *...
# -*- 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): # Deleting field 'Insumos.rubro' db.delete_column(u'ficha_granos_basicos_...
"""Support for Honeywell (US) Total Connect Comfort climate systems.""" import datetime import logging from typing import Any, Dict, List, Optional import requests import somecomfort import voluptuous as vol from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateEntity from homeassistant.components.clim...
from py65.utils.conversions import itoa from py65.utils.devices import make_instruction_decorator class MPU: # vectors RESET = 0xfffc NMI = 0xfffa IRQ = 0xfffe # processor flags NEGATIVE = 128 OVERFLOW = 64 UNUSED = 32 BREAK = 16 DECIMAL = 8 INTERRUPT = 4 ZERO = 2 ...
"""Library for using callbacks to resume your code.""" from collections.abc import Callable from functools import partial, update_wrapper import inspect import threading import time import weakref __version__ = "1.0.0" __author__ = "FichteFoll <fichtefoll2@googlemail.com>" __all__ = ( 'send_self', 'Generat...
import sys from io import BytesIO from telegram import (ReplyKeyboardMarkup, ReplyKeyboardRemove) import telegram from flask import Flask, request, send_file from flask.ext.cache import Cache from fsm import TocMachine import google_news as news import boto3 client = boto3.client('rekognition') from gtts import gTTS ...
"""The tests for the Group Light platform.""" from unittest.mock import MagicMock import asynctest import homeassistant.components.group.light as group from homeassistant.setup import async_setup_component from tests.components.light import common async def test_default_state(hass): """Test light group default...
__author__ = 'Xiang-Guo Li' __copyright__ = 'Copyright 2018, The Materials Virtual Lab' __email__ = 'xil110@eng.ucsd.edu' __date__ = '07/30/18' from pymatgen.util.testing import PymatgenTest import os import unittest import numpy as np import warnings from pymatgen import Structure from pymatgen.analysis.gb.grain impo...
# 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...
# 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...
#!/usr/bin/env python """Classes to encapsulate the idea of a dataset in machine learning, including file access. Currently this focuses on reading and writing transparently to different file formats. A dataset is modeled as an (example,label) tuple, each of which is an array. The base class doesn't know ...
import os import os.path import subprocess import threading import socket import lldb from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbtest_config def checksum(message): """ Calculate the GDB server protocol checksum of the message. The GDB server protocol uses a simple modulo 256 sum...
import os, logging, threading, time, traceback from datetime import timedelta from Queue import Queue, Empty from galaxy import model from galaxy.jobs.runners import BaseJobRunner from galaxy.jobs import TaskWrapper from paste.deploy.converters import asbool import pkg_resources import shutil from subprocess import c...
import pyemto import pyemto.utilities as utils import numpy as np import os latpath = "../../../" # Path do bmdl, kstr and shape directories # each system need to have same number of alloy elements #systems = [['Fe','Al'],['Fe','Cr']] systems = [['Fe'],['Al']] systems = [['Al']] #concentrations = [[0.5,0.5]] concent...
# Copyright 2015 IBM Corp. # # 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...
# Tests of custom properties for Python programming. # # Author: Peter Odding <peter@peterodding.com> # Last Change: March 2, 2020 # URL: https://property-manager.readthedocs.io """Automated tests for the :mod:`property_manager` module.""" # Standard library modules. import logging import os import random import sys ...
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin from future.moves import urllib import logging import json import re import http.cookiejar from flexget import plugin from flexget.config_schema import one_or_more from flexget...
"""Check package URLs for updates Subclasses of `Hoster` define how to handle each hoster. Hosters are selected by regex matching each source URL in a recipe. The `HTMLHoster` provides parsing for hosting sites listing new releases in HTML format (probably covers most). Adding a hoster is as simple as defining a regex...
from rest_framework.exceptions import MethodNotAllowed from rest_framework.permissions import SAFE_METHODS, BasePermission from olympia.amo import permissions from olympia.access import acl # Most of these classes come from zamboni, check out # https://github.com/mozilla/zamboni/blob/master/mkt/api/permissions.py fo...
# -*- coding: utf-8 -*- """ Created on Thu Jun 21 14:26:35 2018 @author: tih """ import time import os import re import gdal import numpy as np import datetime import osr def Get_Time_Info(workbook, number): # Open the VIIRS_PROBAV_Input sheet ws = workbook['VIIRS_PROBAV_Input'] # Extract the name of t...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Patch transplanting extension for Mercurial # # Copyright 2006, 2007 Brendan Cully <brendan@kublai.com> # # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. from mercurial.i18n import _ import os, tempfile from mercurial import bu...
""" mbed CMSIS-DAP debugger Copyright (c) 2015 ARM 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 o...
#!/usr/bin/env python3 import netCDF4 as nc import sys import numpy as np import matplotlib.pyplot as plt import argparse import scipy.ndimage as sn # contains the filters from plotTools import addImagePlot from netcdfTools import read3dDataFromNetCDF from utilities import selectFromList #============================...
import re from .samples import Sample METRIC_TYPES = ( 'counter', 'gauge', 'summary', 'histogram', 'gaugehistogram', 'unknown', 'info', 'stateset', ) METRIC_NAME_RE = re.compile(r'^[a-zA-Z_:][a-zA-Z0-9_:]*$') METRIC_LABEL_NAME_RE = re.compile(r'^[a-zA-Z_][a-zA-Z0-9_]*$') RESERVED_METRIC_LABEL_NAME_RE = re.com...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
#!/usr/bin/env python2 import os import time import qrcode import shutil import logging import tempfile import argparse # get python log log = logging.getLogger() # set default log level log.setLevel(logging.DEBUG) # define log format log_format = "[%(asctime)s] (%(levelname)s) %(message)s" # initialize argument par...
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib import...
import pandas as pd import pandas.testing as tm import pytest from pytest import param import ibis import ibis.common.exceptions as com from ibis.backends.pyspark.compiler import _can_be_replaced_by_column_name def test_basic(client): table = client.table('basic_table') result = table.compile().toPandas() ...
#!/usr/bin/python3 # -*- coding: utf-8 -*- # # Proxy2 # # TODO: # - implement dynamic plugins directory scanning method in the PluginsLoader # - perform severe code refactoring as for now it's kinda ugly # - add more advanced logging capabilities, redesign packets contents dumping # # Changelog: # 0.1 origi...