gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | |
# Copyright 2016 Battelle Energy Alliance, 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 agr... | |
'''
This is the final wavelength calibration code that implements the
grating equation to calculate the wavelength dispersion.
The input should just be the name of a comparison lamp, taken from argv.
The function depend on some hard coded data, "WaveList" and "Parameters" which
are project spesific.
Written by Je... | |
'''
Project: Prism
Author: Kain Liu
'''
from PIL import Image
from cossim import cossim
from sketch import sketch
from numpy import *
import time
import os, sys
import scipy.spatial.distance as dis
# 24k pictures in total
population = 24000
# random vector
rv_number = 256
# sample id of images
samples = [ 2158, 7... | |
#!/usr/bin/env python
from __future__ import print_function
from __future__ import absolute_import
import os
import tct
import sys
#
import os
params = tct.readjson(sys.argv[1])
facts = tct.readjson(params['factsfile'])
milestones = tct.readjson(params['milestonesfile'])
reason = ''
resultfile = params['resultfile']
... | |
# -----------------------------------------------------------------------------
# Copyright * 2014, United States Government, as represented by the
# Administrator of the National Aeronautics and Space Administration. All
# rights reserved.
#
# The Crisis Mapping Toolkit (CMT) v1 platform is licensed under the Apache
#... | |
# Copyright (c) "Neo4j"
# Neo4j Sweden AB [http://neo4j.com]
#
# This file is part of Neo4j.
#
# 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... | |
# Lint as: python3
# Copyright 2019 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 ... | |
from auspex.log import logger
from auspex.config import isnotebook
from auspex.experiment import Experiment, FloatParameter
from auspex.stream import DataStream, DataAxis, SweepAxis, DataStreamDescriptor, InputConnector, OutputConnector
from auspex.instruments import instrument_map
import auspex.filters
import bbndb
im... | |
"""Tests for the 'setuptools' package"""
from unittest import TestSuite, TestCase, makeSuite, defaultTestLoader
import distutils.core, distutils.cmd
from distutils.errors import DistutilsOptionError, DistutilsPlatformError
from distutils.errors import DistutilsSetupError
import setuptools, setuptools.dist
from setuptoo... | |
"""
Author : Jay Rambhia
email : jayrambhia777@gmail.com
Git : https://github.com/jayrambhia
gist : https://gist.github.com/jayrambhia
=============================================
Name : deskwid
Repo : DeskWid
Git : https://github.com/jayrambhia/DeskWid
version 0.1
"""
# Copyright (c) 2012 Jay Rambhia
# Pe... | |
from six.moves import cStringIO as StringIO
import netlib
from netlib import tcp
from netlib.http import user_agents
from pathod import language
from pathod.language import http2, base
import tutils
def parse_request(s):
return language.parse_pathoc(s, True).next()
def parse_response(s):
return language.p... | |
import unittest
import kdTree
class KdTreeTest(unittest.TestCase):
# TEST Point
def testPointCreate(self):
p = kdTree.Point([1, 2])
self.assertEqual(1, p.coords[kdTree.X_COORD])
self.assertEqual(2, p.coords[kdTree.Y_COORD])
def testEquality(self):
p = kdTree.Point([1, 2]... | |
#!/usr/bin/python2.4
# Copyright (c) 2006-2008 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.
'''The 'grit transl2tc' tool.
'''
import getopt
from grit.tool import interface
from grit.tool import rc2grd
from grit impor... | |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'UI-Layouts/qPreferences.ui'
#
# Created: Sat Feb 7 19:49:38 2015
# by: pyside-uic 0.2.15 running on PySide 1.2.1
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class Ui_qPreferences(object):... | |
#
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | |
##
# Copyright (c) 2007-2015 Apple 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 l... | |
# This work was created by participants in the DataONE project, and is
# jointly copyrighted by participating institutions in DataONE. For
# more information on DataONE, see our web site at http://dataone.org.
#
# Copyright 2009-2019 DataONE
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you ma... | |
# coding: utf-8
from __future__ import unicode_literals
import re
import itertools
from .common import InfoExtractor
from ..utils import (
urlencode_postdata,
int_or_none,
unified_strdate,
)
class VierIE(InfoExtractor):
IE_NAME = 'vier'
IE_DESC = 'vier.be and vijf.be'
_VALID_URL = r'''(?x)
... | |
import json
import os
import argparse
import copy
import shutil
import subprocess
cur_dir = os.path.abspath(os.path.dirname(__file__))
print(f"cur_dir: {cur_dir}")
def insert_extract_code(file_path):
code_lines = []
code = \
"""
import json
import os
def extract(my_pipeline, file_name, output_path='gener... | |
from __future__ import absolute_import, unicode_literals
from copy import copy
from django.conf import settings
from django.core.exceptions import ValidationError
from django.core.urlresolvers import NoReverseMatch
from django.db.models.fields import FieldDoesNotExist
from drf_toolbox.compat import models, django_pgfie... | |
from ..errors import AutoDiscoverFailed, ErrorNonExistentMailbox
from ..fields import (
BooleanField,
BuildField,
Choice,
ChoiceField,
EmailAddressField,
EWSElementField,
IntegerField,
OnOffField,
ProtocolListField,
TextField,
)
from ..properties import EWSElement
from ..transpor... | |
# Standard python modules.
import logging
import time
import sys
# citest modules.
import citest.gcp_testing as gcp
import citest.json_predicate as jp
import citest.service_testing as st
from citest.json_contract import ObservationPredicateFactory
ov_factory = ObservationPredicateFactory()
# Spinnaker modules.
import... | |
#
# 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... | |
"""
"""
# Created on 2013.08.05
#
# Author: Giovanni Cannata
#
# Copyright 2013, 2014, 2015, 2016, 2017 Giovanni Cannata
#
# This file is part of ldap3.
#
# ldap3 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 Fo... | |
#!/usr/bin/env python3
# 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.
"""Unit tests for the client_replay.CommandSequence class."""
import io
import optparse
import os
import sys
import unittest
import ... | |
# -*- test-case-name: twisted.test.test_log -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Logging and metrics infrastructure.
"""
from __future__ import division
import sys
import time
import warnings
from datetime import datetime
import logging
from zope.interface import Interface... | |
import numpy as np
def art(sinogram: np.ndarray, angles: np.ndarray, initial: np.ndarray = None,
iterations: int = 1, count=None, max_count=None) -> np.ndarray:
"""Algebraic Reconstruction Technique
The Algebraic Reconstruction Technique (ART) iteratively
computes the inverse of the Radon transfo... | |
"""Helpers for managing a pairing with a HomeKit accessory or bridge."""
import asyncio
import datetime
import logging
from homeassistant.helpers.event import async_track_time_interval
from .const import DOMAIN, HOMEKIT_ACCESSORY_DISPATCH, ENTITY_MAP
DEFAULT_SCAN_INTERVAL = datetime.timedelta(seconds=60)
RETRY_INTE... | |
"""
Copyright (c) 2019 Eric Shook. All rights reserved.
Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
@author: eshook (Eric Shook, eshook@gmail.edu)
@contributors: <Contribute and add your name here!>
"""
# Load forest
from forest import *
# PyCUDA imports
import py... | |
# -*- coding: utf-8 -*-
#
# 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
#... | |
# Copyright (c) 2013 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 ... | |
"""Sorbet - frozen sequence storage engine
Sorbet is fast - on a "standard" laptop it achieves:
- 200k writes per second,
- 300k reads per second.
"""
# ------------------------------------------------------------------------------
def sorbet(path, kind='disk'):
if kind=='disk':
return sorbet_on_disk(path)
elif ... | |
# Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to us... | |
"""
ATD (1995) Colour Vision Model
==============================
Defines the *ATD (1995)* colour vision model objects:
- :class:`colour.CAM_Specification_ATD95`
- :func:`colour.XYZ_to_ATD95`
Notes
-----
- According to *CIE TC1-34* definition of a colour appearance model, the
*ATD (1995)* model cannot be c... | |
#===============================================================================
# Copyright 2009 Matt Chaput
#
# 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/li... | |
# Copyright (c) 2012 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 code
import cpp_util
from model import Platforms
from schema_util import CapitalizeFirstLetter
from schema_util import JsFunctionNameToClassName
... | |
import unittest
import collections
from fontParts.base import FontPartsError
from fontTools.misc.py23 import basestring
testPNGData = """
89504e470d0a1a0a0000000d4948445200000080000000800806000000c33e61cb0000
02ee694343504943432050726f66696c65000078018554cf6b134114fe366ea9d02208
5a6b0eb27890224959ab6845d436fd11626b0cd... | |
#!/usr/bin/env python
# -*- coding: utf-8
# Dmitry Abramov
# Python v. 2.7.9
from __future__ import division, print_function
import os.path, sys
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir))
import operator
from structures.Graph import GraphNode, connected_components
from stru... | |
# Copyright 2013 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 absolute_import
import os
import posixpath
import unittest
import mock
from pyfakefs import fake_filesystem_unittest
from py_utils im... | |
# do not import dpga here, as that slows down test collection considerably,
# even if we do not run these tests.
import numba
import numpy as np
from . import rng # noqa: F401
def setup_module():
# do this separately so that we get distinct timing information for it
import clifford.dpga # noqa: F401
class... | |
import numpy as np
from six.moves import range
from ...core.utils import as_id_array
from ...utils.jaggedarray import JaggedArray
from .status import CORE_NODE, CLOSED_BOUNDARY
def _split_link_ends(link_ends):
"""
Examples
--------
>>> from landlab.grid.unstructured.links import _split_link_ends
... | |
# encoding=utf-8
# Generated by cpy
# 2014-06-17 09:58:41.398125
import os, sys
from sys import stdin, stdout
import socket
class SSDB_Response(object):
pass
def __init__(this, code='', data_or_message=None):
pass
this.code = code
this.data = None
this.message = None
if code=='ok':
pass
this.data ... | |
###############################################################################
##
## Copyright (C) 2014-2015, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## ... | |
import cuisine
from fabric.api import task, roles, run, sudo, cd, local
from fabric.contrib.files import uncomment
from utilities import notify
from conf import MACHINE, KEY
import templates
@task
@roles('web')
def new():
# just for convenience.
#local('deactivate')
local('gcutil addinstance ' + KEY + ' '... | |
"""Common functionality for multiprocess system basees built with the
python 'multiprocess' module. Intended as a base class, not for
direct usage."""
import logging
from thespian.actors import *
from thespian.system.systemBase import systemBase
from thespian.system.utilis import thesplog, checkActorCapabilities, pa... | |
import re
import logging
from functools import partial
from py4jdbc.utils import CachedAttr
from py4jdbc.resultset import ResultSet, ColumnResultSet
from py4jdbc.gateway_process import GatewayProcess
from py4jdbc.exceptions import dbapi2 as dbapi2_exc
from py4jdbc.exceptions.py4j import reraise_jvm_exception
params... | |
"""Functions for signing notebooks"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import base64
from contextlib import contextmanager
import hashlib
from hmac import HMAC
import io
import os
from IPython.utils.io import atomic_writing
from IPython.utils.py3com... | |
# 20170614 Add manual trade
import ael
import acm
import HTI_Util
import HTI_Email_Util
import HTI_FeedTrade_EDD_Util
import os
import sys, traceback
import datetime
import sqlite3
import csv
import decimal
import account_journal
import win32com.client
ael_variables = [['startdate', 'Start Date', 'string', [str(ael.da... | |
# -*- coding: utf-8 -*-
"""
twython.api
~~~~~~~~~~~
This module contains functionality for access to core Twitter API calls,
Twitter Authentication, and miscellaneous methods that are useful when
dealing with the Twitter API
"""
import warnings
import requests
from requests.auth import HTTPBasicAuth
from requests_o... | |
"""
Created on Fri Jan 24 2020.
@author: mtageld
"""
import copy
import os
from itertools import combinations
import numpy as np
from imageio import imwrite
from histomicstk.annotations_and_masks.annotation_and_mask_utils import (
_get_coords_from_element, _get_idxs_for_all_rois,
_simple_add_element_to_roi, ... | |
#!/usr/bin/env python
# Copyright 2012 Hewlett-Packard Development Company, L.P.
# Copyright 2014 Wikimedia Foundation 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://ww... | |
"""Config flow for the Huawei LTE platform."""
from collections import OrderedDict
import logging
from typing import Any, Dict, Optional
from urllib.parse import urlparse
from huawei_lte_api.AuthorizedConnection import AuthorizedConnection
from huawei_lte_api.Client import Client
from huawei_lte_api.Connection import... | |
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information.
import sys
from generate import generate
MAX_ARGS = 3
MAX_HELPERS = 10
TYPE_CODE_TYPES = ['Int16', 'Int32', 'In... | |
# Copyright (c) 2020 Rocky Bernstein
from uncompyle6.scanners.tok import Token
IFELSE_STMT_RULES = frozenset(
[
(
"ifelsestmt",
(
"testexpr",
"c_stmts_opt",
"jump_forward_else",
"else_suite",
"... | |
#!/usr/bin/env python2.7
from __future__ import absolute_import, division, print_function
from six.moves import range
import utool
from ibeis.control import SQLDatabaseControl
from os.path import join
from guitool.api_item_model import APIItemModel
from guitool.__PYQT__ import QtGui
import string
import random
print, ... | |
#!/usr/bin/env python
#
# Copyright 2008 FriendFeed
#
# 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... | |
# Sway
from __future__ import print_function, division
import sys
sys.dont_write_bytecode = True
from model import *
from space import *
from grid import *
def BASIC_5_2(): return BASIC(5,2)
def BASIC_10_2(): return BASIC(10,2)
def BASIC_20_2(): return BASIC(20,2)
def BASIC_40_2(): return BASIC(40,2)
class BASI... | |
from django.shortcuts import render
from django.conf import settings
from django.http import Http404, HttpResponsePermanentRedirect
from django.urls import reverse
from datetime import date, timedelta, datetime
from chicago.models import ChicagoBill, ChicagoEvent
from councilmatic_core.views import *
from haystack.q... | |
# 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 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 ... | |
import pygame
import render
import theme
import callback
import resource
import focus
import kvc
class View(object):
"""A rectangular portion of the window.
Views may have zero or more child views contained within it.
Signals
on_mouse_down(view, button, point)
on_mouse_up(view, button... | |
#!/usr/bin/env python3
'''Take a prefix and model name run predictions, and generate evaluations for crystal, bestonly,
and all test sets (take max affinity; if pose score is available also consider
max pose score).
Generates graphs and overall CV results. Takes the prefix and (for now) assumes trial 0.
Will evalua... | |
########
# Copyright (c) 2018 Cloudify Platform 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 requi... | |
from itertools import product
import collections
import math
import numpy as np
import pytest
# public 3d array funcs
from rio_color.colorspace import convert_arr, saturate_rgb
# public scalar func
from rio_color.colorspace import convert
# enums required to define src and dst for convert and convert_arr
from rio_c... | |
# Copyright 2015 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 json
import unittest
import mock
import webapp2
import webtest
# Importing mock_oauth2_decorator before file_bug mocks out
# OAuth2Decorator usage i... | |
"""Module for the xls diffing and CLI.
IndexedVenn
This is a named tuple that is meant to carry information about two
sequences (called "a" and "b"). It has the following ordered members:
- common_a: The index and item of all items in both a and b with the
condition that the item appears ex... | |
from __future__ import absolute_import, print_function
import logging
import six
from datetime import timedelta
from enum import IntEnum
from bitfield import BitField
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import IntegrityError, models, transaction
from django.ut... | |
# Copyright 2013 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 math
import os
from core import perf_benchmark
from telemetry import benchmark
from telemetry import page as page_module
from telemetry.page import ... | |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | |
from __future__ import absolute_import, unicode_literals
# unicode_literals ensures that any render / __str__ methods returning HTML via calls to mark_safe / format_html
# return a SafeText, not SafeBytes; necessary so that it doesn't get re-encoded when the template engine
# calls force_text, which would cause it to l... | |
import json
import types
from bitstring import CreationError
from .constants import CONDITIONAL
from .errors import BadConditionalCaseError
from .utils import indent_text
class BreadStruct(object):
def __init__(self):
self._data_bits = None
self._fields = {}
self._conditional_fields = []... | |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2009 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://trac.edgewall.com/license.html.
#
# This software consists of vo... | |
import datetime
from urlparse import urlparse
from utils import log as logging
from django.shortcuts import get_object_or_404, render_to_response
from django.views.decorators.http import condition
from django.http import HttpResponseForbidden, HttpResponseRedirect, HttpResponse, Http404
from django.conf import settings... | |
# The MIT License (MIT)
#
# Copyright (c) 2014 Zulko
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | |
# pylint: disable=I0011,W0613,W0201,W0212,E1101,E1103
from __future__ import absolute_import, division, print_function
import os
import sys
import numpy as np
from mock import patch, MagicMock
try:
from IPython import __version__ as ipy_version
except:
ipy_version = '0.0'
from qtpy import QtCore
from glue.... | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module contains the classes and utility functions for distance and
cartesian coordinates.
"""
import warnings
import numpy as np
from astropy import units as u
from astropy.utils.exceptions import AstropyWarning
from .angles import Angle
__al... | |
import os
import time
import glob
from ctypes.util import find_library
from contextlib import suppress
import pytest
import astropy.units as u
from astropy.io import fits
import requests
from panoptes.pocs.camera.simulator.dslr import Camera as SimCamera
from panoptes.pocs.camera.simulator.ccd import Camera as SimSDK... | |
#!/usr/bin/env python
#--------Include modules---------------
from copy import copy
import rospy
from visualization_msgs.msg import Marker
from std_msgs.msg import String
from geometry_msgs.msg import Point
from nav_msgs.msg import OccupancyGrid
import actionlib_msgs.msg
from move_base_msgs.msg import MoveBaseAction,... | |
"""Compressed Sparse Row matrix format"""
__docformat__ = "restructuredtext en"
__all__ = ['csr_matrix', 'isspmatrix_csr']
from warnings import warn
import numpy as np
from sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \
get_csr_submatrix
from sputils import upcast, isintlike
from compresse... | |
#!/usr/bin/env python3
# -*- mode: python -*-
# -*- coding: utf-8 -*-
"""Runs the KijiExpress Music tutorial."""
import glob
import logging
import os
import shutil
import sys
import tempfile
# Add the root directory to the Python path if necessary:
__path = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0])... | |
# -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# 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 ... | |
# Copyright 2016 Hewlett Packard Enterprise Development Company LP
#
# 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
#
# Unles... | |
from cardboard import types
from cardboard.ability import (
AbilityNotImplemented, spell, activated, triggered, static
)
from cardboard.cards import card, common, keywords, match
@card("Malach of the Dawn")
def malach_of_the_dawn(card, abilities):
def malach_of_the_dawn():
return AbilityNotImplemente... | |
# Copyright (c) 2010-2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | |
#!/usr/bin/env python
from __future__ import print_function
import argparse
import os
import re
import subprocess
import sys
class TestFailedError(Exception):
pass
def escapeCmdArg(arg):
if '"' in arg or ' ' in arg:
return '"%s"' % arg.replace('"', '\\"')
else:
return arg
def run_com... | |
# 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 ... | |
"""
Handles a Minecraft world save using either the Anvil or McRegion format.
For more information about the world format:
https://minecraft.gamepedia.com/Level_format
"""
import os, glob, re
from . import region
from . import chunk
from .region import InconceivedChunk, Location
class UnknownWorldFormat(Exception):
... | |
from django.shortcuts import render, redirect
from datetime import datetime
from core.views import initRequest
from django.db import connection, transaction
from django.http import HttpResponse
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.core.cache import cache
from pprint i... | |
from __future__ import unicode_literals
import json
import requests
import six
from datetime import datetime
from six.moves.urllib.parse import parse_qs
from xml.etree.ElementTree import tostring, SubElement, Element
from .exceptions import (
XeroBadRequest, XeroExceptionUnknown, XeroForbidden, XeroInternalError... | |
#!/usr/bin/env python
# Copyright (c) 2012 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.
"""A tool to extract size information for chrome, executed by buildbot.
When this is run, the current directory (cwd) should be ... | |
#
# 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... | |
# Copyright (c) 2009-2010 Denis Bilenko. See LICENSE for details.
import sys
import traceback
from gevent import core
from gevent.hub import greenlet, getcurrent, get_hub, GreenletExit, Waiter
from gevent.timeout import Timeout
__all__ = ['Greenlet',
'joinall',
'killall']
class SpawnedLink(ob... | |
import nipype.pipeline.engine as pe
import nipype.interfaces.utility as util
import nipype.interfaces.io as nio
import re
import os
import sys
import glob
from CPAC.utils.datasource import create_grp_analysis_dataflow
from CPAC.utils import Configuration
from CPAC.utils.utils import prepare_gp_links
from CPAC.group_a... | |
import numpy as np
import matplotlib.pyplot as plt
from scipy.io import loadmat
import cPickle as pickle
from openmdao.api import Problem
from pyoptsparse import Optimization, SNOPT
from wakeexchange.OptimizationGroups import OptAEP
from wakeexchange.gauss import gauss_wrapper, add_gauss_params_IndepVarComps
from wa... | |
# 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, ... | |
# -*- coding: utf-8
# 'version': '0.3'
#
# Copyright (c) 2017, Stephen B, Hope, All rights reserved.
#
# CommAI-env Copyright (c) 2016-present, Facebook, Inc., All rights reserved.
# Round1 Copyright (c) 2017-present, GoodAI All rights reserved.
#
# This source code is licensed under the BSD-style license found in the... | |
# Copyright 2018 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, ... | |
import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
from datetime import datetime, timezone
from typing import Union, Any, Dict
from dateparser import parse
import urllib3
import traceback
# Disable insecure warnings
urllib3.disable_warnings()
''' GLOBAL VARIABLES '''
... | |
# 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.