gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
"""A more or less complete user-defined wrapper around dictionary objects."""
class UserDict(object):
def __init__(*args, **kwargs):
if not args:
raise TypeError("descriptor '__init__' of 'UserDict' object "
"needs an argument")
self = args[0]
args = ... | |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import logging
import os
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.files.storage import get_storage_class
from .utils.loader import load_object
from .utils.recursive_dictionary import Recurs... | |
# import_export_vote_smart/views_admin.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
from .controllers import retrieve_and_match_candidate_from_vote_smart, \
retrieve_vote_smart_candidates_into_local_db, \
retrieve_vote_smart_candidate_bio_into_local_db, \
retrieve_vote_smart_position_ca... | |
"""Future-returning APIs for coroutines."""
# Copyright (c) PyZMQ Developers.
# Distributed under the terms of the Modified BSD License.
from collections import namedtuple
from zmq import POLLOUT, POLLIN
try:
from tornado.concurrent import Future
except ImportError:
from .minitornado.concurrent import Future... | |
"""
Compute Engine definitions for the Pipeline API.
"""
from abc import (
ABCMeta,
abstractmethod,
)
from uuid import uuid4
from six import (
iteritems,
with_metaclass,
)
from six.moves import zip_longest
from numpy import array
from pandas import (
DataFrame,
date_range,
MultiIndex,
)
fro... | |
import datetime
import decimal
import re
import time
import math
from itertools import tee
import django.utils.copycompat as copy
from django.db import connection
from django.db.models.fields.subclassing import LegacyConnection
from django.db.models.query_utils import QueryWrapper
from django.conf import settings
fro... | |
#!/usr/bin/python
#
# Copyright (c) 2019 Yunge Zhu, (@yungezz)
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'statu... | |
###############################################################################
##
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## "Redistribution and use in source and binary forms, with or without
## modification, ... | |
#!/usr/bin/python
import sys, itertools, os, re, glob
# use glob.glob. it uses os.listdir() and fnmatch.fnmatch() ..so it's unix style pattern match
def check_sandbox_for_errors(LOG_DIR=None, python_test_name='',
cloudShutdownIsError=False, sandboxIgnoreErrors=False, pattern=None):
# show the parameters
#... | |
import os
import socket
import threading
import unittest
from collections import OrderedDict
from mock import MagicMock
from parameterized import parameterized
from hazelcast.config import _Config
from hazelcast.core import Address
from hazelcast.reactor import (
AsyncoreReactor,
_WakeableLoop,
_SocketedW... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This is a modified version of 'service.py' (version 1.1.1), part of the 'atom' module
# from the gdata-python-client project (http://code.google.com/p/gdata-python-client/) by Google Inc.
# Copyright (C) 2006, 2007, 2008 Google Inc.
#
# It has been modified to support json... | |
#!/usr/bin/env python
# -*- mode: python; encoding: utf-8 -*-
"""An implementation of a data store based on mongo."""
import hashlib
import threading
import time
from bson import binary
from bson import objectid
import pymongo
from pymongo import errors
import logging
from grr.lib import config_lib
from grr.lib imp... | |
import re
from zope.interface import implementer
from pyramid.interfaces import (
IRoutesMapper,
IRoute,
)
from pyramid.compat import (
PY3,
native_,
text_,
text_type,
string_types,
binary_type,
is_nonstr_iter,
decode_path_info,
)
from pyramid.exceptions import URLDeco... | |
import re
from django.db.backends.base.introspection import (
BaseDatabaseIntrospection, FieldInfo, TableInfo,
)
field_size_re = re.compile(r'^\s*(?:var)?char\s*\(\s*(\d+)\s*\)\s*$')
def get_field_size(name):
""" Extract the size number from a "varchar(11)" type name """
m = field_size_re.search(name)
... | |
# -*- coding: utf-8 -*-
from django.conf import settings
from django.contrib.auth import get_user_model
from django.db import models
from django.utils.translation import ugettext_lazy as _
class AbstractHuman(models.Model):
"""Simple Abstract Human model
Note that this model may be linked to django registere... | |
import urllib
import urllib2
import json
import logging
import info
import re
import base64
import simplejson
import zlib
from HTMLParser import HTMLParser
lyric_url = "http://www.xiami.com/radio/lyric"
related_info_url = "http://www.xiami.com/radio/relate-info"
get_hq_url_temp = "http://www.xiami.com/song/gethqsong/s... | |
#!/usr/bin/python
# Copyright 2016 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 appli... | |
# -*- coding: utf-8 -*-
"""\
This is a python port of "Goose" orignialy licensed to Gravity.com
under one or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.
Python port was written by Xavier Grangier for Recrutae
Gravity.co... | |
# Copyright (C) 2003-2006 Robey Pointer <robey@lag.net>
#
# This file is part of paramiko.
#
# Paramiko 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; either version 2.1 of the License, or (at your opt... | |
import os
import shutil
import logging
from pbcore.io import FastqReader, FastqWriter, FastqRecord
from pbhla.io.BlasrIO import BlasrReader
log = logging.getLogger()
def write_fastq( fasta_records, output_file):
"""
Write a FastaRecord, or list of records, out to file
"""
with FastqWriter( output_fil... | |
# -*- coding: utf-8 -*-
import mock
from typing import Any, Dict, Iterable, List, Optional, Text, Tuple
from django.test import TestCase
from django.http import HttpResponse, HttpRequest
from django.test.client import RequestFactory
from django.conf import settings
from zerver.lib.actions import do_deactivate_realm, ... | |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | |
# Copyright 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... | |
from __future__ import division, absolute_import, print_function
r''' Test the .npy file format.
Set up:
>>> import sys
>>> from io import BytesIO
>>> from numpy.lib import format
>>>
>>> scalars = [
... np.uint8,
... np.int8,
... np.uint16,
... np.int16,
... ... | |
#!/usr/bin/env python
#
# Copyright 2016 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 2015 Cisco Systems, 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 requi... | |
import collections
import logging
from typing import Dict, List, Optional
import numpy as np
from ray.tune import trial_runner
from ray.tune.result import DEFAULT_METRIC
from ray.tune.trial import Trial
from ray.tune.schedulers.trial_scheduler import FIFOScheduler, TrialScheduler
logger = logging.getLogger(__name__)... | |
# -*- coding: utf-8 -*-
import cStringIO
import contextlib
import datetime
import hashlib
import inspect
import logging
import math
import mimetypes
import unicodedata
import os
import re
import time
import urlparse
from PIL import Image
from sys import maxint
import werkzeug
# optional python-slugify import (https:/... | |
#
#Copyright (c) 2012-2021, NVIDIA CORPORATION.
#SPDX-License-Identifier: Apache-2.0
import copy
import json
import signal
import logging
import msgpack
import itertools
import ssbench
from ssbench.importer import random
from ssbench.ordered_dict import OrderedDict
class Scenario(object):
"""Encapsulation of 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... | |
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
import javax.management.ObjectName;
import javax.management.MBeanInfo;
import javax.management.MBeanAttributeInfo;
import javax.management.MBeanOperationInfo;
import javax.manag... | |
# coding=utf-8
"""
Reproject :class:`xarray.DataArray` objects.
Makes assumptions on the data that it matches certain NetCDF-CF criteria
The CRS is stored as the 'spatial_ref' attribute of the 'crs' data variable
Spatial dimensions are either 'latitude' / 'longitude' or 'x' / 'y',
although this should probably instead... | |
from totalimpactwebapp.snap import Snap
from totalimpactwebapp.product import Product
from totalimpactwebapp.profile import Profile
from totalimpactwebapp.profile import get_profile_summary_dict
from totalimpactwebapp.product import refresh_products_from_tiids
from totalimpactwebapp.pinboard import Pinboard
# from tota... | |
# =============================================================================
# PROJECT CHRONO - http:#projectchrono.org
#
# Copyright (c) 2019 projectchrono.org
# All rights reserved.
#
# Use of this source code is governed by a BSD-style license that can be found
# in the LICENSE file at the top level of the distri... | |
# Copyright 2012 NEC Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | |
import unittest
from urllib import quote_plus as enc
from merlin import Merlin
from merlin.error import ValidationError
from merlin.facet import Facet as F
from merlin.filter import Field, NF
from merlin.sort import Sort as S
from merlin.search import Search
from merlin.geo import Geo
from merlin.group import Group
c... | |
import sys
import types
import unittest
class Test_TestLoader(unittest.TestCase):
### Tests for TestLoader.loadTestsFromTestCase
################################################################
# "Return a suite of all tests cases contained in the TestCase-derived
# class testCaseClass"
def te... | |
# Copyright 2009 by Cymon J. Cox. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Command line wrapper for the multiple alignment programme MAFFT.
"""
from __future__ import ... | |
import base64
import collections
import hashlib
from xmlrpclib import Fault, ServerProxy
API_ENDPOINT = 'https://secure.gravatar.com/xmlrpc'
def hash_email(email):
"""
:param string email: email address
:returns: the hash of ``email``, suitable for embedding in a URL to retrieve its assigned
ima... | |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | |
import pytest
from metaworld.envs.mujoco.env_dict import ALL_V1_ENVIRONMENTS, ALL_V2_ENVIRONMENTS
from metaworld.policies import *
from tests.metaworld.envs.mujoco.sawyer_xyz.utils import trajectory_summary
test_cases_old_nonoise = [
# This should contain configs where a V2 policy is running in a V1 env.
# n... | |
import os
# os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
# os.environ["CUDA_VISIBLE_DEVICES"] = "1"
from src.python.baselines import *
from src.python.preprocess2 import *
from pymongo import MongoClient
from tqdm import tqdm
import tensorflow as tf
### Keras
from keras import optimizers
from keras.models impor... | |
"""
Unit tests for the param.Time class, time dependent parameters and
time-dependent numbergenerators.
"""
import unittest
import param
import numbergen
import copy
from nose.plugins.skip import SkipTest
import fractions
try:
import gmpy
except ImportError:
import os
if os.getenv('PARAM_TEST_GMPY','0') =... | |
#!/usr/bin/env python
__author__ = 'Thomas R. Lennan, Stephen Henrie, Michael Meisinger'
from uuid import uuid4
import bcrypt
#from pyon.core.security.authentication import Authentication
from pyon.public import log, RT, OT, Inconsistent, NotFound, BadRequest, get_ion_ts_millis, get_ion_ts, Unauthorized
from interf... | |
#-------------------------------------------------------------------------------
# elftools: elf/structs.py
#
# Encapsulation of Construct structs for parsing an ELF file, adjusted for
# correct endianness and word-size.
#
# Eli Bendersky (eliben@gmail.com)
# This code is in the public domain
#-------------------------... | |
# Copyright 2014 eBay Inc.
#
# Author: Ron Rickard <rrickard@ebaysf.com>
#
# 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... | |
#!/usr/bin/env python
"""Helper functions used by client building/repacking process."""
import io
import logging
import os
import shutil
import struct
import tempfile
from typing import Optional, Sequence, Text, Tuple
from grr_response_client_builder import build
from grr_response_core import config
from grr_respo... | |
from bson import ObjectId
import jsonschema
import numpy
from girder.exceptions import ValidationException
from girder.models.file import File
from girder.models.model_base import Model
from girder.models.upload import Upload
from girder.utility.acl_mixin import AccessControlMixin
from .image import Image
from .segme... | |
# -*- test-case-name: twisted.names.test.test_names -*-
# Copyright (c) 2001-2008 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Async DNS server
Future plans:
- Better config file format maybe
- Make sure to differentiate between different classes
- notice truncation bit
Important: No addit... | |
# 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 (c) 2006-2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# Copyright (c) 2010 Google
# Copyright (c) 2008 rPath, Inc.
# Copyright (c) 2009 The Echo Nest Corporation
# Copyright (c) 2010, Eucalyptus Systems, Inc.
# Copyright (c) 2011, Nexenta Systems Inc.
# All... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Copyright 2014-2019 OpenEEmeter contributors
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/LIC... | |
__author__ = 'Ian S. Evans'
__version__ = '0.0.4'
from json import dumps, JSONEncoder, loads
from collections import UserList
MIMETYPE = "application/vnd.collection+json"
class Comparable(object):
"""
An object that needs to be comparable.
Stolen shamelessly from Ricardo Kirkner's bindings
See https... | |
#!/usr/bin/env python
import unittest
from src import draw_figure
from src.draw_figure import Pose
from functools import partial
from copy import copy
import math
class Speed():
def __init__(self, linear, angular):
self.linear = linear
self.angular = angular
def __str__(self):
return... | |
#!/usr/bin/env python3
import time
import argparse
import configparser
import logging
import getpass
import requests
import serial
import sys
NETATMO_URL_AUTH = "https://api.netatmo.com/oauth2/token"
NETATMO_URL_STATION = "https://api.netatmo.com/api/getstationsdata"
NETATMO_URL_TIMEOUT = 20
config = None
config_fil... | |
# pylint: disable=pointless-string-statement
# 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
#
# U... | |
#!/usr/bin/env python3
"""Data Science Toolkit client for Python.
This module provides client library functions and CLI for the Data Science
Toolkit. The module was forked from the original dstk.py library provided with
the Data Science Toolkit.
See http://www.datasciencetoolkit.org/developerdocs#python for more deta... | |
# ----------------------------------------------------------------------------
# Copyright (c) 2017-, LabControl development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# -------------------------------------------------... | |
"""
flask_httpauth
==================
This module provides Basic and Digest HTTP authentication for Flask routes.
:copyright: (C) 2014 by Miguel Grinberg.
:license: MIT, see LICENSE for more details.
"""
import hmac
from base64 import b64decode
from functools import wraps
from hashlib import md5
from random import ... | |
import sys,os, pickle, numpy, pylab, operator, itertools
import cv2
from shutil import copy as copyfile
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import matplotlib.pyplot as plt
from DataParseApp import dataparseDialog
from sklearn.decomposition import NMF
projectpath=os.path.split(os.path.abspath(__file__)... | |
'''
@author: Dallas Fraser
@author: 2019-03-31
@organization: MLSB API
@summary: Tests the importing of team csv
'''
from sqlalchemy import func
from datetime import date
from base64 import b64encode
from api.model import Team
from api.advanced.import_team import parse_lines, BACKGROUND, HEADERS,\
INVALID_ROW, extr... | |
# -*- coding: utf-8 -*-
"""
Created on Fri Dec 19 11:29:18 2014
Author: Josef Perktold
License: BSD-3
"""
import numpy as np
from scipy import stats
import pandas as pd
# this is similar to ContrastResults after t_test, copied and adjusted
class PredictionResults(object):
"""
Results class for predictions.... | |
import time
from datetime import date, timedelta
import pytest
from django.conf import settings
from django.contrib.auth.tokens import (
PasswordResetTokenGenerator, default_token_generator,
)
from django.core import mail as djmail
from django.test import TestCase
from django_otp.oath import TOTP
from django_otp.p... | |
# -*- coding: utf-8 -*-
"""Multivariate Normal and t distributions
Created on Sat May 28 15:38:23 2011
@author: Josef Perktold
TODO:
* renaming,
- after adding t distribution, cov doesn't make sense for Sigma DONE
- should mean also be renamed to mu, if there will be distributions
with mean != mu
... | |
import logging
"""
This script provides a Duck typed file reader for c3d files. It was
modified from c3d_converter.py Taken from:
http://blog.noisygecko.com/c3d_convert.py
Convert a "c3d" format motion capture file into a
comma separated file.
This code was taken from "c3d_import.py" by
Jean-Baptiste PERIN (jb_perin... | |
import nltk
import json
import numpy as np
import traceback
from codecs import open
from pathlib import Path
from puls_util import separate_title_from_body
from cap_transform import (make_capitalized_title,
make_uppercase_title,
make_lowercase_title)
from data im... | |
# -*- coding: utf-8 -*-
"""Utilities that may be packaged in external libraries."""
from random import SystemRandom
from collections import OrderedDict
from importlib import import_module
from django.views.generic import TemplateView
from django.contrib.auth.hashers import BasePasswordHasher, mask_hash
def random_un... | |
import time, copy
import threading, logging
import traceback
import tornado
from tornado import gen
from tornado.web import RequestHandler
from tornado.wsgi import WSGIAdapter
from concurrent.futures import ThreadPoolExecutor
from itchatmp.config import SERVER_WAIT_TIME, COROUTINE
from itchatmp.content import (NORMAL... | |
import functools
from distutils.version import LooseVersion
import numpy as np
from ..core import indexing
from ..core.utils import FrozenDict, is_remote_uri
from ..core.variable import Variable
from .common import WritableCFDataStore, find_root_and_group
from .file_manager import CachingFileManager, DummyFileManager... | |
# 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 ... | |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Misc tools to find activations and cut on maps
"""
# Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org>
# License: BSD
import warnings
# Standard scientific libraries imports (more spe... | |
"""
example human gene
https://www.wikidata.org/wiki/Q14911732
https://mygene.info/v3/gene/1017
https://www.ncbi.nlm.nih.gov/gene/1017
http://uswest.ensembl.org/Homo_sapiens/Gene/Summary?g=ENSG00000123374;r=12:55966769-55972784
example mouse gene
https://www.wikidata.org/wiki/Q21129787
example yeast gene:
https://www... | |
# Copyright 2015 Brocade Communications System, 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
#
# ... | |
# coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | |
# Copyright 2015-2017 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... | |
"""Representation of a deCONZ gateway."""
import asyncio
import async_timeout
from pydeconz import DeconzSession, errors, group, light, sensor
from homeassistant.config_entries import SOURCE_HASSIO
from homeassistant.const import CONF_API_KEY, CONF_HOST, CONF_PORT
from homeassistant.core import callback
from homeassi... | |
import pickle, sys, os
import numpy
from scipy.misc import toimage
import topo
from topo import pattern
from topo import sheet
############################################################
# FUNCTIONS TO CREATE AND LOAD ORGANISED GCAL CONNECTIVITY #
############################################################
def p... | |
#L
# Copyright SAIC
#
# Distributed under the OSI-approved BSD 3-Clause License.
# See http://ncip.github.com/python-api/LICENSE.txt for details.
#L
# This API was generated by pyCaCORE
import cabig.cabio.CaBioWSQueryService_client as services
from cabig.cacore.ws.proxy import *
schema = services.ns3
class Agent(WSB... | |
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import absolute_import, division, print_function, unicode_literals
import base64
import hashlib
import os
from . import fetc... | |
#Alex Holcombe alex.holcombe@sydney.edu.au
#Modified by Kim Ransley from the twoWords.py program at the github repository: https://github.com/alexholcombe/twoWords
#1. Inverted
#2. One word
#3. duration
#4. trail, trial
from __future__ import print_function
from psychopy import monitors, visual, event, data, logging... | |
#!python
"""Bootstrap distribute installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
from distribute_setup import use_setuptools
use_setuptools()
If you want to require a specific version of se... | |
# Copyright 2008-2013 Software freedom conservancy
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | |
# Copyright (c) 2011 Florian Mounier
# Copyright (c) 2011 Anshuman Bhaduri
# Copyright (c) 2012-2014 Tycho Andersen
# Copyright (c) 2013 xarvh
# Copyright (c) 2013 Craig Barnes
# Copyright (c) 2014 Sean Vig
# Copyright (c) 2014 Adi Sieker
# Copyright (c) 2014 Sebastien Blot
#
# Permission is hereby granted, free of cha... | |
from django.conf import settings
from django.contrib import messages as django_messages
from django.urls import reverse_lazy
from django.utils.decorators import method_decorator
from django.views.decorators.http import require_POST
from django.views.generic.base import RedirectView, TemplateView
from django.views.gener... | |
"""
Pandora API Transport
This module contains the very low level transport agent for the Pandora API.
The transport is concerned with the details of a raw HTTP call to the Pandora
API along with the request and response encryption by way of an Encyrpytor
object. The result from a transport is a JSON object for the AP... | |
# 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 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... | |
# pyOCD debugger
# Copyright (c) 2015-2020 Arm Limited
# Copyright (c) 2021 Chris Reed
# Copyright (c) 2022 Clay McClure
# SPDX-License-Identifier: Apache-2.0
#
# 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... | |
#!/usr/bin/env python
#coding: utf-8
__author__ = 'Toshihiro Kamiya <kamiya@mbj.nifty.com>'
__status__ = 'experimental'
import re
import sys
import asm_manip as am
import ope_manip as om
import type_formatter as tf
import clonefile_manip as cm
import gen_ngram as ng
def extract_class_from_loc_linenum(L):
pat_l... | |
__author__ = 'andreasveit'
__version__ = '1.3'
# Interface for evaluating with the COCO-Text dataset.
# COCO-Text is a large dataset designed for text detection and recognition.
# This is a Python API that assists in evaluating text detection and recognition results
# on COCO-Text. The format of the COCO-Text annota... | |
"""
MI logging can be configured using a combination of two of four files.
there is first a "base" configuration, and then a "local" set of overrides.
the base configuration is from the file specified in the environment variable MI_LOGGING_CONFIG
or res/config/mi-logging.yml (ie, users can set MI-specific configuratio... | |
#!/usr/bin/env python
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
import os
import yaml
from fabric.api import task, run, sudo, put, task, \
parallel, execute, env
from cuisine import file_exists, file_write, file_append, \
text_strip_margin, mode_sudo, file_update, ssh_keygen, \
ssh_... | |
#
# 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,... | |
"""Dirac notation for states."""
from __future__ import print_function, division
from sympy import (cacheit, conjugate, Expr, Function, integrate, oo, sqrt,
Tuple)
from sympy.core.compatibility import u, range
from sympy.printing.pretty.stringpict import stringPict
from sympy.physics.quantum.qexpr ... | |
########
# 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
# Copyright (c) Facebook, Inc. and its affiliates.
#
# 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... | |
"""Support for Wireless Sensor Tags."""
import logging
from requests.exceptions import ConnectTimeout, HTTPError
import voluptuous as vol
from wirelesstagpy import NotificationConfig as NC, WirelessTags, WirelessTagsException
from homeassistant import util
from homeassistant.const import (
ATTR_BATTERY_LEVEL,
... | |
# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file ac... | |
from django.contrib.auth.decorators import login_required
from django.views.decorators.http import require_http_methods
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404, redirect, render
from django.contrib import messages
from django.utils.translation import ugettext as _
fro... | |
# Licensed to the StackStorm, Inc ('StackStorm') 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 th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.