gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# Copyright (c) 2010, individual contributors (see AUTHORS file)
#
# Permission to use, copy, modify, and/or 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 SOFTWARE IS PROVIDED "AS IS" ... | |
#!/usr/bin/env python
import sys, urllib, urllib2, re, logging, json, uuid, ast, datetime, os, requests, time, collections
from redten.shellprinting import lg, good, boom, mark, anmt, info
from redten.redten_client import RedTenClient, ppj
"""
More documentation and samples:
- Forecast: https://github.com/jay-johnso... | |
import bmesh
import bpy
from mathutils import Vector
MAX_NUM_COLOR_SETS = 8
MAX_NUM_TEXCOORD_SETS = 8
def create_mesh(op, mesh_spec):
idx, primitive_idx = mesh_spec
mesh = op.gltf['meshes'][idx]
primitives = mesh['primitives']
# The caller can request we generate only one primitive instead of all of... | |
"This module define the functions of the features for EEG analysis"
import numpy as np
import scipy as sp
from sklearn.neighbors import KDTree
from numba import njit
def bandPower(spectrum, bandsLimits, freqRes, normalize=False):
"""
Returns the power of each band at the given index.
Parameters
... | |
#!/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 b... | |
# Copyright 2013 Metacloud, Inc.
# Copyright 2012 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 ... | |
from __future__ import absolute_import
import datetime
from xml_models import xpath_finder
from xml_models.managers import ModelManager
from dateutil.parser import parse as date_parser
from lxml import etree
# pylint: disable=too-few-public-methods
# Fields only need one public method
from xml_models.xpath_finder im... | |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import json
from ..decorators import requires_auth
from ..exceptions import error_for
from ..models import GitHubCore
from .. import utils
from uritemplate import URITemplate
class Release(GitHubCore):
"""The :class:`Release <Release>` object.
... | |
# Copyright 2021 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, ... | |
# coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from tests import IntegrationTestCase
from tests.holodeck import Request
from twilio.base.exceptions import TwilioException
from twilio.http.response import Response
class SupportingDocumentTestCas... | |
# Copyright (c) 2011 Adi Roiban.
# See LICENSE for details.
'''Configuration section for Chevah logger.'''
from chevah.utils import __python_future__
import re
from zope.interface import implements
from chevah.utils.configuration import ConfigurationSectionMixin
from chevah.utils.constants import (
CONFIGURATION... | |
# -*- coding:utf-8 -*-
'''
Function for building whole packed version of highlight.js out of
pre-packed modules.
'''
import os
import shutil
import re
import argparse
import subprocess
import json
from functools import partial
REPLACES = {
'case_insensitive': 'cI',
'lexems': 'l',
'contains': 'c',
'key... | |
from oldowan.mtconvert.seq2sites import seq2sites
from oldowan.polymorphism import Polymorphism
def test_example_1():
"""Wilson et al 2002 Example 1
Seq: ATACAACCCCCACCCAT
Seq: ATACAACCCCCACCCAT
rCRS: ATACAACCCCCGCCCAT
Sites: 499A
"""
a = Polymorphism(499,0,'A')
seq = 'ATACTACTAATC... | |
# 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... | |
"""
pghoard
Copyright (c) 2015 Ohmu Ltd
See LICENSE for details
"""
import datetime
import hashlib
import json
import multiprocessing
import multiprocessing.pool
import os
import shutil
import time
import unittest
from tempfile import mkdtemp
from unittest.mock import MagicMock, Mock, patch
import pytest
from pghoar... | |
# ===============================================================================
# Copyright 2015 Jake Ross
#
# 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... | |
# 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.
# --------------------------------------------------------------------... | |
#!/usr/bin/env python
#----------------------------------------------------------------------
# Copyright (c) 2011-2015 Raytheon BBN Technologies
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without ... | |
from pycocotools.coco import COCO
import numpy as np
import logging
import os
import sys
import cv2
import shutil
import json
"""
COCO SUPPORT
"""
def _mapSubject(annotation,mapping):
"""
map annotation category_id to a subject
:param mapping:
:param annotation:
:return:
@type mapping: dict
... | |
#!/usr/bin/env python
"""Main apt-select script"""
import requests
import re
from sys import exit, stderr, version_info
from os import getcwd
from apt_select.arguments import get_args, DEFAULT_COUNTRY, SKIPPED_FILE_GENERATION
from apt_select.mirrors import Mirrors
from apt_select.apt import System, Sources, SourcesFi... | |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
"""Support for Climate devices of (EMEA/EU-based) Honeywell TCC systems."""
from __future__ import annotations
from datetime import datetime as dt
import logging
from homeassistant.components.climate import ClimateEntity
from homeassistant.components.climate.const import (
HVAC_MODE_AUTO,
HVAC_MODE_HEAT,
... | |
# Copyright 2015-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 or agreed to in w... | |
# 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
# distrib... | |
#!/usr/bin/env python
'''
An abstraction of the IPython Parallel task interface.
Given a PBS_NODEFILE, this class launches the controller and engines via ssh
using a temporary profile.
Author: Monte Lunacek, monte.lunacek@colorado.edu
'''
import os
import subprocess
import time
import socket
import signal
import shu... | |
"""The tests for numeric state automation."""
from datetime import timedelta
import logging
from unittest.mock import patch
import pytest
import voluptuous as vol
import homeassistant.components.automation as automation
from homeassistant.components.homeassistant.triggers import (
numeric_state as numeric_state_t... | |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
from PySide import QtGui, QtOpenGL, QtCore
from OpenGL import GL
from OpenGL import GL
from OpenGL.GL import shaders
from OpenGL.arrays import vbo
from OpenGL.GL.ARB import texture_rg
from OpenGL.GL.ARB import half_float_vertex
from ctypes import c_void_p
import numpy
import math
vert_src = """#version 120
attribute v... | |
#!/usr/bin/env python
"""
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");... | |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2007-2009 The PyAMF Project.
# See LICENSE.txt for details.
"""
AMF Utilities.
@since: 0.1.0
"""
import struct
import calendar
import datetime
import types
import inspect
import pyamf
try:
from cStringIO import StringIO
except ImportError:
from StringIO import Stri... | |
#!/usr/bin/env python
import os
from os.path import join as pjoin, dirname, basename
import cPickle as pickle
import argparse
import luigi
import numpy
import pandas
import ogr
from eotools.vector import retrieve_attribute_table
CONFIG = luigi.configuration.get_config()
def combine_all_cells():
# Config param... | |
from __future__ import unicode_literals
from __future__ import print_function
import time
import keras.backend
import keras.callbacks
import keras.constraints
import keras.layers
import keras.layers.recurrent
import keras.models
import keras.optimizers
import keras.regularizers
import numpy
import pandas
import sklea... | |
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -------------------------------------------------------------------------... | |
# coding: utf-8
#
# Copyright 2010-2014 Ning, Inc.
# Copyright 2014-2020 Groupon, Inc
# Copyright 2020-2021 Equinix, Inc
# Copyright 2014-2021 The Billing Project, LLC
#
# The Billing Project, LLC licenses this file to you under the Apache License, version 2.0
# (the "License"); you may not use this file except in com... | |
# coding: utf-8
# imports
import os
import re
# django imports
from django.template import (
Library, Node, Variable, VariableDoesNotExist, TemplateSyntaxError
)
from django.utils.encoding import smart_str
# filebrowser imports
from filebrowser.settings import VERSIONS
from filebrowser.conf import fb_settings
fr... | |
#!/usr/bin/env python
#
# Copyright 2001 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 require... | |
# 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 compliance with the License. You may obtain
# a ... | |
"""general tests and simple benchmarks for the sparse module"""
from __future__ import division, print_function, absolute_import
import time
import warnings
import numpy
import numpy as np
from numpy import ones, array, asarray, empty
from numpy.testing import *
from scipy import sparse
from scipy.lib.six import xr... | |
# -*- coding: utf-8 -*-
###
# (C) Copyright (2012-2016) Hewlett Packard Enterprise Development LP
#
# 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 limi... | |
# generated by pgen/main.py
import token
SkulptOpMap = {
"(": token.LPAR,
")": token.RPAR,
"[": token.LSQB,
"]": token.RSQB,
":": token.COLON,
",": token.COMMA,
";": token.SEMI,
"+": token.PLUS,
"-": token.MINUS,
"*": token.STAR,
"/": token.SLASH,
"|": token.VBAR,
"&": token.AMPER,
"<": token.LESS,
">": token.GREATER,
... | |
from copy import deepcopy
from django.db.models import Q
from django.http import HttpResponseBadRequest
from django.shortcuts import render
from bestiary.models import Fusion, ESSENCE_MAP, Monster
from herders.decorators import username_case_redirect
from herders.models import Summoner, MonsterInstance, MonsterPiece,... | |
# -*- coding: utf-8 -*-
"""The command line interface (CLI) tools classes."""
import abc
import codecs
import datetime
import locale
import re
import sys
import time
import textwrap
import pytz
try:
import resource
except ImportError:
resource = None
import plaso
from plaso.cli import logger
from plaso.cli imp... | |
# Copyright 2012 OpenStack Foundation
# Copyright 2013 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 ... | |
#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
import gevent
import gevent.queue
import gevent.pywsgi
import gevent.monkey
gevent.monkey.patch_all()
import os
import sys
import logging
import json
from pprint import pprint
import functools
import socket
import time
import errno
import re
import co... | |
import os, sys, re, copy
import matplotlib.pyplot as pyplot
import immunoseq.lib.immunoseqLib as iseqlib
from sonLib.bioio import system
def getSubSamples(seqs):
samples = []
for header, name2seq in seqs.iteritems():
for name in name2seq.keys():
if name not in samples:
sampl... | |
import copy
from datetime import datetime
import functools
import hashlib
import json
import os
import random
import re
import string
import socket
import subprocess
import sys
import time
import uuid
import warnings
import yaml
with warnings.catch_warnings():
# Fabric maintenance is lagging a bit so let's suppres... | |
import hashlib
import logging
import os
import tempfile
import pickle
import random
import shutil
import string
import sys
class BlockMD5(object):
def __init__(self):
return None
def compare_blocks(offset, name1, name2):
'''compare two files byte-by-byte'''
info = os.stat(name1)
... | |
#
# Copyright 2013 Quantopian, 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 wr... | |
from __future__ import unicode_literals
from django.db import models
from django_evolution.errors import SimulationFailure
from django_evolution.mutations import RenameField
from django_evolution.signature import (AppSignature,
ModelSignature,
... | |
# Copyright 2021 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 2015-2017 Espressif Systems (Shanghai) PTE LTD
#
# 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 ... | |
#!/usr/bin/python
# (c) 2018 Jim Hawkins. MIT licensed, see https://opensource.org/licenses/MIT
# Part of Blender Driver, see https://github.com/sjjhsjjh/blender-driver
"""Blender Driver unit test that can be run from the unittest application.
This module is intended for use within Blender Driver and can only be used ... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, ... | |
# Copyright 2011 Dorgival Guedes
# Copyright 2013 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 app... | |
#!/usr/bin/env python
#
# Copyright 2014 tigmi
#
# 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 agre... | |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2017 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""
Implementation of a flexible versioning scheme providing support for PEP-440,
setuptools-compatible and semantic versioning.
"""
import logging
import re
from .compat import string_types
f... | |
# -*- coding: utf-8 -*-
'''Module containing helpers for testing the Chevah server.'''
from __future__ import with_statement
from StringIO import StringIO
import base64
import logging
from chevah.compat.testing import CompatManufacture
from chevah.utils.configuration_file import (
FileConfigurationProxy,
)
fr... | |
"""
Shipyard models pertaining to the librarian app.
"""
from datetime import datetime, timedelta
import os
import random
import re
import tempfile
import logging
import json
import shutil
import stat
from io import BytesIO
from zipfile import ZipFile
from django.core.exceptions import ValidationError
from django.con... | |
'''
OptimizerForHDPFullVarModel.py
Model Notation
--------
Dirichlet-Multinomial model with K+1 possible components
v := K-length vector with entries in [0,1]
beta := K+1-length vector with entries in [0,1]
entries must sum to unity. sum(beta) = 1.
alpha0 := scalar, alpha0 > 0
Generate stick breaking f... | |
"""
Support for Sonarr.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.sonarr/
"""
import logging
import time
from datetime import datetime
import requests
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeas... | |
"""Tests for the SmartThings component init module."""
from uuid import uuid4
from aiohttp import ClientConnectionError, ClientResponseError
from asynctest import Mock, patch
from pysmartthings import InstalledAppStatus, OAuthToken
import pytest
from homeassistant.components import cloud, smartthings
from homeassista... | |
"""
Harvester for NIH.gov Research Portal Online Reporting Tools (RePORTER) for the SHARE Notification Service
Getting weekly summary from ExPORTER on nih.gov, parse XML and normalize the data
An example file: http://exporter.nih.gov/XMLData/final/RePORTER_PRJ_X_FY2015_035.zip
Note: This harvester assigns incorrect d... | |
from flask import render_template, flash, redirect, url_for, g, jsonify, request, abort
from flask.ext.login import login_user, logout_user, current_user, login_required
from flask.ext.sqlalchemy import get_debug_queries
from datetime import datetime
from app import app, db, lm
from app import socketio
from config impo... | |
<<<<<<< HEAD
<<<<<<< HEAD
from test.support import run_unittest, check_warnings
import cgi
import os
import sys
import tempfile
import unittest
import warnings
from collections import namedtuple
from io import StringIO, BytesIO
class HackedSysModule:
# The regression test will have real values in sys.argv, which
... | |
import os
import scipy as sp
import gzip
import h5py
import sys
from ldpred import sum_stats_parsers
from ldpred import reporting
from ldpred import util
from ldpred import plinkfiles
from plinkio import plinkfile
import time
def _verify_coord_data_(data_dict):
"""
Verify that merged data is ok
"""
nu... | |
#!/usr/bin/env python
"""
objcgo: Cgo (Go lang) wrapper interfaces generattor for Objective-C
"""
import re
from clang.cindex import CursorKind, TypeKind
def get_node_by_kind(kind, node):
cs = filter_kind(kind, node)
assert(len(cs) < 2)
return cs[0] if len(cs) > 0 else None
def filter_kind(kind, node)... | |
"""
Python-Markdown Extension Regression Tests
==========================================
A collection of regression tests to confirm that the included extensions
continue to work as advertised. This used to be accomplished by doctests.
"""
from __future__ import unicode_literals
import unittest
import zmarkdown
c... | |
"""
Provides virtual field to access to translation from multilingual model instance.
"""
from django.db.models import ForeignObject
from django.db.models.deletion import DO_NOTHING
from django.db.models.fields.related import OneToOneRel, ReverseSingleRelatedObjectDescriptor
from django.db.models.related import PathInf... | |
import agents as ag
import envgui as gui
import random
# ______________________________________________________________________________
loc_A, loc_B = (1, 1), (2, 1) # The two locations for the Vacuum world
def RandomVacuumAgent():
"Randomly choose one of the actions from the vacuum environment."
p = ag.Ra... | |
# 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 logging
import hmac
import hashlib
import uuid
import json
import re
import time
import random
from datetime import datetime
import gzip
from io import BytesIO
import warnings
from .compat import (
compat_urllib_parse, compat_urllib_error,
compat_urllib_request, compat_urllib_par... | |
import music21
import torch
import numpy as np
from music21 import interval, stream
from torch.utils.data import TensorDataset
from tqdm import tqdm
from DatasetManager.helpers import standard_name, SLUR_SYMBOL, START_SYMBOL, END_SYMBOL, \
standard_note, OUT_OF_RANGE, REST_SYMBOL
from DatasetManager.metadata impo... | |
#!/usr/bin/env python
"""
Integration (not unit) tests for pylast.py
"""
import warnings
from flaky import flaky
import os
import pytest
from random import choice
import time
import unittest
import lastfm_source.pylast.pylast as pylast
def load_secrets():
secrets_file = "test_pylast.yaml"
if os.path.isfile(... | |
"""
Component to interface with an alarm control panel.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel/
"""
import asyncio
from datetime import timedelta
import logging
import os
import voluptuous as vol
from homeassistant.const imp... | |
import logging
import re
logging.basicConfig(level=logging.INFO)
log = logging.getLogger(__name__)
# Handle "<actions/>"
def handle_actions(top):
# Nothing to do if it's empty.
# Otherwise...
if list(top) and len(list(top)) > 0:
raise NotImplementedError("Don't know how to handle a "
... | |
from __future__ import absolute_import
from collections import OrderedDict
import warnings
import six
import math
import decimal
from plotly import utils
from plotly import exceptions
from plotly import graph_reference
from plotly import session
from plotly.files import (CONFIG_FILE, CREDENTIALS_FILE, FILE_CONTENT,
... | |
# 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... | |
import argparse
import datetime
import time
from argh import arg
from six import iteritems
import pnc_cli.cli_types as types
import pnc_cli.utils as utils
from pnc_cli.swagger_client import ProductMilestoneRest
from pnc_cli.swagger_client import ProductmilestonesApi
from pnc_cli.swagger_client import ProductversionsA... | |
""" test script to verify the CG method works, and time it versus cholesky """
import argparse
import json
import logging
from collections import defaultdict
import matplotlib.pyplot as plt
import scipy.io
import seaborn
from implicit.als import AlternatingLeastSquares
from implicit.gpu import HAS_CUDA
from implicit.... | |
#!/usr/bin/env python2
# Python
from BaseHTTPServer import HTTPServer
import abc
import argparse
import codecs
import logging
import os
import select
import socket
import sys
# 3rd party
from inotify.watcher import Watcher
from prometheus_client import Counter
from prometheus_client import MetricsHandler
import inoti... | |
from __future__ import unicode_literals
import copy
import datetime
from boto3 import Session
from moto.compat import OrderedDict
from moto.core import BaseBackend, BaseModel, CloudFormationModel
from moto.core.utils import iso_8601_datetime_with_milliseconds
from moto.utilities.utils import random_string
from moto.... | |
# -*- coding:utf-8 -*-
import os
import sys, collections
from empty import Empty
from flask import Flask, render_template, g, session, redirect, url_for, request, flash, abort
import flask_ld as ld
from flask_ld.utils import lru
from flask_restful import Resource
from nanopub import NanopublicationManager, Nanopublic... | |
########
# Copyright (c) 2014 GigaSpaces Technologies 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
#
# Unless... | |
#!/usr/bin/env python
"""
exceptions.py
"""
################################################################################
#
# exceptions.py
#
#
# Copyright (c) 10/9/2009 Leo Goodstadt
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated doc... | |
"""The tests for the device tracker component."""
# pylint: disable=protected-access
import asyncio
import json
import logging
from unittest.mock import call
from datetime import datetime, timedelta
import os
from asynctest import patch
import pytest
from homeassistant.components import zone
from homeassistant.core im... | |
import os
import sys
import getpass
from time import time
import argparse
import textwrap
import json
import io
from insta_logging.insta_logging import insta_logger
__author__ = 'sehlat57'
def load_ignore_list():
"""
Get names of users from file to be excluded from liking list
:return: list of users to ... | |
from ietf.doc.models import Document
from ietf.group.models import Group
from ietf.person.models import Person
from ietf.doc.models import State
class RuleManager(object):
codename = ''
description = ''
def __init__(self, value):
self.value = self.get_value(value)
def get_value(self, value)... | |
import numpy as np
import pytest
from pandas.core.dtypes.generic import ABCDateOffset
import pandas as pd
from pandas import Series, TimedeltaIndex, timedelta_range
from pandas.tests.test_base import Ops
import pandas.util.testing as tm
from pandas.tseries.offsets import Day, Hour
class TestTimedeltaIndexOps(Ops):... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 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/LICEN... | |
# 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 absolute_import, division, unicode_literals
from six import text_type
import re
from codecs import register_error, xmlcharrefreplace_errors
from .constants import voidElements, booleanAttributes, spaceCharacters
from .constants import rcdataElements, entities, xmlEntities
from . import treewal... | |
#!/usr/bin/env python
"""Service registry for apitools."""
import collections
import logging
import re
import textwrap
from apitools.base.py import base_api
from apitools.gen import util
# We're a code generator. I don't care.
# pylint:disable=too-many-statements
_MIME_PATTERN_RE = re.compile(r'(?i)[a-z0-9_*-]+/[a-... | |
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
from .. import VEXObject
# IRStmt heirarchy
class IRStmt(VEXObject):
def __init__(self, c_stmt, irsb):
VEXObject.__init__(self)
self.arch = irsb.arch
#self.c_stmt = c_stmt
self.tag = ints_to_enums[c_stmt.tag]
def pp(self):
print self.__str__()
@property
def expressions(self):
expressions = [ ]
for ... | |
#!/usr/bin/env python
# Copyright 2020 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.
"""Stage the Chromium checkout to update CTS test version."""
import contextlib
import json
import os
import re
import sys
import tempf... | |
#!/usr/bin/env python
"""
head_tracker.py - Version 1.1 2013-12-20
Move the head to track a target published on the /roi topic.
Created for the Pi Robot Project: http://www.pirobot.org
Copyright (c) 2010 Patrick Goebel. All rights reserved.
This program is free software; you can redistr... | |
#!/usr/bin/env python
DOCUMENTATION = '''
---
module: dockerimp
short_description: improved docker container management module
description:
- Manage docker containers with ansible
options:
name:
description:
- Set the name of the container
required: false
default: null
... | |
"""Helpers for config validation using voluptuous."""
from datetime import (
date as date_sys,
datetime as datetime_sys,
time as time_sys,
timedelta,
)
from enum import Enum
import inspect
import logging
from numbers import Number
import os
import re
from socket import _GLOBAL_DEFAULT_TIMEOUT # type: i... | |
r"""UUID objects (universally unique identifiers) according to RFC 4122.
This module provides immutable UUID objects (class UUID) and the functions
uuid1(), uuid3(), uuid4(), uuid5() for generating version 1, 3, 4, and 5
UUIDs as specified in RFC 4122.
If all you want is a unique ID, you should probably call uuid1() ... | |
# Copyright 2013-2014 MongoDB, 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 writin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.