gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# 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 required by applicable la... | |
# Copyright 2012 Managed I.T.
# Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# Author: Kiall Mac Innes <kiall@managedit.ie>
#
# 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
#
# ... | |
# -*- coding: utf-8 -*-
"""
sale.py
"""
import warnings
from trytond.model import fields
from trytond.pool import PoolMeta, Pool
from trytond.pyson import Eval
__all__ = ['SaleLine', 'Sale']
__metaclass__ = PoolMeta
class Sale:
"Sale"
__name__ = 'sale.sale'
is_international_shipping = fields.Functi... | |
"""
Test suite for the productdb.tasks module
"""
import pytest
import pandas as pd
from django.contrib.auth.models import User
from django.core.cache import cache
from django.core.files.uploadedfile import SimpleUploadedFile
from django.urls import reverse
from django.test import Client
from app.config.settings import... | |
# -*- coding: utf-8 -*-
from django.apps import apps
from django.db import models
from django.conf import settings
from django.contrib.auth.models import Group, UserManager
from django.contrib.sites.models import Site
from django.core.exceptions import ImproperlyConfigured, ValidationError
from django.utils.encoding im... | |
import numpy as np
import numpy as np
import gsmlib.splibs as sp
import matplotlib.pyplot as plt
from gsmlib.SB import SB,SBTraining
from gsmlib.NB import NB,NBTraining
def readfile(fn):
f = open(fn)
l = []
for line in f.readlines():
line = line.replace("+-","-")
a = complex(line)
l.append(a)
return np.array... | |
from decimal import Decimal, InvalidOperation
__author__ = 'Duong Duc Anh'
from datetime import datetime
from django.contrib import auth
from django.contrib.auth import authenticate, login
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core import ser... | |
# -*- coding: utf-8 -*-
"""Object to read lines from a stream using an arbitrary delimiter"""
import math
# from itertools import filterfalse
# from unicodedata import combining, normalize
__all__ = ['ReadLines']
# the default amount of data to read on a buffer full
DEFAULT_BLOCK_SIZE = 1048756
# # the size to re... | |
"""logging facilities
The way to use this is as follows:
* each module declares its own logger, using:
from .logger import create_logger
logger = create_logger()
* then each module uses logger.info/warning/debug/etc according to the
level it believes is appropriate:
logger.debug('debugging info for d... | |
from kivy.uix.recycleboxlayout import RecycleBoxLayout
from kivy.clock import Clock
from kivy_soil import kb_system
class AppRecycleBoxLayout(RecycleBoxLayout):
selected_widgets = None
'''Set with indexes of selected widgets'''
sel_first = -1
'''Index of first selected widget of current multiselect''... | |
#!/usr/bin/env python
import os, sys, subprocess, logging, dxpy, json, re, socket, getpass, urlparse, datetime, requests, time, csv
import common
import dateutil.parser
logger = logging.getLogger(__name__)
EPILOG = '''Notes:
Examples:
%(prog)s
'''
DEFAULT_APPLET_PROJECT = 'E3 ChIP-seq'
def get_args():
import a... | |
# Copyright 2010-2011 OpenStack Foundation
# Copyright 2011 Piston Cloud Computing, 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... | |
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2015, ARM Limited and 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/LICENSE-2.0
#
# ... | |
import io
from datetime import datetime
from unittest.mock import patch
from django.core.exceptions import ImproperlyConfigured
from django.core.files.base import File
from django.test import TestCase
from storages.backends import ftp
USER = 'foo'
PASSWORD = 'b@r'
HOST = 'localhost'
PORT = 2121
URL = "ftp://{user}:{... | |
"""This module/class contains functionality for computing (and plotting) radial
velocities and creating reference spectra for extracted fluxes. This should
ideally remain independent of the extraction method, such that it does not
matter which spectrograph took the data, nor what "Spectrograph" object was
used for e... | |
# Copyright (C) 2016-2022 Lightbits Labs Ltd.
# Copyright (C) 2020 Intel Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apa... | |
"""
A test spanning all the capabilities of all the serializers.
This class defines sample data and a dynamically generated
test case that is capable of testing the capabilities of
the serializers. This includes all valid data values, plus
forward, backwards and self references.
"""
from __future__ import unicode_lite... | |
import json
from collections import defaultdict
from datetime import datetime
from django.conf import settings
import langcodes
import six.moves.urllib.error
import six.moves.urllib.parse
import six.moves.urllib.request
from couchdbkit.exceptions import ResourceNotFound
from crispy_forms.utils import render_crispy_for... | |
#!/usr/bin/env python
###
# (C) Copyright (2012-2015) 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 limita... | |
#!/usr/bin/python
import optparse, os, sys
from biokbase.probabilistic_annotation.DataExtractor import *
from biokbase.probabilistic_annotation.DataParser import *
# Common variables...
from biokbase.probabilistic_annotation.PYTHON_GLOBALS import *
usage="%prog [options]"
description="""Main driver to get data needed... | |
from .logs import LoggingMixin
class EngineIONamespace(LoggingMixin):
'Define engine.io client behavior'
def __init__(self, io):
self._io = io
self._callback_by_event = {}
self._log_name = io._url
self.initialize()
def initialize(self):
"""Initialize custom variab... | |
# Targets not used, not possible to condition generated sequences
import data_utils_2
import pandas as pd
import numpy as np
import tensorflow as tf
import math, random, itertools
import pickle
import time
import json
import os
import math
from data_utils_2 import get_data
import tensorflow as tf
import numpy as np
... | |
# --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
import datasets
import datasets.pascal_voc
import os
import datasets.im... | |
#!/usr/bin/env python3
import os
from distutils.version import LooseVersion
import argparse
import base64
import collections
import copy
import itertools
import json
import jsonschema
import pathlib
import shutil
import sys
import tempfile
import re
import zipfile
def main():
parser = argparse.ArgumentParser(
... | |
# by amounra 0613 : http://www.aumhaa.com
import Live
#import os, __builtin__, __main__, _ast, _codecs, _functools, _md5, _random, _sha, _sha256, _sha512, _socket, _sre, _ssl, _struct, _symtable, _types, _weakref, binascii, cStringIO, collections, datetime, errno, exceptions, fcntl, gc, imp, itertools, marshal, math, ... | |
import socket
import argparse
class Proxy:
def __init__(self, host, port, prefix="", max_connections=5,
request_size_limit=4096, reuseaddr=True, verbosity=0):
"""
Initialize a new Proxy class.
:param host: address to bind the proxy server to
:param port: port to b... | |
from __future__ import unicode_literals
import tablib
from copy import deepcopy
from datetime import date
from decimal import Decimal
from unittest import skip, skipUnless
from django import VERSION
from django.conf import settings
from django.contrib.auth.models import User
from django.db import IntegrityError
from ... | |
import warnings
import numpy as np
from numpy.testing import (assert_array_equal, assert_array_almost_equal,
assert_raises, assert_almost_equal)
import skimage
from skimage import data
from skimage import exposure
from skimage.exposure.exposure import intensity_range
from skimage.color impo... | |
# Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | |
# 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 ... | |
"""
Agent running periodically on a server with installed python-zimbra libs,
that looks on the server for emails, that have reached their followup time,
moves them to the inbox and tags them.
"""
import logging
from optparse import OptionParser
import re
from datetime import datetime
from pythonzimbra.tools import... | |
#!/usr/bin/python
# vim: sw=4 et
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 2 of the License, or
# (at your optio... | |
#!/usr/bin/env python3
# -*- mode: python -*-
# -*- coding: utf-8 -*-
"""Manages a Bento cluster."""
import logging
import os
import re
import signal
import subprocess
import sys
import xml.etree.ElementTree as etree
from base import base
from base import cli
from kiji import bento_cluster
from kiji import maven_rep... | |
from datetime import datetime
from . import ApiObject
class Host(ApiObject):
"""
[Zabbix Host](https://www.zabbix.com/documentation/2.2/manual/api/reference/host/object)
"""
@classmethod
def by_name(C, api, name):
"""
Return a new `Host` with matching `name`.
"""
... | |
"""Functionality for autorenewal and associated juggling of configurations"""
from __future__ import print_function
import copy
import glob
import logging
import os
import traceback
import six
import zope.component
import OpenSSL
from letsencrypt import configuration
from letsencrypt import cli
from letsencrypt impo... | |
import os
import re
import collections
from uitools.qt import QtGui
from maya import cmds, mel
from sgfs.ui import product_select
RefEdit = collections.namedtuple('RefEdit', ('command', 'namespaces', 'nodes', 'source'))
class RefEditSelector(product_select.Layout):
def _setup_sections(self):
sup... | |
# -*- coding: utf-8 -*-
# Copyright 2014, 2015 OpenMarket 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 applica... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import time
import argparse
from configparser import RawConfigParser as ConfigParser
class Config(object):
def __init__(self, configure_file):
self._args = self.__parse_args(configure_file)
self._config = self.__parse_config()
def __pars... | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
from astropy import units as u
from astropy.utils.misc import unbroadcast
import copy
from .wcs import WCS, WCSSUB_LONGITUDE, WCSSUB_LATITUDE, WCSSUB_CELESTIAL
__doctest_skip__ = ['wcs_to_celestial_frame', 'celestial_frame_to_wcs']
... | |
"""Network of GrFNNs
This module provides the necessary code to build a model connecting
multiple GrFNNs. Connections can be made within a GrFNN or between pairs
of them.
More importantly, it provides a method to run the model (process an
stimulus), including the ability to learn the connections between
GrFNNs.
To D... | |
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | |
#!/usr/bin/env python2.7
#
# Copyright 2018 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.
import argparse
import re
import os
import posixpath
import StringIO
import sys
import subprocess
from contextlib import closing
... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2011 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# ... | |
#!/usr/bin/env python
# Copyright (c) 2003 CORE Security Technologies
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# Parallel Coordinates traffic grapher.
#
# This grapher uses the pcap library to list... | |
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2015, Ben Lopatin and contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright ... | |
# -*- coding: utf-8 -*-
import unittest
from mock import Mock
import cloud4rpi
from cloud4rpi.errors import InvalidConfigError
from cloud4rpi.errors import UnexpectedVariableTypeError
from cloud4rpi.errors import UnexpectedVariableValueTypeError
class ApiClientMock(object):
def __init__(self):
def noop_o... | |
"""Demo platform for the cover component."""
from homeassistant.components.cover import (
ATTR_POSITION,
ATTR_TILT_POSITION,
SUPPORT_CLOSE,
SUPPORT_CLOSE_TILT,
SUPPORT_OPEN,
SUPPORT_OPEN_TILT,
SUPPORT_SET_TILT_POSITION,
SUPPORT_STOP_TILT,
CoverEntity,
)
from homeassistant.core import... | |
"""
ulmo.twc.kbdi.core
~~~~~~~~~~~~~~~~~~~~~
This module provides direct access to `Texas Weather Connection`_ `Daily
Keetch-Byram Drought Index (KBDI)`_ dataset.
.. _Texas Weather Connection: http://twc.tamu.edu/
.. _Daily Keetch-Byram Drought Index (KBDI): http://twc.tamu.edu/drought/kbdi
""... | |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import tempfile
import os
from django import forms
from django.contrib import admin
from django.contrib.admin.views.main import ChangeList
from django.core.files.storage import FileSystemStorage
from django.core.mail import EmailMessage
... | |
# Copyright (c) 2014, Fundacion Dr. Manuel Sadosky
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
# list of condit... | |
"""Tokenization help for Python programs.
tokenize(readline) is a generator that breaks a stream of bytes into
Python tokens. It decodes the bytes according to PEP-0263 for
determining source file encoding.
It accepts a readline-like method which is called repeatedly to get the
next line of input (or b"" for EOF). ... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2014 The Plaso Project Authors.
# Please see the AUTHORS file for details on individual 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 L... | |
# Copyright 2014 Cloudbase Solutions Srl
#
# 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... | |
# -*- encoding: utf-8
from sqlalchemy.testing import eq_, engines, pickleable, assert_raises_message
import datetime
import os
from sqlalchemy import Table, Column, MetaData, Float, \
Integer, String, Boolean, TIMESTAMP, Sequence, Numeric, select, \
Date, Time, DateTime, DefaultClause, PickleType, text, Text, \... | |
"""ctrack REST API
"""
from datetime import date
import logging
from dateutil.parser import parse as parse_date
from django.db.models import Sum, Count
from django.db.models.functions import TruncMonth
from django.conf.urls import url, include
from django.http import Http404, HttpResponseBadRequest
from rest_framewor... | |
# Author: Travis Oliphant, 2002
#
# Further enhancements and tests added by numerous SciPy developers.
#
from __future__ import division, print_function, absolute_import
import warnings
import numpy as np
from numpy.random import RandomState
from numpy.testing import (TestCase, run_module_suite, assert_array_equal,
... | |
#!C:/Python34/python
__author__ = 'Max Dignan'
#
#
# This file is open sourced under the MIT License
# Original Author: Max Dignan
#
# This block must be kept in any, and all, future iterations
# as defined by the MIT License
#
#
#
import hashlib
import uuid
import os
import pickle
# will allow user to connect wi... | |
#!/usr/bin/env python
# generate Python Manifest for the OpenEmbedded build system
# (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
# (C) 2007 Jeremy Laine
# licensed under MIT, see COPYING.MIT
#
# June 22, 2011 -- Mark Hatle <mark.hatle@windriver.com>
# * Updated to no longer generate special -dbg pa... | |
#from __future__ import print_function
#I learned and develop in python 3.x, whatever is in my distribution packages (3.2 currently)
#I've found with the print function 2.7 generally works the same
import re, sys, string, glob, argparse, os
from os.path import *
from collections import namedtuple
if_regex = r"\s(... | |
from random import uniform
import pytest
from diofant import (E1, Chi, Ci, E, Ei, EulerGamma, Float, I, Integer, Li,
Limit, O, Rational, Shi, Si, Symbol, conjugate, cos, cosh,
diff, erf, erf2, erf2inv, erfc, erfcinv, erfi, erfinv,
exp, exp_polar, expand, ... | |
from __future__ import absolute_import
import os
import os.path
import json
import time
import pkgutil
import warnings
from datetime import datetime
import cherrypy
from cherrypy.wsgiserver.wsgiserver2 import CherryPyWSGIServer
from cherrypy.process.servers import ServerAdapter
# from cherrypy import _cperror, _cpl... | |
# -*- coding: utf-8 -*-
# ##########################################################
# ## make sure administrator is on localhost
# ###########################################################
import os
import socket
import datetime
import copy
import gluon.contenttype
import gluon.fileutils
try:
import pygraphvi... | |
#Distributed under the MIT licesnse.
#Copyright (c) 2013 Cospan Design (dave.mccoy@cospandesign.com)
#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 limit... | |
import pytest
networkx = pytest.importorskip("networkx")
from pyscipopt import Model, Conshdlr, SCIP_RESULT, SCIP_PARAMEMPHASIS, SCIP_PARAMSETTING
try:
from types import SimpleNamespace
except:
class SimpleNamespace:
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
def ... | |
'''
Title: SAP Security Interactive tool 1.3
Author: Joe Friedrich
License: MIT
'''
print('Importing libraries')
import os
import pyperclip
from company import Company
from sys import stdin
def get_menu(list_of_things):
'''
This takes a list as input.
It prints the list to the screen as menu options 1 thro... | |
"""The texture module provide some utilities to generate, analyse and plot
crystallographic textures.
"""
import numpy as np
from pymicro.crystal.lattice import Symmetry, Lattice, HklPlane, SlipSystem
from pymicro.crystal.microstructure import Orientation, Grain, Microstructure
from matplotlib import pyplot as plt, col... | |
# dependency.py
# Author: Dixon Crews
# CSC 505-001, Fall 2016
# Homework 3, #4
###############################################################################
# Import needed library
import operator
###############################################################################
# Define the Node class
# Follows th... | |
"""
EvEditor (Evennia Line Editor)
This implements an advanced line editor for editing longer texts
in-game. The editor mimics the command mechanisms of the "VI" editor
(a famous line-by-line editor) as far as reasonable.
Features of the editor:
- undo/redo.
- edit/replace on any line of the buffer.
- search&repl... | |
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import print_function
import fnmatch
import imp
import logging
import os
import sys
import zipfile
from telemetry.internal.util import comm... | |
# Copyright (c) 2013 Hortonworks, 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 ... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... | |
import os
import numpy as np
def TH14evaldet(detfilename, gtpath, subset):
# Read ground truth
detClassFile = open(os.path.join(gtpath, 'detclasslist.txt'))
classNames = dict()
classNamesAll = dict()
for line in detClassFile.readlines():
classNames[(line.split()[-1].strip())] = int(line.... | |
"""Tests for options manager for :class:`Poly` and public API functions. """
from sympy.polys.polyoptions import (
Options, Expand, Gens, Wrt, Sort, Order, Field, Greedy, Domain,
Split, Gaussian, Extension, Modulus, Symmetric, Strict, Auto,
Frac, Formal, Polys, Include, All, Gen, Symbols, Method)
from sym... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from mock import patch
from mock import MagicMock as Mock
from pyrax.clouddatabases import CloudDatabaseDatabase
from pyrax.clouddatabases import CloudDatabaseFlavor
from pyrax.clouddatabases import CloudDatabaseInstance
from pyrax.clouddatabases import C... | |
#
# 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... | |
#
# 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... | |
import six
import mock
if six.PY3:
from io import StringIO
else:
from StringIO import StringIO
from ..config import is_number
from ..base import BaseSmartCSVTestCase
import smartcsv
from smartcsv.exceptions import InvalidCSVException
class ValidatorColumnTestCase(BaseSmartCSVTestCase):
def test_valid_va... | |
import boto3
import botocore
import time
import logging
import os
from datetime import datetime
import tarfile
from spark_controler.ec2_instance_data_dict import ec2_data_dict
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
formatter = loggi... | |
#!/usr/bin/env python3
import pprint
import argparse
import inspect
import json
import os
import requests
import argh
import subprocess
import urllib.parse
API_ENDPOINT = 'https://api.digitalocean.com/v2'
DEBUG = False
DO_API_TOKEN = os.environ.get('DO_API_TOKEN')
DO_KEYPAIR_ID = os.environ.get('DO_KEYPAIR_ID')
DO_K... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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/LICE... | |
from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
from BattleBase import *
from BattleProps import *
from BattleSounds import *
from toontown.toon.ToonDNA import *
from toontown.suit.SuitDNA import *
from direct.directnotify import DirectNotifyGlobal
import random
import MovieCamera
import ... | |
# Copyright (c) 2016, Genevolv LLC. All rights reserved.
''' Data Access Object contains data access functions and manages the
connection cursor.
'''
import logging
LOG = logging.getLogger(__name__)
import datetime
import pyodbc
import uuid
import sys
def get_value_string(value):
'''returns the appropria... | |
from __future__ import unicode_literals
import os
import subprocess
import sys
import time
from .common import AudioConversionError, PostProcessor
from ..compat import (
compat_subprocess_get_DEVNULL,
)
from ..utils import (
encodeArgument,
encodeFilename,
get_exe_version,
is_outdated_version,
... | |
"""
plot_grid.py
Class instance used to make Display.
"""
# Load the needed packages
import numpy as np
import os
import pyart
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as \
NavigationToolbar
from matplotlib.figure import F... | |
#
# This file is part of DroneBridgeLib: https://github.com/seeul8er/DroneBridge
#
# Copyright 2018 Wolfgang Christl
#
# 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.a... | |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Utilities for extracting color channels out of arbitrary images
"""
import cv2
import numpy as np
import enum
from .text import putTextAutoscale
__all__ = ["ColorspaceChannel", "Colorspace", "convert_to_colorspace",
"extract_channel", "colorspace_components_overvi... | |
# Copyright (c) 2011 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | |
# Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | |
#!/usr/bin/env python2
"""
mbed SDK
Copyright (c) 2011-2014 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 applicabl... | |
# ------------------------------------------------------------------------------
# Copyright (c) 2010-2013, EVEthing team
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# Redistributions of... | |
"""This module describes fully-functioning networks created from the pieces in `layer`.
"""
from __future__ import division, print_function
import collections
import inspect
import numpy as np
import six
import theano
import theano.tensor as T
from theano.tensor.shared_randomstreams import RandomStreams
from ..data ... | |
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | |
import decimal
import numpy as np
import pandas as pd
import pytest
import ibis
import ibis.common.exceptions as com
import ibis.util as util
from ibis import literal as L
@pytest.mark.parametrize(
('expr', 'expected'),
[
(ibis.NA.fillna(5), 5),
(L(5).fillna(10), 5),
(L(5).nullif(5),... | |
# 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 (C) 2011 Midokura KK
# Copyright (C) 2011 Nicira, Inc
# Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# ... | |
# Copyright 2014 NEC Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | |
# Copyright (c) 2003-2012 CORE Security Technologies:
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# $Id: ntlm.py 910 2013-11-08 19:13:10Z bethus $
#
import base64
import array
import struct
import cal... | |
# Copyright (c) 2010-2012 OpenStack, 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 ... | |
# Build a graph for an individual video frame
from nltk.corpus import wordnet as wn
import utilities.paths as paths
from os import listdir
from os.path import isfile, join
import string
DRIVE = paths.get_drive()
def add_to_dic(dict, k, v):
if k not in dict:
dict[k] = v
return dict
def remDashNum(s):... | |
#!/usr/bin/env python
"""
This module is for working with Micron Optics interrogators.
"""
from __future__ import print_function, division
import datetime
import socket
import struct
import time
import json
import sys
import numpy as np
__version__ = "0.0.2"
class Interrogator(object):
def __init__(self, ip_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.