gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# 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 ... | |
from typing import List, Dict, Set, Iterable, Iterator, Union, Optional
from pathlib import Path
import numpy
from numpy import ndarray
import zlib
import srsly
from thinc.api import NumpyOps
from .doc import Doc
from ..vocab import Vocab
from ..compat import copy_reg
from ..attrs import SPACY, ORTH, intify_attr, IDS
... | |
import math
import numpy
import random
"""Helper classes."""
"""Begin data input functions"""
def read_ibrl_data(data_file):
"""Reads IBRL data from file and returns dict mapping
temp./humidity sensor data to the node that collected them
:param data_file: string representing path to ibrl dataset
:ret... | |
from typing import Any, Dict, Optional
from urllib.parse import urljoin
from django.conf import settings
from django.http import HttpRequest
from version import (
LATEST_MAJOR_VERSION,
LATEST_RELEASE_ANNOUNCEMENT,
LATEST_RELEASE_VERSION,
ZULIP_VERSION,
)
from zerver.decorator import get_client_name
fr... | |
# vim:ts=4:sw=4:et:
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
from watchman.integration.lib import WatchmanEdenTestCase
def possible_cookie(name):
return ".watchman... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from permabots.models import Bot, TelegramBot, KikBot, MessengerBot
from rest_framework import status
from permabots.views import BotDetail, TelegramBotDetail, KikBotDetail, MessengerBotDetail
import json
from tests.api.base import BaseTestAPI
from unittest import skip
cla... | |
#!/usr/bin/env python
import sys
import numpy
import h5py
import logging
logger = logging.getLogger(__file__)
import kaldi_io, kaldi_argparse
from fuel.datasets.hdf5 import H5PYDataset
def get_parser(datasets={}):
parser = kaldi_argparse.KaldiArgumentParser(description="""Exchange data between Kaldi and Fuel... | |
"""Python utilities required by Keras."""
from __future__ import absolute_import
import numpy as np
import time
import sys
import six
import marshal
import types as python_types
import inspect
_GLOBAL_CUSTOM_OBJECTS = {}
class CustomObjectScope(object):
"""Provides a scope that changes to `_GLOBAL_CUSTOM_OBJEC... | |
""" Basic Clousmesh finctions.
.. role:: strikethrough
This file contains some very basic utility functions that must not
need any import from cloudmesh. That is no statement such as
* :strikethrough:`import cloudmesh`
must occur in the list of import. If functions are needed hat need to
be used they must be declea... | |
"""
A command-line interface for Ravel.
Ravel's CLI provides a user-friendly way to interact the backend
PostgreSQL database and Mininet.
"""
import cmd
import getpass
import os
import sys
import time
from functools import partial
import ravel.mndeps
import ravel.profiling
from ravel.db import RavelDb, BASE_SQL
from... | |
import os
import sys
import errno
import itertools
import logging
import stat
import threading
from fuse import FuseOSError, Operations
from . import exceptions, utils
from .keys import Key
from .logs import Log
from .views import View
logger = logging.getLogger('basefs.fs')
class ViewToErrno():
def __enter__... | |
# Copyright 2013 Rackspace Hosting 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 re... | |
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
# 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/LICEN... | |
#!/usr/bin/env python
__author__ = "waroquiers"
import os
import unittest
import numpy as np
from pymatgen.analysis.chemenv.coordination_environments.coordination_geometries import (
AllCoordinationGeometries,
)
from pymatgen.analysis.chemenv.coordination_environments.coordination_geometry_finder import (
... | |
"""
intersections.py
------------------
Primarily mesh-plane intersections (slicing).
"""
import numpy as np
from .constants import log, tol
from . import util
from . import geometry
from . import grouping
from . import transformations
def mesh_plane(mesh,
plane_normal,
plane_origin,
... | |
# Copyright (c) 2013 Mirantis 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 writ... | |
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *
from OpenGL.arrays import vbo
import sys
sys.path.append("S3DGLPy")
from Primitives3D import *
from PolyMesh import *
from Cameras3D import *
from struct import *
from sys import exit, argv
import numpy as np
import scipy.io as sio
import os
im... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | |
# 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... | |
import os
from six.moves.configparser import ConfigParser, NoSectionError
from six.moves import urllib
from conans.errors import ConanException
from conans.model.env_info import unquote
from conans.paths import conan_expand_user, DEFAULT_PROFILE_NAME
from conans.util.env_reader import get_env
from conans.util.files i... | |
#
# 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... | |
# -*- coding: utf-8 -*-
"""
<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>
"""
#<DefineAugmentation>
import ShareYourSystem as SYS
import types
BaseModuleStr="ShareYourSystem.Specials.Predicters.Predicter"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Class... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Copyright 2013 Jacek Markowski, [email protected]
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... | |
#! /usr/bin/python
# hhaim
import sys
import os
python_ver = 'python%s' % sys.version_info[0]
yaml_path = os.path.join('external_libs', 'pyyaml-3.11', python_ver)
if yaml_path not in sys.path:
sys.path.append(yaml_path)
import yaml
import dpdk_nic_bind
import re
import argparse
import copy
import shlex
import trace... | |
"""
Finite difference weights
=========================
This module implements an algorithm for efficient generation of finite
difference weights for ordinary differentials of functions for
derivatives from 0 (interpolation) up to arbitrary order.
The core algorithm is provided in the finite difference weight generat... | |
import os, sys
import pytest
from _pytest.monkeypatch import monkeypatch as MonkeyPatch
def pytest_funcarg__mp(request):
cwd = os.getcwd()
sys_path = list(sys.path)
def cleanup():
sys.path[:] = sys_path
os.chdir(cwd)
request.addfinalizer(cleanup)
return MonkeyPatch()
def test_set... | |
#!/usr/bin/env python3
import os.path
import sys
import configparser
import argparse
import subprocess
import validate
import mysql.connector
from mysql.connector import errorcode
from tabulate import tabulate
import json
import requests
import safe_json_decoder as decoder
import thomas_queries
import thomas_utils
imp... | |
# Copyright (c) 2014 VMware, 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 a... | |
"""
Tests of role and membership calculations.
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from django.test import TestCase
from ..constants import role_kinds
from ..models import Classroom
from ..models import Facility
from ..models import ... | |
"""Support for ISY994 binary sensors."""
from datetime import timedelta
import logging
from typing import Callable
from homeassistant.components.binary_sensor import DOMAIN, BinarySensorDevice
from homeassistant.const import STATE_OFF, STATE_ON
from homeassistant.core import callback
from homeassistant.helpers.event i... | |
"""
Form generation utilities for App Engine's new ``ndb.Model`` class.
The goal of ``model_form()`` is to provide a clean, explicit and predictable
way to create forms based on ``ndb.Model`` classes. No malabarism or black
magic should be necessary to generate a form for models, and to add custom
non-model related fi... | |
#!/usr/bin/python
#coding=utf-8
#Python 3.6
import os
import sys
import hashlib
import zlib
import re
import tempfile
import struct
import shutil
import time,datetime
from config import *
from subprocess import *
from multiprocessing import Lock
from distutils.spawn import find_executable
def g_init(param):
global... | |
import pysal
from pysal.common import *
import pysal.weights
import numpy as np
from scipy import sparse, float32
import scipy.spatial
import os
import operator
import scipy
__all__ = ['lat2W', 'block_weights', 'comb', 'order', 'higher_order',
'shimbel', 'remap_ids', 'full2W', 'full', 'WSP2W',
'i... | |
from __future__ import division, print_function, absolute_import
import numpy as np
import itertools as itr
import amitgroup as ag
from pnet.layer import Layer
import pnet
import pnet.matrix
from amitgroup.plot import ImageGrid
def _extract_batch(im, settings, num_parts, num_orientations, part_shape,
... | |
# -*- coding: utf-8 -*-
"""
Written by Daniel M. Aukes
Email: danaukes<at>gmail.com
Please see LICENSE for full license.
"""
import sympy
sympy.init_printing(use_latex=False,pretty_print=False)
import pynamics
import numpy
import scipy
from pynamics.force import Force
from pynamics.spring import Spring
from pynamics.v... | |
"""
Primary key changing capabilities and passive/non-passive cascading updates.
"""
from sqlalchemy.test.testing import eq_, ne_, \
assert_raises, assert_raises_message
import sqlalchemy as sa
from sqlalchemy.test import testing
from sqlalchemy import Integer, String, ForeignKey, Unicode
from ... | |
#!/usr/bin/env python
import os, sys
new_path = [ os.path.join( os.getcwd(), "lib" ) ]
new_path.extend( sys.path[1:] ) # remove scripts/ from the path
sys.path = new_path
from galaxy import eggs
import pkg_resources
pkg_resources.require( "SQLAlchemy >= 0.4" )
import time, ConfigParser, shutil
from datetime impor... | |
'''
Module containing useful encryption functions.
Some require openssl to be installed.
'''
import glob
import os
from M2Crypto import BIO, SMIME, X509
from subprocess import Popen, PIPE
import tempfile
import logging
# hashlib only available in python 2.5+
try:
from hashlib import md5
except ImportError:
fr... | |
from __future__ import division
from shapely.geometry import Point, LineString
import random
import math
import numpy as np
class RRTFamilyPathPlanner():
"""Plans path using an algorithm from the RRT family.
Contains methods for simple RRT based search, RRTstar based search and informed RRTstar based search... | |
# Test the runpy module
import unittest
import os
import os.path
import sys
import re
import tempfile
from test.test_support import verbose, run_unittest, forget, check_impl_detail
from test.script_helper import (temp_dir, make_script, compile_script,
make_pkg, make_zip_script, make_zip_... | |
"""
shared options and groups
The principle here is to define options once, but *not* instantiate them
globally. One reason being that options with action='append' can carry state
between parses. pip parse's general options twice internally, and shouldn't
pass on state. To be consistent, all options will follow this d... | |
# Copyright 2016 Hewlett Packard Enterprise Development Company LP.
# Copyright 2017 IBM Corp
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0... | |
# 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... | |
# Copyright (C) 2013-2014 by Zhang Li <zhangli10 at baidu.com>
# All rights reserved.
#
# vim-javacomplete_ex:
# improved vim-javacomplete, add following features:
# 1. complete a class name.
# 2. add 'import' statement for a given class.
#
# Redistribution and use in source and binary forms, with or with... | |
#!/usr/bin/env python3
# Copyright 2016 The Fontbakery Authors
# Copyright 2017 The Google Font Tools 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/lice... | |
from contextlib import contextmanager
import collections
import random
import threading
import time
from typing import TypeVar, Generic, Iterable, List, Callable, Any
import ray
from ray.util.iter_metrics import MetricsContext, SharedMetrics
# The type of an iterator element.
T = TypeVar("T")
U = TypeVar("U")
def f... | |
#! /usr/bin/env python
import sys ; sys.path.append('~/InstallingSoftware/pythons/')
import imagetools
from import_tools import *
fl=sys.argv[-1]
ending=""
#fl='/nfs/slac/g/ki/ki18/anja/SUBARU/MACS0416-24/W-S-Z+_2010-11-04/SCIENCE/SUPA0125892_7OCF.fits'
#crfl='/nfs/slac/g/ki/ki18/anja/SUBARU/eyes/data_filter_results/re... | |
import matplotlib.pyplot as plt
import numpy as np
import pathlib
import scipy.interpolate
import sys
import typing
import vorpy.pickle
def zero_crossing_times (t_v:np.ndarray, f_v:np.ndarray, *, orientation:int=0) -> np.ndarray:
"""
Returns piecewise-linearly-computed approximations of the actual zero crossin... | |
#
# Nodes used as utilities and support for transforms etc.
# These often make up sets including both Nodes and ExprNodes
# so it is convenient to have them in a seperate module.
#
import Nodes
import ExprNodes
from Nodes import Node
from ExprNodes import AtomicExprNode
from PyrexTypes import c_ptr_type
class TempHan... | |
import numpy as np
from snob import nips_search3 as mixture
#from snob import mixture_ka as mixture
# Generate data from the example in Section 13.4 of P & A (2015)
np.random.seed(888)
N = 1000
weight = np.array([0.3, 0.3, 0.3, 0.1])
mu = np.array([
[-4, -4],
[-4, -4],
[2, 2],
[-1, -6]
])
cov = np.a... | |
"""
This module provides WSGI application to serve the Home Assistant API.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/http/
"""
import asyncio
import json
import logging
import ssl
from ipaddress import ip_network
from pathlib import Path
import os... | |
"""
Tests for DatetimeArray
"""
import numpy as np
import pytest
from pandas.core.dtypes.dtypes import DatetimeTZDtype
import pandas as pd
import pandas._testing as tm
from pandas.core.arrays import DatetimeArray
class TestDatetimeArrayComparisons:
# TODO: merge this into tests/arithmetic/test_datetime64 once i... | |
from jinja2 import Undefined
from contextlib import contextmanager
from werkzeug.local import LocalStack, LocalProxy
from lektor.reporter import reporter
from lektor.utils import make_relative_url
_ctx_stack = LocalStack()
def url_to(*args, **kwargs):
"""Calculates a URL to another record."""
ctx = get_ct... | |
"""
.. module:: predictor
:synopsis: prediction method (for un-annotated text)
.. moduleauthor:: Liyuan Liu
"""
import torch
import torch.autograd as autograd
import numpy as np
import itertools
import sys
from tqdm import tqdm
from model.crf import CRFDecode_vb
from model.utils import *
class predict:
"""... | |
# election/views_admin.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
from .controllers import election_remote_retrieve, elections_import_from_master_server, elections_sync_out_list_for_api
from .models import Election
from .serializers import ElectionSerializer
from admin_tools.views import redirect... | |
# 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 direct.interval.IntervalGlobal import *
from pandac.PandaModules import *
from DistributedNPCToonBase import *
from toontown.chat.ChatGlobals import *
from toontown.hood import ZoneUtil
from toontown.nametag.NametagGlobals import *
from toontown.quest import MultiTrackChoiceGui
from toontown.quest import QuestCho... | |
#!/usr/bin/env @PYTHON_EXECUTABLE@
"""
Description: Export a Siconos mechanics-IO HDF5 file in VTK format.
"""
# Lighter imports before command line parsing
from __future__ import print_function
import sys
import os
import getopt
#
# a replacement for vview --vtk-export
#
def usage(long=False):
print(__doc__); p... | |
"""This is the Bokeh charts interface. It gives you a high level API to build
complex plot is a simple way.
This is the Builder class, a minimal prototype class to build more chart
types on top of it.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2014, Contin... | |
"""
`amqplib`_ backend for carrot.
.. _`amqplib`: http://barryp.org/software/py-amqplib/
"""
import pylibrabbitmq as amqp
from pylibrabbitmq import ChannelError, ConnectionError
from carrot.backends.base import BaseMessage, BaseBackend
from itertools import count
import warnings
import weakref
DEFAULT_PORT = 5672
... | |
# Copyright 2020 The UniqueRandomizer 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 applicable law or agre... | |
"""
homeassistant.components.device_tracker.tplink
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Device tracker platform that supports scanning a TP-Link router for device
presence.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/device_tracker.tplink/
"... | |
# Copyright (c) 2014 Mirantis 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 writ... | |
from decimal import Decimal
from django.utils.translation import ugettext_lazy as _
from payment.modules.base import BasePaymentProcessor, ProcessorResult
from satchmo_utils.numbers import trunc_decimal
from payflowpro.client import PayflowProClient
from payflowpro.classes import (CreditCard, Amount, Address, Shipping... | |
import sys
import os
import json
import re
import io
import urllib
import hashlib
import requests
import logging
import shutil
import time
import traceback
from requests_toolbelt import MultipartEncoder
from multiprocessing import Pool
#from functools import partial
import subprocess
from zipfile import ZipFile
from os... | |
#!/usr/bin/env python3
import base64
import errno
import http.client
import json
import logging
import os
import pickle # nosec
import socket
import ssl
import sys
import threading
from typing import Any, Type
import ctf_gameserver.lib.flag
from ctf_gameserver.lib.checkresult import CheckResult
_TIMEOUT_SECONDS ... | |
"""The tests for the Group components."""
# pylint: disable=protected-access
from collections import OrderedDict
import homeassistant.components.group as group
from homeassistant.const import (
ATTR_ASSUMED_STATE,
ATTR_FRIENDLY_NAME,
ATTR_ICON,
EVENT_HOMEASSISTANT_START,
SERVICE_RELOAD,
STATE_H... | |
# 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 ... | |
# -*- coding: utf-8 -*-
"""
checks.py
Each function in here should
- Take a DataFrame as its first argument, maybe optional arguments
- Makes its assert on the result
- Return the original DataFrame
"""
import numpy as np
import pandas as pd
from engarde import generic
from engarde.generic import verify, verify_all,... | |
'''
Implements the RTS ALUA Target Port Group class.
This file is part of RTSLib.
Copyright (c) 2016 by Red Hat, 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/lice... | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | |
#####################################################################################
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# This source code is subject to terms and conditions of the Apache License, Version 2.0. A
# copy of the license can be found in the License.html file at the root of th... | |
# 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 ... | |
from __future__ import absolute_import, unicode_literals
import idna
from .tasks import (
check_domain,
check_bulk_domain,
create_registrant,
create_registry_contact,
update_domain_registrant,
update_domain_registry_contact,
create_domain,
connect_domain,
check_host,
create_host,... | |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""Test single point logfiles in cclib."""
import os
import unittest
import numpy
from common import get_minimum_carbon... | |
#!/usr/bin/env python
# rgb2colorname.py
# by [email protected], [email protected], https://github.com/paarthneekhara
# Usage:
# Explained in https://github.com/jetbloom/rgb2colorname/blob/master/README.md
# KDTree Implementation details http://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.KDTree... | |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# aiohttp documentation build configuration file, created by
# sphinx-quickstart on Wed Mar 5 12:35:35 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# au... | |
# Copyright 2014 Uri Laserson
#
# 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,... | |
import curses
from MediaManager.util.numbers import humanize
class SyncList(dict):
def __init__(self, filepath):
self.__filepath = filepath
def load(self):
try:
for line in open(self.__filepath, 'rt'):
line = line.split('#', 1)[0]
line = line.rstrip... | |
"""
A simple JSON REST request abstraction layer that is used by the
``dropbox.client`` and ``dropbox.session`` modules. You shouldn't need to use this.
"""
import io
import socket
import sys
import urllib
try:
import json
except ImportError:
import simplejson as json
try:
import urllib3
except ImportErro... | |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'CopyBuilding.room'
db.delete_column(u'build_copybuilding', 'room_id')
# Deleting ... | |
import sys
import numpy as np
from PyQt4.QtGui import QIntValidator, QDoubleValidator, QApplication, QSizePolicy
from PyMca5.PyMcaIO import specfilewrapper as specfile
from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets import widget
try:
from orangecontrib.xoppy.util.xoppy_ca... | |
#!/usr/bin/env python
#
# Copyright 2015 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 o... | |
# encoding: utf-8
"""
attribute/__init__.py
Created by Thomas Mangin on 2009-11-05.
Copyright (c) 2009-2013 Exa Networks. All rights reserved.
"""
import collections
from struct import unpack
from exabgp.util.od import od
from exabgp.configuration.environment import environment
from exabgp.bgp.message.update.attrib... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''Various generic helper methods'''
import xbmcgui
import xbmc
import xbmcvfs
import xbmcaddon
import sys
from traceback import format_exc
import requests
import arrow
from requests.packages.urllib3.util.retry import Retry
from requests.adapters import HTTPAdapter
import url... | |
# -*- coding: utf-8 -*-
"""
Created on Wed Jan 25 18:22:00 2017
@author: hubj
"""
# %matplotlib inline
import numpy as np # linear algebra
# import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import dicom
import os
import scipy.ndimage
# import matplotlib.pyplot as plt
import pickle
# from skimag... | |
# Copyright 2017 Square, 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,... | |
## @file
# This file is used to parse and evaluate expression in directive or PCD value.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this d... | |
# -*- coding: utf-8 -*-
# Copyright 2020 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... | |
import os.path
import time
import types
from robot.errors import DataError
from robot.utils import secs_to_timestr, timestr_to_secs
from selenium import webdriver
from selenium.common.exceptions import NoSuchWindowException
from Selenium2Library.base import LibraryComponent, keyword
from Selenium2Library.locators.win... | |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2003-2009 Edgewall Software
# Copyright (C) 2003-2005 Daniel Lundin <[email protected]>
# Copyright (C) 2005-2006 Emmanuel Blot <[email protected]>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as p... | |
from core.himesis import Himesis, HimesisPreConditionPatternLHS
import cPickle as pickle
from uuid import UUID
class HConditionBranch1ProcPart2_CompleteLHS(HimesisPreConditionPatternLHS):
def __init__(self):
"""
Creates the himesis graph representing the AToM3 model HConditionBranch1ProcPart2_Com... | |
#!/usr/bin/env python
#
# Copyright (C) 2008 The Android Open Source Project
#
# 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 req... | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | |
#########
# Copyright (c) 2015 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... | |
from os import path
from itertools import chain
from webassets import six
from webassets.six.moves import map
from webassets.six.moves import zip
try:
import glob2 as glob
from glob import has_magic
except ImportError:
import glob
from glob import has_magic
from .bundle import Bundle, is_url
from .cach... | |
# -*- test-case-name: xquotient.test.test_grabber -*-
from epsilon import hotfix
hotfix.require('twisted', 'deferredgenerator_tfailure')
import time, datetime
from twisted.mail import pop3, pop3client
from twisted.internet import protocol, defer, ssl, error
from twisted.python import log, components, failure
from tw... | |
# Copyright 2015 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | |
# -*- coding: utf-8 -*-
#
# Copyright 2014 Red Hat, 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... | |
from __future__ import unicode_literals
from __future__ import absolute_import
from collections import namedtuple
import logging
import re
import sys
from operator import attrgetter
import six
from docker.errors import APIError
from docker.utils import create_host_config, LogConfig
from . import __version__
from .con... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.