gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python3 from utilities import filesFromList, vtkWriteDataStructured2d, vtkWriteHeaderAndGridStructured2d from utilities import vtkWritePointDataHeader, vtkWritePointDataStructured2D from utilities import writeLog from plotTools import addContourf, extractFromCSV from footprintTools import * from mapTools...
"""Support for Proxmox VE.""" from datetime import timedelta import logging from proxmoxer import ProxmoxAPI from proxmoxer.backends.https import AuthenticationError from proxmoxer.core import ResourceException from requests.exceptions import SSLError import voluptuous as vol from homeassistant.const import ( CON...
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 compli...
# -*- coding: utf-8 -*- """ libfb2.sb ~~~~~~~~~ Reads frostbite2 sb and toc files. Thanks to gibbed for the original analysis of the XOR trick for the obfuscation. :copyright: (c) Copyright 2011 by Armin Ronacher, Richard Lacharite, Pilate. :license: BSD, see LICENSE for more details. """ imp...
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test behavior of -maxuploadtarget. * Verify that getdata requests for old blocks (>1week) are dropped ...
import numpy as np import accpm import scipy.optimize as opt import config def linear_predictor(X, w): """ Returns a vector of predictions (+1 or -1) given input data X and parameter vector w. """ predictions = np.sign(np.dot(X, w)) return predictions def initial_polyhedron(X): """ Re...
# All fields except for BlobField written by Jonas Haag <jonas@lophus.org> from django.db import models from django.core.exceptions import ValidationError from django.utils.importlib import import_module __all__ = ('RawField', 'ListField', 'DictField', 'SetField', 'BlobField', 'EmbeddedModelField') class ...
# Copyright 2014 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 ...
from collections import OrderedDict import pytest import numpy as np from astropy import units as u from astropy.tests.helper import assert_quantity_allclose from astropy.modeling.functional_models import ( Gaussian1D, Sersic1D, Sine1D, Linear1D, Lorentz1D, Voigt1D, Const1D, Box1D, Trapezoid1D, Ricke...
''' Hackpack Configure A script to configure your TwiML apps and Twilio phone numbers to use your hackpack's Heroku app. Usage: Auto-configure using your local_settings.py: python configure.py Deploy to new Twilio number and App Sid: python configure.py --new Deploy to specific App Sid: python configure...
# Copyright 2011 OpenStack Foundation # Copyright 2012 Justin Santa Barbara # # 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 absolute_import from __future__ import with_statement import socket import types from anyjson import dumps from itertools import count from Queue import Empty, Queue as _Queue from kombu.connection import BrokerConnection from kombu.entity import Exchange, Queue from kombu.exceptions import In...
from __future__ import absolute_import import re from collections import deque import six class Token: def __init__(self, **kwds): self.buffer = None self.__dict__.update(kwds) def __str__(self): return self.__dict__.__str__() def regexec(regex, input): matches = regex.match(inp...
# -*- coding: utf-8 -*- """ Internal module for formatting output data in csv, html, and latex files. This module also applies to display formatting. """ from __future__ import print_function # pylint: disable=W0141 from pandas.core.dtypes.missing import isna, notna from pandas.core.dtypes.common import ( is_cate...
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # vi:ts=4:et # Wekan API Python CLI, originally from here, where is more details: # https://github.com/wekan/wekan/wiki/New-card-with-Python3-and-REST-API # TODO: # addcustomfieldtoboard: There is error: Settings must be object. So adding does not work yet. try: ...
from __future__ import division, print_function, absolute_import import os import sys from scipy._lib.six import xrange, u import numpy as np from numpy.testing import (verbose, run_module_suite, assert_, assert_raises, assert_array_equal, assert_equal, assert_alm...
'''Library / toolkit for creating command line programs with minimal effort.''' # Copyright (c) 2013-2016, 2018 Benjamin Althues <benjamin@babab.nl> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and...
# !/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of Erebus, a web dashboard for tor relays. # # :copyright: (c) 2015, The Tor Project, Inc. # (c) 2015, Damian Johnson # (c) 2015, Cristobal Leiva # # :license: See LICENSE for licensing information. """ Websocket-related...
from __future__ import division import re import datetime from decimal import Decimal from django.utils import six STRFDATETIME = re.compile('([dgGhHis])') STRFDATETIME_REPL = lambda x: '%%(%s)s' % x.group() def nice_repr(timedelta, display="long", sep=", "): """ Turns a datetime.timedelta object into a nic...
"""Implement the Google Smart Home traits.""" import logging from homeassistant.components import ( alarm_control_panel, binary_sensor, camera, cover, fan, group, input_boolean, input_select, light, lock, media_player, scene, script, sensor, switch, vacuu...
# 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...
import copy import json import numbers import pdb import geojson import geo import spatialref def geo_feature(geo): """extract a feature from various types of input""" feature = geo try: feature = feature.__geo_interace__ except AttributeError: pass return feature def geo_features(geo): """e...
# -*- coding: utf-8 -*- from __future__ import with_statement import sys from django.core.urlresolvers import clear_url_caches, reverse from django.utils import six from cms.api import create_page, create_title from cms.apphook_pool import apphook_pool from cms.appresolver import applications_page_check, clear_app_re...
import operator import warnings from haystack import connections, connection_router from haystack.backends import SQ from haystack.constants import REPR_OUTPUT_SIZE, ITERATOR_LOAD_PER_QUERY, DEFAULT_OPERATOR from haystack.exceptions import NotHandled from haystack.inputs import Raw, Clean, AutoQuery from haystack.utils...
# Copyright 2014-2020 Scalyr Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
# 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 __future__ import division import sys, os, imp, urllib, json, time, traceback, re, getopt, tempfile, AdvancedHTMLParser, urllib2, urlparse, zipfile, shutil, requests, logging, psutil, subprocess, sqlite3, cgi from threading import Timer import thread from scripts import kodi_utils from collections import OrderedDi...
import json import os from decimal import Decimal from django.core.urlresolvers import reverse from django.test import TestCase from casexml.apps.stock.models import StockTransaction, StockReport from corehq.apps.accounting import generator from corehq.apps.accounting.models import BillingAccount, DefaultProductPlan, S...
# imu.py # The supporting library for the sensors on Arduino board. # Author: Yanglei Zhao ############################# import struct import time import math import sqlite3 import sys try: import serial except: sys.stderr.write('Warning: pySerial not installed, will not connect Arduino.\n') import numpy as ...
""" A MathML printer. """ from __future__ import print_function, division from sympy import sympify, S, Mul from sympy.core.compatibility import range, string_types, default_sort_key from sympy.core.function import _coeff_isneg from sympy.printing.conventions import split_super_sub, requires_partial from sympy.printi...
# Standard library import os import warnings # Third-party from astropy.table.meta import get_header_from_yaml, get_yaml_from_table from astropy.io.misc.hdf5 import _encode_mixins, meta_path from astropy.utils.exceptions import AstropyUserWarning from astropy.utils import metadata from thejoker.thejoker import valida...
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file import os,re,imp,sys from waflib import Utils,Errors,Logs import waflib.Node HEXVERSION=0x1081300 WAFVERSION="1.8.19" WAFREVISION="f14a6d43092d3419d90c1ce16b9d3c700309d7b3" ABI=98 DBFILE='.wafpickle-...
# -*- coding: utf-8 -*- from copy import deepcopy import inspect import sys from six import iteritems from six import iterkeys from six import add_metaclass from .common import * from .datastructures import OrderedDict as OrderedDictWithSort from .exceptions import ( BaseError, DataError, MockCreationError, ...
#! /usr/bin/env python # Copyright (c) 2015 Samuel Merritt <sam@swiftstack.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
# 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 writi...
from antlr4_generated.CListener import CListener from antlr4_generated.CParser import CParser from AbstractSyntaxTree import * from antlr4 import tree from antlr4 import ParserRuleContext import sys class Listener(CListener): def __init__(self, tree): super(Listener, self).__init__() self.ast = tr...
# ---------------------------------------------------------------------- # Copyright (c) 2014 Rafael Gonzalez. # # 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...
import collections import numpy import six import chainer from chainer import backend from chainer.backends import cuda def to_device(device, x): """Send an array to a given device. This method sends a given array to a given device. This method is used in :func:`~chainer.dataset.concat_examples`. Y...
import os import sys import shutil import logging import webbrowser import traceback import socket import django.conf from cactus import ui as ui_module from cactus.config.router import ConfigRouter from cactus.deployment import get_deployment_engine_class from cactus.i18n.commands import MessageMaker, MessageCompile...
import logging import re import sys import functools import json from django.utils import six try: str = str except NameError: str = str logger = logging.getLogger(__name__) URL_PARAM_RE = re.compile('(?P<k>[^(=|&)]+)=(?P<v>[^&]+)(&|$)') URL_PARAM_NO_VALUE_RE = re.compile('(?P<k>[^(&|?)]+)(&|$)') def import...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Script to extract the strings from Event Log message resource files.""" import argparse import logging import os import re import sys from dfvfs.helpers import command_line as dfvfs_command_line from dfvfs.helpers import volume_scanner as dfvfs_volume_scanner from dfvf...
#!/usr/bin/env python # requirements_to_rst.py # Copyright (c) 2013-2020 Pablo Acosta-Serafini # See LICENSE for details # pylint: disable=C0103,C0111,R0912,R0914,R0915,R1717,R1718 import os import textwrap from pypkg.functions import get_supported_interps, json_load ### # Global variables ### LINE_WIDTH = 72 ###...
# (c) Copyright 2018 SUSE LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import glob import o...
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, merge, publish, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # The MIT License (MIT) # # Copyright (c) 2015 Shigeru Kitazaki # # 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...
# runhandler.py # Author: Richard Gibson # # A base class for the submit.Submit and deleterun.DeleteRun classes. The # majority of the functions in this class contain functions that update # memcache upon deletion / insertion of runs into the database. If we didn't # care about datastore reads/writes, this class wo...
# Copyright 2014 IBM Corp. # # 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 a...
# This file is part of the MicroPython project, http://micropython.org/ # # The MIT License (MIT) # # Copyright (c) 2016 Glenn Ruben Bakke # # 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 wi...
import re from calendar import monthrange from datetime import date from django import forms from django.core.exceptions import ImproperlyConfigured from django.utils.translation import ugettext_lazy as _ from oscar.apps.address.forms import AbstractAddressForm from oscar.core.loading import get_model from oscar.form...
# 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...
import marshal import os import subprocess import urlparse import dxr.plugins """Omniglot - Speaking all commonly-used version control systems. At present, this plugin is still under development, so not all features are fully implemented. Omniglot first scans the project directory looking for the hallmarks of a VCS ...
# $Id: __init__.py 6141 2009-09-25 18:50:30Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ This is ``docutils.parsers.rst`` package. It exports a single class, `Parser`, the reStructuredText parser. Usage ===== 1. Create a parser:: pa...
#!/usr/bin/env python from __future__ import print_function from __future__ import absolute_import from builtins import str from builtins import range from builtins import object # standard library import itertools # third party import matplotlib.pyplot as plt from matplotlib import cm as CM from matplotlib.colors im...
# 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. from copy import deepcopy import logging import re import string from file_system import FileNotFoundError def _ClassifySchemaNode(node_name, api): ...
"""Module to run the phaser rotation search""" __author__ = "Adam Simpkin & Felix Simkovic" __date__ = "15 April 2018" __version__ = "0.4" import glob import logging import os import shutil import uuid logger = logging.getLogger(__name__) from pyjob.script import ScriptCollector, Script import simbad.db import sim...
"""pack a list of components into as few components as possible. adapted from phidl.geometry. """ import warnings from typing import Any, Dict, List, Optional, Tuple import numpy as np from pydantic import validate_arguments from gdsfactory.component import Component from gdsfactory.name import get_name_short from g...
""" test the scalar Timedelta """ from datetime import timedelta from hypothesis import ( given, strategies as st, ) import numpy as np import pytest from pandas._libs import lib from pandas._libs.tslibs import ( NaT, iNaT, ) import pandas as pd from pandas import ( Timedelta, TimedeltaIndex,...
# encoding: utf-8 import tempfile import uuid import errno import signal import pwd import os import ssl from slimurl import URL from tornado.ioloop import IOLoop from tornado.httpserver import HTTPServer from tornado.log import gen_log as log from tornado.options import options, define from tornado.process import cpu_...
# Copyright 2011-2012 James McCauley # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
""" 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 this ...
# 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 ...
#!/usr/bin/python -u # 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 ap...
""" threadly a simple threadpool and scheduler for python. """ import threading import logging import Queue from Queue import Empty as EmptyException from threadly.Structures import SortedLockingList from threadly.KeyedExecutor import KeyedExecutor from threadly.Futures import ListenableFuture from threadly.Futures im...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify 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 law...
# Copyright 2014, Rackspace, US, 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 w...
import logging import numpy as np from scipy.optimize import brent from math import gcd from qcodes import Instrument from qcodes.utils import validators as vals from qcodes.instrument.parameter import ManualParameter from pycqed.utilities.general import add_suffix_to_dict_keys from pycqed.measurement import detector...
from __future__ import with_statement import unittest import tempfile import inspect import shutil import sys import os import re from os.path import abspath, basename, dirname, exists, join, normpath from robot.errors import DataError from robot.utils.importer import Importer, ByPathImporter from robot.utils.asserts ...
from datetime import datetime, timedelta from tzlocal import get_localzone import six from apscheduler.triggers.base import BaseTrigger from apscheduler.triggers.cron.fields import ( BaseField, WeekField, DayOfMonthField, DayOfWeekField, DEFAULT_VALUES) from apscheduler.util import datetime_ceil, convert_to_datet...
from .. utils import TranspileTestCase, UnaryOperationTestCase, BinaryOperationTestCase, InplaceOperationTestCase class ListTests(TranspileTestCase): def test_setattr(self): self.assertCodeExecution(""" x = [1, 2, 3] try: x.attr = 42 except AttributeErro...
""" Dynamically generated set of TestCases based on set of yaml files decribing some integration tests. These files are shared among all official Elasticsearch clients. """ import re from os import walk, environ from os.path import exists, join, dirname, pardir import yaml from elasticsearch import TransportError from...
# # Copyright (c) 2010-2014, MIT Probabilistic Computing Project # # Lead Developers: Dan Lovell and Jay Baxter # Authors: Dan Lovell, Baxter Eaves, Jay Baxter, Vikash Mansinghka # Research Leads: Vikash Mansinghka, Patrick Shafto # # Licensed under the Apache License, Version 2.0 (the "License"); # you may...
from presenter import * import wiki import sys from outbuffer import * from visitor import * from entities import SpecificEnabler, DeprecatedSpecificEnabler, Application, PrettyPrinter import logging from fidoc import FIdoc def generate_page(dw, outpage, meta): # out = FileBuffer(outfile) out = PageBuffer(dw, ou...
"""Implementation of the cache provider.""" # This plugin was not named "cache" to avoid conflicts with the external # pytest-cache version. import json import os from pathlib import Path from typing import Dict from typing import Generator from typing import Iterable from typing import List from typing import Optional...
r""" Greb is a command line tool to find meaning of words. Usage: greb (<WORD> [-leyn] [-h | --help] | -d | -t | -w) Options: -l --all Lists everything -e --sen Lists sentence -y --syn Lists synonyms -n --ant Lists antonyms -d --rdm Displays a random from search...
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test REST interface # from test_framework.test_framework import BitcoinTestFramework from test_fram...
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license """ IPv4 (Internet Protocol v4). """ import os,time,struct,re,socket,new from select import select from collections impo...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 compli...
import json import logging from builtins import str from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.sites.shortcuts import get_current_site from django.core.cache import cache from django.core.exceptions import ObjectDoesNotExist from django.core.exception...
# Copyright 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 agr...
import os.path import tornado import tornado.auth import markdown import re from gblog import config from gblog import utils from gblog.handlers.basehandler import BaseHandler class HomeHandler(BaseHandler): """Handle URL '/'. Subclass of BaseHandler and RequestHandler, support standard GET/POST metho...
import numpy as np import py_paddle.swig_paddle as api from paddle.proto.ParameterConfig_pb2 import ParameterConfig import struct import tarfile import cStringIO from topology import Topology __all__ = ['Parameters', 'create'] def create(layers): """ Create parameter pool by topology. :param layers: ...
############################################################################### # Server process to keep track of unlinked resources (like shared memory # segments, semaphores etc.) and clean them. # # On Unix we run a server process which keeps track of unlinked # resources. The server ignores SIGINT and SIGTERM and r...
from math import sqrt, pi, sin, cos import numpy as np from lib.fourier import direct_f, inverse_f from lib import cmbplot L_max_field = 4 L_max_polynom = 4 L_max_back = 4 N = 32 def coef_1(in_l, in_m): if in_l != 0: return sqrt((in_l - in_m) * (2.0 * in_l + 1.0) / ((in_l + in_m) *...
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
# The following comment should be removed at some point in the future. # mypy: strict-optional=False import functools import logging import os import shutil import sys import uuid import zipfile from typing import Any, Collection, Dict, Iterable, List, Optional, Sequence, Union from pip._vendor.packaging.markers impo...
########################################################################## # # Copyright (c) 2008-2015, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redis...
# Copyright (c) 2016 Zadara Storage, 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 ...
import inspect import mixins from xml.etree import ElementTree as ET def capfirst(s): return s[0].upper() + s[1:] _mixin_classes = None def load_mixin_classes(): return dict(inspect.getmembers(mixins, inspect.isclass)) def get_mixin_classes(): global _mixin_classes if _mixin_classes is None: ...
# ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (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.mozilla.org/MPL/ # # Softwa...
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: david@reciprocitylabs.com # Maintained By: david@reciprocitylabs.com from collections import namedtuple from flask import g from flask.ext.login im...
# -*- coding: utf-8 -*- # # Copyright 2017 dpa-infocom GmbH # # 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...
"""Predict Stellar Mass Function including scatter in the Stellar-Halo-Mass relation. Plot results in file 'HaloMassFunctions.pdf'. """ #----------------------------------------------------------------------------- # Kenza Arraki (https://github.com/karraki), September 2014 #-------------------------------------------...
# 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...
# -*- coding: utf-8 -*- from sqlalchemy import event from slugify import slugify from flask import current_app as app from flask import url_for from flask_editablesite.database import ( Column, db, Model, SurrogatePK, Slugged, TimeStamped, Confirmable, update_slug_before_save, upda...
"""An implementation of the Zephyr Abstract Syntax Definition Language. See http://asdl.sourceforge.net/ and http://www.cs.princeton.edu/~danwang/Papers/dsl97/dsl97-abstract.html. Only supports top level module decl, not view. I'm guessing that view is intended to support the browser and I'm not interested in the br...
import numpy as np llf = np.array([-240.21658671417]) nobs = np.array([ 202]) k = np.array([ 4]) k_exog = np.array([ 1]) sigma = np.array([ .79473430527544]) chi2 = np.array([ 54633.096432541]) df_model = np.array([ 3]) k_ar = np.array([ 2]) k...
#!/usr/bin/python # File: start_client.py ; This file is part of Twister. # version: 2.011 # Copyright (C) 2012-2013 , Luxoft # Authors: # Adrian Toader <adtoader@luxoft.com> # Andrei Costachi <acostachi@luxoft.com> # Andrei Toma <atoma@luxoft.com> # Cristi Constantin <crconstantin@luxoft.com> # Dani...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # # Basic object model for an Impala cluster. Basic model is an "Impala Service" which # represents a collection of ImpalaD processes and a State Store service. The Impala # service is associated with an ImpalaCluster which has information o...